pg_dump error

From: "Jose' Soares Da Silva" <sferac(at)bo(dot)nettuno(dot)it>
To: hackers postgres <pgsql-hackers(at)PostgreSQL(dot)org>
Cc: bugs postgres <pgsql-bugs(at)PostgreSQL(dot)org>
Subject: pg_dump error
Date: 1998-05-19 12:24:31
Message-ID: Pine.LNX.3.96.980519120411.820A-100000@proxy.bazzanese.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi all,

I think there's an error on pg_dump,
my environment is:
Lynux 2.0.33
PostgreSQL 6.3

1) ----VARCHAR(-50)------------------------------------------

I created a table as:
CREATE TABLE utente (
intestazione_azienda varchar,
indirizzo varchar
);

using pg_dump -d mydatabase > file

file is like:
\connect - postgres
CREATE TABLE utente (intestazione_azienda varchar(-5), indirizzo varchar(-5));

if I try to load it using
psql -d mydatabase < file
I have this:

ERROR: length for 'varchar' type must be at least 1

2) ----CONSTRAINT--------------------------------------------

I created a table like:

CREATE TABLE attivita_a (
azienda CHAR(11) NOT NULL,
attivita CHAR(03) NOT NULL,
operatore CHAR(03),
vet_esterno VARCHAR(45),
tipo_allevamento1 CHAR(02),
tipo_allevamento2 CHAR(02),
esonerato CHAR CHECK(esonerato = 'S' OR esonerato = 'N'),
razza_prevalente1 CHAR(03),
razza_prevalente2 CHAR(03),
iscrizione_libro DATE,
iscritta_funzionali CHAR CHECK(iscritta_funzionali = 'S' OR iscritta_funzionali = 'N'),
iscritta_tutela CHAR CHECK(iscritta_tutela = 'S' OR iscritta_tutela = 'N'),
sigla_tutela CHAR(04),
adesione_altri_piani VARCHAR(50),
data_adesione DATE,
PRIMARY KEY (azienda,attivita)
);

using pg_dump I have this:

\connect - postgres
CREATE TABLE attivita_a (
azienda char(11) NOT NULL,
attivita char(3) NOT NULL,
operatore char(3),
vet_esterno varchar(45),
tipo_allevamento1 char(2),
tipo_allevamento2 char(2),
esonerato char,
razza_prevalente1 char(3),
razza_prevalente2 char(3),
iscrizione_libro date,
iscritta_funzionali char,
iscritta_tutela char,
sigla_tutela char(4),
adesione_altri_piani varchar(50),
data_adesione date)
CONSTRAINT attivita_a_esonerato CHECK esonerato = 'S' OR esonerato = 'N',
CONSTRAINT attivita_a_iscritta_funzionali CHECK iscritta_funzionali = 'S' OR iscritta_funzionali = 'N',
CONSTRAINT attivita_a_iscritta_tutela CHECK iscritta_tutela = 'S' OR iscritta_tutela = 'N';
--
Note that CONSTRAINTs are the wrong syntax, they are defined after the close
parenthesis of CREATE TABLE.

3)----VIEWS-------------------------------------------------
I have some views on my database but seems that pg_dump doesn't see those
views.
Jose'

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Heflin 1998-05-19 14:09:52 Re: [GENERAL] extracting date information?
Previous Message Jose' Soares Da Silva 1998-05-19 09:58:48 Re: [GENERAL] extracting date information?

Browse pgsql-hackers by date

  From Date Subject
Next Message Gran Thyni 1998-05-19 12:29:50 Re: [HACKERS] Query cancel and OOB data
Previous Message Michael Meskes 1998-05-19 10:36:09 Anyone seen gtksql?