Cases
1) Add column => No difference if NOT NULL and/or DEFAULT are not present
2) Add column with default and/or not null => multiple postgresql statements, drop encoding.
i) If NOT NULL and no default -> throw
ii) If default is function with params => throw
3) Rename table => jsql? No difference
4) Rename column => jsql? No difference
5) Drop column => jsql? No difference
6) Add Contrainst => No difference
7) Drop Constraint => No difference
8) Alter column add foreign key -> need to ADD CONSTRAINT somethingfk : But this does not work in a transaction. Dropping as it is not enforced by Redshift
(Changed in version 2.9.0) The p0 call-by-name arguments is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.
Created by frankfarrell on 01/03/2018.
Converts redshift alter table to postgres equivalents
https://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE.html#r_ALTER_TABLE-synopsis
> https://www.postgresql.org/docs/9.1/static/sql-altertable.html
Cases 1) Add column => No difference if NOT NULL and/or DEFAULT are not present 2) Add column with default and/or not null => multiple postgresql statements, drop encoding. i) If NOT NULL and no default -> throw ii) If default is function with params => throw 3) Rename table => jsql? No difference 4) Rename column => jsql? No difference 5) Drop column => jsql? No difference 6) Add Contrainst => No difference 7) Drop Constraint => No difference 8) Alter column add foreign key -> need to ADD CONSTRAINT somethingfk : But this does not work in a transaction. Dropping as it is not enforced by Redshift