Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Expose the default for channel_binding in PQconndefaults().
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 28 Dec 2020 17:13:40 +0000 (12:13 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 28 Dec 2020 17:13:40 +0000 (12:13 -0500)
If there's a static default value for a connection option,
it should be shown in the PQconninfoOptions array.

Daniele Varrazzo

Discussion: https://postgr.es/m/CA+mi_8Zo8Rgn7p+6ZRY7QdDu+23ukT9AvoHNyPbgKACxwgGhZA@mail.gmail.com

src/interfaces/libpq/fe-connect.c

index 4c45c126e4cac2874398390cdb70e19acbfc35ad..d5c702d8dd18260346cd1c4867be8dc5d58f9533 100644 (file)
@@ -214,7 +214,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
        "Database-Password-File", "", 64,
    offsetof(struct pg_conn, pgpassfile)},
 
-   {"channel_binding", "PGCHANNELBINDING", NULL, NULL,
+   {"channel_binding", "PGCHANNELBINDING", DefaultChannelBinding, NULL,
        "Channel-Binding", "", 8,   /* sizeof("require") == 8 */
    offsetof(struct pg_conn, channel_binding)},