Thread: binary operators

binary operators

From
Frederic Metoz
Date:
Hello,

I am looking for the binary AND and OR ... SHIFT as well.
Do they exist for postgresql ?

Tanks,

Fred




Re: binary operators

From
Christopher Sawtell
Date:
On Wed, 31 Jan 2001 04:12, Frederic Metoz wrote:
> Hello,
>
> I am looking for the binary AND and OR ... SHIFT as well.
> Do they exist for postgresql ?

AND and OR ..... yes.
SHIFT .... I don't think so.

-- 
Sincerely etc.,
NAME       Christopher SawtellCELL PHONE 021 257 4451ICQ UIN    45863470EMAIL      csawtell @ xtra . co . nzCNOTES
ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz
-->> Please refrain from using HTML or WORD attachments in e-mails to me <<--



Re: binary operators

From
Ken Corey
Date:
Frederic Metoz wrote:
> I am looking for the binary AND and OR ... SHIFT as well.
> Do they exist for postgresql ?

Depending on what you're doing...you might get away with using
mathematical operators to accomplish the above...

A right SHIFT would be dividing by 2.  A left shift would be multiplying
by 2.  

I don't know off the top of my head about AND and OR.  Doesn't the
manual cover this?

-Ken


Re: binary operators

From
Peter Eisentraut
Date:
Frederic Metoz writes:

> I am looking for the binary AND and OR ... SHIFT as well.
> Do they exist for postgresql ?

in 7.1

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



Re: binary operators

From
KuroiNeko
Date:
Frederic Metoz writes:

> I am looking for the binary AND and OR ... SHIFT as well.
> Do they exist for postgresql ?
I have  functions that  do this  on int4. Not  operators, but  better than
nothing :)  Anyone interested,  please feel  free to  email in  private. In
fact, the lib is simple as a moo.


--
������������������



Re: binary operators

From
Jaros³aw B³¹d
Date:
Frederic Metoz wrote:

> Hello,
>
> I am looking for the binary AND and OR ... SHIFT as well.
> Do they exist for postgresql ?
>
> Tanks,
>
> Fred

In postgresql binary operators AND, OR ... don't exist, but you can
simply extend postgresql by yours operators. You should use CREATE
OPERATOR function. If you are interested in examples you can send me
mail.

--
Jaroslaw Blad
Lead Engineer
mailto:jaroslaw.blad@e-point.pl
e-point S.A. POLAND
(22) 853 48 30 http://www.e-point.pl