4 SELECT text 'this is a text string' = text 'this is a text string' AS true;
10 SELECT text 'this is a text string' = text 'this is a text strin' AS false;
16 CREATE TABLE TEXT_TBL (f1 text);
17 INSERT INTO TEXT_TBL VALUES ('doh!');
18 INSERT INTO TEXT_TBL VALUES ('hi de ho neighbor');
19 SELECT '' AS two, * FROM TEXT_TBL;
21 -----+-------------------
26 -- As of 8.3 we have removed most implicit casts to text, so that for example
27 -- this no longer works:
29 ERROR: function length(integer) does not exist
30 LINE 1: select length(42);
32 HINT: No function matches the given name and argument types. You might need to add explicit type casts.
33 -- But as a special exception for usability's sake, we still allow implicit
34 -- casting to text in concatenations, so long as the other input is text or
35 -- an unknown literal. So these work:
36 select 'four: '::text || 2+2;
42 select 'four: ' || 2+2;
50 ERROR: operator does not exist: integer || numeric
51 LINE 1: select 3 || 4.0;
53 HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.