Add psql tab completion support for FOR PORTION OF

Started by Kiran K28 days ago3 messageshackers
Jump to latest
#1Kiran K
itskkpg@gmail.com

Hi Hackers,

Add tab completion support in psql for the FOR PORTION OF clause
used in UPDATE and DELETE statements with temporal tables.
Attached a patch with the changes and corresponding tests.

Regards,
Kiran

Attachments:

0001-Add-psql-tab-completion-for-FOR-PORTION-OF-clause.patchapplication/octet-stream; name=0001-Add-psql-tab-completion-for-FOR-PORTION-OF-clause.patchDownload+71-5
#2Peter Eisentraut
peter_e@gmx.net
In reply to: Kiran K (#1)
Re: Add psql tab completion support for FOR PORTION OF

On 15.04.26 05:52, Kiran K wrote:

Add tab completion support in psql for the FOR PORTION OF clause
used in UPDATE and DELETE statements with temporal tables.
Attached a patch with the changes and corresponding tests.

This looks very useful, but it seems one of the rules doesn't quite work
in my testing:

update pg_class for portion of oid from 1 to 2 <tab>

I think you mean for this to complete AS or SET, but it offers nothing
in my testing. (Same with DELETE.)

(Obviously, the table and column names and values are nonsense, but they
should work for the purpose of tab completion.)

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Peter Eisentraut (#2)
Re: Add psql tab completion support for FOR PORTION OF

On 27.04.26 11:02, Peter Eisentraut wrote:

On 15.04.26 05:52, Kiran K wrote:

Add tab completion support in psql for the FOR PORTION OF clause
used in UPDATE and DELETE statements with temporal tables.
Attached a patch with the changes and corresponding tests.

This looks very useful, but it seems one of the rules doesn't quite work
in my testing:

update pg_class for portion of oid from 1 to 2 <tab>

I think you mean for this to complete AS or SET, but it offers nothing
in my testing.  (Same with DELETE.)

In order to semi-conclude this thread, I have committed this patch with
the rule that didn't work removed. Thanks.