Order the columns of a cartodbfied table consistently
The final order of the columns of a cartodbfied table wasn't uniquely specified, so could vary across PG versions. This was a problem in particular for having deterministic test results.
This commit is contained in:
@@ -1071,7 +1071,7 @@ BEGIN
|
|||||||
-- by selecting their names into an array and
|
-- by selecting their names into an array and
|
||||||
-- joining the array with a comma
|
-- joining the array with a comma
|
||||||
SELECT
|
SELECT
|
||||||
',' || array_to_string(array_agg(Format('%I',a.attname)),',') AS column_name_sql,
|
',' || array_to_string(array_agg(Format('%I',a.attname) ORDER BY a.attnum),',') AS column_name_sql,
|
||||||
Count(*) AS count
|
Count(*) AS count
|
||||||
INTO rec
|
INTO rec
|
||||||
FROM pg_class c
|
FROM pg_class c
|
||||||
|
|||||||
Reference in New Issue
Block a user