is there a way to export PostgreSQL 11 database and import it into YugaByteDB without manual intervention? I dumped PostgreSQL database using pg_dump, but YugaByteDB does not support adding keys and indexes after a table is created (ALTER TABLE xxxx ADD CONSTRAINT). Since that is the way pg_dump dumps a database it would make me edit resulting SQL file manualy or write a script to convert all CREATE TABLE commands to add constraints and than rearange the dump in order for dependencies to be satisfied.
Is there a better way to do it?
I made a program to dump PostgreSQL schema and it works OK except for this issue:
I have a column named order and when importing schema I am getting this error:
ERROR: syntax error at or near "order"
LINE 3: order integer ,
ORDER is a reserved word in SQL, and this is expected behavior. To use a reserved word as a column name, you’d have to double-quote it: "order" integer