Re: [bug] keyword commit being accepted for column name

From: Kirk Parker <khp(at)equatoria(dot)us>
To: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: [bug] keyword commit being accepted for column name
Date: 2025-05-31 18:22:08
Message-ID: CANwZ8rmFPavdXmTQa9qS+sVEquyC2staomFf7OvkXPD0witYjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, May 31, 2025, 11:03 Vinícius Abrahão <vinnix(dot)bsd(at)gmail(dot)com> wrote:

> postgres=# create table postgres_git_repository(commit text,
> first_line_commit text);
> CREATE TABLE
> postgres=# create table postgres_git_repository2("commit" text,
> first_line_commit text);
> CREATE TABLE
> postgres=# create table postgres_git_repository3("COMMIT" text,
> first_line_commit text);
> CREATE TABLE
>
> postgres=# select version();
> version
>
>
> --------------------------------------------------------------------------------------------------------
> PostgreSQL 17.4 on x86_64-pc-linux-gnu, compiled by clang version 19.1.7
> (CentOS 19.1.7-1.el9), 64-bit
>
> postgres=# \d postgres_git_repository
> Table "public.postgres_git_repository"
> Column | Type | Collation | Nullable | Default
> -------------------+------+-----------+----------+---------
> commit | text | | |
> first_line_commit | text | | |
>
> postgres=# \h commit
> Command: COMMIT
> Description: commit the current transaction
> Syntax:
> COMMIT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
>
> URL: https://www.postgresql.org/docs/17/sql-commit.html
>

This is one of those cases where PostgreSQL diverges from the SQL standard
(and documents that it does so):

https://www.postgresql.org/docs/current/sql-keywords-appendix.html#KEYWORDS-TABLE

>
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2025-05-31 18:32:10 Re: [bug] keyword commit being accepted for column name
Previous Message Vinícius Abrahão 2025-05-31 18:03:09 [bug] keyword commit being accepted for column name