psql tab completion & USERSET vars - Mailing list pgsql-hackers

From Neil Conway
Subject psql tab completion & USERSET vars
Date
Msg-id 873c9l88ky.fsf@mailbox.samurai.com
Whole thread Raw
Responses Re: psql tab completion & USERSET vars  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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,
soit strikes me as         rather pointless to try
 

Any comments?

-Neil



pgsql-hackers by date:

Previous
From: "Alex J. Avriette"
Date:
Subject: Re: RFC: Very large scale postgres support
Next
From: "Simon Riggs"
Date:
Subject: Re: [PATCHES] update i386 spinlock for hyperthreading