Chapter 3. PostgreSQL Operators

I l @ ve RuBoard

Data types, by themselves , are only useful for holding data. To make comparisons, orderings, and selections of table datum, operators are needed.

Most operators simply return an implicit Boolean true or false given the comparison criteria. However, some operators, such as the math- and string- related ones, return new results from the supplied elements.

The following is a map of the default PostgreSQL operators grouped by data type. After that is a more detailed listing of all the supported PostgreSQL operators, including information on specific usage, syntax, and notes.

Table 3.1. Map of Operators Grouped by Data Type

Data Type

Operator

Geometric

+

-

*

/

#

##

&&

&<

&>

<->

<<

<^

>>

>^

?#

?-

?-

@-@

?

?

\@

@@

~=

Logical

AND

OR

NOT

Network

<

<=

=

>=

>

<>

<<

<<=

>>

>>=

Numerical

!

!!

%

*

+

-

/

:

@

^

/

/

String

<

<=

<>

=

>

>=

!!=

~~

!~~

~

~*

!~

!~*

Time

#<

#<=

#<>

#=

#>

#>=

<#>

<<

~=

<?>

I l @ ve RuBoard


PostgreSQL Essential Reference
PostgreSQL Essential Reference
ISBN: 0735711216
EAN: 2147483647
Year: 2001
Pages: 118
Authors: Barry Stinson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net