Re: [BUGS] Re: [SQL] MAX() of 0 records.
От | Tom Lane |
---|---|
Тема | Re: [BUGS] Re: [SQL] MAX() of 0 records. |
Дата | |
Msg-id | 10917.962989979@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [SQL] MAX() of 0 records. (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Paul McGarry <paulm@opentec.com.au> writes: > Would that mean that any update that used an aggregate function > would be invalid? That would be a bit scary seeing as I am doing > this in part to get around using aggregate functions in a view. You'd have to embed the aggregate in a sub-select if we did things that way. I'd rather not have such a restriction, but only if we can understand clearly what it means to put an aggregate directly into UPDATE. The executive summary of what I said before is "exactly what SHOULD this query do, anyway?" I think it's not well-defined without some additional assumptions. >> Another way to look at it is that perhaps an UPDATE involving aggregate >> functions ought to be implicitly treated as GROUP BY targetTable.ctid. > What exactly is a ctid? Physical location of the tuple, expressed as block# and tuple# within the file. Try "select ctid,* from sometable" ... regards, tom lane
В списке pgsql-hackers по дате отправления: