pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nico <haegens_nico@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: Relation "autonummeringl2" does not exist
Date: Sat, 22 Jan 2005 14:03:40 +0100
Message-ID: <cstivp$2jcd$1@news.hub.org> (raw)

Hello,
as I have told, I am making a servlet that generates a menu and one that 
changes it(deleting, adding & updating items). However it returns an error:
Relation "autonummeringl2" does not exist
autonummeringL2 is the name of a sequence that raises a field by 1 each time 
it is called. Any suggestions are welcome.

Nico.

Here is the table creation sql:
 CREATE TABLE "tblMenuL2" (
    "MenuL2ID" integer DEFAULT nextval('autonummeringL2'::text) NOT NULL,
    "MenuL1ID" integer NOT NULL,
    "MenuL2Name" character varying(50) NOT NULL,
    "MenuL2Page" character varying(50),
    "MenuL2Order" smallint NOT NULL
);
ALTER TABLE ONLY "tblMenuL2"
    ADD CONSTRAINT "pkMenuL2ID" PRIMARY KEY ("MenuL2ID");
ALTER TABLE ONLY "tblMenuL2"
    ADD CONSTRAINT "fkMenuL1ID" FOREIGN KEY ("MenuL1ID") REFERENCES 
"tblMenuL1"("MenuL1ID") ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE ONLY "tblMenuL2"
    ADD CONSTRAINT "MenuL2Volgorde" UNIQUE ("MenuL2ID", "MenuL1ID");

Here is the update query & insert. It happens during the insert query.:
UPDATE "tblMenuL2" SET "MenuL2Order"="MenuL2Order"+1 WHERE "MenuL2Order">=5; 
INSERT INTO "tblMenuL2"("MenuL1ID", "MenuL2Name", "MenuL2Page", 
"MenuL2Order") VALUES(1, 'naam', 'pagina', 5); 





view thread (3+ messages)  latest in thread

Message-ID: <cstivp$2jcd$1@news.hub.org>
Permalink:  ../cstivp$2jcd$1@news.hub.org/
Also on:    postgresql.org/message-id/cstivp$2jcd$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: haegens_nico@yahoo.com
  Subject: Re: Relation "autonummeringl2" does not exist
  In-Reply-To: <cstivp$2jcd$1@news.hub.org>
  References: <cstivp$2jcd$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox