Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view
Дата
Msg-id BANLkTikc=5ajmmKNaE3H6Qo-hng1LyHcUw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Fri, Jun 3, 2011 at 1:19 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Fri, Jun 3, 2011 at 10:59 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Personally my advice is to avoid USING: it wasn't one of the SQL
>>> committee's better ideas.
>
>> I don't understand why we can't just translate the USING into some
>> equivalent construct that doesn't involve USING.
>
> There is no directly equivalent construct, because USING changes the
> shape of the output table (the join has one fewer output column than
> would exist without USING).
>
> Now, if the query doesn't involve any explicit reference to "joinalias.*",
> we could probably fake it with some ugly thing involving
> COALESCE(leftcol, rightcol) ... but I don't think people will want to
> read that, and anyway the idea falls apart as soon as you do have a
> whole-row reference.

Well, it gets internally translated to COALESCE(leftcol, rightcol)
anyway, so I hardly think it's too ugly to print it out that way.
It's what we're doing; more, it'll work instead of erroring out.  This
is not the first complaint we've gotten about this problem.

I'm not seeing the problem with whole-row references; can you elaborate on that?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Daniel Cristian Cruz
Дата:
Сообщение: Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view