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

sequence... my nightmare :-(

From: "Alain Roger" <raf(dot)news(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: sequence... my nightmare :-(
Date: 2008-09-27 15:45:01
Message-ID: 75645bbb0809270845y2d3b9977u3d2765280f5dee12@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
Hi,

i have a schema called : test_survey
i have within this schema this table:
CREATE TABLE test_survey.accounts
(
  "ID" bigint NOT NULL DEFAULT
nextval('test_survey."accounts_ID_seq"'::regclass),
  "login" character varying(300) NOT NULL,
  pwd character varying(100) NOT NULL,
  creation_date timestamp without time zone NOT NULL,
  CONSTRAINT accounts_pkey PRIMARY KEY ("ID")
)
WITH (OIDS=FALSE);
ALTER TABLE test_survey.accounts OWNER TO mysurvey;

and this sequence:
CREATE SEQUENCE test_survey."accounts_ID_seq"
  INCREMENT 1
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 1
  CACHE 1;
ALTER TABLE test_survey."accounts_ID_seq" OWNER TO mysurvey;


when i write the following query i get the error :ERROR:  relation
"accounts_id_seq" does not exist
SET search_path = test_survey;
insert into accounts values
(nextval('accounts_ID_seq'),'test(at)test(dot)com','ab4ef51934f2d3f02f1a','11/19/2007
15:46:09');

why ?

-- 
Alain
------------------------------------
Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

Responses

pgsql-general by date

Next:From: Glyn AstillDate: 2008-09-27 15:59:48
Subject: Re: sequence... my nightmare :-(
Previous:From: Andrew DunstanDate: 2008-09-27 15:05:21
Subject: Re: PostgreSQL future ideas

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