Re: BUG #4710: Bug with sql functions, when using INSERT.. RETURNING .. statment

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Oleg" <serovOv(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4710: Bug with sql functions, when using INSERT.. RETURNING .. statment
Date: 2009-03-17 16:44:32
Message-ID: 10390.1237308272@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Oleg" <serovOv(at)gmail(dot)com> writes:
> CREATE TABLE test (id BIGINT);
> CREATE OR REPLACE FUNCTION test(in_row test) RETURNS bigint AS
> $body$
> INSERT INTO test (SELECT $1.*) RETURNING id;
> $body$
> LANGUAGE 'sql';

> WILL THROW:

> ERROR: return type mismatch in function declared to return bigint

This is improved for 8.4.

http://archives.postgresql.org/pgsql-committers/2008-10/msg00295.php

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander 2009-03-17 20:00:27 BUG #4712: Installing problems
Previous Message Dave Page 2009-03-17 13:27:48 Re: BUG #4711: no mirror found in country selection for download