Re: Operators and schemas

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Operators and schemas
Дата
Msg-id Pine.LNX.4.30.0204151550440.834-100000@peter.localdomain
обсуждение исходный текст
Ответ на Operators and schemas  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Operators and schemas  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane writes:

> After some fooling around with gram.y, I have come to the conclusion
> that there's just no way to use a schema-qualified name for an operator
> in an expression.  I was hoping we might be able to write something like
>     operand1 schema.+ operand2
> but I can't find any way to make this work without tons of shift/reduce
> conflicts.  One counterexample suggesting it can't be done is that
>     foo.*
> might be either a reference to all the columns of foo, or a qualified
> operator name.

What about foo."*"?

> We can still put operators into namespaces and allow qualified names in
> CREATE/DROP OPERATOR.  However, lookup of operators in expressions would
> have to be completely dependent on the search path.  That's not real
> cool; among other things, pg_dump couldn't guarantee that dumped
> expressions would be interpreted the same way when reloaded.

We could make some sort of escape syntax, like
   op1 myschema.operator(+) op2

-- 
Peter Eisentraut   peter_e@gmx.net



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Inefficient handling of LO-restore + Patch
Следующее
От: "Rod Taylor"
Дата:
Сообщение: Re: Operators and schemas