Re: Call to build-in operator from new operator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: kim(at)billes(dot)dk
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Call to build-in operator from new operator
Date: 2005-04-18 15:31:06
Message-ID: 22086.1113838266@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

kim(at)billes(dot)dk writes:
> I'm trying to develop a new operator for PostGreSQL (actually for TelegraphCQ, which
> is an extension of PSQL). Part of the operator's procedure is the @-operator. So now
> my question is: How do I call the on_pb function from inside my own function?.

DirectFunctionCall2 is probably the least painful way to do it. You
need to convert the arguments and result to and from Datum, but the
other gruntwork is taken care of by that function. Look at existing
uses for examples.

> Further, is there a way to access data in tables in the database other than those
> given as arguments to the function? And how?

Only if you do your own query.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-04-18 16:04:09 Re: Problem with PITR recovery
Previous Message Greg Stark 2005-04-18 15:29:38 Re: Problem with PITR recovery