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

Re: InitPostgres and flatfiles question

From: Mario Weilguni <mweilguni(at)sime(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Markus Schiltknecht <markus(at)bluegap(dot)ch>
Subject: Re: InitPostgres and flatfiles question
Date: 2007-01-04 15:41:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Am Donnerstag, 4. Januar 2007 16:36 schrieb Tom Lane:
> Markus Schiltknecht <markus(at)bluegap(dot)ch> writes:
> 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.
> I wonder whether we ought to change that?  The point of
> PreventTransactionChain is that we don't want the user rolling back
> the statement post-completion, but it seems that
> 	psql -c 'CREATE DATABASE foo; ABORT; BEGIN; ...'
> would bypass the check.

Maybe not directly related to that problem, but I had a problem with "-c" last 
month, when I noticed that this will not work:

psql -c "set client_encoding=iso-8859-1; select name from customer" (UTF8 
database, output is hmmm... broken german umlauts).

Best regards
	Mario Weilguni

In response to

pgsql-hackers by date

Next:From: Simon RiggsDate: 2007-01-04 15:56:39
Subject: Re: wal_checksum = on (default) | off
Previous:From: Gregory StarkDate: 2007-01-04 15:37:59
Subject: Odd numeric->float4/8 casting behaviour

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