mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00

This creates a consolidated area to reference all of the notes from previous releases of PostgreSQL, as current releases only keep the the notes for that specific major release of PostgreSQL.
8 lines
256 B
Python
8 lines
256 B
Python
from django.db import connection
|
|
|
|
def exec_to_dict(query, params=None):
|
|
curs = connection.cursor()
|
|
curs.execute(query, params)
|
|
columns = [col[0] for col in curs.description]
|
|
return [dict(list(zip(columns, row))) for row in curs.fetchall()]
|