Re: [HACKERS] Proposal to add work_mem option to postgres_fdw module - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] Proposal to add work_mem option to postgres_fdw module
Date
Msg-id 20180827052906.GC5553@paquier.xyz
Whole thread Raw
In response to RE: [HACKERS] Proposal to add work_mem option to postgres_fdw module  ("Shinoda, Noriyoshi (PN Japan GCS Delivery)" <noriyoshi.shinoda@hpe.com>)
Responses Re: [HACKERS] Proposal to add work_mem option to postgres_fdw module
List 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

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Removing useless DISTINCT clauses
Next
From: Amit Langote
Date:
Subject: Re: document that MergeAppend can now prune