Rechercher une page de manuel
SQL::Translator::Producer::PostgreSQL.3pm
Langue: en
Version: 2009-05-10 (debian - 07/07/09)
Section: 3 (Bibliothèques de fonctions)
NAME
SQL::Translator::Producer::PostgreSQL - PostgreSQL producer for SQL::TranslatorSYNOPSIS
my $t = SQL::Translator->new( parser => '...', producer => 'PostgreSQL' ); $t->translate;
DESCRIPTION
Creates a DDL suitable for PostgreSQL. Very heavily based on the Oracle producer.PostgreSQL Create Table Syntax
CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name ( { column_name data_type [ DEFAULT default_expr ] [ column_constraint [, ... ] ] | table_constraint } [, ... ] ) [ INHERITS ( parent_table [, ... ] ) ] [ WITH OIDS | WITHOUT OIDS ]
where column_constraint is:
[ CONSTRAINT constraint_name ] { NOT NULL | NULL | UNIQUE | PRIMARY KEY | CHECK (expression) | REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] } [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
and table_constraint is:
[ CONSTRAINT constraint_name ] { UNIQUE ( column_name [, ... ] ) | PRIMARY KEY ( column_name [, ... ] ) | CHECK ( expression ) | FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ] [ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] } [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
Create Index Syntax
CREATE [ UNIQUE ] INDEX index_name ON table [ USING acc_method ] ( column [ ops_name ] [, ...] ) [ WHERE predicate ] CREATE [ UNIQUE ] INDEX index_name ON table [ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] ) [ WHERE predicate ]
SEE ALSO
SQL::Translator, SQL::Translator::Producer::Oracle.AUTHOR
Ken Y. Clark <kclark@cpan.org>.Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre