Re: Table as argument in postgres function

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Table as argument in postgres function
Date: 2019-05-21 07:04:07
Message-ID: CADkLM=c+xaexd8LmfBmqMJ_M4pDQj=YFk2Xcd1hzQtOwqebk9w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

>
>
>> Is there anything preventing us from having the planner resolve object
>> names from strings?
>>
>
> The basic problem is fact so when you use PREPARE, EXECUTE protocol, you
> has not parameters in planning time.
>

I agree that it defeats PREPARE as it is currently implemented with
PQprepare(), and it would never be meaningful to have a query plan that
hasn't finalized which objects are involved.

But could it be made to work with PQexecParams(), where the parameter
values are already provided?

Could we make a version of PQprepare() that takes an extra array of
paramValues for object names that must be supplied at prepare-time?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2019-05-21 07:10:15 Re: PG 12 draft release notes
Previous Message Kyotaro HORIGUCHI 2019-05-21 07:00:25 Re: VACUUM fails to parse 0 and 1 as boolean value

Browse pgsql-sql by date

  From Date Subject
Next Message Pavel Stehule 2019-05-21 07:13:46 Re: Table as argument in postgres function
Previous Message Pavel Stehule 2019-05-20 06:03:46 Re: Table as argument in postgres function