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