TPGDump generate error on Postgresql 10.2

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
LeonardU
Posts: 3
Joined: Tue 11 Dec 2018 07:52

TPGDump generate error on Postgresql 10.2

Post by LeonardU » Tue 11 Dec 2018 07:57

I called the method PGDump.BackupToFile.
When it tries to save the sequences it gives the following error:
"Column increment_by does not exists!"

The postgresql version of the database is 10.2.

I have the last version by this time of this set of components: PgDac 5.3.8.

How should I save correctly the entire database (including sequences), using this component?

azyk
Devart Team
Posts: 1115
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TPGDump generate error on Postgresql 10.2

Post by azyk » Wed 12 Dec 2018 11:27

You can see the sample of using TPgDump in PgDacDemo project, which is located in the folder '\Demos\PgDacDemo' relatively the path where PgDAC demos were installed.

More details about TPgDump in our online documentation: https://www.devart.com/pgdac/docs/pgdump.htm

If the error persists, create a dump of the test database using the standard utility pg_dump. Then use the contact form at our site: https://www.devart.com/company/contactform.html and send this dump.

LeonardU
Posts: 3
Joined: Tue 11 Dec 2018 07:52

Re: TPGDump generate error on Postgresql 10.2

Post by LeonardU » Thu 13 Dec 2018 09:48

Thanks for answering. In the PgDacDemo project, tPgDump is used only for tables (and not for SEQUENCES). So this demo is not helping me at all.

Maybe it's a bug, because sequences are saved correctly in a Postresql 9 database. The error is generated on a Postgresql 10 database.

Until this error is resolved, I'm back at using the classic pg_dump command for saving the entire database.

Best regards,
Leonard

PS: I cannot send the dump in the contact form because it's very large database.

azyk
Devart Team
Posts: 1115
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TPGDump generate error on Postgresql 10.2

Post by azyk » Thu 13 Dec 2018 12:59

Please provide us with CREATE table script (PostgreSQL 10.2) to reproduce the 'Column increment_by does not exists!' error using TPgDump.

LeonardU
Posts: 3
Joined: Tue 11 Dec 2018 07:52

Re: TPGDump generate error on Postgresql 10.2

Post by LeonardU » Wed 09 Jan 2019 14:22

Currently i don't have access to the postgresql 10.2 database, but there is no need to send you this script. Just create a sequence in any postgresql 10.2 database, and then try to dump the entire database (including sequences).
Here is an example of a create sequence script:

Code: Select all

CREATE SEQUENCE test_serial;
Thanks.

azyk
Devart Team
Posts: 1115
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TPGDump generate error on Postgresql 10.2

Post by azyk » Fri 11 Jan 2019 09:17

In order for TPgDump to back up SEQUENCE in the database, set the doSequences property to True. For example:

Code: Select all

PgDump.ObjectTypes := PgDump.ObjectTypes + [doSequences];
More about TPgDump.ObjectTypes: https://www.devart.com/pgdac/docs/devar ... types.htm

Post Reply