dbTalk Databases Forums  

[BUGS] BUG #1187: Problem in SQL Functions on Composite Types

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1187: Problem in SQL Functions on Composite Types in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1187: Problem in SQL Functions on Composite Types - 07-06-2004 , 10:41 AM







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?












---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1187: Problem in SQL Functions on Composite Types - 07-09-2004 , 08:22 PM






"PostgreSQL Bugs List" <pgsql-bugs (AT) postgresql (DOT) org> writes:
Quote:
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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.