Skip to content
Discussion options

You must be logged in to vote

I cannot test it in the exactly same setting with a different postgres version. I could test it locally on my laptop later.

However, I think the reason for the error is that GENERATED ALWAYS AS ... STORED is not supported by postgres 11. I looked at the postgres docu and it seems to be supported by Version 12+, see https://www.postgresql.org/docs/12/sql-altertable.html. For version 12 it says:

and column_constraint is:

[ CONSTRAINT constraint_name ]
{ NOT NULL |
  NULL |
  CHECK ( expression ) [ NO INHERIT ] |
  DEFAULT default_expr |
  GENERATED ALWAYS AS ( generation_expr ) STORED |
  GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ] |
  UNIQUE index_parameters |
 …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ibe-314
Comment options

Answer selected by vinckr
@vinckr
Comment options

@ibe-314
Comment options

@vinckr
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants