Search Postgresql Archives

Re: Elegant copy of a row using PL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/16/07, richard lavoie <richard_lavoie@xxxxxx> wrote:
Hi!


I'm not sure about the English terminology for that so I'm sorry if I made a
mistake on the subject and on this message.

I've a table with 50 colums. I want to copy a certain row using PL and change only 2 values. The way to do it with insert is to long. Is there any other elegant way?

the basic methodology is to:

insert select into a scratch table;
update scratch table;
insert select back into real_table;

scratch can be a persistent table (remember to truncate it) or a temp
table.  if it is a temp, remember to create it before you call your pl
for the first time in a session.

merlin


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux