From: | Scott Ribe <scott_ribe(at)killerbytes(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | postgres list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Changing from base type to inherited |
Date: | 2004-08-12 03:52:06 |
Message-ID: | BD404586.4DA39%scott_ribe@killerbytes.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Can't you do something like
>
> INSERT INTO B SELECT *, some-more-values FROM A WHERE ...
Yes, that works. I didn't think of trying that because I also need to check
for existence of A and change some values in it if it exists, so I select it
into a record type, and
insert into B docrec.*, some-more-values;
does not work.
Not using the record type, instead inserting into B as per your suggestion
and immediately updating B, is a lot less code, which was what I asked for.
And in this case there couldn't possibly be a material difference in
performance, so good enough.
Would it be a reasonable feature request to ask for the ability to use
myrecord.* on a record type as a value list?
--
Scott Ribe
scott_ribe(at)killerbytes(dot)com
http://www.killerbytes.com/
(303) 665-7007 voice
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Rawnsley | 2004-08-12 04:07:05 | Re: Replication options? |
Previous Message | Tom Lane | 2004-08-12 03:17:58 | Re: Changing from base type to inherited |