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 Ora‐
15       cle producer.
16

PostgreSQL Create Table Syntax

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

Create Index Syntax

45         CREATE [ UNIQUE ] INDEX index_name ON table
46             [ USING acc_method ] ( column [ ops_name ] [, ...] )
47             [ WHERE predicate ]
48         CREATE [ UNIQUE ] INDEX index_name ON table
49             [ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] )
50             [ WHERE predicate ]
51

SEE ALSO

53       SQL::Translator, SQL::Translator::Producer::Oracle.
54

AUTHOR

56       Ken Y. Clark <kclark@cpan.org>.
57
58
59
60perl v5.8.8                       2007-S1Q0L-:2:4Translator::Producer::PostgreSQL(3)
Impressum