pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ilmari@ilmari.org
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [PATCH] Improve tab completion for CREATE TABLE
Date: Fri, 21 Dec 2018 13:57:40 +0000
Message-ID: <d8j4lb7f0dn.fsf@dalvik.ping.uio.no> (raw)
In-Reply-To: <20181220053352.GO27104@paquier.xyz>
References: <d8j1s77kdbb.fsf@dalvik.ping.uio.no>
	<d8j7eguin89.fsf@dalvik.ping.uio.no>
	<20181219050530.GC19856@paquier.xyz>
	<d8jh8f9f6fe.fsf@dalvik.ping.uio.no>
	<20181219234408.GD27104@paquier.xyz>
	<d8j8t0lf4k3.fsf@dalvik.ping.uio.no>
	<20181220053352.GO27104@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:

> On Thu, Dec 20, 2018 at 12:02:52AM +0000, Dagfinn Ilmari Mannsåker wrote:
>> Point, fixed in the attached v4.  OTOH, as I mentioned in my other
>> email, that runs into the problem that it won't complete the actions
>> after e.g.  "CREATE TEMP TABLE FOO () WITH () ON COMMIT".
>
> I am fine to do that later on if that's adapted, one complication being
> that the completion is dependent on the order of the clauses for CREATE
> TABLE as we need something compatible with CREATE TABLE commands bundled
> with CREATE SCHEMA calls so only tail checks can be done.

Yeah, because of that we can't do the obvious HeadMatches("CREATE",
"TABLE") && (TailMatches(...) || TailMatches(...) || ...).  I believe
this would require extending the match syntax with regex-like grouping,
alternation and repetition operators, which I'm not volunteering to do.

> So committed your last version after some comment tweaks and reordering
> the entries in alphabetical order.

Thanks!

- ilmari
-- 
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live with
 the consequences of."                              -- Skud's Meta-Law




view thread (15+ messages)  latest in thread

Message-ID: <d8j4lb7f0dn.fsf@dalvik.ping.uio.no>
Permalink:  ../d8j4lb7f0dn.fsf@dalvik.ping.uio.no/
Also on:    postgresql.org/message-id/d8j4lb7f0dn.fsf@dalvik.ping.uio.no

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: ilmari@ilmari.org, michael@paquier.xyz
  Subject: Re: [PATCH] Improve tab completion for CREATE TABLE
  In-Reply-To: <d8j4lb7f0dn.fsf@dalvik.ping.uio.no>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox