Skip site navigation (1) Skip section navigation (2)

create operator problem

From: "Vazsonyi Peter[ke]" <neko(at)kornel(dot)szif(dot)hu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: create operator problem
Date: 1998-04-24 13:42:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

I use an external function in postgres and here i try create operator for
like with regional character support ::

-----< Cut begin
create function mylike(text,text) returns bool
as '/home/vip/neko/tudakozo/' language 'c';
select mylike('Jeno','Jen'),mylike('aJenO','Jen'),mylike('fJeNof','Jen'),
t     |t     |t     |t
(1 row)

select 'f:', mylike('asd','fds');
f:      |f
(1 row)

-- It works

drop operator ~~ (text,text);
create operator ~~ (leftarg=text,rightarg=text,procedure=mylike);
select 'this will be true'::text ~~ 'true';
(1 row)
-- it seems not ;(
-----< Cut end

I'm not a realy postgres guru, but whith postgres 6.2 can i use this
function as operator too. If that was a bug, this letter is a bug report,
but if it isn't please help me!  The used postgres's vn: 6.3-2, it runs on a
linux (RH4.2;i386 + updates)

sprintf         ("`-''-/").___..--''"`-._            Error In
("%|s",          `6_ 6  )   `-.  (     ).`-.__.`)    Loading Object
"Petike"         (_Y_.)'  ._   )  `._ `. ``-..-'     line:3
/* Neko */     _..`--'_..-_/  /--'_.' ,'             Before /*Neko*/
 );           (il),-''  (li),'  ((!.-'	 see:


pgsql-hackers by date

Next:From: Tom LaneDate: 1998-04-24 14:50:51
Subject: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size
Previous:From: Michael MeskesDate: 1998-04-24 11:33:05
Subject: Re: [HACKERS] linux, bsd, i386-solaris and univel shared libraries.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group