5 SELECT text 'this is a text string' = text 'this is a text string' AS true;
7 SELECT text 'this is a text string' = text 'this is a text strin' AS false;
9 CREATE TABLE TEXT_TBL (f1 text);
11 INSERT INTO TEXT_TBL VALUES ('doh!');
12 INSERT INTO TEXT_TBL VALUES ('hi de ho neighbor');
14 SELECT '' AS two, * FROM TEXT_TBL;
16 -- As of 8.3 we have removed most implicit casts to text, so that for example
17 -- this no longer works:
21 -- But as a special exception for usability's sake, we still allow implicit
22 -- casting to text in concatenations, so long as the other input is text or
23 -- an unknown literal. So these work:
25 select 'four: '::text || 2+2;
26 select 'four: ' || 2+2;
36 select concat(1,2,3,'hello',true, false, to_date('20100309','YYYYMMDD'));
37 select concat_ws('#','one');
38 select concat_ws('#',1,2,3,'hello',true, false, to_date('20100309','YYYYMMDD'));
39 select concat_ws(',',10,20,null,30);
40 select concat_ws('',10,20,null,30);
41 select concat_ws(NULL,10,20,null,30) is null;
42 select reverse('abcde');
43 select i, left('ahoj', i), right('ahoj', i) from generate_series(-5, 5) t(i) order by i;