Re: Can I use a query with UPDATE on its SET?

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Can I use a query with UPDATE on its SET?
Дата
Msg-id 20090226134120.GA32672@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Re: Can I use a query with UPDATE on its SET?  (Eus <eus@member.fsf.org>)
Список pgsql-general
On Thu, Feb 26, 2009 at 02:15:49AM -0800, Eus wrote:
> Is it possible to eliminate the use of `fieldname' completely?
> So, I just need to type `UPDATE table SET (SELECT ...) WHERE primary_key'.
>
> I think this should be possible because if the subquery in the SET
> clause returns the same number of columns with the same types of those
> of the destination table, PostgreSQL should be able to just update the
> values at once.

Not at the moment; there was a discussion about it a while ago[1] on the
-hackers list.  It all petered out after I couldn't think how to explain
my position and have since forgotten about it.  I'll try and think what
I was trying to say and respond again.

--
  Sam  http://samason.me.uk/

 [1] http://archives.postgresql.org/pgsql-hackers/2009-01/msg02336.php

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

Предыдущее
От: Serge Fonville
Дата:
Сообщение: Re: postgresql with storage
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Restore DB