Fix an issue where base types are not displaying in the create/edit domain dialog, also corrected the condition to show hidden system types. Fixes #2692

pull/6/head
Murtuza Zabuawala 2017-09-13 09:52:16 +01:00 committed by Dave Page
parent 120dbcc7d8
commit 5891bda06a
2 changed files with 12 additions and 1 deletions

View File

@ -493,7 +493,8 @@ AND relname = typname AND relkind != 'c') AND
relnamespace=typnamespace AND relname = substring(typname FROM 2)::name
AND relkind != 'c'))"""
if self.blueprint.show_system_objects:
# To show hidden objects
if not self.blueprint.show_system_objects:
condition += " AND nsp.nspname != 'information_schema'"
# Get Types

View File

@ -93,6 +93,16 @@ class DataTypeReader:
"""
res = []
try:
# Check if template path is already set or not
# if not then we will set the template path here
if not hasattr(self, 'data_type_template_path'):
self.data_type_template_path = 'datatype/sql/' + (
'#{0}#{1}#'.format(
self.manager.server_type,
self.manager.version
) if self.manager.server_type == 'gpdb' else
'#{0}#'.format(self.manager.version)
)
SQL = render_template(
"/".join([self.data_type_template_path,'get_types.sql']),