Re: to copy a record

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: to copy a record
Дата
Msg-id 20030604225555.GE40542@flake.decibel.org
обсуждение исходный текст
Ответ на Re: to copy a record  ("Jay O'Connor" <joconnor@cybermesa.com>)
Список pgsql-general
On Wed, Jun 04, 2003 at 03:50:29PM -0700, Jay O'Connor wrote:
> On 2003.06.04 12:48 Jim C. Nasby wrote:
> > SELECT * INTO TEMP temp_table FROM blah;
> > UPDATE temp_table SET field = newvalue;
> > INSERT INTO blah SELECT * FROM temp_table;
>
>
> Looks sweet.  Much simpler what I was doing, too

BTW (I should have mentioned this originally), this will surely be much
slower than doing a SELECT INTO and specifying the fields individually,
because off the overhead of 2 additional queries, as well as creating
the temporary table.
--
Jim C. Nasby (aka Decibel!)                    jim@nasby.net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

В списке pgsql-general по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Nulls get converted to 0 problem
Следующее
От: Blair Robertson
Дата:
Сообщение: Weird Character Ordering