From: | Philip Hallstrom <philip(at)adhesivemedia(dot)com> |
---|---|
To: | MT <mt(at)open2web(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: sequenc_name.currval not defined |
Date: | 2002-11-21 23:07:35 |
Message-ID: | 20021121150727.Q72914-100000@cypress.adhesivemedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
you have to call nextval() before you can use currval().
On Thu, 21 Nov 2002, MT wrote:
> Hi,
>
> I keep on getting the following error when I attempt to insert a new record:
>
> SELECT * FROM table_name WHERE tableid = currval('tableid_seq');
>
> PostgreSQL said: ERROR: tableid_seq.currval is not yet defined in this
> session.
>
> What's weird about this problem is that I have a script that
> successfully performs this action.
>
> Thanks for your help,
>
> Mark
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
From | Date | Subject | |
---|---|---|---|
Next Message | Doug McNaught | 2002-11-21 23:31:52 | Re: how do i find out when a record was created/modified? |
Previous Message | scott.marlowe | 2002-11-21 23:07:20 | Re: sequenc_name.currval not defined |