Re: libpq and transactions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: libpq and transactions
Дата
Msg-id 7451.1155299749@sss.pgh.pa.us
обсуждение исходный текст
Ответ на libpq and transactions  (Alex du Plessis <alexdup01@telkomsa.net>)
Ответы Re: libpq and transactions  (Alex du Plessis <alexdup01@telkomsa.net>)
Список pgsql-novice
Alex du Plessis <alexdup01@telkomsa.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

В списке pgsql-novice по дате отправления:

Предыдущее
От: Andy Chambers
Дата:
Сообщение: Minimising disk writes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Minimising disk writes