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

Re: psql tab completion for DO blocks

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql tab completion for DO blocks
Date: 2010-02-11 00:21:25
Message-ID: 201002110021.o1B0LPj03139@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Takahiro Itagaki wrote:
> 
> Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> 
> > Where are we on this patch?  We should at least implement the completion
> > for 'LANGUAGE' in 'DO', and use the existing pg_language query for
> > completion.  I am attaching a patch that does exactly this.
> 
> I don't think we need the patch except adding DO to the top-level sql_commands.
> 
> Syntax of DO command is:
>     DO code [ LANGUAGE lang_name ]
> We need 'code' before LANGUAGE, but the patch completes "DO" to "DO LANGUAGE".
> It will be just a syntax error.
> 
> Also, we've already had a completion after LANGUAGE (see words_after_create),
> so we don't need an additional Query_for_list_of_languages after LANGUAGE.

Ah, I see.  I had not checked the patch against the actual syntax; shame
on me.

> BTW, I'm working on psql tab-completion adjustment for new syntax in 9.0.
> I'll send it soon.

OK, thanks.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-02-11 00:40:20
Subject: Re: log_error_verbosity function display
Previous:From: Marko TiikkajaDate: 2010-02-11 00:13:19
Subject: Re: Writeable CTEs and empty relations

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