]> granicus.if.org Git - postgresql/blob - src/test/regress/expected/misc_functions.out
Don't allow logging in with empty password.
[postgresql] / src / test / regress / expected / misc_functions.out
1 --
2 -- num_nulls()
3 --
4 SELECT num_nonnulls(NULL);
5  num_nonnulls 
6 --------------
7             0
8 (1 row)
9
10 SELECT num_nonnulls('1');
11  num_nonnulls 
12 --------------
13             1
14 (1 row)
15
16 SELECT num_nonnulls(NULL::text);
17  num_nonnulls 
18 --------------
19             0
20 (1 row)
21
22 SELECT num_nonnulls(NULL::text, NULL::int);
23  num_nonnulls 
24 --------------
25             0
26 (1 row)
27
28 SELECT num_nonnulls(1, 2, NULL::text, NULL::point, '', int8 '9', 1.0 / NULL);
29  num_nonnulls 
30 --------------
31             4
32 (1 row)
33
34 SELECT num_nonnulls(VARIADIC '{1,2,NULL,3}'::int[]);
35  num_nonnulls 
36 --------------
37             3
38 (1 row)
39
40 SELECT num_nonnulls(VARIADIC '{"1","2","3","4"}'::text[]);
41  num_nonnulls 
42 --------------
43             4
44 (1 row)
45
46 SELECT num_nonnulls(VARIADIC ARRAY(SELECT CASE WHEN i <> 40 THEN i END FROM generate_series(1, 100) i));
47  num_nonnulls 
48 --------------
49            99
50 (1 row)
51
52 SELECT num_nulls(NULL);
53  num_nulls 
54 -----------
55          1
56 (1 row)
57
58 SELECT num_nulls('1');
59  num_nulls 
60 -----------
61          0
62 (1 row)
63
64 SELECT num_nulls(NULL::text);
65  num_nulls 
66 -----------
67          1
68 (1 row)
69
70 SELECT num_nulls(NULL::text, NULL::int);
71  num_nulls 
72 -----------
73          2
74 (1 row)
75
76 SELECT num_nulls(1, 2, NULL::text, NULL::point, '', int8 '9', 1.0 / NULL);
77  num_nulls 
78 -----------
79          3
80 (1 row)
81
82 SELECT num_nulls(VARIADIC '{1,2,NULL,3}'::int[]);
83  num_nulls 
84 -----------
85          1
86 (1 row)
87
88 SELECT num_nulls(VARIADIC '{"1","2","3","4"}'::text[]);
89  num_nulls 
90 -----------
91          0
92 (1 row)
93
94 SELECT num_nulls(VARIADIC ARRAY(SELECT CASE WHEN i <> 40 THEN i END FROM generate_series(1, 100) i));
95  num_nulls 
96 -----------
97          1
98 (1 row)
99
100 -- special cases
101 SELECT num_nonnulls(VARIADIC NULL::text[]);
102  num_nonnulls 
103 --------------
104              
105 (1 row)
106
107 SELECT num_nonnulls(VARIADIC '{}'::int[]);
108  num_nonnulls 
109 --------------
110             0
111 (1 row)
112
113 SELECT num_nulls(VARIADIC NULL::text[]);
114  num_nulls 
115 -----------
116           
117 (1 row)
118
119 SELECT num_nulls(VARIADIC '{}'::int[]);
120  num_nulls 
121 -----------
122          0
123 (1 row)
124
125 -- should fail, one or more arguments is required
126 SELECT num_nonnulls();
127 ERROR:  function num_nonnulls() does not exist
128 LINE 1: SELECT num_nonnulls();
129                ^
130 HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
131 SELECT num_nulls();
132 ERROR:  function num_nulls() does not exist
133 LINE 1: SELECT num_nulls();
134                ^
135 HINT:  No function matches the given name and argument types. You might need to add explicit type casts.