Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Implementing named infix operators with parser hook?

by anonymized user 468275 (Curate)
on Aug 17, 2018 at 12:08 UTC ( [id://1220492]=note: print w/replies, xml ) Need Help??


in reply to Implementing named infix operators with parser hook?

Don't know if it helps but you can overload all keywords, functions and operators in Postgresql, and have them call a perl subroutine instead, e.g for something like BETWEEN (doc snippet:)
CREATE OPERATOR name ( PROCEDURE = function_name [, LEFTARG = left_type ] [, RIGHTARG = right_type ] [, COMMUTATOR = com_op ] [, NEGATOR = neg_op ] [, RESTRICT = res_proc ] [, JOIN = join_proc ] [, HASHES ] [, MERGES ] )

One world, one people

Replies are listed 'Best First'.
Re^2: Implementing named infix operators with parser hook?
by LanX (Saint) on Aug 17, 2018 at 12:21 UTC
    Thanks! :)

    It doesn't help here, because I'm DB agnostic and this goes the other way round.

    But it's good to know and shows a nice way to model such overloads.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1220492]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-03-28 08:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found