I have a table that consists of some PostGIS related data. These data are generated automatically on INSERT or UPDATE. Sometimes the data provided on the polygon column might not fit the generation function and cause an error. I wanted to handle this error and set a default value when it fail. — Last resort options — Creating postgres functions
Tag: generated-columns
PostgreSQL Generated Column from a JSONB column with nested values
I have following table with a JSONB column: CREATE TABLE movies ( contributors JSONB ); The data in the column looks like this: INSERT INTO movies (contributors) VALUES(‘[ {“last_name”: “…
Computed / calculated / virtual / derived columns in PostgreSQL
Does PostgreSQL support computed / calculated columns, like MS SQL Server? I can’t find anything in the docs, but as this feature is included in many other DBMSs I thought I might be missing something. Eg: http://msdn.microsoft.com/en-us/library/ms191250.aspx Answer Up to Postgres 11 generated columns are not supported – as defined in the SQL standard and implemented by some RDBMS including