| From: | "Steve Howe" <howe(at)carcass(dot)dhs(dot)org> | 
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org | 
| Subject: | This script will crash the connection | 
| Date: | 2001-01-21 05:04:41 | 
| Message-ID: | 94dqjm$8dg$1@news.tht.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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 as
 on 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adriaan Joubert | 2001-01-21 06:43:36 | Re: BIT/BIT VARYING status | 
| Previous Message | Tom Lane | 2001-01-21 04:39:52 | Re: Re: [PATCHES] Patch to support transactions with BLOBs for current CVS |