Get diagnistic (row_count) 7.3 vs. 7.4 changes

From: Maksim Likharev <MLikharev(at)micropat(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Get diagnistic (row_count) 7.3 vs. 7.4 changes
Date: 2004-12-01 19:06:06
Message-ID: 000201c4d7d8$cff34170$8815a8c0@aurigin.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
Just trying 7.4.5 and bumped into a problem.

consider following code:

CREATE OR REPLACE FUNCTION rowcount_test() RETURNS bigint AS '
DECLARE
base_hits bigint;
BEGIN
CREATE TEMP TABLE ltbl_temp AS SELECT 1 AS data;
GET DIAGNOSTICS base_hits = ROW_COUNT;

RETURN base_hits;
END;
' LANGUAGE PLPGSQL VOLATILE;

in 7.3.3 GET DIAGNOSTICS was returning number of selected rows into a temp
table
in 7.4.5 GET DIAGNOSTICS returns 0

Is it known behavior change or something else.
Thank you.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joachim Zobel 2004-12-01 19:40:20 createlang plperl fails with 8.0 beta5
Previous Message gnari 2004-12-01 18:57:05 Re: autocommit and transactions