Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D32C7476391 for ; Mon, 27 Jan 2003 15:18:29 -0500 (EST) Received: from server.yourfacility.com (server.yourfacility.com [207.103.74.10]) by postgresql.org (Postfix) with SMTP id F380C476AF6 for ; Mon, 27 Jan 2003 15:17:39 -0500 (EST) Received: (qmail 92995 invoked by uid 0); 27 Jan 2003 20:22:30 -0000 Received: from pcp01408378pcs.norstn01.pa.comcast.net (HELO rodk) (68.80.144.23) by server.yourfacility.com with SMTP; 27 Jan 2003 20:22:30 -0000 From: "Rod Kreisler" To: , "Pgsql-Sql@Postgresql. Org" Subject: Re: sequence question Date: Mon, 27 Jan 2003 15:17:38 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/425 X-Sequence-Number: 11290 select relname as table, attname as column from pg_class c join pg_attribute a on c.oid=a.attrelid join pg_attrdef d on a.attnum=d.adnum where adsrc='nextval(\'"SEQUENCE_NAME_SEQ"\'::text)'\ AND d.adrelid=c.oid; There may be a more efficient query, but I wasn't too worried about figuring it out... HTH Rod > -----Original Message----- > From: pgsql-sql-owner@postgresql.org > [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Marie G. Tuite > Sent: Monday, January 27, 2003 3:06 PM > To: Pgsql-Sql@Postgresql. Org > Subject: [SQL] sequence question > > > Hey there, > > Does anybody have a nice way to identify what table.column is using a > particular sequence on a database-wide basis? > > --Thanks. > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > >