Re: SELECT statement in stored procedure

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT statement in stored procedure
Date: 2006-07-01 17:56:26
Message-ID: 200607011056.27045@hal.medialogik.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Saturday 01 July 2006 09:08, "Alain Roger" <raf(dot)news(at)gmail(dot)com> wrote:
> it works but i get all fields from my accounts table.
>
> So how can i get only login and status ?
>

Define a composite type that includes only those fields and return SETOF
that_new_type instead of SETOF accounts.

Or select login,status from function_name() instead of select *.

--
When we vote for taxes, we are voting to steal from our neighbors

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Clodoaldo Pinto 2006-07-01 18:48:32 Postgresql does not start on reboot
Previous Message David Fetter 2006-07-01 16:53:06 Re: Dynamic technical graphics generation inside plperl query?