From: | Unprivileged user <nobody> |
---|---|
To: | pgsql-ports(at)postgresql(dot)org |
Subject: | Port Bug Report: Error when using row-level locking from PL |
Date: | 1999-06-11 15:09:55 |
Message-ID: | 199906111509.LAA67164@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-ports |
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Adriaan Joubert
Your email address : a(dot)joubert(at)albourne(dot)com
Category : runtime: back-end
Severity : serious
Summary: Error when using row-level locking from PL
System Configuration
--------------------
Operating System : Alpha DU 4.0D
PostgreSQL version : 6.5
Compiler used : cc
Hardware:
---------
DEC 8200
Versions of other tools:
------------------------
--------------------------------------------------------------------------
Problem Description:
--------------------
I have a PL function that does various things to various tables and needs to lock some rows in one of the tables. But when I add 'FOR UPDATE OF <table>' to the SELECT statement, I get the error
ERROR: query didn't return correct # of attributes for *internal*
--------------------------------------------------------------------------
Test Case:
----------
create table a (a int4);
insert into a values (3);
CREATE FUNCTION a_test () RETURNS bool AS
'
DECLARE
mya INT4;
BEGIN
SELECT a INTO mya FROM a;
return true;
END;
' LANGUAGE 'plpgsql';
CREATE FUNCTION b_test () RETURNS bool AS
'
DECLARE
mya INT4;
BEGIN
SELECT a INTO mya FROM a FOR UPDATE OF a;
return true;
END;
' LANGUAGE 'plpgsql';
select a_test();
select b_test();
--------------------------------------------------------------------------
Solution:
---------
--------------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Henry B. Hotz | 1999-06-11 17:59:28 | Re: [PORTS] Patch for m68k architecture |
Previous Message | Bruce Momjian | 1999-06-11 14:27:01 | Re: [PORTS] Patch for m68k architecture |