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
signature.asc
Description: PGP signature