Re: [HACKERS] Tab completion for view triggers in psql

2010-12-16 Thread Greg Smith
David Fetter wrote: That we're in the position of having prevN_wd for N = 1..5 as the current code exists is a sign that we need to refactor the whole thing, as you've suggested before. I'll work up a design and prototype for this by this weekend. Great. I don't think issues around tab

Re: [HACKERS] Tab completion for view triggers in psql

2010-12-16 Thread David Fetter
On Thu, Dec 16, 2010 at 07:40:31AM -0500, Greg Smith wrote: David Fetter wrote: That we're in the position of having prevN_wd for N = 1..5 as the current code exists is a sign that we need to refactor the whole thing, as you've suggested before. I'll work up a design and prototype for this

Re: [HACKERS] Tab completion for view triggers in psql

2010-12-14 Thread David Fetter
On Mon, Dec 13, 2010 at 10:48:54PM -0500, Robert Haas wrote: On Tue, Nov 30, 2010 at 9:15 AM, David Fetter da...@fetter.org wrote: Patch attached. If you think my changes are ok, please change the patch status to Ready for Committer. Done :) I have committed part of this patch. Great!

Re: [HACKERS] Tab completion for view triggers in psql

2010-12-13 Thread Robert Haas
On Tue, Nov 30, 2010 at 9:15 AM, David Fetter da...@fetter.org wrote: Patch attached. If you think my changes are ok, please change the patch status to Ready for Committer. Done :) I have committed part of this patch. The rest is attached. I don't know that there's any problem with it, but

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-30 Thread Itagaki Takahiro
On Wed, Nov 24, 2010 at 12:21, David Fetter da...@fetter.org wrote: Please find attached a patch changing both this and updateable to updatable, also per the very handy git grep I just learned about :) I think the patch has two issues to be fixed. It expands all tables (and views) in

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-30 Thread David Fetter
On Tue, Nov 30, 2010 at 05:48:04PM +0900, Itagaki Takahiro wrote: On Wed, Nov 24, 2010 at 12:21, David Fetter da...@fetter.org wrote: Please find attached a patch changing both this and updateable to updatable, also per the very handy git grep I just learned about :) I think the patch has

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-30 Thread Itagaki Takahiro
On Tue, Nov 30, 2010 at 18:18, David Fetter da...@fetter.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

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-30 Thread David Fetter
On Tue, Nov 30, 2010 at 08:13:37PM +0900, Itagaki Takahiro wrote: On Tue, Nov 30, 2010 at 18:18, David Fetter da...@fetter.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 (

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-26 Thread David Fetter
On Wed, Nov 24, 2010 at 11:01:28PM -0500, Josh Kupershmidt wrote: On Tue, Nov 23, 2010 at 10:21 PM, David Fetter da...@fetter.org wrote: Please find attached a patch changing both this and updateable to updatable, also per the very handy git grep I just learned about :) I looked a little

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-24 Thread Josh Kupershmidt
On Tue, Nov 23, 2010 at 10:21 PM, David Fetter da...@fetter.org wrote: Please find attached a patch changing both this and updateable to updatable, also per the very handy git grep I just learned about :) I looked a little more at this patch today. I didn't find any serious problems, though it

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-23 Thread Josh Kupershmidt
On Fri, Oct 29, 2010 at 10:33 AM, David Fetter da...@fetter.org wrote: That seems like a matter for a separate patch.  Looking this over, I found I'd created a query that can never get used, so please find enclosed the next version of the patch :) I like deletables better than deleteables for

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-23 Thread David Fetter
On Tue, Nov 23, 2010 at 09:37:57PM -0500, Josh Kupershmidt wrote: On Fri, Oct 29, 2010 at 10:33 AM, David Fetter da...@fetter.org wrote: That seems like a matter for a separate patch.  Looking this over, I found I'd created a query that can never get used, so please find enclosed the next

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-22 Thread Alvaro Herrera
Excerpts from David Fetter's message of dom nov 21 21:17:12 -0300 2010: Given its small and isolated nature, I was hoping we could get this in sooner rather than later. As I understand it, CFs are there to review patches that take significant effort for even a committer to understand, so

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-21 Thread David Fetter
On Fri, Oct 29, 2010 at 08:33:00AM -0700, David Fetter wrote: On Tue, Oct 26, 2010 at 11:55:07AM +0900, Itagaki Takahiro wrote: On Tue, Oct 26, 2010 at 11:34 AM, David Fetter da...@fetter.org wrote: Do we need to 'add' it? Possibly.  My understanding is that it couldn't really replace it.

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-21 Thread Robert Haas
On Sun, Nov 21, 2010 at 1:07 PM, David Fetter da...@fetter.org wrote: On Fri, Oct 29, 2010 at 08:33:00AM -0700, David Fetter wrote: On Tue, Oct 26, 2010 at 11:55:07AM +0900, Itagaki Takahiro wrote: On Tue, Oct 26, 2010 at 11:34 AM, David Fetter da...@fetter.org wrote: Do we need to 'add'

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-21 Thread David Fetter
On Sun, Nov 21, 2010 at 03:36:58PM -0500, Robert Haas wrote: On Sun, Nov 21, 2010 at 1:07 PM, David Fetter da...@fetter.org wrote: On Fri, Oct 29, 2010 at 08:33:00AM -0700, David Fetter wrote: On Tue, Oct 26, 2010 at 11:55:07AM +0900, Itagaki Takahiro wrote: On Tue, Oct 26, 2010 at 11:34

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-21 Thread Robert Haas
On Sun, Nov 21, 2010 at 4:05 PM, David Fetter da...@fetter.org wrote: Could someone please commit this? :) Eh... was there some reason you didn't add it to the CommitFest app? I forgot. A fair excuse. :-) Because that's what I work from. It's pretty trivial, but I don't feel

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-21 Thread David Fetter
On Sun, Nov 21, 2010 at 07:09:08PM -0500, Robert Haas wrote: On Sun, Nov 21, 2010 at 4:05 PM, David Fetter da...@fetter.org wrote: Could someone please commit this? :) Eh... was there some reason you didn't add it to the CommitFest app? I forgot. A fair excuse. :-) Because

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-21 Thread Robert Haas
On Sun, Nov 21, 2010 at 7:17 PM, David Fetter da...@fetter.org wrote: On Sun, Nov 21, 2010 at 07:09:08PM -0500, Robert Haas wrote: On Sun, Nov 21, 2010 at 4:05 PM, David Fetter da...@fetter.org wrote: Could someone please commit this? :) Eh... was there some reason you didn't add it to

Re: [HACKERS] Tab completion for view triggers in psql

2010-11-21 Thread David Fetter
On Sun, Nov 21, 2010 at 08:27:34PM -0500, Robert Haas wrote: On Sun, Nov 21, 2010 at 7:17 PM, David Fetter da...@fetter.org wrote: On Sun, Nov 21, 2010 at 07:09:08PM -0500, Robert Haas wrote: On Sun, Nov 21, 2010 at 4:05 PM, David Fetter da...@fetter.org wrote: Could someone please commit

Re: [HACKERS] Tab completion for view triggers in psql

2010-10-29 Thread David Fetter
On Tue, Oct 26, 2010 at 11:55:07AM +0900, Itagaki Takahiro wrote: On Tue, Oct 26, 2010 at 11:34 AM, David Fetter da...@fetter.org wrote: Do we need to 'add' it? Possibly.  My understanding is that it couldn't really replace it. Ah, I see. I was wrong. We can have modification privileges

Re: [HACKERS] Tab completion for view triggers in psql

2010-10-26 Thread Dean Rasheed
On 25 October 2010 21:01, David Fetter da...@fetter.org wrote: Folks, Please find attached patch for $subject :) Thanks for looking at this. I forgot about tab completion. I think that the change to ALTER TRIGGER is not necessary. AFAICT it works OK unmodified. In fact, the modified code

Re: [HACKERS] Tab completion for view triggers in psql

2010-10-26 Thread David Fetter
On Tue, Oct 26, 2010 at 12:35:13PM +0100, Dean Rasheed wrote: On 25 October 2010 21:01, David Fetter da...@fetter.org wrote: Folks, Please find attached patch for $subject :) Thanks for looking at this. I forgot about tab completion. I think that the change to ALTER TRIGGER is not

[HACKERS] Tab completion for view triggers in psql

2010-10-25 Thread David Fetter
Folks, Please find attached patch for $subject :) Cheers, David. -- David Fetter da...@fetter.org http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Re: [HACKERS] Tab completion for view triggers in psql

2010-10-25 Thread Itagaki Takahiro
On Tue, Oct 26, 2010 at 5:01 AM, David Fetter da...@fetter.org wrote: Please find attached patch for $subject :) Thank you for maintaining psql tab completion, but I'm not sure whether tgtype is the best column for the purpose. How about has_table_privilege() to filter candidate relations in

Re: [HACKERS] Tab completion for view triggers in psql

2010-10-25 Thread David Fetter
On Tue, Oct 26, 2010 at 10:30:49AM +0900, Itagaki Takahiro wrote: On Tue, Oct 26, 2010 at 5:01 AM, David Fetter da...@fetter.org wrote: Please find attached patch for $subject :) Thank you for maintaining psql tab completion, but I'm not sure whether tgtype is the best column for the

Re: [HACKERS] Tab completion for view triggers in psql

2010-10-25 Thread Itagaki Takahiro
On Tue, Oct 26, 2010 at 10:53 AM, David Fetter da...@fetter.org wrote: How about has_table_privilege() to filter candidate relations That's orthogonal to tgtype (snip) Shall I send a new patch with that added? Do we need to 'add' it? I intended to replace the JOIN with pg_trigger to

Re: [HACKERS] Tab completion for view triggers in psql

2010-10-25 Thread David Fetter
On Tue, Oct 26, 2010 at 11:10:53AM +0900, Itagaki Takahiro wrote: On Tue, Oct 26, 2010 at 10:53 AM, David Fetter da...@fetter.org wrote: How about has_table_privilege() to filter candidate relations That's orthogonal to tgtype (snip) Shall I send a new patch with that added? Do we need

Re: [HACKERS] Tab completion for view triggers in psql

2010-10-25 Thread Itagaki Takahiro
On Tue, Oct 26, 2010 at 11:34 AM, David Fetter da...@fetter.org wrote: Do we need to 'add' it? Possibly.  My understanding is that it couldn't really replace it. Ah, I see. I was wrong. We can have modification privileges for views even if they have no INSTEAD OF triggers. So, I think your