diff --git a/lib/extras.py b/lib/extras.py index 69da5264..137d6fbe 100644 --- a/lib/extras.py +++ b/lib/extras.py @@ -841,7 +841,8 @@ SELECT t.oid, attname, atttypid FROM pg_type t JOIN pg_namespace ns ON typnamespace = ns.oid JOIN pg_attribute a ON attrelid = typrelid -WHERE typname = %s and nspname = 'public'; +WHERE typname = %s and nspname = 'public' +ORDER BY attnum; """, (name, )) recs = curs.fetchall()