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

ecpg odd syntax error at array index

From: Jürgen Cappel <email(at)juergen-cappel(dot)de>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: ecpg odd syntax error at array index
Date: 2003-12-27 14:18:45
Message-ID: JEEKIPNAKJNCFLMOBKHGMEALDCAA.email@juergen-cappel.de (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hello,

seems odd, but why is the first SELECT a, quote: syntax error at or near "["
while the second one is OK ?  Do spaces really make a difference for ecpg
before an array index ?

myfunction ()
{
    EXEC SQL BEGIN DECLARE SECTION;
    char  chtm[23][19];
    EXEC SQL END DECLARE SECTION;

    EXEC SQL SELECT mycolumn INTO :chtm[ 0] FROM mytable WHERE ...;
    EXEC SQL SELECT mycolumn INTO :chtm[1] FROM mytable WHERE ...;
}

Versions are:

ecpg (PostgreSQL 7.4) 3.0.0
Linux scaleo 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686 unknown

Jürgen Cappel


Responses

pgsql-interfaces by date

Next:From: Michael MeskesDate: 2003-12-29 13:54:09
Subject: Re: ecpg odd syntax error at array index
Previous:From: Jürgen CappelDate: 2003-12-27 07:36:44
Subject: ecpg with nested structure

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