pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Oops: ecpg changes <> to = (not good)
2+ messages / 2 participants
[nested] [flat]

* Oops: ecpg changes <> to = (not good)
@ 1999-12-14 20:21  Stephen Birch <sbirch@ironmountainsystems.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Stephen Birch @ 1999-12-14 20:21 UTC (permalink / raw)
  To: pgsql-interfaces

In the process of cleaning up some memory leaks in the cvs tree, I
discovered that
the checked in version of ecpg interperates <> as =:

For example, if you run ecpg on the following:

test()
{
  exec sql
    select xxx from yyy where zzz <> ppp;
}

You get this output:

/* Processed by ecpg (2.6.11) */
/* These two include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>

test()
{
  { ECPGdo(__LINE__, NULL, "select  xxx   from yyy where zzz  = ppp
",
ECPGt_EOIT, ECPGt_EORT);}
#line 5 "t.pgc"

}



Note that zzz <> ppp has been changed to zzz = ppp.  This is not broken
in 6.5.3.

Not good.

I would debug this myself, but do not understand lex and yacc well
enough yet.

Steve







^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [INTERFACES] Oops: ecpg changes <> to = (not good)
@ 1999-12-15 07:03  Michael Meskes <meskes@postgresql.org>
  parent: Stephen Birch <sbirch@ironmountainsystems.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Meskes @ 1999-12-15 07:03 UTC (permalink / raw)
  To: Stephen Birch <sbirch@ironmountainsystems.com>; +Cc: pgsql-interfaces

On Tue, Dec 14, 1999 at 12:21:34PM -0800, Stephen Birch wrote:
> In the process of cleaning up some memory leaks in the cvs tree, I
> discovered that
> the checked in version of ecpg interperates <> as =:

Oops. This typo got in there when I took over the simplified a_expr and
b_expr rules from gram.y. 

> I would debug this myself, but do not understand lex and yacc well
> enough yet.

I already changed it in my source. As soon as I commit the correct version
will go in.

If you need a patch earlier I attach the patch.

Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De           | Use PostgreSQL!

Attachments:

patch (text/plain, 604B) download --- preproc.y.orig Wed Dec 15 08:02:35 1999 +++ preproc.y Wed Dec 15 08:02:58 1999 @@ -3595,7 +3595,7 @@ | a_expr '=' a_expr { $$ = cat3_str($1, make1_str("="), $3); } | a_expr Op a_expr - { $$ = cat3_str($1, make1_str("="), $3); } + { $$ = cat3_str($1, $2, $3); } | Op a_expr { $$ = cat2_str($1, $2); } | a_expr Op @@ -3713,7 +3713,7 @@ | b_expr '=' b_expr { $$ = cat3_str($1, make1_str("="), $3); } | b_expr Op b_expr - { $$ = cat3_str($1, make1_str("="), $3); } + { $$ = cat3_str($1, $2, $3); } | Op b_expr { $$ = cat2_str($1, $2); } | b_expr Op
^ permalink raw reply [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-12-15 07:03 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-12-14 20:21 Oops: ecpg changes <> to = (not good) Stephen Birch <sbirch@ironmountainsystems.com>
1999-12-15 07:03 ` Michael Meskes <meskes@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox