| From: | Koshino Taiki <koshino(at)sraoss(dot)co(dot)jp> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | [PATCH] Improve tab completion for CREATE DOMAIN without AS |
| Date: | 2026-11-26 22:09:45 |
| Message-ID: | TY7P286MB974944F9962A98CE6B97CA71D394422@TY7P286MB974944.JPNP286.PROD.OUTLOOK.COM |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
AS is optional in CREATE DOMAIN, but psql completion currently works
only when it is present:
postgres=# CREATE DOMAIN d AS enu<Tab> -- completes enum1
postgres=# CREATE DOMAIN d enu<Tab> -- no completion
The attached patch offers data types both with and without AS. It also
offers the following clauses after the base type in either form:
COLLATE DEFAULT CONSTRAINT NOT NULL NULL CHECK (
Collation-name completion is corrected as well:
postgres=# CREATE DOMAIN d text COLLATE col<Tab>
postgres=# CREATE DOMAIN d text COLLATE coll1
The change follows the existing single-word base-type matching and does
not add completion inside DEFAULT or CHECK expressions.
Tests for both forms are included.
Regards,
Taiki Koshino
Taiki Koshino<koshino(at)sraoss(dot)co(dot)jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Improve-tab-completion-for-CREATE-DOMAIN-without-.patch | application/octet-stream | 3.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Koshino Taiki | 2026-11-26 22:08:34 | [PATCH] Improve tab completion after CREATE INDEX key list |