Received: from radius.wavefire.com (radius.wavefire.com [139.142.95.252]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f25JpHx30453 for ; Mon, 5 Mar 2001 14:51:18 -0500 (EST) (envelope-from wade@wavefire.com) Received: (qmail 17232 invoked from network); 5 Mar 2001 20:01:45 -0000 Received: from wade.wavefire.com (HELO wade) (139.142.167.223) by radius.wavefire.com with SMTP; 5 Mar 2001 20:01:45 -0000 Message-Id: <3.0.32.20010305115122.01951500@mail.wavefire.com> X-Sender: wade@mail.wavefire.com X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Mon, 05 Mar 2001 11:51:22 -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/58 X-Sequence-Number: 1703 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