Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tim McAuley <mcauleyt(at)tcd(dot)ie>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)
Date: 2003-09-26 20:57:28
Message-ID: 27373.1064609848@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-jdbc

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> scott.marlowe writes:
>> but I get basically the same thing if I dump it to a .sql file and do:
>> psql dbname <dbname.sql

> Use psql -f dbname.sql instead.

This doesn't seem like a good argument not to add more information to
the CONTEXT line for COPY errors. Sure, in theory the existing info
should be sufficient, but what if the information is not coming in
through psql? (For instance, maybe the COPY data is being generated
on-the-fly by some other program.) Or what if the dump file is so large
you can't easily edit it to determine which line number is in question?
There are plenty of scenarios where it's not all that convenient to
triangulate on a problem from outside information. Minimalism isn't
really a virtue in error reports anyway.

I'm thinking maybe:

CONTEXT: COPY tablename, line 41: "data ..."

would serve the purpose nicely.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-09-26 21:14:36 Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)
Previous Message scott.marlowe 2003-09-26 20:56:31 Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-26 21:14:36 Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)
Previous Message scott.marlowe 2003-09-26 20:56:31 Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2003-09-26 21:14:36 Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)
Previous Message scott.marlowe 2003-09-26 20:56:31 Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)