Thread: SIGSEGV

SIGSEGV

From
Patrick Welche
Date:
Using cvs source of Dec 4 15:13:

test=# \d amount                          Table "public.amount"Column |  Type   |                       Modifiers
                
 
--------+---------+--------------------------------------------------------id     | integer | not null default
nextval('public.amount_id_seq'::text)value | integer | 
 

test=# select "value" from amount;value 
-------
(0 rows)

test=# select value from amount;
server closed the connection unexpectedly       This probably means the server terminated abnormally       before or
whileprocessing the request.
 
The connection to the server was lost. Attempting reset: Failed.
!#


Not very graceful... (and this is different to the geqo prob I saw with my
libpq++ program, cured with geqo=false (Thanks Tom!))

Program received signal SIGSEGV, Segmentation fault.
transformTargetEntry (pstate=0x82e235c, node=0x82e21fc, expr=0x0, colname=0x0,    resjunk=0 '\000') at
parse_target.c:61
61              if (IsA(expr, RangeVar))
(gdb) bt
#0  transformTargetEntry (pstate=0x82e235c, node=0x82e21fc, expr=0x0,    colname=0x0, resjunk=0 '\000') at
parse_target.c:61
#1  0x80c2af0 in transformTargetList (pstate=0x82e235c, targetlist=0x82e2234)   at parse_target.c:192
#2  0x80a9c00 in transformSelectStmt (pstate=0x82e235c, stmt=0x82e22b4)   at analyze.c:1654
#3  0x80a7feb in transformStmt (pstate=0x82e235c, parseTree=0x82e22b4,    extras_before=0xbfbfa9b0,
extras_after=0xbfbfa9b4)at analyze.c:308
 
#4  0x80a7bd0 in parse_analyze (parseTree=0x82e22b4, parentParseState=0x0)   at analyze.c:147
#5  0x813e1c0 in pg_analyze_and_rewrite (parsetree=0x82e22b4) at postgres.c:408
#6  0x813e4a3 in pg_exec_query_string (query_string=0x82e201c, dest=Remote,    parse_context=0x828c8ac) at
postgres.c:696
#7  0x813f935 in PostgresMain (argc=5, argv=0xbfbfaca8,    username=0x826a925 "prlw1") at postgres.c:2016
#8  0x8124332 in DoBackend (port=0x826a800) at postmaster.c:2293
#9  0x8123c25 in BackendStartup (port=0x826a800) at postmaster.c:1915
#10 0x8122e0b in ServerLoop () at postmaster.c:1002
#11 0x8122972 in PostmasterMain (argc=3, argv=0x8266030) at postmaster.c:781
#12 0x80fb135 in main (argc=3, argv=0xbfbfb4b4) at main.c:209
#13 0x8069e84 in ___start ()

Cheers,

Patrick


Re: SIGSEGV

From
Tom Lane
Date:
Patrick Welche <prlw1@newn.cam.ac.uk> writes:
> test=# select value from amount;
> server closed the connection unexpectedly

This is a known bug also (in the domain-constraint patch, which has
turned VALUE into a reserved word, a rather unpleasant price to pay
for the feature IMHO).  Rod claimed his latest patch fixes it, but
AFAIK that hasn't been applied yet.
        regards, tom lane


Re: SIGSEGV

From
Rod Taylor
Date:
On Mon, 2002-12-09 at 19:04, Tom Lane wrote:
> Patrick Welche <prlw1@newn.cam.ac.uk> writes:
> > test=# select value from amount;
> > server closed the connection unexpectedly
>
> This is a known bug also (in the domain-constraint patch, which has
> turned VALUE into a reserved word, a rather unpleasant price to pay
> for the feature IMHO).  Rod claimed his latest patch fixes it, but
> AFAIK that hasn't been applied yet.

It was applied a couple of days ago by Bruce.

a=# select value;
ERROR:  VALUE is not allowed in expression for node 732

Error message isn't great, but it doesn't crash anymore.

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc