> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oxla.com/llms.txt
> Use this file to discover all available pages before exploring further.

# pg_type

## Overview

The `pg_type` table stores information about built-in data types. It mimics the [pg\_type](https://www.postgresql.org/docs/current/catalog-pg-type.html) PostgreSQL system catalog.

<Warning>Please note that Oxla doesn’t support the custom types</Warning>

## Columns

<Note>This table is designed for compatibility with tools that require PostgreSQL system tables, so it mostly has dummy data. Please note that not all columns in `pg_type` are applicable to every type of relation.</Note>

The following columns are available for querying in `pg_type`:

| Column           | Type   | Description                                                                           |
| ---------------- | ------ | ------------------------------------------------------------------------------------- |
| `oid`            | `int`  | This column represents the Object ID (OID) for each type in the database              |
| `typname`        | `text` | This column represents the data type.                                                 |
| `typlen`         | `int`  | This column represents the number of bytes in the internal representation of the type |
| `typnamespace`   | `int`  | *Unused*                                                                              |
| `typowner`       | `int`  | *Unused*                                                                              |
| `typtype`        | `text` | *Unused*                                                                              |
| `typisdefined`   | `bool` | *Unused*                                                                              |
| `typstorage`     | `text` | *Unused*                                                                              |
| `typalign`       | `text` | *Unused*                                                                              |
| `typnotnull`     | `bool` | *Unused*                                                                              |
| `typcategory`    | `text` | *Unused*                                                                              |
| `typispreferred` | `bool` | *Unused*                                                                              |
| `typdelim`       | `text` | *Unused*                                                                              |
| `typrelid`       | `int`  | *Unused*                                                                              |
| `typsubscript`   | `int`  | *Unused*                                                                              |
| `typelem`        | `int`  | *Unused*                                                                              |
| `typarray`       | `int`  | *Unused*                                                                              |
| `typinput`       | `int`  | *Unused*                                                                              |
| `typoutput`      | `int`  | *Unused*                                                                              |
| `typreceive`     | `int`  | *Unused*                                                                              |
| `typsend`        | `int`  | *Unused*                                                                              |
| `typmodin`       | `int`  | *Unused*                                                                              |
| `typmodout`      | `int`  | *Unused*                                                                              |
| `typanalyze`     | `int`  | *Unused*                                                                              |
| `typalign`       | `text` | *Unused*                                                                              |
| `typstorage`     | `text` | *Unused*                                                                              |
| `typnotnull`     | `bool` | *Unused*                                                                              |
| `typbasetype`    | `int`  | *Unused*                                                                              |
| `typtypmod`      | `int`  | *Unused*                                                                              |
| `typndims`       | `int`  | *Unused*                                                                              |
| `typcollation`   | `int`  | *Unused*                                                                              |
| `typdefaultbin`  | `text` | *Unused*                                                                              |
| `typdefault`     | `text` | *Unused*                                                                              |
| `typacl`         | `text` | *Unused*                                                                              |

## Example

This example query retrieves the Object ID (`oid`) and data type name (`typname`) from the `pg_type` catalog. You can adjust the columns in the `SELECT` statement based on your needs.

```sql theme={null}
SELECT oid, typname FROM pg_type;
```

It will return the list of Oxla’s supported data types:

```sql theme={null}
 oid  |   typname   
------+-------------
   23 | int4
  700 | float4
   16 | bool
   20 | int8
  701 | float8
   25 | text
 1114 | timestamp
 1184 | timestamptz
 1083 | time
 1186 | interval
 1082 | date
  114 | json
(12 rows)
```
