This script will crash the connection - Mailing list pgsql-hackers

From Steve Howe
Subject This script will crash the connection
Date
Msg-id 94dqjm$8dg$1@news.tht.net
Whole thread Raw
Responses Re: This script will crash the connection
Re: This script will crash the connection
List pgsql-hackers
Helo all,
   Please try this script, it will crash the current connection.   I'm using the 01/18/2001 PostgreSQL v7.1 beta3
snapshot.

-- Script begin -------------------------------------
create table blah( var_field varchar(8), n1 integer default 23, n2 integer, arr_str varchar[], m money, s text
);

create rule blah_update ason update to blah  do    notify TestEvent;

INSERT INTO blah (var_field, n1, n2, arr_str, m, s) VALUES ('aaa', 1, 2,
NULL, NULL, NULL);
UPDATE blah SET n1=n1+1;  -- Won't crash the connection
UPDATE blah SET n1=2 WHERE var_field='aaa' AND n1=1 AND n2=2 AND arr_str IS
NULL AND m IS NULL; -- Will crash the connection

-- Script end -------------------------------------   psql will print :

pqReadData() -- backend closed the channel unexpectedly.       This probably means the backend terminated abnormally
  before or while processing the request.
 
The connection to the server was lost. Attempting reset: Failed.
!#

Any comments ?

I need this kind of code working for a demo for ZeosDBO users...


Best Regards,
Steve Howe




pgsql-hackers by date:

Previous
From: Frank Joerdens
Date:
Subject: beta3 vacuum crash
Next
From: Patrick Welche
Date:
Subject: Re: C++ interface build on FreeBSD 4.2 broken?