Wiki / Data Types / Character strings
pg_ndistinct
multivariate ndistinct coefficients
Reading PostgreSQL 18.6.
PG10–20 core source inventory. Casts and operator classes show explicitly declared relationships; absent rows do not rule out coercions or indexing through other mechanisms.
Definition
multivariate ndistinct coefficients
pg_ndistinct
- Catalog name
- pg_catalog.pg_ndistinct
- Type OID
- 3361
- Type kind
- Base type
- Declared length
- Variable length (varlena)
- Storage strategy
- extended
- Input function
- pg_ndistinct_in
- Output function
- pg_ndistinct_out
English manual
Read the complete manual section
Read the source definition
52.64. pg_type
The catalog pg_type stores information about data types. Base types and enum types (scalar types) are created with CREATE TYPE, and domains with CREATE DOMAIN. A composite type is automatically created for each table in the database, to represent the row structure of the table. It is also possible to create composite types with CREATE TYPE AS.
Table 52.64. pg_type Columns
|
Column Type Description |
|---|
|
Row identifier |
|
Data type name |
|
The OID of the namespace that contains this type |
|
Owner of the type |
|
For a fixed-size type, |
|
|
|
|
|
|
|
True if the type is a preferred cast target within its |
|
True if the type is defined, false if this is a placeholder entry for a not-yet-defined type. When |
|
Character that separates two values of this type when parsing array input. Note that the delimiter is associated with the array element data type, not the array data type. |
|
If this is a composite type (see |
|
Subscripting handler function's OID, or zero if this type doesn't support subscripting. Types that are “true” array types have |
|
If |
|
If |
|
Input conversion function (text format) |
|
Output conversion function (text format) |
|
Input conversion function (binary format), or zero if none |
|
Output conversion function (binary format), or zero if none |
|
Type modifier input function, or zero if type does not support modifiers |
|
Type modifier output function, or zero to use the standard format |
|
Custom ANALYZE function, or zero to use the standard function |
|
|
|
|
|
|
|
If this is a domain (see |
|
Domains use |
|
|
|
|
|
If |
|
|
|
Access privileges; see Section 5.8 for details |
Note
For fixed-width types used in system tables, it is critical that the size and alignment defined in pg_type agree with the way that the compiler will lay out the column in a structure representing a table row.
Table 52.65 lists the system-defined values of typcategory. Any future additions to this list will also be upper-case ASCII letters. All other ASCII characters are reserved for user-defined categories.
Table 52.65. typcategory Codes
| Code | Category |
|---|---|
A |
Array types |
B |
Boolean types |
C |
Composite types |
D |
Date/time types |
E |
Enum types |
G |
Geometric types |
I |
Network address types |
N |
Numeric types |
P |
Pseudo-types |
R |
Range types |
S |
String types |
T |
Timespan types |
U |
User-defined types |
V |
Bit-string types |
X |
unknown type |
Z |
Internal-use types |
Catalog attributes
Source bootstrap values for this build. See pg_type for field meanings. Header defaults are included; build-dependent constants remain symbolic. This is not a live-server measurement.
oid3361descrmultivariate ndistinct coefficientstypacl_null_typlen-1typelem0typnamepg_ndistincttypsendpg_ndistinct_sendtyptypebtypalignityparray0typbyvalftypdelim','typinputpg_ndistinct_intypmodin-typndims0typownerPOSTGREStyprelid0typmodout-typoutputpg_ndistinct_outtyptypmod-1typanalyze-typdefault_null_typnotnullftypreceivepg_ndistinct_recvtypstoragextypbasetype0typcategoryZtypcollationdefaulttypisdefinedttypnamespacepg_catalogtypsubscript-typdefaultbin_null_array_type_oid0typispreferredfarray_type_name
Catalog casts 2
Explicit pg_cast records involving this type. PostgreSQL also supports coercions outside pg_cast; an absent row does not prove that a conversion is impossible.
| From | To | Context | Method | Function |
|---|---|---|---|---|
pg_ndistinct | bytea | Implicit | Binary compatible | 0 |
pg_ndistinct | text | Implicit | Input/output | 0 |
Version comparison
PostgreSQL 17.11 → 18.6. Source build identifiers and prose are excluded from attribute changes.
No catalog or structured attribute changes between these samples.
The documentation also differs between these builds; inspect the versioned manual definitions.
Documentation and source
- Build
- 18.6 · https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2
- Fingerprint
555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f
Related entries
All Data Types · Download this version as JSON · The first recorded sample does not establish when a type was introduced.