特殊语法形式

为了兼容SQL标准和PostgreSQL,以下函数可以被支持,同时等价于常规的内置函数:

特殊形式等价于
CURRENT_CATALOGcurrent_catalog()
CURRENT_DATEcurrent_date()
CURRENT_ROLEcurrent_user()
CURRENT_SCHEMAcurrent_schema()
CURRENT_TIMESTAMPcurrent_timestamp()
CURRENT_TIMEcurrent_time()
CURRENT_USERcurrent_user()
EXTRACT(<part> FROM <value>)extract(“<part>”, <value>)
EXTRACT_DURATION(<part>FROM <value>)extract_duration(“<part>”,<value>)
OVERLAY(<text1> PLACING <text2> FROM <int1> FOR <int2>)overlay(<text1>,<text2>, <int1>, <int2>)
OVERLAY(<text1> PLACING <text2> FROM <int>)overlay(<text1>,<text2>, <int>)
POSITION(<text1> IN <text2>)strpos(<text2>, <text1>)
SESSION_USERcurrent_user()
SUBSTRING(<text>FOR<int1>FROM <int2>)substring(<text>,<int2>, <int1>)
SUBSTRING(<text> FOR <int>)substring(<text>, 1, <int>)
SUBSTRING(<text>FROM<int1>FOR<int2>)substring(<text>,<int1>, <int2>)
SUBSTRING(<text> FROM <int>)substring(<text>, <int>)
TRIM(<text1> FROM <text2>)btrim(<text2>, <text1>)
TRIM(<text1>, <text2>)btrim(<text1>, <text2>)
TRIM(FROM <text>)btrim(<text>)
TRIM(LEADING <text1> FROM <text2>)ltrim(<text2>, <text1>)
TRIM(LEADING FROM <text>)ltrim(<text>)
TRIM(TRAILING <text1> FROM <text2>)rtrim(<text2>, <text1>)
TRIM(TRAILING FROM <text>)rtrim(<text>)
USERcurrent_user()