|
NAMEBigtop::Backend::SQL::Postgres - backend to generate sql for Postgres database creationSYNOPSISIf your bigtop file looks like this:config { SQL Postgres {} } app App::Name { } and there are table and/or sequence blocks in the app block, this module will make docs/schema.postgres (relative to the build_dir) when you type: bigtop app.bigtop SQL or bigtop app.bigtop all You can feed that file directly to psql, once you have created a database. That is type: createdb dbname -U user psql dbname -U user < docs/schema.postgres DESCRIPTIONThis is a Bigtop backend which generates SQL Postgres can understand.KEYWORDSThis module defines no keywords. Look in Bigtop::SQL for a list of the keywords you can use in table and sequence blocks.SHORTHAND for is argumentsThis module does provide a couple of bits of shorthand (some aren't so short) for the arguments of the is field statement.field id { is int4, primary_key, auto; } This translates into: id int4 PRIMARY KEY DEFAULT NEXTVAL( 'your_sequence' ), You can also type 'assign_by_sequence' instead of 'auto'. That might aid understanding, if you can type it correctly. Note that using 'primary_key' instead of the literal 'PRIMARY KEY' is important. It tells the SQL and the Model back ends that this is the primary key. METHODSTo keep podcoverage tests happy.
AUTHORPhil Crow <crow.phil@gmail.com>COPYRIGHT and LICENSECopyright (C) 2005 by Phil CrowThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
Visit the GSP FreeBSD Man Page Interface. |