Re: ecpg - GRANT bug

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ecpg - GRANT bug
Date: 2001-10-18 10:54:41
Message-ID: 20011018125441.A32556@feivel.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

[Sorry, for the late replies, but I was on the road since Sunday.]

On Mon, Oct 15, 2001 at 10:10:40AM -0400, Tom Lane wrote:
> Lee Kindness <lkindness(at)csl(dot)co(dot)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.

Yes, that of course is better. Sorry, I simply didn't see this either.

> 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.

I beg to disagree.

> That just causes ecpg to be more tightly coupled to a particular backend
> version than it needs to be.

Sure, but it also makes sure you get the error message at compile time
rather than at run time. If this is not how ecpg should work, there is no
need to use this complex parser at all. I could simply accept all sql
statements and let the backend decide which one it accepts.

But for the user this is not a good idea IMO. I don't like running a program
to debug syntax.

Michael
--
Michael Meskes
Michael(at)Fam-Meskes(dot)De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Meskes 2001-10-18 10:58:31 Re: ecpg - GRANT bug
Previous Message pgsql-bugs 2001-10-18 10:13:45 Bug #487: Erroneus values of BOOLEANS

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2001-10-18 10:58:31 Re: ecpg - GRANT bug
Previous Message Alessio Bragadini 2001-10-18 10:10:03 Re: How do I get a list of DB's or Tables with a postgres SQL statement?