How to get the primary key fields from a postgres table

How to get the primary key fields from a postgres table

Postby genriquez » Thu 22 Aug 2013 04:05

Hi

Someone know how to get the primary key fields from a postgres table?

Im working with Delphi XE2 and XE4, DbExpress DevArtPostgres Driver.

I try with

SqlQuery1.SetSchemaInfo(stIndexes,'MyTable','');
SqlQuery1.Open;

But return a list of indexnames, but not the Primary Key Fields.

Thanks.
genriquez
 
Posts: 6
Joined: Tue 27 Nov 2012 17:26

Re: How to get the primary key fields from a postgres table

Postby AlexP » Thu 22 Aug 2013 09:17

Hello,

We cannot reproduce the problem - when executing the provided code, PK is returned correctly. Please specify your driver version and provide the script for creating the table.
AlexP
Devart Team
 
Posts: 5528
Joined: Tue 10 Aug 2010 11:35


Return to dbExpress driver for PostgreSQL