1SQL::Translator::ProducUesre:r:PCoosnttgrriebSuQtLe(d3S)PQeLr:l:TDroacnusmleanttoart:i:oPnroducer::PostgreSQL(3)
2
3
4

NAME

6       SQL::Translator::Producer::PostgreSQL - PostgreSQL producer for
7       SQL::Translator
8

SYNOPSIS

10         my $t = SQL::Translator->new( parser => '...', producer => 'PostgreSQL' );
11         $t->translate;
12

DESCRIPTION

14       Creates a DDL suitable for PostgreSQL.  Very heavily based on the
15       Oracle producer.
16
17       Now handles PostGIS Geometry and Geography data types on table
18       definitions.  Does not yet support PostGIS Views.
19

PostgreSQL Create Table Syntax

21         CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name (
22             { column_name data_type [ DEFAULT default_expr ] [ column_constraint [, ... ] ]
23             | table_constraint }  [, ... ]
24         )
25         [ INHERITS ( parent_table [, ... ] ) ]
26         [ WITH OIDS | WITHOUT OIDS ]
27
28       where column_constraint is:
29
30         [ CONSTRAINT constraint_name ]
31         { NOT NULL | NULL | UNIQUE | PRIMARY KEY |
32           CHECK (expression) |
33           REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL ]
34             [ ON DELETE action ] [ ON UPDATE action ] }
35         [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
36
37       and table_constraint is:
38
39         [ CONSTRAINT constraint_name ]
40         { UNIQUE ( column_name [, ... ] ) |
41           PRIMARY KEY ( column_name [, ... ] ) |
42           CHECK ( expression ) |
43           FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
44             [ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] }
45         [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
46

Create Index Syntax

48         CREATE [ UNIQUE ] INDEX index_name ON table
49             [ USING acc_method ] ( column [ ops_name ] [, ...] )
50             [ WHERE predicate ]
51         CREATE [ UNIQUE ] INDEX index_name ON table
52             [ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] )
53             [ WHERE predicate ]
54

SEE ALSO

56       SQL::Translator, SQL::Translator::Producer::Oracle.
57

AUTHOR

59       Ken Youens-Clark <kclark@cpan.org>.
60
61
62
63perl v5.32.0                      2020-S0Q9L-:1:4Translator::Producer::PostgreSQL(3)
Impressum