Received: from radius.wavefire.com (radius.wavefire.com [139.142.95.252]) by mail.postgresql.org (8.11.3/8.11.1) with SMTP id f2QJxHw55268 for ; Mon, 26 Mar 2001 14:59:17 -0500 (EST) (envelope-from wade@wavefire.com) Received: (qmail 20429 invoked from network); 26 Mar 2001 20:03:00 -0000 Received: from wade.wavefire.com (HELO wade) (139.142.167.223) by radius.wavefire.com with SMTP; 26 Mar 2001 20:03:00 -0000 Message-Id: <3.0.32.20010326115909.0194b810@mail.wavefire.com> X-Sender: wade@mail.wavefire.com X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Mon, 26 Mar 2001 11:59:09 -0800 To: pgsql-sql@postgresql.org From: wade Subject: pl/pgsql and returning rows Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Archive-Number: 200103/532 X-Sequence-Number: 2202 Here is the senario... I have a table defined as create table details ( field1 field2 . . . ); and a function: create function get_details(int4) returns details as ' declare ret details%ROWTYPE; site_rec record; cntct contacts%ROWTYPE; begin select into site_rec * sites_table where id = $1 limit 1; select into cntct * from contacts where id = site_rec.contact; -- and then i populate rows of ret. ret.name := cntct.name; ret.ip := site_rec.ip; . . . return ret; end; ' language 'plpgsql'; now the problem is when is when I do a: SELECT get_details(55); all i get is a single oid-looking return value: get_details ------------- 136295592 (1 row) How do i get at the actual information in the row? Is this type of function even possible? If not, is there a different manner in which i should approach this task? Thanx in advance. -Wade