Re: How would you handle updating an item and related stuff all at once?

From: Chris <dmagick(at)gmail(dot)com>
To: Rick Schumeyer <rschumeyer(at)ieee(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How would you handle updating an item and related stuff all at once?
Date: 2007-02-18 22:54:23
Message-ID: 45D8D91F.7020009@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> It seems to me the easiest thing to do is delete all the relations for the
> account and create all new ones with the data submitted from the form.
> This seems wasteful, but the alternative would be a pain. Or is this
> really the best way?

I do it the same way.. I'm open to suggestions about better ways to do
it too but *shrug* this works well.

Are you doing this action a lot or is it an occasional thing that will
happen? That is - is it worth investing a lot of time in to finding
another approach?

> Completely off topic, (but not worth a separate post) I have been forced
> to use a little bit of mysql lately...did you know that if you use
> transaction and foreign key syntax with myisam tables, it does not
> complain...it just silently ignores your requests for transactions and
> foreign key checks. Yikes! I had incorrectly assumed I would get an
> error message indicating that transactions are not supported. Oh well.

Well, it's documented.

http://dev.mysql.com/doc/refman/4.1/en/ansi-diff-foreign-keys.html

For storage engines other than InnoDB, MySQL Server parses the FOREIGN
KEY syntax in CREATE TABLE statements, but does not use or store it.

--
Postgresql & php tutorials
http://www.designmagick.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message ITAGAKI Takahiro 2007-02-19 01:03:02 Re: Inequality operators are not deduced.
Previous Message Chris 2007-02-18 22:40:20 Re: indexes across multiple tables