Bug#98643: plpgsql SELECT INTO causes trouble when assignment impossible (fwd)

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Michal Politowski <mpol(at)charybda(dot)icm(dot)edu(dot)pl>
Subject: Bug#98643: plpgsql SELECT INTO causes trouble when assignment impossible (fwd)
Date: 2001-05-25 06:08:15
Message-ID: 200105250608.f4P68Ftb021191@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


------- Forwarded Message

Date: Fri, 25 May 2001 00:47:13 +0200
From: Michal Politowski <mpol(at)charybda(dot)icm(dot)edu(dot)pl>
To: Debian Bug Tracking System <submit(at)bugs(dot)debian(dot)org>
Subject: Bug#98643: plpgsql SELECT INTO causes trouble when assignment impossib
le

Package: postgresql
Version: 7.1.1-4
Severity: important

After
psql template1 -f x.sql

where x.sql looks as follows:

- ----- x.sql -----
CREATE DATABASE test;
\c test
CREATE TABLE foo (bar int4);
INSERT INTO foo VALUES (17);
CREATE FUNCTION quux() RETURNS int4 AS '
DECLARE
baz int4;
BEGIN
SELECT INTO baz bar FROM foo WHERE bar > 23;
RETURN 42;
END;
' LANGUAGE 'plpgsql';
SELECT quux();
- ----------

I get this on screen:

CREATE DATABASE
You are now connected to database test.
CREATE
INSERT 117035 1
CREATE
psql:x.sql:13: pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
psql:x.sql:13: connection to server was lost

And this in logs:
May 25 00:39:13 Amber postgres[15856]: [1] DEBUG: connection: host=[local] use
r=mike database=template1
May 25 00:39:13 Amber postgres[15858]: [1] DEBUG: connection: host=[local] use
r=mike database=test
May 25 00:39:13 Amber postgres[15859]: [1] DEBUG: database system was interrup
ted at 2001-05-25 00:38:16 CEST
May 25 00:39:13 Amber postgres[15859]: [2] DEBUG: CheckPoint record at (0, 377
3544)
May 25 00:39:13 Amber postgres[15859]: [3] DEBUG: Redo record at (0, 3773544);
Undo record at (0, 0); Shutdown TRUE
May 25 00:39:13 Amber postgres[15859]: [4] DEBUG: NextTransactionId: 1134; Nex
tOid: 117024
May 25 00:39:13 Amber postgres[15859]: [5] DEBUG: database system was not prop
erly shut down; automatic recovery in progress...
May 25 00:39:13 Amber postgres[15859]: [6] DEBUG: redo starts at (0, 3773608)
May 25 00:39:13 Amber postgres[15859]: [7] DEBUG: ReadRecord: record with zero
len at (0, 3883500)
May 25 00:39:13 Amber postgres[15859]: [8] DEBUG: redo done at (0, 3883464)
May 25 00:39:16 Amber postgres[15859]: [9] DEBUG: database system is in produc
tion state

- -- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux Amber 2.2.19 #1 Thu Mar 29 15:52:51 CEST 2001 i586
Locale: LANG=pl_PL, LC_CTYPE=C

Versions of packages postgresql depends on:
ii debianutils 1.15 Miscellaneous utilities specific t
ii libc6 2.2.3-1 GNU C Library: Shared libraries an
ii libpgsql2.1 7.1.1-4 Shared library libpq.so.2.1 for Po
ii libreadline4 4.2-3 GNU readline and history libraries
ii libssl0.9.6 0.9.6a-3 SSL shared libraries
ii postgresql-client 7.1.1-4 Front-end programs for PostgreSQL
ii procps 1:2.0.7-4 The /proc file system utilities.
ii zlib1g 1:1.1.3-15 compression library - runtime

- --
Michal Politowski -- mpol(at)lab(dot)icm(dot)edu(dot)pl
Warning: this is a memetically modified message

------- End of Forwarded Message

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"And Jesus answering said unto them, They that are
whole need not a physician; but they that are sick. I
come not to call the righteous, but sinners to
repentance." Luke 5:31,32

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2001-05-25 07:44:14 AW: Plans for solving the VACUUM problem
Previous Message Hannu Krosing 2001-05-25 06:01:53 Re: Plans for solving the VACUUM problem