470,579 Members | 2,175 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,579 developers. It's quick & easy.

How to know column constraints via system catalog tables

Hi,

I need to query each column's constraint and name of a table in
postgreSQL v7.3.4 with a single SQL query but don't know how. Would
appreciate any pointers!

Thank you.

Regards,
Damon
Nov 12 '05 #1
1 2392
Ok I realise now to look for it using the pg_constraint and pg_class.
But the conkey in pg_constraint uses int2[] datatype. So if I have a
primary key made up of 2 columns then the conkey can return something
like {1,2}. I wonder how can i store this in my C++ data type? Is
there an equivalent? Thank you.

so********@excite.com (Damon) wrote in message news:<15**************************@posting.google. com>...
Hi,

I need to query each column's constraint and name of a table in
postgreSQL v7.3.4 with a single SQL query but don't know how. Would
appreciate any pointers!

Thank you.

Regards,
Damon

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Shino | last post: by
5 posts views Thread by Robert Stearns | last post: by
reply views Thread by BobTheDatabaseBoy | last post: by
4 posts views Thread by Frank | last post: by
2 posts views Thread by Scott Goodwin | last post: by
2 posts views Thread by RamaKrishna Narla | last post: by
5 posts views Thread by sameer_deshpande | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.