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

General question (C++ interfacing to PostgreSQL)

From: Carlos Moreno <moreno(at)mochima(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: General question (C++ interfacing to PostgreSQL)
Date: 2001-04-22 16:23:06
Message-ID: 3AE3056A.AF530097@mochima.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
I'm just curious about what the standard practice for creating 
PgConnection/PgDatabase objects should be. 

First, I'm not quite sure when or how should I use PgDatabase 
(in the simple tests that I've done so far, I use only PgConnection). 

As for the PgConnection, I'm wondering if I should create them 
as local variables whenever I need to execute a selcect or 
insert/update/delete statement, or if it is a better idea to 
keep a unique (possibly global) PgConnection object and keep 
asking it to Exec SQL statements. 

Is there any considerable overhead when creating PgConnection 
instances?  Are multiple instances asking for trouble? 


There's probably a tutorial where these guidelines are?  I 
haven't been able to find it, but if someone points me to 
such tutorial, I'd be very grateful! 

Oh, another thing...  How can I prevent output from being 
sent to stdout whenever I execute a SELECT statement?  I'd 
like to get the data, and not send it to stdout -- however, 
when I do  connect.Exec ("select ..... "), I get the results 
of the SQL statement displayed without the program cout'ing 
them explicitly... 

Thanks!

Carlos
--

Responses

pgsql-interfaces by date

Next:From: Lonnie CumberlandDate: 2001-04-22 17:35:12
Subject: removing extraneous objects?
Previous:From: Hauke LampeDate: 2001-04-22 03:36:26
Subject: Re: Client/Server Security question

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