Re: [HACKERS] Associative Operators? (Was: Re: [NOVICE] Out of frying pan, into fire)

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Associative Operators? (Was: Re: [NOVICE] Out of frying pan, into fire)
Дата
Msg-id 199903162223.RAA20888@candle.pha.pa.us
обсуждение исходный текст
Ответ на Associative Operators? (Was: Re: [NOVICE] Out of frying pan, into fire)  (Clark Evans <clark.evans@manhattanproject.com>)
Ответы Re: [HACKERS] Associative Operators? (Was: Re: [NOVICE] Out of frying pan, into fire)  ("D'Arcy" "J.M." Cain <darcy@druid.net>)
Список pgsql-hackers
> Seth McQuale pointed out that the follwing does not work:
>   SELECT LASTNAME || ',' || FIRSTNAME [AS] NAME FROM FRIENDS;
> 
> The solution, was:
>   SELECT ( LASTNAME || ',' ) || FIRSTNAME AS NAME FROM FRIENDS;
> 
> I looked at pg_operator and didn't see any flag to mark
> an operator as 'associative'.   Perhaps if we added a flag
> like this, the re-write system could be modified to handle
> cases like this.
> 
> Thoughts?
> 
> Clark Evans
> 
> 

My guess is that we should auto-left-associate functions like || if no
parens are present.  It would be a small change to the parser.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

Предыдущее
От: secret
Дата:
Сообщение: Re: [HACKERS] Re: postmaster dies (was Re: Very disappointing performance)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Re: postmaster dies (was Re: Very disappointing performance)