public inbox for [email protected]  
help / color / mirror / Atom feed
From: Diego <[email protected]>
To: [email protected]
Subject: Bug in create type when missed the comma between element list
Date: Mon, 4 Nov 2024 13:17:14 -0300
Message-ID: <[email protected]> (raw)

Hi team!

I found this bug in the create type command. If you miss the comma 
between the elements, the command doesn't fail; it runs and concatenates 
the elements.

I detected the problem in v14.4, and it is alive in v17.

pglatest$ psql -h 127.0.0.1 -p 55532
Password for user daf:
Time: 0.481 ms
psql (16.4 (Ubuntu 16.4-1.pgdg24.04+2), server 17.0 (Debian 
17.0-1.pgdg120+1))
WARNING: psql major version 16, server major version 17.
          Some psql features might not work.
Type "help" for help.

u: daf db: daf # CREATE TYPE test_enum AS ENUM(
     'one'
     'two',
     'three',
     'four'
);
CREATE TYPE
Time: 12.242 ms
u: daf db: daf # \dt+
Did not find any relations.
u: daf db: daf # \dT+
                                        List of data types
  Schema |   Name    | Internal name | Size | Elements | Owner | Access 
privileges | Description
--------+-----------+---------------+------+----------+-------+-------------------+-------------
  public | test_enum | test_enum     | 4    | onetwo  +| daf 
|                   |
         |           |               |      | three   +| 
|                   |
         |           |               |      | four     | 
|                   |
(1 row)

u: daf db: daf #


maybe, some of you can help me to report it properly.

Thank you,
Diego.


view thread (2+ messages)

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Bug in create type when missed the comma between element list
  In-Reply-To: <[email protected]>

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

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