Re: Error class not found - Mailing list pgsql-general

From Darko Prenosil
Subject Re: Error class not found
Date
Msg-id 003501c207d9$a24c6b10$f600000a@darko
Whole thread Raw
In response to Re: Invalid length of startup packet  (Jan Wieck <janwieck@yahoo.com>)
List pgsql-general
----- Original Message -----
From: "Remi" <gemegesola@retemail.es>
To: <pgsql-general@postgresql.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 !




pgsql-general by date:

Previous
From: Wei Wang
Date:
Subject: Re: erros when making examples in /src/test/examples
Next
From: "Joel Burton"
Date:
Subject: Re: How to pickup null values in SQL Language?