On Tue, 31 Oct 2000, Mike Haberman wrote:

> 
> So I've been working on getting torque to play nicely with postgres.
> I've had to make several changes (nothing huge), to get the following to
> work:
> 
> Foreign Keys to not throw exceptions at runtime 
> --------------------
>    XMLSchemaToSQL.java
>       null check on properties (see eariler post)
> 
>    added the file foreign_key under db/postgres

needs to be called foreignkey, look in the other
database directories for examples.

> 
>    added the line in postgres/db.props
>    foreignKeyInsideTableDirective = true
> 
> 
>    TODO:
>    foreignKeyInsideTableDirective = false
>    does not work (it still puts them inside the table)

The foreignKeyInsideTableDirective is only a flag
you still need to put the place marker for the actual
content in the 'table' template. The flag is set so
to help format the text around the foreign key correctly.
Again, look at the 'table' template in the mysql directory
for example.

> Drop Serial
> ----------
>    in postgres, you should drop the sequence, before you drop the table. 
>    (only applicable for serial keys)
> 
>    XMLSchemaToSQL.java
>       added a small section of logic for this
> 
> 
>    Each db/* now needs a template called drop_seq
>    (all can be empty except postgres which has)
>    drop sequence $table#_$seq#_seq;

There is already a drop template and it's implemented
in the other dbs.

>    which leads me to the next fix:
>    Utils.stringSubstitution()
>    I needed to add the ability to have a token separator for torque's
>    macro substituion

Take a look again at the conf/torque directory, and look
at the other examples first. Most of what you're patching
already works :-)

jvz.



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to