Re: Error class not found

From: "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>
To: "Remi" <gemegesola(at)retemail(dot)es>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error class not found
Date: 2002-05-30 12:57:53
Message-ID: 003501c207d9$a24c6b10$f600000a@darko
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


----- Original Message -----
From: "Remi" <gemegesola(at)retemail(dot)es>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Wednesday, May 29, 2002 9:49 PM
Subject: [GENERAL] Error class not found

> Y have import a table of PostgreSQL 7.0.3 in the PostgreSQL 7.2.1 with
> PhpPgAdmin and a file.sql below:
> -----------------------------------------------------------
> CREATE TABLE "mensajes" (
> "mensajeid" int4 DEFAULT nextval('mensajes_mensajeid_seq'::text) NOT
> NULL,
> "usuarioid" int4 NOT NULL,
> "fechacreacion" timestamp NOT NULL,
> "asunto" varchar(255) NOT NULL,
> "cuerpo" text NOT NULL,
> CONSTRAINT "mensajes_pkey" PRIMARY KEY ("mensajeid")
> );
> CREATE INDEX "mensajes_usuarioid_key" ON "mensajes" ("usuarioid");

If You use sintax "int4 DEFAULT nextval" instead of "SERIAL" this means that
you need also to CREATE SEQUENCE by Your self. When SERIAL sintax is used,
server
automaticaly creates this sequence for you. You can find more about it in
the documentation.

What You did is "View dump (schema) of table" from phpPgAdmin, and that dump
shows only
dump of that table.
If You try to execute "View dump (schema) of database" from phpPgAdmin,
somewhere in the dump
You will find :

CREATE SEQUENCE "mensajes_mensajeid_seq" start 1 increment 1 maxvalue
9223372036854775807 minvalue 1 cache 1;

You need to execute this line too against database, and things will work
just fine.

Regards !

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joel Burton 2002-05-30 13:06:28 Re: How to pickup null values in SQL Language?
Previous Message Wei Wang 2002-05-30 12:53:19 Re: erros when making examples in /src/test/examples