Closed diegosardina closed 3 years ago
Why closed?
Some tests were failing and I wasn't able to fix them in time, just need a bit more time and I will do a new pull request :-)
However one of the problem was with pg_get_serial_sequence()
that needed to be guarded in some cases (and by quoting the table name with quote_ident() ).
If you are interested in reviewing it I will ping you when it's ready
Please do not open a new pull request, always edit the current one.
Does it cause problems? Unfortunately I deleted the old branch :-\
Since PostgreSQL 10, identity columns are recommended instead of serial types as stated in the documentation (and serial types are even discouraged here).
Database Explorer doesn't recognise identity columns. Just adding
a.attidentity = ANY (ARRAY['a', 'd'])
does the trick.A note about the last line in the change: With an auto increment column created in the correct way (by specifying SERIAL or IDENTITY) using
pg_get_serial_sequence()
is enough. However serial types can be created manually, but if the sequence is created without OWNED BY (e.g. Doctrine), that procedure returns null. I left the previous one to avoid breakage but since IDENTITY can't be created manually (and that procedure is the only way to get the sequence name in this case), in the future justpg_get_serial_sequence()
is the way.