mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix View Data options for tables with columns that need quoting. Fixes #1492
This commit is contained in:
parent
8c433fbfce
commit
cb35c46f03
@ -365,8 +365,8 @@ class TableCommand(GridCommand):
|
|||||||
"""
|
"""
|
||||||
This function is used to fetch the primary key columns.
|
This function is used to fetch the primary key columns.
|
||||||
"""
|
"""
|
||||||
|
driver = get_driver(PG_DEFAULT_DRIVER)
|
||||||
manager = get_driver(PG_DEFAULT_DRIVER).connection_manager(self.sid)
|
manager = driver.connection_manager(self.sid)
|
||||||
conn = manager.connection(did=self.did, conn_id=self.conn_id)
|
conn = manager.connection(did=self.did, conn_id=self.conn_id)
|
||||||
|
|
||||||
pk_names = ''
|
pk_names = ''
|
||||||
@ -382,7 +382,7 @@ class TableCommand(GridCommand):
|
|||||||
raise Exception(result)
|
raise Exception(result)
|
||||||
|
|
||||||
for row in result['rows']:
|
for row in result['rows']:
|
||||||
pk_names += row['attname'] + ','
|
pk_names += driver.qtIdent(conn, row['attname']) + ','
|
||||||
primary_keys[row['attname']] = row['typname']
|
primary_keys[row['attname']] = row['typname']
|
||||||
|
|
||||||
if pk_names != '':
|
if pk_names != '':
|
||||||
|
Loading…
Reference in New Issue
Block a user