postgres_fdw hint messages

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: postgres_fdw hint messages
Date: 2022-08-25 13:42:40
Message-ID: b1f9f399-3a1a-b554-283f-4ae7f34608e2@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The postgres_fdw tests contain this (as amended by patch 0001):

ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw');
ERROR: invalid option "password"
HINT: Valid options in this context are: service, passfile,
channel_binding, connect_timeout, dbname, host, hostaddr, port, options,
application_name, keepalives, keepalives_idle, keepalives_interval,
keepalives_count, tcp_user_timeout, sslmode, sslcompression, sslcert,
sslkey, sslrootcert, sslcrl, sslcrldir, sslsni, requirepeer,
ssl_min_protocol_version, ssl_max_protocol_version, gssencmode,
krbsrvname, gsslib, target_session_attrs, use_remote_estimate,
fdw_startup_cost, fdw_tuple_cost, extensions, updatable, truncatable,
fetch_size, batch_size, async_capable, parallel_commit, keep_connections

This annoys developers who are working on libpq connection options,
because any option added, removed, or changed causes this test to need
to be updated.

It's also questionable how useful this hint is in its current form,
considering how long it is and that the options are in an
implementation-dependent order.

Possible changes:

- Hide the hint from this particular test (done in the attached patches).

- Keep the hint, but maybe make it sorted?

- Remove all the hints like this from foreign data commands.

- Don't show the hint when there are more than N valid options.

- Do some kind of "did you mean" like we have for column names.

Thoughts?

Attachment Content-Type Size
0001-postgres_fdw-Remove-useless-DO-block-in-test.patch text/plain 2.7 KB
0002-postgres_fdw-Avoid-listing-all-libpq-connection-opti.patch text/plain 2.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-08-25 13:43:19 Re: Strip -mmacosx-version-min options from plperl build
Previous Message talk to ben 2022-08-25 13:29:41 Re: archive modules