@@ -35,7 +35,7 @@ fn to_params<'a>(
3535
3636pub fn criterion_benchmark ( c : & mut Criterion ) {
3737 c. bench_function ( "small sql, adjusted" , |b| {
38- let content = format ! ( "select {} from users;" , CURSOR_POS ) ;
38+ let content = format ! ( "select {CURSOR_POS } from users;" ) ;
3939
4040 let cache = SchemaCache :: default ( ) ;
4141 let ( sql, pos) = sql_and_pos ( content. as_str ( ) ) ;
@@ -52,16 +52,15 @@ pub fn criterion_benchmark(c: &mut Criterion) {
5252 u.rolname as "owner!"
5353from
5454 pg_namespace n,
55- {}
55+ {CURSOR_POS }
5656where
5757 n.nspowner = u.oid
5858 and (
5959 pg_has_role(n.nspowner, 'USAGE')
6060 or has_schema_privilege(n.oid, 'CREATE, USAGE')
6161 )
6262 and not pg_catalog.starts_with(n.nspname, 'pg_temp_')
63- and not pg_catalog.starts_with(n.nspname, 'pg_toast_temp_');"# ,
64- CURSOR_POS
63+ and not pg_catalog.starts_with(n.nspname, 'pg_toast_temp_');"#
6564 ) ;
6665
6766 let cache = SchemaCache :: default ( ) ;
9897 ix.indisunique as is_unique,
9998 ix.indrelid as table_oid
10099 from
101- {}
100+ {CURSOR_POS }
102101 where
103102 c.relkind = 'i'
104103 )
128127where
129128 -- system columns, such as `cmax` or `tableoid`, have negative `attnum`s
130129 atts.attnum >= 0;
131- "# ,
132- CURSOR_POS
130+ "#
133131 ) ;
134132
135133 let cache = SchemaCache :: default ( ) ;
@@ -140,7 +138,7 @@ where
140138 } ) ;
141139
142140 c. bench_function ( "small sql, unadjusted" , |b| {
143- let content = format ! ( "select e{} from users;" , CURSOR_POS ) ;
141+ let content = format ! ( "select e{CURSOR_POS } from users;" ) ;
144142
145143 let cache = SchemaCache :: default ( ) ;
146144 let ( sql, pos) = sql_and_pos ( content. as_str ( ) ) ;
@@ -157,16 +155,15 @@ where
157155 u.rolname as "owner!"
158156from
159157 pg_namespace n,
160- pg_r{}
158+ pg_r{CURSOR_POS }
161159where
162160 n.nspowner = u.oid
163161 and (
164162 pg_has_role(n.nspowner, 'USAGE')
165163 or has_schema_privilege(n.oid, 'CREATE, USAGE')
166164 )
167165 and not pg_catalog.starts_with(n.nspname, 'pg_temp_')
168- and not pg_catalog.starts_with(n.nspname, 'pg_toast_temp_');"# ,
169- CURSOR_POS
166+ and not pg_catalog.starts_with(n.nspname, 'pg_toast_temp_');"#
170167 ) ;
171168
172169 let cache = SchemaCache :: default ( ) ;
@@ -235,8 +232,7 @@ where
235232 -- system columns, such as `cmax` or `tableoid`, have negative `attnum`s
236233 atts.attnum >= 0
237234order by
238- sch{} "# ,
239- CURSOR_POS
235+ sch{CURSOR_POS} "#
240236 ) ;
241237
242238 let cache = SchemaCache :: default ( ) ;
0 commit comments