dbTalk Databases Forums  

[BUGS] create temporary sequence and ecpg

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] create temporary sequence and ecpg in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Edmund Bacon
 
Posts: n/a

Default [BUGS] create temporary sequence and ecpg - 09-19-2003 , 05:17 PM







================================================== ==========================
POSTGRESQL BUG REPORT TEMPLATE
================================================== ==========================


Your name : Edmund Bacon
Your email address : ebacon (AT) onesystem (DOT) com


System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Pentium

Operating System (example: Linux 2.0.26 ELF) : Linux 2.4.20

PostgreSQL version (example: PostgreSQL-7.3.4): PostgreSQL-7.3.4

Compiler used (example: gcc 2.95.2) : gcc 3.2.2


Please enter a FULL description of your problem:
------------------------------------------------

Trying to create a TEMPORARY SEQUENCE with ecpg produces
a runtime erorr. the sqlprint error is:

sql error 'ERROR: parser: parse error at or near "foo" at character 27'
in lin

A workaround is to use EXECUTE IMMEDIATE



Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

exec sql include sqlca;

$ cat tmpseq.pgc

int main()
{
exec sql whenever sqlerror sqlprint;

exec sql connect to test;

exec sql create temporary sequence foo;

exec sql disconnect;

return 0;
}

Looking at the emitted C code we see:

{ ECPGdo(__LINE__, NULL, "create sequence temporary foo ", ECPGt_EOIT,
ECPGt_EORT);

Note that the tokens "sequence" and "temporary" have been reversed.

If you know how this problem might be fixed, list the solution below:

---------------------------------------------------------------------





--
Edmund Bacon <ebacon (AT) onesystem (DOT) com>


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.