---
name: "SQL::Translator::Parser::DBI::PostgreSQL"
section: "3pm"
platform: "linux"
package: "libsql-translator-perl"
version: "1.66-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SQL::Translator::Parser::DBI::PostgreSQL"
---

# SQL::Translator::Parser::DBI::PostgreSQL(3pm)

parser for DBD::Pg

## NAME

SQL::Translator::Parser::DBI::PostgreSQL - parser for DBD::Pg

## SYNOPSIS

See SQL::Translator::Parser::DBI.

## DESCRIPTION

Uses DBI to query PostgreSQL system tables to determine schema structure.

## CONFIGURATION

You can specify the following for "parser\_args" in SQL::Translator :

### deconstruct\_enum\_types

If set to a true value, the parser will look for column types which are user-defined Enums, and generate a column definition like:

```
  {
    data_type => 'enum',
    extra => {
      custom_type_name => 'MyEnumType',
      list => [ 'enum_val_1', 'enum_val_2', ... ],
    }
  }
```

This makes a proper round-trip with SQL::Translator::Producer::PostgreSQL (which re-creates the custom enum type if `"producer_args->{postgres_version} >= 8.003"`) and can be translated to other engines.

If the option is false (the default) you would just get

```
  { data_type => 'MyEnumType' }
```

with no provided method to translate it to other SQL engines.

## AUTHOR

Scott Cain \<cain@cshl.edu\>, previous author: Paul Harrington \<harringp@deshaw.com\>.

## SEE ALSO

SQL::Translator, DBD::Pg.
