Re: ecpg - GRANT bug

Lee Kindness <lkindness@csl.co.uk>

From: Lee Kindness <lkindness@csl.co.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Lee Kindness <lkindness@csl.co.uk>, pgsql-hackers@postgresql.org, Michael Meskes <meskes@postgresql.org>, Bruce Momjian <pgman@candle.pha.pa.us>
Date: 2001-10-15T14:32:27Z
Lists: pgsql-bugs, pgsql-hackers
Tom Lane writes:
 > Lee Kindness <lkindness@csl.co.uk> writes:
 > > The existing code in ecpg/preproc/preproc.y to handle the WITH option
 > > simply throws an error and aborts the processing... The patch below
 > > prevents the segfault and also passes on the WITH option to the
 > > backend, probably a better fix.
 > I agree.  It shouldn't be ecpg's business to throw errors on behalf of
 > the backend, especially not "not yet implemented" kinds of errors.
 > That just causes ecpg to be more tightly coupled to a particular backend
 > version than it needs to be.

In which case a number of other cases should be weeded out of
parser.y and passed onto the backend:

 CREATE TABLE:    GLOBAL TEMPORARY option.
 CREATE FUNCTION: IN/OUT/INOUT options (note there's a bug in parser.y
                  there anyway, it would pass on 'oinut' for INOUT).
 COMMIT:          AND [NO] CHAIN options? Where do these come from,
                  it's not ANSI (i'd probably leave this one).

Perhaps an ET_NOTICE should still be output however...

Let me known if you want a patch for these cases too.

Regards, Lee Kindness.