On 4/4/17, Vitaly Burovoy <vitaly.buro...@gmail.com> wrote: > On 4/3/17, Peter Eisentraut <peter.eisentr...@2ndquadrant.com> wrote: >> On 3/30/17 22:57, Vitaly Burovoy wrote: >>> Why do you still want to leave "ADD IF NOT EXISTS" instead of using >>> "SET IF NOT EXISTS"? >>> If someone wants to follow the standard he can simply not to use "IF >>> NOT EXISTS" at all. Without it error should be raised. >> >> As I tried to mention earlier, it is very difficult to implement the IF >> NOT EXISTS behavior here, because we need to run the commands the create >> the sequence before we know whether we will need it. > > I understand. You did not mention the reason. > But now you have the "get_attidentity" function to check whether the > column is an identity or not. > If it is not so create a sequence otherwise skip the creation. > > I'm afraid after the feature freeze it is impossible to do "major > reworking of things", but after the release we have to support the > "ALTER COLUMN col ADD" grammar.
So it would be great if you have a time to get rid of "ALTER ... ADD GENERATED" syntax in favor of "ALTER ... SET GENERATED ... IF NOT EXIST" > 3. > It would be better if tab-completion has ability to complete the > "RESTART" keyword like: > ALTER TABLE x1 ALTER COLUMN i RESTART > tab-complete.c:8898 > - COMPLETE_WITH_LIST5("TYPE", "SET", "RESET", "ADD", "DROP"); > + COMPLETE_WITH_LIST5("TYPE", "SET", "RESET", "RESTART", "ADD", "DROP"); Oops. Of course + COMPLETE_WITH_LIST6("TYPE", "SET", "RESET", "RESTART", "ADD", "DROP"); -- Best regards, Vitaly Burovoy -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers