I have managed to get the table I need thanks to the question: postgres copy tables
sudo pg_dump -i -h server-address -p 5432 -U postgres -t product_attribute_line -F p -b -v -f "product_attribute_line.sql" database-name
My problem comes when I do
psql -d database -U postgres -f product_attribute_line.sql
, and the error is that it is already created:
psql:product_attribute_line.sql:1486: ERROR: constraint "product_attribute_line_write_uid_fkey" for relation "product_attribute_line" already exists
It would be easier if you could delete it to create it again, but the problem is that if I delete it the database will no longer work.
I tried to do insert into
but I can not get it to work, it does not work when doing an import / export with pg_admin. Any ideas?
Thank you.