Re: InitPostgres and flatfiles question

Поиск
Список
Период
Сортировка
От Markus Schiltknecht
Тема Re: InitPostgres and flatfiles question
Дата
Msg-id 459CC230.6080409@bluegap.ch
обсуждение исходный текст
Ответ на Re: InitPostgres and flatfiles question  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: InitPostgres and flatfiles question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

Tom Lane wrote:
> It should happen automatically at commit of the CREATE DATABASE ... and
> you'd not be able to see the pg_database row before that anyway.  So I'm
> not clear on what you're worried about.

I've just found the stumbling block: the -c option of psql wraps all in 
a transaction, as man psql says:
    If the command string contains multiple SQL commands,  they  are    processed  in  a  single  transaction, unless
thereare explicit    BEGIN/COMMIT commands included in the string to divide  it  into    multiple  transactions. This
isdifferent from the behavior when    the same string is fed to psql’s standard input.
 

Thank you for clarification, I wouldn't have expected that (especially 
because CREATE DATABASE itself says, it cannot be run inside a 
transaction block... A transaction block (with BEGIN and COMMIT) seems 
to be more than just a transaction, right?)

Regards

Markus



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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: proposal - new SPI cursor function
Следующее
От: "Simon Riggs"
Дата:
Сообщение: Re: 8.3 pending patch queue