27

I can not find any references to the data type 'name' in the postgres documentation but I am seeing it as a data type on the pgagent.pga_jobstep table for the column 'jstdbname'. The udt_name is also 'name'. Selecting the rows from that table makes them appear as if they are strings.

It is not listed here: Postgres data types

Arthur Putnam
  • 513
  • 2
  • 5
  • 12

2 Answers2

27

Name is a 63 byte (varchar) type used for storing system identifiers.

Using psql you can get type information using \dT or \dT+

So for the name type:

# \dT name

                           List of data types
   Schema   | Name |                 Description                 
------------+------+---------------------------------------------
 pg_catalog | name | 63-byte type for storing system identifiers
(1 row)

or

# \dT+ name
                                                    List of data types
   Schema   | Name | Internal name | Size | Elements |  Owner   | Access privileges |                 Description                 
------------+------+---------------+------+----------+----------+-------------------+---------------------------------------------
 pg_catalog | name | name          | 64   |          | postgres |                   | 63-byte type for storing system identifiers
(1 row)
gsiems
  • 3,253
  • 2
  • 21
  • 26
4
Table 8.5. Special Character Types

Name    Storage Size  Description
"char"  1 byte        single-byte internal type
name    64 bytes      internal type for object names

https://www.postgresql.org/docs/current/datatype-character.html