Re: how to make an SQL UPDATE from record returning function

Поиск
Список
Период
Сортировка
От Rafal Pietrak
Тема Re: how to make an SQL UPDATE from record returning function
Дата
Msg-id 1335260238.27563.71.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: how to make an SQL UPDATE from record returning function  (Abel Abraham Camarillo Ojeda <acamari@the00z.org>)
Список pgsql-general
On Tue, 2012-04-24 at 02:48 -0500, Abel Abraham Camarillo Ojeda wrote:
[----------------]
>
> Why don't create table my_table which stores the composite value by itself (not
>     in two parts)?

Hmmm. OK. mea coulpa. I didn't follow the SQL good practice, and I don't
have a unique ID column in the updated table. So, I cannot "cook
updates" in temporary store (a table), and then post them against
relevant rows.

The function computes updated values for each row (and is expensive),
and I have the particular row "pinpointed" only within the UPDATE
transaction.

And btw: the updated table is "kind of big", and only selected rows are
updated at a time. The selected subset is a tiny fraction of the whole
table, and only because of fine-tuning that sellection, the update keeps
pace with the growth of the table.

So, as of now, temporary storage in additional table want work for me.
thus I'm still looking for a solution.

-R


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

Предыдущее
От: Krzysztof Nienartowicz
Дата:
Сообщение: Re: [HACKERS] Namespace of array of user defined types is confused by the parser in insert?
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: how to make an SQL UPDATE from record returning function