@@ -19,7 +19,6 @@ use pgwire::api::{ClientInfo, NoopErrorHandler, PgWireServerHandlers, Type};
19
19
use tokio:: sync:: Mutex ;
20
20
21
21
use crate :: datatypes;
22
- use crate :: information_schema:: { columns_df, schemata_df, tables_df} ;
23
22
use pgwire:: error:: { PgWireError , PgWireResult } ;
24
23
25
24
pub struct HandlerFactory ( pub Arc < DfSessionService > ) ;
@@ -189,39 +188,6 @@ impl DfSessionService {
189
188
Ok ( None )
190
189
}
191
190
}
192
-
193
- async fn try_respond_information_schema < ' a > (
194
- & self ,
195
- query_lower : & str ,
196
- ) -> PgWireResult < Option < Response < ' a > > > {
197
- if query_lower. contains ( "information_schema.schemata" ) {
198
- let df = schemata_df ( & self . session_context )
199
- . await
200
- . map_err ( |e| PgWireError :: ApiError ( Box :: new ( e) ) ) ?;
201
- let resp = datatypes:: encode_dataframe ( df, & Format :: UnifiedText ) . await ?;
202
- return Ok ( Some ( Response :: Query ( resp) ) ) ;
203
- } else if query_lower. contains ( "information_schema.tables" ) {
204
- let df = tables_df ( & self . session_context )
205
- . await
206
- . map_err ( |e| PgWireError :: ApiError ( Box :: new ( e) ) ) ?;
207
- let resp = datatypes:: encode_dataframe ( df, & Format :: UnifiedText ) . await ?;
208
- return Ok ( Some ( Response :: Query ( resp) ) ) ;
209
- } else if query_lower. contains ( "information_schema.columns" ) {
210
- let df = columns_df ( & self . session_context )
211
- . await
212
- . map_err ( |e| PgWireError :: ApiError ( Box :: new ( e) ) ) ?;
213
- let resp = datatypes:: encode_dataframe ( df, & Format :: UnifiedText ) . await ?;
214
- return Ok ( Some ( Response :: Query ( resp) ) ) ;
215
- }
216
-
217
- // Handle pg_catalog.pg_namespace for pgcli compatibility
218
- if query_lower. contains ( "pg_catalog.pg_namespace" ) {
219
- let resp = self . mock_pg_namespace ( ) . await ?;
220
- return Ok ( Some ( Response :: Query ( resp) ) ) ;
221
- }
222
-
223
- Ok ( None )
224
- }
225
191
}
226
192
227
193
#[ async_trait]
@@ -241,10 +207,6 @@ impl SimpleQueryHandler for DfSessionService {
241
207
return Ok ( vec ! [ resp] ) ;
242
208
}
243
209
244
- if let Some ( resp) = self . try_respond_information_schema ( & query_lower) . await ? {
245
- return Ok ( vec ! [ resp] ) ;
246
- }
247
-
248
210
let df = self
249
211
. session_context
250
212
. sql ( query)
@@ -361,11 +323,8 @@ impl ExtendedQueryHandler for DfSessionService {
361
323
return Ok ( resp) ;
362
324
}
363
325
364
- if let Some ( resp) = self . try_respond_information_schema ( & query) . await ? {
365
- return Ok ( resp) ;
366
- }
367
-
368
326
let ( _, plan) = & portal. statement . statement ;
327
+
369
328
let param_types = plan
370
329
. get_parameter_types ( )
371
330
. map_err ( |e| PgWireError :: ApiError ( Box :: new ( e) ) ) ?;
0 commit comments