Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id D61D92E3348 for ; Thu, 10 Jan 2008 10:13:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 49152-08 for ; Thu, 10 Jan 2008 10:12:40 -0400 (AST) Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id BBAA32E3137 for ; Thu, 10 Jan 2008 10:12:51 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-101-79.bk7-dsl.surnet.cl [200.126.101.79]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m0AECqK5018552 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 10 Jan 2008 06:12:55 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id F01C547BCC; Thu, 10 Jan 2008 11:12:43 -0300 (CLST) Date: Thu, 10 Jan 2008 11:12:43 -0300 From: Alvaro Herrera To: johnf Cc: pgsql-admin@postgresql.org Subject: Re: find the sequence name from schema, table, field Message-ID: <20080110141243.GB6465@alvh.no-ip.org> References: <200801092329.31115.jfabiani@yolo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200801092329.31115.jfabiani@yolo.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Thu, 10 Jan 2008 06:12:57 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/102 X-Sequence-Number: 27876 johnf wrote: > I have to go to the well and ask you guys how in the he_l I can determine the > sequence name if I only have the schema name (normally 'public'), the table > name, and the field name (normally the PK). pg_get_serial_sequence() -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support