Fix pg_dump bug in the database-level collation patch. "datcollate" and
[PostgreSQL.git] / src / test / regress / sql / text.sql
blobb739e56e2d69ff06c420bbf1239baabcb64aa75f
1 --
2 -- TEXT
3 --
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:
19 select length(42);
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;
28 -- but not this:
30 select 3 || 4.0;