Unix Technical Forum

BUG #2074: Error switching connection in embedded PostgreSQL program

This is a discussion on BUG #2074: Error switching connection in embedded PostgreSQL program within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 2074 Logged by: Edoardo Innocenti Email address: edoardo.innocenti@sdb.it PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 10:30 AM
Edoardo Innocenti
 
Posts: n/a
Default BUG #2074: Error switching connection in embedded PostgreSQL program


The following bug has been logged online:

Bug reference: 2074
Logged by: Edoardo Innocenti
Email address: edoardo.innocenti@sdb.it
PostgreSQL version: 8.1.0
Operating system: Linux
Description: Error switching connection in embedded PostgreSQL
program
Details:

We have problem on switching connection in PostgreSQL 8.1.0 database. Here a
test case:

#include <stdio.h>

main ()

{

EXEC SQL BEGIN DECLARE SECTION;

EXEC SQL END DECLARE SECTION;


EXEC SQL CONNECT TO tcpostgresql://localhost/basedati1 AS connection1
USER root;

EXEC SQL CONNECT TO tcpostgresql://localhost/basedati2 AS

connection2 USER root;

EXEC SQL SET CONNECTION connection1; (*)

EXEC SQL DISCONNECT connection1;

EXEC SQL DISCONNECT connection2;

}

We have syntax error when compiling this example with ecpg at line (*)
(this is the syntax used in 8.1 documentation).

If we write

#include <stdio.h>


main ()

{

EXEC SQL BEGIN DECLARE SECTION;

EXEC SQL END DECLARE SECTION;


EXEC SQL CONNECT TO tcpostgresql://localhost/basedati1 AS connection1
USER root;

EXEC SQL CONNECT TO tcpostgresql://localhost/basedati2 AS connection2
USER root;

EXEC SQL SET CONNECTION TO connection1;

EXEC SQL DISCONNECT connection1;

EXEC SQL DISCONNECT connection2;

}


we haven't compiling errors but we obtain [4-1] ERROR: unrecognized
configuration parameter "connection" in PostgreSQL logs.

Thanks in advance

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:46 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com