Re: [SQL] Primary key reference count

2006-04-23 Thread Wiebe Cazemier
On Wednesday 19 April 2006 19:21, Volkan YAZICI wrote: > Here's simple query, to list which table's which columns references to a > specific table. (Hope this is what you asked for.) > > SELECT TBL.table_name, COL.column_name > FROM information_schema.referential_constraints AS REF > INNE

Re: [SQL] Primary key reference count

2006-04-19 Thread Volkan YAZICI
On Apr 19 02:01, Wiebe Cazemier wrote: > I'm trying to find which of the tables in pg_catalog contains the amount of > references to a primary key, but I can't seem to find it. Here's simple query, to list which table's which columns references to a specific table. (Hope this is what you asked for

Re: [SQL] Primary key reference count

2006-04-19 Thread Wiebe Cazemier
On Wednesday 19 April 2006 17:00, Wiebe Cazemier wrote: > Never mind. I found another solution. Whoops. Posted to quickly there. I do still need to know the amount of references to the primary key. ---(end of broadcast)--- TIP 1: if posting/readin

Re: [SQL] Primary key reference count

2006-04-19 Thread Wiebe Cazemier
On Wednesday 19 April 2006 15:33, Wiebe Cazemier wrote: > Either I'm blind, or this is not what I'm looking for. I need to know the > amount of references _to_ a primary key. If you have a customer with two > orders and one invoice, the reference count for the primary key of the > custormer would

Re: [SQL] Primary key reference count

2006-04-19 Thread Wiebe Cazemier
On Wednesday 19 April 2006 15:09, A. Kretschmer wrote: > Yes, > http://www.postgresql.org/docs/8.1/interactive/catalog-pg-constraint.html Either I'm blind, or this is not what I'm looking for. I need to know the amount of references _to_ a primary key. If you have a customer with two orders and o

Re: [SQL] Primary key reference count

2006-04-19 Thread A. Kretschmer
am 19.04.2006, um 14:01:03 +0200 mailte Wiebe Cazemier folgendes: > Hi, > > I'm trying to find which of the tables in pg_catalog contains the amount of > references to a primary key, but I can't seem to find it. Google queries are > also less than successful. Is it even stored in the catalog? Y

[SQL] Primary key reference count

2006-04-19 Thread Wiebe Cazemier
Hi, I'm trying to find which of the tables in pg_catalog contains the amount of references to a primary key, but I can't seem to find it. Google queries are also less than successful. Is it even stored in the catalog? ---(end of broadcast)--- TIP