Fix xslt_process() to ensure that it inserts a NULL terminator after the
[PostgreSQL.git] / src / test / regress / expected / name.out
blobb359d52822571f522d1110435014b04b7f0659da
1 --
2 -- NAME
3 -- all inputs are silently truncated at NAMEDATALEN-1 (63) characters
4 --
5 -- fixed-length by reference
6 SELECT name 'name string' = name 'name string' AS "True";
7  True 
8 ------
9  t
10 (1 row)
12 SELECT name 'name string' = name 'name string ' AS "False";
13  False 
14 -------
15  f
16 (1 row)
21 CREATE TABLE NAME_TBL(f1 name);
22 INSERT INTO NAME_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR');
23 INSERT INTO NAME_TBL(f1) VALUES ('1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr');
24 INSERT INTO NAME_TBL(f1) VALUES ('asdfghjkl;');
25 INSERT INTO NAME_TBL(f1) VALUES ('343f%2a');
26 INSERT INTO NAME_TBL(f1) VALUES ('d34aaasdf');
27 INSERT INTO NAME_TBL(f1) VALUES ('');
28 INSERT INTO NAME_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ');
29 SELECT '' AS seven, * FROM NAME_TBL;
30  seven |                               f1                                
31 -------+-----------------------------------------------------------------
32        | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ
33        | 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq
34        | asdfghjkl;
35        | 343f%2a
36        | d34aaasdf
37        | 
38        | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ
39 (7 rows)
41 SELECT '' AS six, c.f1 FROM NAME_TBL c WHERE c.f1 <> '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR';
42  six |                               f1                                
43 -----+-----------------------------------------------------------------
44      | 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq
45      | asdfghjkl;
46      | 343f%2a
47      | d34aaasdf
48      | 
49 (5 rows)
51 SELECT '' AS one, c.f1 FROM NAME_TBL c WHERE c.f1 = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR';
52  one |                               f1                                
53 -----+-----------------------------------------------------------------
54      | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ
55      | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ
56 (2 rows)
58 SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 < '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR';
59  three | f1 
60 -------+----
61        | 
62 (1 row)
64 SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 <= '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR';
65  four |                               f1                                
66 ------+-----------------------------------------------------------------
67       | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ
68       | 
69       | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ
70 (3 rows)
72 SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 > '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR';
73  three |                               f1                                
74 -------+-----------------------------------------------------------------
75        | 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq
76        | asdfghjkl;
77        | 343f%2a
78        | d34aaasdf
79 (4 rows)
81 SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 >= '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR';
82  four |                               f1                                
83 ------+-----------------------------------------------------------------
84       | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ
85       | 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq
86       | asdfghjkl;
87       | 343f%2a
88       | d34aaasdf
89       | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ
90 (6 rows)
92 SELECT '' AS seven, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*';
93  seven |                               f1                                
94 -------+-----------------------------------------------------------------
95        | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ
96        | 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq
97        | asdfghjkl;
98        | 343f%2a
99        | d34aaasdf
100        | 
101        | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ
102 (7 rows)
104 SELECT '' AS zero, c.f1 FROM NAME_TBL c WHERE c.f1 !~ '.*';
105  zero | f1 
106 ------+----
107 (0 rows)
109 SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '[0-9]';
110  three |                               f1                                
111 -------+-----------------------------------------------------------------
112        | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ
113        | 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq
114        | 343f%2a
115        | d34aaasdf
116        | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ
117 (5 rows)
119 SELECT '' AS two, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*asdf.*';
120  two |     f1     
121 -----+------------
122      | asdfghjkl;
123      | d34aaasdf
124 (2 rows)
126 DROP TABLE NAME_TBL;