Re: [HACKERS] Proposal to add work_mem option to postgres_fdw module

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Shinoda, Noriyoshi (PN Japan GCS Delivery)" <noriyoshi(dot)shinoda(at)hpe(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Proposal to add work_mem option to postgres_fdw module
Date: 2018-08-27 05:29:06
Message-ID: 20180827052906.GC5553@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Shinoda-san,

On Sun, Aug 26, 2018 at 02:21:55AM +0000, Shinoda, Noriyoshi (PN Japan GCS Delivery) wrote:
> Thank you very much for your comment.
> I will try to modify it so that GUC can be added more generically.

It seems to me that you would pass down just a string which gets
allocated for "options", and injection risks are something to be careful
about. Another possibility would be an array with comma-separated
arguments, say:
options = 'option1=foo,option2=bar'
There is already some work done with comma-separated arguments for the
parameter "extensions", now that's more work.

> When specifying multiple GUC settings for PQconnectdbParams, is it
> correct to describe as follows?

Yep, it seems to me that you have that right.

https://www.postgresql.org/docs/devel/static/libpq-connect.html#LIBPQ-CONNSTRING

options
Specifies command-line options to send to the server at connection
start. For example, setting this to -c geqo=off sets the session's
value of the geqo parameter to off. Spaces within this string are
considered to separate command-line arguments, unless escaped with a
backslash (\); write \\ to represent a literal backslash. For a
detailed discussion of the available options, consult Chapter 19.

--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-08-27 06:07:55 Re: document that MergeAppend can now prune
Previous Message David Rowley 2018-08-27 05:24:06 Re: Removing useless DISTINCT clauses