Re: Operators and schemas

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Operators and schemas
Date: 2002-04-15 19:54:03
Message-ID: Pine.LNX.4.30.0204151550440.834-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-04-15 19:56:33 Re: regression in CVS HEAD
Previous Message Rod Taylor 2002-04-15 19:51:48 Re: Operators and schemas