dbTalk Databases Forums  

[BUGS] BUG #1178: PQexecPrepared - PostgreSQL 7.4.1

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


Discuss [BUGS] BUG #1178: PQexecPrepared - PostgreSQL 7.4.1 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1178: PQexecPrepared - PostgreSQL 7.4.1 - 06-22-2004 , 10:39 AM







The following bug has been logged online:

Bug reference: 1178
Logged by: Theo Kramer

Email address: theo (AT) flame (DOT) co.za

PostgreSQL version: 7.4

Operating system: Redhat Linux 9

Description: PQexecPrepared - PostgreSQL 7.4.1

Details:

I am having a problem with PQexecPrepared() as follows (derived from
testlibpq3.c)

PQexec(conn,
"PREPARE S0000123_000 (text) AS SELECT * from test1 WHERE t = $1");

When invoking PQexecPrepared() I get the following message from the backend

ERROR: prepared statement "S0000123_0000" does not exist

Yet if I use

PQexec(conn, "EXECUTE S0000123_0000 ('ho there')");

instead of PQexecPrepared() then all works perfectly.

Sounds like a bug to me...?


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1178: PQexecPrepared - PostgreSQL 7.4.1 - 06-22-2004 , 12:32 PM






"PostgreSQL Bugs List" <pgsql-bugs (AT) postgresql (DOT) org> writes:
Quote:
PQexec(conn,
"PREPARE S0000123_000 (text) AS SELECT * from test1 WHERE t = $1");
When invoking PQexecPrepared() I get the following message from the backend
ERROR: prepared statement "S0000123_0000" does not exist
Case sensitivity. PQexecPrepared takes its name argument literally,
but anything inside a SQL command will get downcased unless quoted.
So you actually prepared "s0000123_000".

regards, tom lane

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


Reply With Quote
  #3  
Old   
Theo Kramer
 
Posts: n/a

Default Re: [BUGS] BUG #1178: PQexecPrepared - PostgreSQL 7.4.1 - 06-24-2004 , 08:50 AM



On Tue, 2004-06-22 at 19:23, Tom Lane wrote:
Quote:
"PostgreSQL Bugs List" <pgsql-bugs (AT) postgresql (DOT) org> writes:
PQexec(conn,
"PREPARE S0000123_000 (text) AS SELECT * from test1 WHERE t = $1");
When invoking PQexecPrepared() I get the following message from the backend
ERROR: prepared statement "S0000123_0000" does not exist

Case sensitivity. PQexecPrepared takes its name argument literally,
but anything inside a SQL command will get downcased unless quoted.
So you actually prepared "s0000123_000".

Many thanks - perhaps a gotcha in the documentation for PQexecPrepared()
would useful...

Regards
Theo


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


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.