Thanks for your suggestion to use curval(), that will be useful.  I'd
entirely forgotten about that function.  That likely will help when combined
with Richard's suggestion and an idea I already had.

I'm sorry that the problem wasn't clearer.  The best way I can describe it
is like this:
  The end result is to duplicate the data for a particular record in table
  "a" so that all of it's related data in tables "b" and "c" is duplicated.
Where "b" is the middle table in a many to many relationship.  For example,

- a ----    - b ----    - c ----
 aid  <--+   bid  <--+   cid
 data1   +-->aid     +-->bid
 data2       field1      info1
 date3       field2      info2

SELECT a.*,b.*,c.* from a,b,c where b.aid = a.aid and c.bid = b.bid;

So, the goal is to duplicate an object that is made up of the data stored
across these three tables. 

Any suggestions?

Matthew Nuzum           | ISPs: Make $200 - $5,000 per referral by
www.followers.net               | recomending Elite CMS to your customers!
[EMAIL PROTECTED]       | http://www.followers.net/isp




---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to