Robert Haas <robertmhaas@gmail.com> writes:
> Look at how the POSITION() pseudofunction is defined around gram.y
> line 9651. Essentially any special syntax of this type gets converted
> to a regular function call internally. So in your case I think there
> will be some function that gets called something ike this:
> xmlexists(xpath_expression, xml_expression)
> ...but the grammar can be modified to allow a different syntax for
> that function call.
Note also that we typically try to allow the function to be called with
the generic comma-separated syntax as well as the keyword-based syntax
that the SQL committee has such weird love for. This makes life easier
for users, and it also means that we don't need special cases in
ruleutils.c.
regards, tom lane