From: | M Spreij <nemo(at)mechintosh(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | design/copying a bunch of records |
Date: | 2003-07-23 15:46:02 |
Message-ID: | a05210602bb445b2d47d5@[192.168.1.12] |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi all,
I hope to be able to answer more questions than I need to ask later
on, but for now.. :-}
I'm trying to make a system where the admin will create a set of
categories and products, sort order and all, where multiple users
will be able to make custom sets with the same records, with optional
translations, different prices, different product- and category
sortorder. If the admin removes a product, the users won't be able
to use that anymore either (inner join, or a loop-delete from user
sets), but they can add their own products as well. If the admin
adds a record, it would be copied to all user sets as well. This
probably screams "duplicate data" but nearly all records will need
translations or price changes, and custom sorting, so I couldn't
figure any other good way.
So I figured the best way was to copy the records from the
admin-set to user-sets (but suggestions for other ways are very
welcome!), and was wondering if there is a 'good' way to copy about
50 records to different tables every time you add a user account -
the only way I can think of is write some loops in PHP. Better ways?
TIA!
Regards,
Martin
--
<mailto:mac(dot)com(at)nemo>
<http://www.mechintosh.com/>
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2003-07-23 15:57:38 | Re: Struggling with set-returning functions, seeking advice |
Previous Message | Tom Lane | 2003-07-23 15:35:11 | Re: Struggling with set-returning functions, seeking advice |