]> granicus.if.org Git - postgresql/blob - src/pl/plpython/feature.expected
I have attached two patches as per:
[postgresql] / src / pl / plpython / feature.expected
1 select stupid();
2  stupid 
3 --------
4  zarkon
5 (1 row)
6
7 SELECT static_test();
8  static_test 
9 -------------
10            1
11 (1 row)
12
13 SELECT static_test();
14  static_test 
15 -------------
16            2
17 (1 row)
18
19 SELECT global_test_one();
20                     global_test_one                     
21 --------------------------------------------------------
22  SD: set by global_test_one, GD: set by global_test_one
23 (1 row)
24
25 SELECT global_test_two();
26                     global_test_two                     
27 --------------------------------------------------------
28  SD: set by global_test_two, GD: set by global_test_one
29 (1 row)
30
31 SELECT import_fail();
32 NOTICE:  ('import socket failed -- untrusted dynamic module: _socket',)
33     import_fail     
34 --------------------
35  failed as expected
36 (1 row)
37
38 SELECT import_succeed();
39      import_succeed     
40 ------------------------
41  succeeded, as expected
42 (1 row)
43
44 SELECT import_test_one('sha hash of this string');
45              import_test_one              
46 ------------------------------------------
47  a04e23cb9b1a09cd1051a04a7c571aae0f90346c
48 (1 row)
49
50 select import_test_two(users) from users where fname = 'willem';
51                           import_test_two                          
52 -------------------------------------------------------------------
53  sha hash of willemdoe is 3cde6b574953b0ca937b4d76ebc40d534d910759
54 (1 row)
55
56 select argument_test_one(users, fname, lname) from users where lname = 'doe' order by 1;
57                                   argument_test_one                                  
58 -------------------------------------------------------------------------------------
59  jane doe => {'fname': 'jane', 'userid': 1, 'lname': 'doe', 'username': 'j_doe'}
60  john doe => {'fname': 'john', 'userid': 2, 'lname': 'doe', 'username': 'johnd'}
61  willem doe => {'fname': 'willem', 'userid': 3, 'lname': 'doe', 'username': 'w_doe'}
62 (3 rows)
63
64 select nested_call_one('pass this along');
65                          nested_call_one                         
66 -----------------------------------------------------------------
67  {'nested_call_two': "{'nested_call_three': 'pass this along'}"}
68 (1 row)
69
70 select spi_prepared_plan_test_one('doe');
71  spi_prepared_plan_test_one 
72 ----------------------------
73  there are 3 does
74 (1 row)
75
76 select spi_prepared_plan_test_one('smith');
77  spi_prepared_plan_test_one 
78 ----------------------------
79  there are 1 smiths
80 (1 row)
81
82 select spi_prepared_plan_test_nested('smith');
83  spi_prepared_plan_test_nested 
84 -------------------------------
85  there are 1 smiths
86 (1 row)
87
88 SELECT * FROM users;
89  fname  | lname | username | userid 
90 --------+-------+----------+--------
91  jane   | doe   | j_doe    |      1
92  john   | doe   | johnd    |      2
93  willem | doe   | w_doe    |      3
94  rick   | smith | slash    |      4
95 (4 rows)
96
97 UPDATE users SET fname = 'william' WHERE fname = 'willem';
98 INSERT INTO users (fname, lname) VALUES ('william', 'smith');
99 INSERT INTO users (fname, lname, username) VALUES ('charles', 'darwin', 'beagle');
100 SELECT * FROM users;
101   fname  | lname  | username | userid 
102 ---------+--------+----------+--------
103  jane    | doe    | j_doe    |      1
104  john    | doe    | johnd    |      2
105  willem  | doe    | w_doe    |      3
106  rick    | smith  | slash    |      4
107  willem  | smith  | w_smith  |      5
108  charles | darwin | beagle   |      6
109 (6 rows)
110
111 SELECT join_sequences(sequences) FROM sequences;
112  join_sequences 
113 ----------------
114  ABCDEFGHIJKL
115  ABCDEF
116  ABCDEF
117  ABCDEF
118  ABCDEF
119  ABCDEF
120 (6 rows)
121
122 SELECT join_sequences(sequences) FROM sequences
123         WHERE join_sequences(sequences) ~* '^A';
124  join_sequences 
125 ----------------
126  ABCDEFGHIJKL
127  ABCDEF
128  ABCDEF
129  ABCDEF
130  ABCDEF
131  ABCDEF
132 (6 rows)
133
134 SELECT join_sequences(sequences) FROM sequences
135         WHERE join_sequences(sequences) ~* '^B';
136  join_sequences 
137 ----------------
138 (0 rows)
139