Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 8ED6D2E2D3B for ; Mon, 10 Dec 2007 10:08:20 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 75160-03 for ; Mon, 10 Dec 2007 10:08:06 -0400 (AST) Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 0F7E82E025D for ; Mon, 10 Dec 2007 10:08:16 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-109-160.bk7-dsl.surnet.cl [200.126.109.160]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id lBAE87dA009970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Dec 2007 06:08:10 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id B972C47C7F; Mon, 10 Dec 2007 11:08:05 -0300 (CLST) Date: Mon, 10 Dec 2007 11:08:05 -0300 From: Alvaro Herrera To: Poovendran Moodley Cc: "A. Kretschmer" , pgsql-sql@postgresql.org Subject: Re: SQL INSERT/TRIGGER Help Message-ID: <20071210140805.GD8036@alvh.no-ip.org> References: <20071210064425.GA917@a-kretschmer.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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]); Mon, 10 Dec 2007 06:08:10 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/39 X-Sequence-Number: 29731 Poovendran Moodley escribió: > I'm not really sure how to the *currval() *method. I've read up on it and I > noticed it works with *nextval()* and *setval()*. The parameter for * > currval()* is a regex - is there a regex to represent the most recently > automatically generated number ( i.e. a serial field)? It's not a regex. I assume you are confused because it says "regclass". This is shorthand for "registered class" (where "class" is a synonymous for "relation", in this case a sequence). -- Alvaro Herrera http://www.amazon.com/gp/registry/5ZYLFMCVHXC "La felicidad no es mañana. La felicidad es ahora"