I believe what's going on here is that I took a shortcut ... I wanted to provide something akin to EOModeler's feature where PART of your sql script can fail and it says "do you want to continue?". To do this, I run each sql script command in its own transaction. The problem with this is that some commands are interdependent, and I think that's what you're seeing. I'm not exactly sure how EOModeler provides that features. Maybe they track how far they got, rollback, only execute up to the previous command, skip the broken one, and then rinse and repeat?

On Jan 26, 2007, at 11:42 AM, Clark Mueller wrote:

Hi all,

I have been tinkering with PostgreSQL, and would like to try using it with a WO project. I'm running into an odd problem when trying to generate SQL out of Entity Modeler, which is that commands like this sequence of commands fail:

CREATE TABLE customer_note (customer_id int4 NOT NULL, date timestamp NOT NULL, details varchar(1000) , id int4 NOT NULL, is_call varchar(5) , is_closed varchar(5) , is_email varchar(5) , is_face_to_face varchar(5) , is_note varchar(5) , subject varchar (255) NOT NULL, user_id int4 NOT NULL);

CREATE SEQUENCE customer_note_seq;

CREATE TEMP TABLE EOF_TMP_TABLE AS SELECT SETVAL ('customer_note_seq', (SELECT MAX(id) FROM customer_note));

DROP TABLE EOF_TMP_TABLE;

Specifically, when it hits the "DROP TABLE EOF_TMP_TABLE", it says that eof_tmp_table does not exist. However, if I take the SQL from Entity Modeler and run it as a script against the database, it works perfectly. I'm using the Wonder plugins and prototypes, and the JDBC driver included with PostgreSQL 8.2.1.

URL: jdbc:postgresql://localhost/pgtest
Driver: org.postgresql.Driver
Plugin: PostgresqlPlugIn

Any idea what's up?

Thanks,
Clark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag% 40mdimension.com

This email sent to [EMAIL PROTECTED]


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to