Skip to content

Put type modifier between parentheses and quotes#44

Open
M-Butter wants to merge 1 commit into
aws:mainfrom
M-Butter:main
Open

Put type modifier between parentheses and quotes#44
M-Butter wants to merge 1 commit into
aws:mainfrom
M-Butter:main

Conversation

@M-Butter

@M-Butter M-Butter commented Jun 4, 2026

Copy link
Copy Markdown

The type modifier (if any) for a collection or icollection is specified as the text representation of a data type, like:
collection('text')
But when displaying the type, it showed as collectiontext instead of collection('text').

Issue #, if available:

Description of changes:

With definitions:

postgres=# create schema typemodtest;
CREATE SCHEMA
postgres=# create type typemodtest.my_rec as (
        coll_no_typemod              collection,
        coll_typemod_int             collection('int'),
        icoll_no_typemod             icollection,
        icollection_typemod_varchar  icollection('varchar')
);
CREATE TYPE

the type definition shows as:

postgres=# \d typemodtest.my_rec
                             Composite type "typemodtest.my_rec"
           Column            |             Type             | Collation | Nullable | Default 
-----------------------------+------------------------------+-----------+----------+---------
 coll_no_typemod             | collection                   |           |          | 
 coll_typemod_int            | collectioninteger            |           |          | 
 icoll_no_typemod            | icollection                  |           |          | 
 icollection_typemod_varchar | icollectioncharacter varying |           |          | 

but should show as:

postgres=# \d typemodtest.my_rec
                               Composite type "typemodtest.my_rec"
           Column            |               Type               | Collation | Nullable | Default 
-----------------------------+----------------------------------+-----------+----------+---------
 coll_no_typemod             | collection                       |           |          | 
 coll_typemod_int            | collection('integer')            |           |          | 
 icoll_no_typemod            | icollection                      |           |          | 
 icollection_typemod_varchar | icollection('character varying') |           |          | 

That is what this pull request is about.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The type modifier (if any) for a collection or icollection is specified
as the text representation of a data type, like:
    collection('text')
But when displaying the type, it showed as collectiontext instead of
collection('text').
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant