Re: pg_restore (libpq? parser?) bug in 8 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_restore (libpq? parser?) bug in 8
Date
Msg-id 23760.1092281157@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_restore (libpq? parser?) bug in 8  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> At 12:42 PM 12/08/2004, Tom Lane wrote:
>> Hm.  But we could assume that a COPY will be all by itself in a TOC
>> entry, couldn't we?

> Maybe. I know I hit a couple of nasty examples in the original code. Isn't 
> the COPY combined with the data? If so, we still have to scan for it's end. 
> The existing scanner is pretty trivial.

Agreed.  But we only emit dollar quoting in CREATE FUNCTION entries, and
I don't really see why you need to parse those with any accuracy.  I
think we could do something here with making assumptions based on the
known TOC entry type about what might be in it.

> Another possible issue - if I pass two statements in one string to libpq, 
> separated by semicolons, will it cope? If so, has that been true since 7.0? 

Yes, and yes, except that if the first one gets an error the second will
not be executed.  Per the other thread, that's probably a behavior change
we don't want.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Philip Warner
Date:
Subject: Re: dollar-quoting in psql and in general
Next
From: Tom Lane
Date:
Subject: Re: dollar-quoting in psql and in general