Re: Foreign Key for PHP serialized data - possible?

From: Hannes Dorbath <light(at)theendofthetunnel(dot)de>
To: Dave <withheld(at)nospam(dot)thanks>
Subject: Re: Foreign Key for PHP serialized data - possible?
Date: 2007-10-06 21:36:54
Message-ID: 4707FFF6.7010402@theendofthetunnel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dave wrote:
> What I'm trying to do is to create a foreign key on tb1_column so that if a
> number in tb2_column changes or gets deleted, it cascades to the appropriate
> segment of the serialized data.
> e.g. if an id of Oranges changes from '5' to '24', the tb1_column rows will
> get changed in the above example row to:
> a:5:{i:0;s:1:"9";i:1;s:2:"24";i:2;s:2:"11";i:3;s:2:"100";i:4;s:2:"10";}

No offense, but that sounds like sick application design. Anyway, a
plphp trigger can do it:

http://www.commandprompt.com/community/plphp

--
Best regards,
Hannes Dorbath

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-10-06 21:36:58 Re: ERROR: could not open file "pg_subtrans...
Previous Message Warren 2007-10-06 21:06:33 ERROR: could not open file "pg_subtrans...