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

Re: Fix for psql core dumping on bad user

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "D(dot) Hageman" <dhageman(at)dracken(dot)com>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Fix for psql core dumping on bad user
Date: 2001-04-18 16:48:31
Message-ID: Pine.LNX.4.30.0104181833040.762-100000@peter.localdomain (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Tom Lane writes:

> $ cat zscript
> \connect - testuser
> $ psql -f zscript regression
> psql:zscript:1: \connect: FATAL 1:  user "testuser" does not exist
> $
>
> Nonetheless, the comment at the top of do_connect() says that it
> *should* terminate the program under these circumstances, so I'm not
> sure why it doesn't.  Peter?

The comment is not correct.  Failure in do_connect() in non-interactive
mode terminates the script.  In the case of -f the program terminates
implicitly, but in case of \i you would return to the prompt (or the
containing \i).

-- 
Peter Eisentraut   peter_e(at)gmx(dot)net   http://funkturm.homeip.net/~peter


In response to

pgsql-hackers by date

Next:From: Oliver SeidelDate: 2001-04-18 16:57:22
Subject: theory of distributed transactions / timeouts
Previous:From: D. HagemanDate: 2001-04-18 16:40:15
Subject: Re: Fix for psql core dumping on bad user

pgsql-patches by date

Next:From: Peter EisentrautDate: 2001-04-18 17:22:08
Subject: Re: [PATCHES] Fix for psql core dumping on bad user
Previous:From: D. HagemanDate: 2001-04-18 16:40:15
Subject: Re: Fix for psql core dumping on bad user

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