pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kumar <sgnerd@yahoo.com.sg>
To: psql <pgsql-sql@postgresql.org>
Subject: How to return a record set from function.
Date: Wed, 27 Aug 2003 12:48:15 +0530
Message-ID: <006901c36c6b$65ab2000$7502a8c0@hdsc.com> (raw)

Dear Friends,

I am newbie to Postgres. I am running 7.3.4 on Linux 7.3. I am using Pgadmin tool. I need to return the table rows via record set.

Create table t1 (c1 int, c2 varchar, c3 varchar);

Create or Replace function sel_t1 () returns setof records as '
select c1, c2, c3 from t1;
' Language SQL;

It was fine and created a function. while i execute it as

select sel_t1; 

 I got the following error.

ERROR:  Cannot display a value of type RECORD

How to solve this. Please help.

Kumar

view thread (4+ messages)  latest in thread

Message-ID: <006901c36c6b$65ab2000$7502a8c0@hdsc.com>
Permalink:  ../006901c36c6b$65ab2000$7502a8c0@hdsc.com/
Also on:    postgresql.org/message-id/006901c36c6b$65ab2000$7502a8c0@hdsc.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sgnerd@yahoo.com.sg
  Subject: Re: How to return a record set from function.
  In-Reply-To: <006901c36c6b$65ab2000$7502a8c0@hdsc.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox