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

Fix for psql core dumping on bad user

From: "D(dot) Hageman" <dhageman(at)dracken(dot)com>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: Fix for psql core dumping on bad user
Date: 2001-04-17 22:39:13
Message-ID: Pine.LNX.4.33.0104171737090.709-300000@typhon.dracken.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
The postgresql interactive terminal will dump core on any script that is
run via the -f command line option if their exists a connect line without
a valid user.  An example connect line is in one of the attached files.
The user that I have choosen is just testuser, you will see what I mean if
you just run that script on any database you have on your system, assuming
that you don't have a user called testuser.  If you do, change the
username and see what happens.  This bug has been in psql for the last
couple of versions that I have tested.

Also attached is a patch that seems to correct the issue.  I admit that I
haven't studied the code long enough to determine if the fix is suitable,
but I feel that it will give you something to work from if it is not.

-- 
//===================================================================\\
||  D. Hageman                               <dhageman(at)dracken(dot)com>  ||
\\===================================================================//


Attachment: psql-core.patch
Description: text/plain (645 bytes)
Attachment: example.sql
Description: text/plain (23 bytes)

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2001-04-17 23:21:38
Subject: Re: three VERY minor things with 7.1 final
Previous:From: David GeorgeDate: 2001-04-17 22:18:29
Subject: three VERY minor things with 7.1 final

pgsql-patches by date

Next:From: Tom LaneDate: 2001-04-17 23:32:45
Subject: Re: Fix for psql core dumping on bad user
Previous:From: Kyle VanderBeekDate: 2001-04-17 18:29:27
Subject: Re: Large Object problems (was Re: JDBC int8 hack)

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