Re: plpgsql, dynamic variable lengths..

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: plpgsql, dynamic variable lengths..
Date: 2020-02-08 02:36:03
Message-ID: 31014.1581129363@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Wells Oliver <wells(dot)oliver(at)gmail(dot)com> writes:
> Yes, but the issue is it won't always be three params, and not always the
> same variable in $1, $2, etc. It depends on which keys are present in the
> passed JSON object. Which I why I think I need to do something else like
> create a recordset and pass that in USING, or something. Just can't quite
> figure it out...

Maybe just pass the JSON object as the only USING param, and do the
field selections in the SQL fragments?

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Guillaume Lelarge 2020-02-08 08:54:45 Re: plpgsql, dynamic variable lengths..
Previous Message Wells Oliver 2020-02-08 02:23:31 Re: plpgsql, dynamic variable lengths..