From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | "D(dot) Hageman" <dhageman(at)dracken(dot)com> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> |
Subject: | Re: [PATCHES] Fix for psql core dumping on bad user |
Date: | 2001-04-18 17:22:08 |
Message-ID: | Pine.LNX.4.30.0104181916340.762-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
D. Hageman writes:
> 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.
Okay, I've found the problem. When the connection fails, psql momentarily
runs without a valid database connection. When it does that, the
multibyte encoding has the invalid value -1. (You need to compile with
multibyte enabled to reproduce this.) With that value, PQmblen() has
trouble when it parses the next line. Perhaps PQmblen() should simply
return 1 when it is passed an invalid encoding. In any case it should do
better than dump core.
--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter
From | Date | Subject | |
---|---|---|---|
Next Message | Sergiy Ovcharuk | 2001-04-18 17:43:38 | get difference between two timestamp value in second? |
Previous Message | Alex Pilosov | 2001-04-18 17:15:52 | Re: [BUG] views and functions on relations |
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2001-04-19 01:40:07 | Re: Re: [PATCHES] Fix for psql core dumping on bad user |
Previous Message | Peter Eisentraut | 2001-04-18 16:48:31 | Re: Fix for psql core dumping on bad user |