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

Reply via email to