dbTalk Databases Forums  

Re: [BUGS] Record type and ROW type in pl/pgsql functions

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


Discuss Re: [BUGS] Record type and ROW type in pl/pgsql functions in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Record type and ROW type in pl/pgsql functions - 04-20-2004 , 07:45 AM






dinar (AT) yantel (DOT) ru writes:
Quote:
declare
hosts_str mail_relayhosts%ROWTYPE;
...
FOR hosts_str IN SELECT hosts from mail_relayhosts LOOP
You would need SELECT * FROM here, if you're selecting the whole row.
This is going to try to stuff "hosts" into the first column of the
rowtype variable, which is the wrong datatype. (I think it would then
complain about too few columns supplied, but it's not getting that far.)

regards, tom lane

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


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.