Documentation errors in Programmers guide, chapter 4.

Started by Dan Merillatabout 25 years ago2 messagesdocs
Jump to latest
#1Dan Merillat
harik@chaos.ao.net

The following more interesting example takes a single argument of type EMP, and retrieves multiple results:

select function hobbies (EMP) returns set of HOBBIES
as 'select (HOBBIES.all) from HOBBIES
where $1.name = HOBBIES.person'
language 'sql';

Should be:

create function hobbies (EMP) returns setof HOBBIES ...

It took me quite a while to figure out the second error, since "set of"
seemed perfectly natural there, when in fact it is "setof".

Thanks,

--Dan

#2Bruce Momjian
bruce@momjian.us
In reply to: Dan Merillat (#1)
Re: Documentation errors in Programmers guide, chapter 4.

Looks like this has been fixed. Can you check the development
documentation on the web site.

The following more interesting example takes a single argument of type EMP, and retrieves multiple results:

select function hobbies (EMP) returns set of HOBBIES
as 'select (HOBBIES.all) from HOBBIES
where $1.name = HOBBIES.person'
language 'sql';

Should be:

create function hobbies (EMP) returns setof HOBBIES ...

It took me quite a while to figure out the second error, since "set of"
seemed perfectly natural there, when in fact it is "setof".

Thanks,

--Dan

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026