Re: pgsql variables from records

From: Richard Huxton <dev(at)archonet(dot)com>
To: SunWuKung <Balazs(dot)Klein(at)axelero(dot)hu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pgsql variables from records
Date: 2006-03-17 15:31:02
Message-ID: 441AD636.6090009@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

SunWuKung wrote:
> Select Into max_option parameter_value From parameters Where methodid=
> 999 And parameter_name='max_option'
>
> and so on for each parameter.
>
> Is there a way to get all these parameters into one variable in pgsql -
> eg. Select Into paramarray(param_name, param_value) parameter_name,
> parameter_value Where methodid=999 - and refer to their values in a
> simple way like param_array.max_option ?

Have a look at using a variable of type RECORD. See the plpgsql
documentation for examples.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2006-03-17 15:31:39 Re: Grant Priviliges on column
Previous Message Richard Huxton 2006-03-17 15:30:11 Re: each line counter