Skip site navigation (1) Skip section navigation (2)

nextval problem

From: "Ivo Anon" <ivoa72(at)hotmail(dot)com>
To: "pgsql-novice(at)postgresql(dot)org(dot)pgsql-sql"(at)postgresql(dot)org
Subject: nextval problem
Date: 2004-02-13 01:54:21
Message-ID: h7WWb.13725$2Z2.1853@amsnews05.chello.com (view raw or flat)
Thread:
Lists: pgsql-novicepgsql-sql
I'm new to postgresql and I'm having problems with the 'nextval' function
(or whatever it is called in postgresql).

I created a table (called ADDRESS) using 'pgadmin' which has a serial field
(called addressid). When I tried the sql statement:

        select nextval('public."ADDRESS_addressid_seq"')

everything seemed to be working fine.

I then used the create table statement (displayed in pgadmin when the table
'ADDRESS' is selected) to create the same table (of course after first
dropping 'ADDRESS'). When I try the same select-statement I suddenly got an
error message saying:

        ERROR:  Relation "public"."ADDRESS_addressid_seq" does not exist

Can anybody help me with this problem?



Responses

pgsql-novice by date

Next:From: beyaNet ConsultancyDate: 2004-02-13 09:23:41
Subject: test
Previous:From: Lynn.TilbyDate: 2004-02-12 23:55:44
Subject: Re: "NULL value without indicator"

pgsql-sql by date

Next:From: David WithamDate: 2004-02-13 02:30:10
Subject: Index question
Previous:From: owDate: 2004-02-13 01:22:53
Subject: Re: 7.4 - FK constraint performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group