@@ -202,10 +202,9 @@ internal static async Task<string> CreateTempTable(NpgsqlConnection conn, string
202202 await conn . ExecuteNonQueryAsync ( @$ "
203203START TRANSACTION;
204204SELECT pg_advisory_xact_lock(0);
205- DROP TABLE IF EXISTS { tableName } CASCADE ;
205+ DROP TABLE IF EXISTS { tableName } ;
206206COMMIT;
207207CREATE TABLE { tableName } ({ columns } );" ) ;
208-
209208 return tableName ;
210209 }
211210
@@ -219,7 +218,7 @@ internal static async Task<string> GetTempTableName(NpgsqlConnection conn)
219218 await conn . ExecuteNonQueryAsync ( @$ "
220219START TRANSACTION;
221220SELECT pg_advisory_xact_lock(0);
222- DROP TABLE IF EXISTS { tableName } CASCADE ;
221+ DROP TABLE IF EXISTS { tableName } ;
223222COMMIT" ) ;
224223 return tableName ;
225224 }
@@ -234,7 +233,7 @@ internal static async Task<string> CreateTempTable(NpgsqlDataSource dataSource,
234233 await dataSource . ExecuteNonQueryAsync ( @$ "
235234START TRANSACTION;
236235SELECT pg_advisory_xact_lock(0);
237- DROP TABLE IF EXISTS { tableName } CASCADE ;
236+ DROP TABLE IF EXISTS { tableName } ;
238237COMMIT;
239238CREATE TABLE { tableName } ({ columns } );" ) ;
240239 return tableName ;
@@ -246,7 +245,7 @@ await dataSource.ExecuteNonQueryAsync(@$"
246245 internal static async Task < string > CreateTempSchema ( NpgsqlConnection conn )
247246 {
248247 var schemaName = "temp_schema" + Interlocked . Increment ( ref _tempSchemaCounter ) ;
249- await conn . ExecuteNonQueryAsync ( $ "DROP SCHEMA IF EXISTS { schemaName } CASCADE ; CREATE SCHEMA { schemaName } ") ;
248+ await conn . ExecuteNonQueryAsync ( $ "DROP SCHEMA IF EXISTS { schemaName } ; CREATE SCHEMA { schemaName } ") ;
250249 return schemaName ;
251250 }
252251
@@ -257,7 +256,7 @@ internal static async Task<string> CreateTempSchema(NpgsqlConnection conn)
257256 internal static async Task < string > GetTempViewName ( NpgsqlConnection conn )
258257 {
259258 var viewName = "temp_view" + Interlocked . Increment ( ref _tempViewCounter ) ;
260- await conn . ExecuteNonQueryAsync ( $ "DROP VIEW IF EXISTS { viewName } CASCADE ") ;
259+ await conn . ExecuteNonQueryAsync ( $ "DROP VIEW IF EXISTS { viewName } ") ;
261260 return viewName ;
262261 }
263262
@@ -268,7 +267,7 @@ internal static async Task<string> GetTempViewName(NpgsqlConnection conn)
268267 internal static async Task < string > GetTempMaterializedViewName ( NpgsqlConnection conn )
269268 {
270269 var viewName = "temp_materialized_view" + Interlocked . Increment ( ref _tempViewCounter ) ;
271- await conn . ExecuteNonQueryAsync ( $ "DROP MATERIALIZED VIEW IF EXISTS { viewName } CASCADE ") ;
270+ await conn . ExecuteNonQueryAsync ( $ "DROP MATERIALIZED VIEW IF EXISTS { viewName } ") ;
272271 return viewName ;
273272 }
274273
@@ -279,7 +278,7 @@ internal static async Task<string> GetTempMaterializedViewName(NpgsqlConnection
279278 internal static async Task < string > GetTempFunctionName ( NpgsqlConnection conn )
280279 {
281280 var functionName = "temp_func" + Interlocked . Increment ( ref _tempFunctionCounter ) ;
282- await conn . ExecuteNonQueryAsync ( $ "DROP FUNCTION IF EXISTS { functionName } CASCADE ") ;
281+ await conn . ExecuteNonQueryAsync ( $ "DROP FUNCTION IF EXISTS { functionName } ") ;
283282 return functionName ;
284283 }
285284
@@ -293,7 +292,7 @@ internal static async Task<string> GetTempFunctionName(NpgsqlConnection conn)
293292 internal static async Task < string > GetTempProcedureName ( NpgsqlDataSource dataSource )
294293 {
295294 var procedureName = "temp_procedure" + Interlocked . Increment ( ref _tempProcedureCounter ) ;
296- await dataSource . ExecuteNonQueryAsync ( $ "DROP PROCEDURE IF EXISTS { procedureName } CASCADE ") ;
295+ await dataSource . ExecuteNonQueryAsync ( $ "DROP PROCEDURE IF EXISTS { procedureName } ") ;
297296 return procedureName ;
298297 }
299298
@@ -307,7 +306,7 @@ internal static async Task<string> GetTempProcedureName(NpgsqlDataSource dataSou
307306 internal static async Task < string > GetTempProcedureName ( NpgsqlConnection connection )
308307 {
309308 var procedureName = "temp_procedure" + Interlocked . Increment ( ref _tempProcedureCounter ) ;
310- await connection . ExecuteNonQueryAsync ( $ "DROP PROCEDURE IF EXISTS { procedureName } CASCADE ") ;
309+ await connection . ExecuteNonQueryAsync ( $ "DROP PROCEDURE IF EXISTS { procedureName } ") ;
311310 return procedureName ;
312311 }
313312
@@ -318,7 +317,7 @@ internal static async Task<string> GetTempProcedureName(NpgsqlConnection connect
318317 internal static async Task < string > GetTempTypeName ( NpgsqlConnection conn )
319318 {
320319 var typeName = "temp_type" + Interlocked . Increment ( ref _tempTypeCounter ) ;
321- await conn . ExecuteNonQueryAsync ( $ "DROP TYPE IF EXISTS { typeName } CASCADE ") ;
320+ await conn . ExecuteNonQueryAsync ( $ "DROP TYPE IF EXISTS { typeName } ") ;
322321 return typeName ;
323322 }
324323
0 commit comments