Re: [HACKERS] psql tab completion for updatable foreign tables

2013-10-23 Thread Robert Haas
On Sat, Oct 19, 2013 at 5:44 AM, Dean Rasheed dean.a.rash...@gmail.com wrote: On 18 October 2013 16:41, Robert Haas robertmh...@gmail.com wrote: On Fri, Oct 18, 2013 at 1:34 AM, Dean Rasheed dean.a.rash...@gmail.com wrote: Personally, I think this is too fancy anyway. I'd just complete all

Re: [HACKERS] psql tab completion for updatable foreign tables

2013-10-19 Thread Dean Rasheed
On 18 October 2013 16:41, Robert Haas robertmh...@gmail.com wrote: On Fri, Oct 18, 2013 at 1:34 AM, Dean Rasheed dean.a.rash...@gmail.com wrote: Personally, I think this is too fancy anyway. I'd just complete all views and foreign tables and be done with it. We don't inspect permissions

Re: [HACKERS] psql tab completion for updatable foreign tables

2013-10-18 Thread Robert Haas
On Fri, Oct 18, 2013 at 1:34 AM, Dean Rasheed dean.a.rash...@gmail.com wrote: Personally, I think this is too fancy anyway. I'd just complete all views and foreign tables and be done with it. We don't inspect permissions either, for example. This might be too confusing for users. Yeah, I

Re: [HACKERS] psql tab completion for updatable foreign tables

2013-10-17 Thread Dean Rasheed
On 17 October 2013 03:29, Peter Eisentraut pete...@gmx.net wrote: On Mon, 2013-07-08 at 16:04 +, Dean Rasheed wrote: There was concern that pg_relation_is_updatable() would end up opening every relation in the database, hammering performance. I now realise that these tab-complete queries

Re: [HACKERS] psql tab completion for updatable foreign tables

2013-10-16 Thread Peter Eisentraut
On Mon, 2013-07-08 at 16:04 +, Dean Rasheed wrote: There was concern that pg_relation_is_updatable() would end up opening every relation in the database, hammering performance. I now realise that these tab-complete queries have a limit (1000 by default) so I don't think this is such an

Re: [HACKERS] psql tab completion for updatable foreign tables

2013-10-14 Thread Samrat Revagade
On Fri, Sep 20, 2013 at 7:54 PM, Dean Rasheed dean.a.rash...@gmail.comwrote: On 20 September 2013 11:29, Samrat Revagade revagade.sam...@gmail.com wrote: Okay, are you adding this to the september commitfest? OK, I've done that. I think that it's too late for 9.3. +1 for

Re: [HACKERS] psql tab completion for updatable foreign tables

2013-10-14 Thread Pavan Deolasee
On Mon, Oct 14, 2013 at 7:20 PM, Samrat Revagade revagade.sam...@gmail.comwrote: Sorry .my environment has some problem. May be you were using old version of psql ? IIRC tab-completion relies heavily on the psql side, Thanks, Pavan -- Pavan Deolasee http://www.linkedin.com/in/pavandeolasee

Re: [HACKERS] psql tab completion for updatable foreign tables

2013-09-20 Thread Samrat Revagade
Okay, are you adding this to the september commitfest? OK, I've done that. I think that it's too late for 9.3. +1 for idea. I have tested patch and got surprising results with Cent-OS Patch is working fine for Cent-OS 6.2 and RHEL 6.3 But is is giving problem on Cent-OS 6.3 (tab

Re: [HACKERS] psql tab completion for updatable foreign tables

2013-09-20 Thread Dean Rasheed
On 20 September 2013 11:29, Samrat Revagade revagade.sam...@gmail.com wrote: Okay, are you adding this to the september commitfest? OK, I've done that. I think that it's too late for 9.3. +1 for idea. I have tested patch and got surprising results with Cent-OS Patch is working fine

Re: [HACKERS] psql tab completion for updatable foreign tables

2013-07-11 Thread Dean Rasheed
On 11 July 2013 00:03, Bernd Helmle maili...@oopsware.de wrote: --On 8. Juli 2013 16:04:31 + Dean Rasheed dean.a.rash...@gmail.com wrote: * pg_relation_is_updatable is only available in 9.3, whereas psql may connect to older servers, so it needs to guard against that. Oh of course, i

Re: [HACKERS] psql tab completion for updatable foreign tables

2013-07-10 Thread Bernd Helmle
--On 8. Juli 2013 16:04:31 + Dean Rasheed dean.a.rash...@gmail.com wrote: * pg_relation_is_updatable is only available in 9.3, whereas psql may connect to older servers, so it needs to guard against that. Oh of course, i forgot about this. Thanks for pointing out. * If we're doing

[HACKERS] psql tab completion for updatable foreign tables

2013-07-08 Thread Bernd Helmle
Recently i got annoyed that psql doesn't tab complete to updatable foreign tables. Attached is a patch to address this. I'm using the new pg_relation_is_updatable() function to accomplish this. The function could also be used for the trigger based stuff in the query, but i haven't touched

Re: [HACKERS] psql tab completion for updatable foreign tables

2013-07-08 Thread Dean Rasheed
On 8 July 2013 12:46, Bernd Helmle maili...@oopsware.de wrote: Recently i got annoyed that psql doesn't tab complete to updatable foreign tables. Attached is a patch to address this. I'm using the new pg_relation_is_updatable() function to accomplish this. The function could also be used for