Lists: | pgsql-bugs |
---|
From: | "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #1187: Problem in SQL Functions on Composite Types |
Date: | 2004-07-06 15:30:53 |
Message-ID: | 20040706153053.26590CF4B5A@www.postgresql.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 1187
Logged by: Eduard Pinchuck
Email address: edwardo(at)softprofi(dot)com
PostgreSQL version: 7.5 Dev
Operating system: FreeBSD 5.1
Description: Problem in SQL Functions on Composite Types
Details:
Hello. PostgreSQL 7.4.2.
I have a problem with such sql function...
CREATE SCHEMA "common_references" AUTHORIZATION "ed";
CREATE TABLE "common_references"."zip_codes" (
"id_zip_code" SERIAL,
"city_name" CHAR(30) NOT NULL,
"region_name" CHAR(30),
"country_name" CHAR(30) NOT NULL,
"zip_code" TEXT NOT NULL,
"district_name" TEXT,
CONSTRAINT "zip_codes_id_zip_code_key" UNIQUE("id_zip_code")
) WITH OIDS;
I had inserted some records...
/* !!!!!!!!!! FUNCTION !!!!!!! */
CREATE OR REPLACE FUNCTION "common_references"."get_zc_el" (integer) RETURNS
SETOF "common_references"."zip_codes" AS'
select * from common_references.zip_codes a
where a.id_zip_code = $1;
'LANGUAGE 'sql' VOLATILE RETURNS NULL ON NULL INPUT SECURITY INVOKER;
/* Expression */
select * from common_references.get_zc_el(1::integer);
/* had returned */
ERROR: query-specified return row and actual function return row do not
match
What is wrong?
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Eduard Pinchuck" <edwardo(at)softprofi(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #1187: Problem in SQL Functions on Composite Types |
Date: | 2004-07-10 01:13:06 |
Message-ID: | 1246.1089421986@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
"PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> writes:
> ERROR: query-specified return row and actual function return row do not
> match
> What is wrong?
Dunno, your example works perfectly for me. How up to date is your copy
of 7.5devel?
regards, tom lane