1SQL::Translator::ParserU:s:eProsCtognrterSiQbLu(t3e)d PeSrQlL:D:oTcruamnesnltaattoiro:n:Parser::PostgreSQL(3)
2
3
4

NAME

6       SQL::Translator::Parser::PostgreSQL - parser for PostgreSQL
7

SYNOPSIS

9         use SQL::Translator;
10         use SQL::Translator::Parser::PostgreSQL;
11
12         my $translator = SQL::Translator->new;
13         $translator->parser("SQL::Translator::Parser::PostgreSQL");
14

DESCRIPTION

16       The grammar was started from the MySQL parsers.  Here is the
17       description from PostgreSQL:
18
19       Table:
20       (http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=sql-createtable.html)
21
22         CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name (
23             { column_name data_type [ DEFAULT default_expr ]
24                [ column_constraint [, ... ] ]
25             | table_constraint }  [, ... ]
26         )
27         [ INHERITS ( parent_table [, ... ] ) ]
28         [ WITH OIDS | WITHOUT OIDS ]
29
30         where column_constraint is:
31
32         [ CONSTRAINT constraint_name ]
33         { NOT NULL | NULL | UNIQUE | PRIMARY KEY |
34           CHECK (expression) |
35           REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL ]
36             [ ON DELETE action ] [ ON UPDATE action ] }
37         [ DEFERRABLE | NOT DEFERRABLE ]
38         [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
39
40         and table_constraint is:
41
42         [ CONSTRAINT constraint_name ]
43         { UNIQUE ( column_name [, ... ] ) |
44           PRIMARY KEY ( column_name [, ... ] ) |
45           CHECK ( expression ) |
46           FOREIGN KEY ( column_name [, ... ] )
47            REFERENCES reftable [ ( refcolumn [, ... ] ) ]
48             [ MATCH FULL | MATCH PARTIAL ]
49             [ ON DELETE action ] [ ON UPDATE action ] }
50         [ DEFERRABLE | NOT DEFERRABLE ]
51         [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
52
53       Index:
54       (http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=sql-createindex.html)
55
56         CREATE [ UNIQUE ] INDEX index_name ON table
57             [ USING acc_method ] ( column [ ops_name ] [, ...] )
58             [ WHERE predicate ]
59         CREATE [ UNIQUE ] INDEX index_name ON table
60             [ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] )
61             [ WHERE predicate ]
62
63       Alter table:
64
65         ALTER TABLE [ ONLY ] table [ * ]
66             ADD [ COLUMN ] column type [ column_constraint [ ... ] ]
67         ALTER TABLE [ ONLY ] table [ * ]
68             ALTER [ COLUMN ] column { SET DEFAULT value | DROP DEFAULT }
69         ALTER TABLE [ ONLY ] table [ * ]
70             ALTER [ COLUMN ] column SET STATISTICS integer
71         ALTER TABLE [ ONLY ] table [ * ]
72             RENAME [ COLUMN ] column TO newcolumn
73         ALTER TABLE table
74             RENAME TO new_table
75         ALTER TABLE table
76             ADD table_constraint_definition
77         ALTER TABLE [ ONLY ] table
78                 DROP CONSTRAINT constraint { RESTRICT | CASCADE }
79         ALTER TABLE table
80                 OWNER TO new_owner
81
82       View table:
83
84           CREATE [ OR REPLACE ] VIEW view [ ( column name list ) ] AS SELECT query
85

AUTHORS

87       Ken Y. Clark <kclark@cpan.org>, Allen Day <allenday@ucla.edu>.
88

SEE ALSO

90       perl(1), Parse::RecDescent.
91
92
93
94perl v5.34.0                      2021-07S-Q2L2::Translator::Parser::PostgreSQL(3)
Impressum