Re: BUG #9227: Error on SELECT ROW OVERLAPS ROW with single ROW argument

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #9227: Error on SELECT ROW OVERLAPS ROW with single ROW argument
Дата
Msg-id 9155.1392750934@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #9227: Error on SELECT ROW OVERLAPS ROW with single ROW argument  (Joshua Yanovski <pythonesque@gmail.com>)
Ответы Re: BUG #9227: Error on SELECT ROW OVERLAPS ROW with single ROW argument  (Joshua Yanovski <pythonesque@gmail.com>)
Список pgsql-bugs
Joshua Yanovski <pythonesque@gmail.com> writes:
> That sounds like it should work.  I was also wondering whether it
> might be possible to do this more generally with some kind of "let"
> internal node:

> (let var = x in (var >= y and var <= z)

> I don't know enough about the planner or the SQL standard to know
> whether this would work, but it does seem a little nicer than
> special-casing BETWEEN to me.

Hmm ... interesting idea, but I don't think it answers any of the
fundamental issues about comparison semantics (ie, how much do we
care if "var" is promoted differently in the two clauses).

Also, as a grammar translation target for BETWEEN it would be a pretty
bad choice, because now views that had been defined in a perfectly
SQL-compliant manner would print out with very-PG-specific syntax.
The existing translation is nasty because of the double eval issue,
but at least what we print is standard SQL.

            regards, tom lane

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

Предыдущее
От: Clemens Eisserer
Дата:
Сообщение: Re: BUG #9161: wal_writer_delay is limited to 10s
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #9161: wal_writer_delay is limited to 10s