1-- 2-- expression evaluated tests that don't fit into a more specific file 3-- 4 5-- 6-- Tests for SQLVAlueFunction 7-- 8 9 10-- current_date (always matches because of transactional behaviour) 11SELECT date(now())::text = current_date::text; 12 13 14-- current_time / localtime 15SELECT now()::timetz::text = current_time::text; 16SELECT now()::time::text = localtime::text; 17 18-- current_timestamp / localtimestamp (always matches because of transactional behaviour) 19SELECT current_timestamp = NOW(); 20-- precision 21SELECT length(current_timestamp::text) >= length(current_timestamp(0)::text); 22-- localtimestamp 23SELECT now()::timestamp::text = localtimestamp::text; 24 25-- current_role/user/user is tested in rolnames.sql 26 27-- current database / catalog 28SELECT current_catalog = current_database(); 29 30-- current_schema 31SELECT current_schema; 32SET search_path = 'notme'; 33SELECT current_schema; 34SET search_path = 'pg_catalog'; 35SELECT current_schema; 36RESET search_path; 37