agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Wolf-D. Ihlenfeldt <wolf@molout.tutkie.tut.ac.jp>
To: postgres@postgres.Berkeley.EDU
Subject: Tuple-Functions on variable tables ?
Date: Fri, 30 Sep 94 13:45:19 jst
Message-ID: <9409300445.AA07197@molout.tutkie.tut.ac.jp> (raw)
I need to make some pretty complicated comparisons between
tuples. The tuples may be from the same or different tables.
I defined a user function, which works fine for the tuples
it is defined for, i.e.
my_func(class1,class2)
works fine if the function is defined as
define function my_func (language = "c", returntype = bool,
trusted="t", percall_cpu = "costly!!!")
arg is (class1,class2) as "/path/myfunc.so"
But how to I formulate a query with
my_func(class1,class1)
or
my_func(class3,class4)
where class3 and 4 may have a slightly different structure, but do
contain the fields used in the function for the comparison.
I have not found a way to pass classes which are different to
those in the prototype htrough the parser. Is there some way
to do this ? And if this is possible, how about using
different classes with operators bound to the functio, i.e.
define operator = (arg1=class1,arg2=class2,procedure=my_func,
restrict=eqsel,join=eqsel)
??
Any help is appreciated.
WDI
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: wolf@molout.tutkie.tut.ac.jp
Subject: Re: Tuple-Functions on variable tables ?
In-Reply-To: <9409300445.AA07197@molout.tutkie.tut.ac.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox