Re: libpq and transactions

From: Alex du Plessis <alexdup01(at)telkomsa(dot)net>
To: Postgres novice mailing list <pgsql-novice(at)postgresql(dot)org>
Subject: Re: libpq and transactions
Date: 2006-08-11 13:18:04
Message-ID: 44DC838C.5030003@telkomsa.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Thanks Tom - I'll try that straightaway

Tom Lane wrote:
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message ben sewell 2006-08-11 15:12:58 executing a procedure withing a procedure?
Previous Message Volkan YAZICI 2006-08-11 13:05:48 Re: libpq Describe Extension [WAS: Bytea and perl]