News for hackers. Stuff that matters.
Re:New In Postgres 12: Generated Columns by Mister_Snuggles on Wednesday October 02, 2019 @12:03PM (#21137935)
For most things no, but there are some things you can do that are difficult or impossible to do in an SQL view.

I-Descriptors can call subroutines, which opens them up to doing anything that the underlying UniVerse BASIC runtime can do.

I once made an I-Descriptor which called a subroutine to feed the postal code into a web service that returned the geographic location of that postal code. It also implemented caching so it would only call the service for a postal code once. You could simply list out the file and find customers in a particular geographic region just using the query language.

I'm sure this is do-able using something like PL/Python, but I suspect it would be much more difficult to do it all in-database than how I did it in UniVerse.

Whether doing it this way is a good idea is, of course, up for debate. In a modern application I wouldn't dream of doing this on the fly in a view. Just because I could build it the way I did doesn't mean it was a good idea.

There are no comments on this comment yet.