|
|
PostgreSQL code generator
The PostgreSQL code generator for RISE generates a native PL/pgSQL script. The script incrementally updates the tables, columns, indexes and constraints in the database to match the RISE model. Once the database model is updated, the views defined in the RISE model are created, or replaced, in the database and possible default data, entered in the model, is inserted. If you are new to RISE, please read more in the RISE Resource Center and if you haven't done so yet, download RISE it's Free!
All database objects handled by the script are named in accordance with the selected RISE model naming convention. The default convention supports having multiple models in the same PostgreSQL database schema.
¨
RISE attribute types are mapped to columns according to:
Identifier |
bigserial/serial¹ |
Int |
bigint/int¹ |
String(n) |
varchar(n) |
Bool |
bool |
DateTime |
timestamp |
Float |
double precision |
Blob |
bytea |
Text |
text | Decimal(p,s) | numeric(p,s) | ¹ It's a model property whether to use 64- or 32-bit integers and sequences.
Notes
There are at the moment no known compliance issues regarding PostgreSQL or the RISE PostgreSQL code generator. There are, however, a few things worth noticing:
- PostgreSQL specifies the encoding on a per database level and the default isn't UTF-8.
- PostgreSQL is case-sensitive but, at the same time, unquoted names fold to lower case. This means that, in the SQL, Document is actually document which is not the same as "Document".
Code generator settings
The PostgreSQL code generator has the following properties:
schema |
The schema, in the database, in which all model objects are place. The default schema is public. |
ignoreRISE |
If this flag is set (TRUE) the RISE sub-system isn't created nor used by the script. |
logXML |
If set the script logs the RISE model XML chunk corresponding to the statement. This flag is ignored if RISE is ignored, i.e. if ignoreRISE == TRUE. |
|
|
|
|
|