Re: 7.2.1: coalesce double-calls function?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 7.2.1: coalesce double-calls function?
Дата
Msg-id 15607.1044383175@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 7.2.1: coalesce double-calls function?  ("SZŰCS Gábor" <surrano@mailbox.hu>)
Список pgsql-general
Kris Jurka <books@ejurka.com> writes:
> I have been looking at this and the NULLIF case seems complicatd.
> Essentially for NULLIF(left,right) I want to ExecEvalExpr(left,...)
> and construct a Const node with the result.  Then makeSimpleA_Expr for
> const left = right.

Uh, no; you are confusing parse-time and run-time work.  What you
probably want is a new node type that includes the OID of the
appropriate "=" operator but does different things with the result
than a normal "=" invocation would do.

Actually, thinking about it that way, it might just be a small variant
on the DistinctExpr node type that exists in current sources.  Certainly
DistinctExpr would be a good model to look at.

            regards, tom lane

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

Предыдущее
От: "Johnson, Shaunn"
Дата:
Сообщение: looking for system tables via ODBC
Следующее
От: Jeff Eckermann
Дата:
Сообщение: Re: Dealing with complex queries