Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sql::translator::producer::postgresql(3pm) [debian man page]

SQL::Translator::Producer::PostgreSQL(3pm)		User Contributed Perl Documentation		SQL::Translator::Producer::PostgreSQL(3pm)

NAME
SQL::Translator::Producer::PostgreSQL - PostgreSQL producer for SQL::Translator SYNOPSIS
my $t = SQL::Translator->new( parser => '...', producer => 'PostgreSQL' ); $t->translate; DESCRIPTION
Creates a DDL suitable for PostgreSQL. Very heavily based on the Oracle producer. Now handles PostGIS Geometry and Geography data types on table definitions. Does not yet support PostGIS Views. 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 Youens-Clark <kclark@cpan.org>. perl v5.14.2 2012-01-18 SQL::Translator::Producer::PostgreSQL(3pm)

Check Out this Related Man Page

SQL::Translator::Parser(3pm)				User Contributed Perl Documentation			      SQL::Translator::Parser(3pm)

NAME
SQL::Translator::Parser - describes how to write a parser DESCRIPTION
Parser modules that get invoked by SQL::Translator need to implement a single function: parse. This function will be called by the SQL::Translator instance as $class::parse($tr, $data_as_string), where $tr is a SQL::Translator instance. Other than that, the classes are free to define any helper functions, or use any design pattern internally that make the most sense. When the parser has determined what exists, it will communicate the structure to the producer through the SQL::Translator::Schema object. This object can be retrieved from the translator (the first argument pass to parse) by calling the schema method: my $schema = $tr->schema; The Schema object has methods for adding tables, fields, indices, etc. For more information, consult the docs for SQL::Translator::Schema and its related modules. For examples of how this works, examine the source code for existing SQL::Translator::Parser::* modules. AUTHORS
Ken Youens-Clark, <kclark@cpan.org<gt>, darren chamberlain <darren@cpan.org>. SEE ALSO
perl(1), SQL::Translator, SQL::Translator::Schema. perl v5.14.2 2012-01-18 SQL::Translator::Parser(3pm)
Man Page

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Embedded SQL in AWK script

Hi All, Can I use AWK script to read data from Oracle table (some embedded SQL perhaps) The reason for this that I have a data file and I need to do some basic validations of the data in the file with some statistical figures related to the data file that I have stored in a Oracle table. Thanks... (2 Replies)
Discussion started by: 2nilotpal
2 Replies

2. Shell Programming and Scripting

Help in Perl

could you please help : i have written script to search the for PRIMARY INDEX and if found display the whole definition of create table: ISSUE NOW IS: to store the table name in a variable and search the file if and update and show table exists.. Example: ct t15( c1... (3 Replies)
Discussion started by: a.suryakumar
3 Replies

3. Shell Programming and Scripting

Help with perl scripting on strings

Hai, I have strings as follows. 0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF 'SYS_C0030166' (INDEX (UNIQUE)) 1 INDEX MODE: ANALYZED (UNIQUE SCAN) OF 'SYS_C0029845' (INDEX (UNIQUE) 9 INDEX MODE: ANALYZED (RANGE SCAN) OF ... (2 Replies)
Discussion started by: sagarbsa
2 Replies

4. Shell Programming and Scripting

Urgent! Sed/Awk Filter Find Pattern Delete Till End Of Line

Hi, I need help with using an awk or sed filter on the below line ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE Look for... (2 Replies)
Discussion started by: rajan_san
2 Replies

5. Shell Programming and Scripting

trimming lines

hi have output as i have trim of lines before CREATE statement and lins after last ")" any idea how to achieve it ? (3 Replies)
Discussion started by: crackthehit007
3 Replies

6. Shell Programming and Scripting

extract DDL - output every match to separate file

Hi, i want to extract the 'CREATE INDEX' or 'CREATE UNIQUE INDEX' statements from a ddl file and output each match to a separate file. i was looking around the net but couldnīt find anything. a possible sed-script could be: sed -n '/CREATE*INDEX*/,/COMMIT/p' filename.ddlbut i couldnīt find out... (11 Replies)
Discussion started by: CactusMoon
11 Replies

7. Shell Programming and Scripting

Extract text between two strings

Hi I have something like this: EXAMPLE 1 CREATE UNIQUE INDEX "STRING_1"."STRING_2" ON "BOSNI_CAB_EVENTO" ("CD_EVENTO" , "CD_EJECUCION" ) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 5242880 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "DB1000_INDICES_512K"... (4 Replies)
Discussion started by: chrispaz81
4 Replies

8. Shell Programming and Scripting

converting to lower case or upper case

here is a code column_name="vivek" column_name2="ViVeK" column_name=$(echo $column_name | awk '{print tolower($0)}') column_name2=$(echo $column_name2 | awk '{print tolower($0)}') echo "column name 1 lower: $column_name" echo "column name... (6 Replies)
Discussion started by: vivek d r
6 Replies

9. Programming

Issue with replace

Hi, I have a problem with a replace of a pattern in a file. Example of file: CREATE TABLE TEST.TEST ( ID_SOGGETTO BIGINT NOT NULL, ENTE VARCHAR(64)) UNIQUE PRIMARY INDEX ( ID_SOGGETTO ,ENTE ); I want to replace the red pattern with another text: i want to replace the text after the... (6 Replies)
Discussion started by: mgazzato
6 Replies

10. Shell Programming and Scripting

Capturing Oracle SQL Error Codes

My issue pertains to earlier posts like exit unix script after sqlerror in procedure - dBforums SQLPLUS Error Capturing | Unix Linux Forums | Shell Programming and Scripting We are executing PL/SQL blocks from shell scripts using SQLPLUS. The error code has to be captured into a logfile that... (3 Replies)
Discussion started by: jerome_rajan
3 Replies