dbTalk Databases Forums  

[BUGS] BUG #1481: ERROR: type tablename does not exist

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


Discuss [BUGS] BUG #1481: ERROR: type tablename does not exist in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
alagu madhu
 
Posts: n/a

Default [BUGS] BUG #1481: ERROR: type tablename does not exist - 02-14-2005 , 07:20 AM







The following bug has been logged online:

Bug reference: 1481
Logged by: alagu madhu
Email address: almadhu (AT) yahoo (DOT) com
PostgreSQL version: 8.0
Operating system: Redhat
Description: ERROR: type tablename does not exist
Details:

CREATE FUNCTION merge_fields(t_row tablename) RETURNS text AS $$
DECLARE
t2_row table2name%ROWTYPE;
BEGIN
SELECT * INTO t2_row FROM table2name WHERE ... ;
RETURN t_row.f1 || t2_row.f3 || t_row.f5 || t2_row.f7;
END;
$$ LANGUAGE plpgsql;

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply With Quote
  #2  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: [BUGS] BUG #1481: ERROR: type tablename does not exist - 02-14-2005 , 12:26 PM






On Mon, Feb 14, 2005 at 10:21:08AM +0000, alagu madhu wrote:
Quote:
Description: ERROR: type tablename does not exist
Details:

CREATE FUNCTION merge_fields(t_row tablename) RETURNS text AS $$
Do you have a table or composite type named "tablename"? Your
example works for me in 8.0.1 if tablename and table2name both
exist.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(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.