Re: SQL INSERT/TRIGGER Help

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Poovendran Moodley <poovenm(at)gmail(dot)com>
Cc: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL INSERT/TRIGGER Help
Date: 2007-12-10 14:08:05
Message-ID: 20071210140805.GD8036@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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"

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Scott 2007-12-11 04:23:52 Insert Rule, Multiple Insert, Update Problem
Previous Message Stefan Scheidegger 2007-12-10 13:21:13 Re: INSERT INTO relational tables