psql tab completion & USERSET vars

From: Neil Conway <neilc(at)samurai(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: psql tab completion & USERSET vars
Date: 2004-02-08 23:17:33
Message-ID: 873c9l88ky.fsf@mailbox.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While reviewing Andrew Dunstan's patch that implements the
log_disconnections GUC var, I noticed that tab-complete.c in psql
claims that only "USERSET and possibly SUSET" GUC variables should be
included in the list of variables that can be auto-completed.

That policy is clearly not followed: fsync, max_connections, port,
shared_buffers, ssl, wal_sync_method, and various other non-USERSET or
SUSET variables are presently included in the completion list.

The two obvious ways to fix this are to add the remaining variables to
the completion list and remove the USERSET/SUSET policy, or to remove
the variables that violate this policy. I think the former is a better
idea, for two reasons:

(1) tab-completing GUC variables that one cannot set is still
useful for SHOW

(2) enforcing semantic validity is something psql is clearly not
in a position to do in the general case, so it strikes me as
rather pointless to try

Any comments?

-Neil

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2004-02-08 23:29:47 Re: [PATCHES] update i386 spinlock for hyperthreading
Previous Message Alex J. Avriette 2004-02-08 22:41:37 Re: RFC: Very large scale postgres support