Dropped attributes in postgres

"Chris Capel" <[email protected]>
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Shouldn't dropped attributes (like columns, which remain in the table invisibly after dropped) be ignored by LIST-ATTRIBUTES? Since they can't be accessed by SQL, there's not much point in including them.

And completely off-topic, what is the rationale behind leaving dropped columns in the physical table like that? I wasn't aware of this issue before CLSQL.

Chris Capel

_______________________________________________
CLSQL-Devel mailing list
[email protected]
http://lists.b9.com/mailman/listinfo/clsql-devel
generic-postgresql.lisp.diff (text/x-patch, 584 B)
--- generic-postgresql.lisp~	2004-07-13 11:00:49.000000000 -0500
+++ generic-postgresql.lisp	2004-11-12 03:11:50.952554352 -0600
@@ -115,7 +115,7 @@
          (result
 	  (mapcar #'car
 		  (database-query
-		   (format nil "SELECT attname FROM pg_class,pg_attribute WHERE pg_class.oid=attrelid AND relname='~A'~A"
+		   (format nil "SELECT attname FROM pg_class,pg_attribute WHERE pg_class.oid=attrelid AND attisdropped = FALSE AND relname='~A'~A"
                            (string-downcase table)
                            owner-clause)
                    database nil nil))))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.