From 8ac5f0070a73081d0e619d2390e3546ba5729483 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Wed, 9 Feb 2011 01:11:36 +0100 Subject: [PATCH] Fields order enforced in composite types adapter --- lib/extras.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()