Skip site navigation (1) Skip section navigation (2)

Re: ecpg & 8.3 -> 8.4 migration

From: Mark Richardson <markmapo(at)yahoo(dot)com>
To: Bosco Rama <postgres(at)boscorama(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-interfaces(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: ecpg & 8.3 -> 8.4 migration
Date: 2009-11-21 20:49:33
Message-ID: 364366.13082.qm@web53307.mail.re2.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
I'm pretty sure the problem I found is related to this, but I found that ecpg doesn't process booleans correctly- this was in a old version of postgres (I think it was 7.4.2).  I traced it down in the code, and there is a section that defines the values to be "yes" or "no", but then further processing looks for "true" or "false", so the end result is that a boolean is ALWAYS false, because the 2 filters don't match.
 
If you're interested in more detail, I have code fixes (they are at work so I'll send on Monday).
Mark

--- On Fri, 11/20/09, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [INTERFACES] ecpg & 8.3 -> 8.4 migration
To: "Bosco Rama" <postgres(at)boscorama(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, "Michael Meskes" <meskes(at)postgresql(dot)org>
Date: Friday, November 20, 2009, 5:02 PM


Bosco Rama <postgres(at)boscorama(dot)com> writes:
> According to the PG docs 'server' is a *non-reserved*
> keyword.  Does ecpg treat it as a reserved word?

Upon poking around in the ecpg sources, I discover that it has its own
list of "unreserved" keywords and pays no attention whatsoever to the
core grammar's unreserved_keyword list.  I can hardly find words to
express my dissatisfaction with that.  The unreserved_keyword list might
not be the single most-likely-to-change production in the core grammar,
but it's got to be right up there in the top two or three.  This little
shortcut means that all the work done last year to generate the ecpg
grammar from core was practically useless --- we still have to worry
about manually maintaining the ecpg grammar any time we change core.

This has *got* to be fixed.  The lack of obvious feedback about keywords
not included in any keyword list means that manual maintenance is
guaranteed to fail, as indeed it's already done, per this report.

            regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2009-11-21 21:00:00
Subject: Re: Hot standby and removing VACUUM FULL
Previous:From: Pavel StehuleDate: 2009-11-21 20:46:54
Subject: Re: Proposal: USING clause for DO statement

pgsql-interfaces by date

Next:From: Michael MeskesDate: 2009-11-24 15:44:04
Subject: Re: ecpg & 8.3 -> 8.4 migration
Previous:From: Michael MeskesDate: 2009-11-21 20:18:33
Subject: Re: ecpg & 8.3 -> 8.4 migration

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group