Re: trouble migrating from 6.3.2 (IRIX) to 7.0.2 (Linux) - Mailing list pgsql-general

From George Armhold
Subject Re: trouble migrating from 6.3.2 (IRIX) to 7.0.2 (Linux)
Date
Msg-id 3A1D0500.9D8BDAD4@cs.rutgers.edu
Whole thread Raw
In response to trouble migrating from 6.3.2 (IRIX) to 7.0.2 (Linux)  (George Armhold <armhold@cs.rutgers.edu>)
Responses Re: trouble migrating from 6.3.2 (IRIX) to 7.0.2 (Linux)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane wrote:

> > CREATE TABLE pfam (swiss_id varchar(16) NOT NULL, pfam_family
> > varchar(32), comment varchar(80), sequence_data varchar(-5));
>
> Hrm.  varchar(-5) is pretty obviously broken :-(.  I don't want to
> guess what sort of aberration prompted that output from pg_dump
> --- 6.3.2 is before my time with Postgres.  Try editing the dump
> file to have a more reasonable value for the varchar max width,
> and see how it goes...

Hmm, I seem to be getting negative values for tables that were created
without a maximum char length.  Is (was) it legal postgres syntax to
say something like

   create table foo (mytext varchar);

without a maximum length constraint?  psql (or perhaps the Perl
interface) let me create such tables under 6.5.3 and they've worked
fine, up until this pg_dump.   Would it be safe to simply edit the
dumped file, change the negative values to something reasonable and
reload the DB?

Thank you for your assistance.


--
George Armhold
Rutgers University
Bioinformatics Initiative

pgsql-general by date:

Previous
From: Colin Taylor
Date:
Subject: Trouble With Strings
Next
From: "Enrico Comini"
Date:
Subject: MS-ACCESS -> PGSQL