• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: PostgreSQL SQL generation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PostgreSQL SQL generation


  • Subject: Re: PostgreSQL SQL generation
  • From: Mike Schrag <email@hidden>
  • Date: Fri, 26 Jan 2007 12:00:36 -0500

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@hidden)
Help/Unsubscribe/Update your Subscription:
40mdimension.com


This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >PostgreSQL SQL generation (From: Clark Mueller <email@hidden>)

  • Prev by Date: PostgreSQL SQL generation
  • Next by Date: Re: daylight saving time problem
  • Previous by thread: PostgreSQL SQL generation
  • Next by thread: Here's one newbie trap to avoid
  • Index(es):
    • Date
    • Thread