From: JohnDz <John_dzilvelis@valpak.com>
To: pgsql-interfaces@postgreSQL.org <pgsql-interfaces@postgreSQL.org>
Cc: Sebastian Meyer <meyer@mevis.de>
Subject: Re: [INTERFACES] pgsql.tcl: Bug concerning joins
Date: Tue, 01 Sep 1998 17:15:56 +0000
Message-ID: <35EC2BCC.2A3C0FD9@valpak.com> (raw)
References: <Pine.SGI.4.02.9809011815240.3577-100000@forte>
Sebastian Meyer wrote:
>
> I found a bug processing a simple join like
> SELECT s1.b,s2.b FROM pgsqlbug1 s1, pgsqlbug2 s2 WHERE s1.a = s2.c;
> This bug only occurs whern using pgsql.tcl.
>
>
> Using pgsql.tcl from Tcl however I get:
>
> meyer> SELECT s1.b,s2.b FROM pgsqlbug1 s1, pgsqlbug2 s2 WHERE s1.a = s2.c;
>
> attributes: b b
> lAttributes: {b 1042 -1} {b 1042 -1}
> Tuple 0: {from table 2} {from table 2}
>
> ... what is wrong, obviously.
>
I can't figure out why this happens, but I did find a work around. Try:
SELECT s1.b AS b1, s2.b AS b2 FROM pgsqlbug1 s1, pgsqlbug2 s2 WHERE s1.a
= s2.c ;
This worked fine with pgsql.tcl .
By the way, I was able to duplicate your error using pgsql.tcl. I think
it has to do with how proc pg_exec or pg_result processes columns with
the same name ( .b ).
--
-----------------------------------------------------------------
|John Dzilvelis |
-----------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: John_dzilvelis@valpak.com, meyer@mevis.de
Subject: Re: [INTERFACES] pgsql.tcl: Bug concerning joins
In-Reply-To: <35EC2BCC.2A3C0FD9@valpak.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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