Skip site navigation (1) Skip section navigation (2)

Re: Tab completion for view triggers in psql

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Josh Kupershmidt <schmiddy(at)gmail(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tab completion for view triggers in psql
Date: 2010-11-30 11:13:37
Message-ID: AANLkTimh=mfPoa8YG78UfCZdQ9JNDEKcaTbRis6vJrZ7@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, Nov 30, 2010 at 18:18, David Fetter <david(at)fetter(dot)org> wrote:
>> It expands all tables (and views) in tab-completion after INSERT,
>> UPDATE, and DELETE FROM.  Is it an intended change?

I found it was a simple bug; we need ( ) around selcondition.

In addition, I modified your patch a bit:

* I added a separated CREATE TRIGGER INSTEAD OF if-branch
  because it doesn't accept tables actually; it only accepts
  views. OTOH, BEFORE or AFTER only accepts tables.

* I think "t.tgtype & (1 << N) <> 0" is more natural
  bit operation than "t.tgtype | (1 << N) = t.tgtype".

Patch attached. If you think my changes are ok,
please change the patch status to "Ready for Committer".

-- 
Itagaki Takahiro

Attachment: psql_view_trigger_tab_completion_6.diff
Description: application/octet-stream (10.6 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2010-11-30 12:26:57
Subject: Re: [GENERAL] column-level update privs + lock table
Previous:From: Heikki LinnakangasDate: 2010-11-30 10:02:50
Subject: Re: GiST insert algorithm rewrite

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group