PostgreSQL

Скачать в pdf «PostgreSQL»

Number


t


Icol


factorial


+


coll + col2


addition



coll — col2


subtraction


*


coll * col2


multiplication


/


coll / col2


division


%


coll % col2


remainder/modulo


л


coll » col2


coll raised to the power of col2


Temporal


+


coll + col2


addition of temporal values



coll — col2


subtraction of temporal values


(…) OVERLAPS


(cl, c2) OVERLAPS


BOOLEAN indicating cols overlap in time


(…)


(c3, c4)


Geometric


see psql’s do for a list of geometric operators


Network


<<


coll < < col2


BOOLEAN indicating if coll is a subnet of col2


<< =


coll << = col2


BOOLEAN indicating if coll is equal or a subnet of col2


>>


coll > > col2


BOOLEAN indicating if coll is a supernet of col2


>> =


coll >>= col2


boolean indicating if coll is equal or a supernet of co12

Table 9.4: Common operators


test=> SELECT CAST(‘1/1/1992’ AS DATE) + CAST(‘1/1/1993’ AS DATE); ERROR:    Unable to identify an operator ‘+’ for types ‘date’ and ‘date’


You will have to retype this query using an explicit cast test=> SELECT CAST(‘1/1/1992’ AS DATE) + CAST(‘l year’ AS INTERVAL); ?column?

Скачать в pdf «PostgreSQL»