BUG #4329: Transaction model changed?

From: "Gerd Grossmann" <gerdgrossmann(at)njini(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4329: Transaction model changed?
Date: 2008-07-28 10:48:53
Message-ID: 200807281048.m6SAmrI7006814@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4329
Logged by: Gerd Grossmann
Email address: gerdgrossmann(at)njini(dot)com
PostgreSQL version: 8.0.17
Operating system: Red Hat Enterprise Linux 4
Description: Transaction model changed?
Details:

Executing the following

CREATE OR REPLACE FUNCTION compatTest() RETURNS void
AS $$
DECLARE
createStmnt TEXT;
BEGIN
createStmnt:='CREATE TABLE test (val integer);INSERT INTO test (val)
VALUES (1);';
EXECUTE createStmnt;
RETURN;
END;
$$
LANGUAGE plpgsql;

SELECT compatTest();

would just work fine under postgresql 8.3 but does not work with postgresql
8.0. It complains that the table test does not exist! Instead it has to be
written like this:

CREATE OR REPLACE FUNCTION compatTest() RETURNS void
AS $$
DECLARE
createStmnt TEXT;
BEGIN
createStmnt:='CREATE TABLE test (val integer);';
EXECUTE createStmnt;
createStmnt:='INSERT INTO test (val) VALUES (1);';
EXECUTE createStmnt;
RETURN;
END;
$$
LANGUAGE plpgsql;

SELECT compatTest();

To me it looks like 8.3 is correct. I assume this is also the reason why it
changed. But since it was not documented anywhere ..

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2008-07-28 11:34:05 Re: BUG #4322: Problems with field not updatable
Previous Message andrew victoria 2008-07-28 06:27:28 BUG #4328: help in creating database encoded with LATIN1