pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedECPG: 7.4 and a "to" Variable
2+ messages / 2 participants
[nested] [flat]
* ECPG: 7.4 and a "to" Variable
@ 2003-08-01 11:06 Lee Kindness <lkindness@csl.co.uk>
2003-08-01 11:33 ` Re: ECPG: 7.4 and a "to" Variable Michael Meskes <meskes@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: Lee Kindness @ 2003-08-01 11:06 UTC (permalink / raw)
To: pgsql-interfaces; +Cc: Lee Kindness <lkindness@csl.co.uk>; pgsql-hackers@postgresql.org, Michael Meskes <meskes@postgresql.org>
Guys, looking at ecpg from CVS HEAD's 7.4. The following code
fragement:
EXEC SQL INCLUDE sqlca;
EXEC SQL WHENEVER SQLERROR call sqlprint;
void lofsdb_GetMinMaxRxStations(int *from, int *to)
{
EXEC SQL BEGIN DECLARE SECTION;
int l_from = 0;
int l_to = 0;
EXEC SQL END DECLARE SECTION;
*from = 0;
*to = 0;
EXEC SQL BEGIN;
EXEC SQL SELECT MIN(from_station), MAX(to_station)
INTO :l_from, :l_to
FROM attr_tables
WHERE basetab LIKE 'attr_rx_%';
if( sqlca.sqlcode == 0 )
{
*from = l_from;
*to = l_to;
}
EXEC SQL COMMIT;
}
when processed using:
/var/lib/pgsql/74b/bin/ecpg -t -I/var/lib/pgsql/74b/include -o x.c x.pc
results in the following error:
x.pc:4: ERROR: syntax error at or near "to"
However this works ok on 7.3.x and when the "to" variable is renamed
(e.g. to "to_rx"). Obviously TO is an SQL keyword, but it's not being
used within an EXEC SQL definition, so shouldn't break things.
Regards, Lee.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ECPG: 7.4 and a "to" Variable
2003-08-01 11:06 ECPG: 7.4 and a "to" Variable Lee Kindness <lkindness@csl.co.uk>
@ 2003-08-01 11:33 ` Michael Meskes <meskes@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Meskes @ 2003-08-01 11:33 UTC (permalink / raw)
To: Lee Kindness <lkindness@csl.co.uk>; +Cc: pgsql-interfaces@postgresql.org, pgsql-hackers@postgresql.org, Michael Meskes <meskes@postgresql.org>
On Fri, Aug 01, 2003 at 12:06:07PM +0100, Lee Kindness wrote:
> Guys, looking at ecpg from CVS HEAD's 7.4. The following code
> fragement:
> ...
Fix just committed. Should work now.
Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-08-01 11:33 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-08-01 11:06 ECPG: 7.4 and a "to" Variable Lee Kindness <lkindness@csl.co.uk>
2003-08-01 11:33 ` 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