Online Documentation Server
 ПОИСК
ods.com.ua Web
 КАТЕГОРИИ
Home
Programming
Net technology
Unixes
Security
RFC, HOWTO
Web technology
Data bases
Other docs

 


 ПОДПИСКА

 О КОПИРАЙТАХ
Вся предоставленная на этом сервере информация собрана нами из разных источников. Если Вам кажется, что публикация каких-то документов нарушает чьи-либо авторские права, сообщите нам об этом.




Functions

Chapter 5. Functions

Describes the built-in functions available in Postgres.

Many data types have functions available for conversion to other related types. In addition, there are some type-specific functions. Some functions are also available through operators and may be documented as operators only.

SQL Functions

SQL functions are constructs defined by the SQL92 standard which have function-like syntax but which can not be implemented as simple functions.

Table 5-1. SQL Functions

FunctionReturnsDescriptionExample
COALESCE(list)non-NULLreturn first non-NULL value in listCOALESCE(rle, c2 + 5, 0)
NULLIF(input,value)input or NULLreturn NULL if input = value, else input NULLIF(c1, 'N/A')
CASE WHEN expr THEN expr [...] ELSE expr ENDexprreturn expression for first true WHEN clauseCASE WHEN c1 = 1 THEN 'match' ELSE 'no match' END



With any suggestions or questions please feel free to contact us