Re: ecpg leaves broken files around

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Michael Meskes <meskes(at)postgresql(dot)org>, PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ecpg leaves broken files around
Date: 2007-06-11 08:03:57
Message-ID: 20070611080357.GB26892@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 11, 2007 at 08:05:16AM +0200, Michael Meskes wrote:
> On Sun, Jun 10, 2007 at 09:56:44PM +0200, Magnus Hagander wrote:
> > AFAIK, most other compilers delete their output if it's not valid. Is
> > there any particular reason why ecpg doesn't do this?
>
> No, not really. Sometimes it comes handy to see what was already
> processed, but you're right, it's not what I would expect from a
> compiler either.
>
> Any objects changing this behaviour?

Certainly not from me :)

If you find the other behaviour useful, perhaps add a commandline switch
that makes it leave the file around? Just make the
remove-the-file-on-failure default.

Oh, and it seems if you want to keep the feature, it needs fixing. It looks
like ecpg doesn't flush/close the file descriptor before error-exit, so the
file that drops out isn't even complete up to the point of error. At least
that's what it looks like from a quick glance - it ends mid-row on
something that's not related to the error itself.

//Magnus

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2007-06-11 08:33:16 ToDO, support UPDATE/DELETE WHERE CURRENT OF cursor_name in plpgsql
Previous Message Greg Smith 2007-06-11 07:51:51 Re: Controlling Load Distributed Checkpoints