diff options
| author | Simon Charette <charette.s@gmail.com> | 2025-08-28 17:34:06 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-08-28 20:44:21 +0200 |
| commit | dc4ee9915228238bd24ce67645504f65eaf2f1fd (patch) | |
| tree | e9d103565370f48aae551e988a076b04e825aa82 /django/db/backends/postgresql/operations.py | |
| parent | 41ff30f6f9d072036be1f74db8f0c8b21565299f (diff) | |
Refs #27222 -- Implemented BaseDatabaseOperations.return_insert_columns()/fetch_returned_insert_rows().
Diffstat (limited to 'django/db/backends/postgresql/operations.py')
| -rw-r--r-- | django/db/backends/postgresql/operations.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/django/db/backends/postgresql/operations.py b/django/db/backends/postgresql/operations.py index a8c073e418..7cd868d789 100644 --- a/django/db/backends/postgresql/operations.py +++ b/django/db/backends/postgresql/operations.py @@ -155,13 +155,6 @@ class DatabaseOperations(BaseDatabaseOperations): return f"SELECT * FROM {placeholder_rows}" return super().bulk_insert_sql(fields, placeholder_rows) - def fetch_returned_insert_rows(self, cursor): - """ - Given a cursor object that has just performed an INSERT...RETURNING - statement into a table, return the tuple of returned data. - """ - return cursor.fetchall() - def lookup_cast(self, lookup_type, internal_type=None): lookup = "%s" # Cast text lookups to text to allow things like filter(x__contains=4) @@ -324,19 +317,6 @@ class DatabaseOperations(BaseDatabaseOperations): return cursor.query.decode() return None - def return_insert_columns(self, fields): - if not fields: - return "", () - columns = [ - "%s.%s" - % ( - self.quote_name(field.model._meta.db_table), - self.quote_name(field.column), - ) - for field in fields - ] - return "RETURNING %s" % ", ".join(columns), () - if is_psycopg3: def adapt_integerfield_value(self, value, internal_type): |
