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 |
Thread: | |
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 | Date | Subject | |
---|---|---|---|
Next Message | Dario V. Fassi | 2004-07-07 06:31:25 | ResultSerMetaData.getColumnDisplaySize() with timestamp error |
Previous Message | Tom Lane | 2004-07-06 13:37:59 | Re: [SQL] Immutable function in index |