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

Re: InitPostgres and flatfiles question

From: Markus Schiltknecht <markus(at)bluegap(dot)ch>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: InitPostgres and flatfiles question
Date: 2007-01-04 16:28:39
Message-ID: (view raw or whole thread)
Lists: pgsql-hackers

Tom Lane wrote:
> Hm, that's an interesting point.  psql's -c just shoves its whole
> argument string at the backend in one PQexec(), instead of dividing
> at semicolons as psql does with normal input.  And so it winds up as
> a single transaction because postgres.c doesn't force a transaction
> commit until the end of the querystring.  But that's not a "transaction
> block" in the normal sense and so it doesn't trigger the
> PreventTransactionChain defense in CREATE DATABASE and elsewhere.

Is there a good reason to not let psql -c behave exactly like psql from 
STDIN? I found this exception to be quite confusing. Of course that 
could break compatibility with certain scripts, but can this be fixed 
without doing so?



In response to


pgsql-hackers by date

Next:From: Bill MoranDate: 2007-01-04 16:35:28
Subject: Re: [HACKERS] Patch to log usage of temporary files
Previous:From: Gregory StarkDate: 2007-01-04 16:26:39
Subject: Re: Odd numeric->float4/8 casting behaviour

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