From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wells Oliver <wells.oliver@gmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: plpgsql, dynamic variable lengths..
Date: Fri, 07 Feb 2020 21:36:03 -0500
Message-ID: <31014.1581129363@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOC+FBVj-CuZriMmLa0oEWONuQQmzzLN9Bzu8cF6AGykh+OUmA@mail.gmail.com>
References: <CAOC+FBVDAcHKJXfJhYVf4Et5E6ohbE+Sw4s2jG+ioCCLJOjunw@mail.gmail.com>
<29969.1581127784@sss.pgh.pa.us>
<CAOC+FBVj-CuZriMmLa0oEWONuQQmzzLN9Bzu8cF6AGykh+OUmA@mail.gmail.com>
Wells Oliver <wells.oliver@gmail.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
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, wells.oliver@gmail.com
Subject: Re: plpgsql, dynamic variable lengths..
In-Reply-To: <31014.1581129363@sss.pgh.pa.us>
* 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