Just another question

Started by Michael Meskesabout 28 years ago5 messageshackers
Jump to latest
#1Michael Meskes
meskes@postgresql.org

I just noticed that there is an operator '=:'. What is it used for?

At the moment I have disabled ':' a_expr in the parser since it's not
distinguishable from a variable. The same problem appears with this
operator. But it can be worked around by using '= :<var>' instead of
'=:<var>'. On the other hand I wonder whether this operator is still needed
when ':' is not allowed in a_expr, b_expr, ...

Michael
--
Dr. Michael Meskes, Project-Manager | topsystem Systemhaus GmbH
meskes@topsystem.de | Europark A2, Adenauerstr. 20
meskes@debian.org | 52146 Wuerselen
Go SF49ers! Go Rhein Fire! | Tel: (+49) 2405/4670-44
Use Debian GNU/Linux! | Fax: (+49) 2405/4670-10

#2Thomas Lockhart
lockhart@alumni.caltech.edu
In reply to: Michael Meskes (#1)
Re: [HACKERS] Just another question

I just noticed that there is an operator '=:'. What is it used for?

tgl=> select * from pg_operator where oprname = '=:';
...
(0 rows)

?? I don't see it here.

- Tom

#3Michael Meskes
meskes@postgresql.org
In reply to: Thomas Lockhart (#2)
RE: [HACKERS] Just another question

But scan.l returns Op.

Michael

--
Dr. Michael Meskes, Project-Manager | topsystem Systemhaus GmbH
meskes@topsystem.de | Europark A2, Adenauerstr. 20
meskes@debian.org | 52146 Wuerselen
Go SF49ers! Go Rhein Fire! | Tel: (+49) 2405/4670-44
Use Debian GNU/Linux! | Fax: (+49) 2405/4670-10

Show quoted text

-----Original Message-----
From: Thomas G. Lockhart [SMTP:lockhart@alumni.caltech.edu]
Sent: Thursday, April 23, 1998 2:07 PM
To: Michael Meskes
Cc: PostgreSQL Hacker
Subject: Re: [HACKERS] Just another question

I just noticed that there is an operator '=:'. What is it used for?

tgl=> select * from pg_operator where oprname = '=:';
...
(0 rows)

?? I don't see it here.

- Tom

#4Michael Meskes
meskes@postgresql.org
In reply to: Michael Meskes (#3)
RE: [HACKERS] Just another question

Yes, I agree. So I let it like it is. But I think this has to be added
to the docs.

Michael

--
Dr. Michael Meskes, Project-Manager | topsystem Systemhaus GmbH
meskes@topsystem.de | Europark A2, Adenauerstr. 20
meskes@debian.org | 52146 Wuerselen
Go SF49ers! Go Rhein Fire! | Tel: (+49) 2405/4670-44
Use Debian GNU/Linux! | Fax: (+49) 2405/4670-10

Show quoted text

-----Original Message-----
From: Thomas G. Lockhart [SMTP:lockhart@alumni.caltech.edu]
Sent: Thursday, April 23, 1998 2:56 PM
To: Meskes, Michael
Cc: PostgreSQL Hacker
Subject: Re: [HACKERS] Just another question

I just noticed that there is an operator '=:'. What is it used
for?

?? I don't see it here.

But scan.l returns Op.

Oh, it is an _allowed_ operator symbol combination, if someone were to
define an operator using it. But it isn't pre-defined anywhere, is it?

And, it should be OK to require spaces to help delimit your embedded
stuff; that is, "=:" is interpreted as a possible operator, while "=
:"
(with space) is "equals embedded variable"...

I'd hate to keep removing single characters from the allowed operator
character set when we get syntax conflicts like this. We'll end up
with
only the SQL92-allowed operator symbols before long :)

- Tom

#5Thomas Lockhart
lockhart@alumni.caltech.edu
In reply to: Michael Meskes (#3)
Re: [HACKERS] Just another question

I just noticed that there is an operator '=:'. What is it used
for?

?? I don't see it here.

But scan.l returns Op.

Oh, it is an _allowed_ operator symbol combination, if someone were to
define an operator using it. But it isn't pre-defined anywhere, is it?

And, it should be OK to require spaces to help delimit your embedded
stuff; that is, "=:" is interpreted as a possible operator, while "= :"
(with space) is "equals embedded variable"...

I'd hate to keep removing single characters from the allowed operator
character set when we get syntax conflicts like this. We'll end up with
only the SQL92-allowed operator symbols before long :)

- Tom