Re: libpq and transactions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: alexdup01(at)telkomsa(dot)net
Cc: Postgres novice mailing list <pgsql-novice(at)postgresql(dot)org>
Subject: Re: libpq and transactions
Date: 2006-08-11 12:35:49
Message-ID: 7451.1155299749@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Alex du Plessis <alexdup01(at)telkomsa(dot)net> writes:
> I wish to use libpq to create a new database using a sql statement
> "CREATE DATABSE". However, it seems this command cannot be enclosed
> within a transaction. How do I go about executing such a statement via
> libpq i.e. which function should I use. (Any information would be helpful)

Use PQexec(), same as any other SQL command. The no-transaction
restriction just means you can't put it between BEGIN and COMMIT
commands.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2006-08-11 12:41:16 Re: Minimising disk writes
Previous Message Andy Chambers 2006-08-11 11:30:35 Minimising disk writes