debugsqlModerate
ERROR: could not find array type for datatype information_schema.sql_identifier
Viewed 0 times
errordatatypearrayinformation_schemacouldtypesql_identifierforfindnot
Problem
I am trying to run the below sql command:
and I get the below error:
SELECT ARRAY(
SELECT column_name
FROM information_schema.columns
WHERE table_name ='gis_field_configuration_stage'
);and I get the below error:
ERROR: could not find array type for datatype information_schema.sql_identifierSolution
Just cast
Its original type is
column_name to text to bypass the error:SELECT ARRAY(
SELECT column_name::text
FROM information_schema.columns
WHERE table_name ='gis_field_configuration_stage'
);Its original type is
information_schema.sql_identifier and its happens that an array of that type is not provided in the predefined types.Code Snippets
SELECT ARRAY(
SELECT column_name::text
FROM information_schema.columns
WHERE table_name ='gis_field_configuration_stage'
);Context
StackExchange Database Administrators Q#32975, answer score: 10
Revisions (0)
No revisions yet.