Skip to content

Structure

PostgresDataType

Data types and their raw OIDs.
struct PostgresDataType

Overview

Use select * from pg_type where oid = <idhere> to look up more information for a given type.

This list was generated by running select oid, typname from pg_type where oid < 10000 order by oid and manually trimming Postgres-internal types.

Topics

Initializers

Instance Properties

  • description
    A textual representation of this instance.
  • isUserDefined
    Returns true if the type’s raw value is greater than or equal to 2^14. This appears to be true for all user-defined types, but I don’t have any documentation to back this up.
  • knownSQLName
    Returns the known SQL name, if one exists. Note: This only supports a limited subset of all PSQL types and is meant for convenience only. This list was manually generated.
  • rawValue
    The raw data type code recognized by PostgreSQL.

Type Properties

Default Implementations

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomStringConvertible
  • Swift.Decodable
  • Swift.Encodable
  • Swift.Equatable
  • Swift.Escapable
  • Swift.ExpressibleByIntegerLiteral
  • Swift.Hashable
  • Swift.RawRepresentable
  • Swift.Sendable
  • Swift.SendableMetatype

See Also

Essentials