+(deftest :fddl/owner/table
+ (with-dataset *ds-fddl*
+ (values
+ (clsql-sys:table-exists-p [alpha])
+ (clsql-sys:table-exists-p [alpha] :owner *test-database-user*)
+ (clsql-sys:table-exists-p [alpha] :owner *test-false-database-user*)))
+ t t nil)
+
+(deftest :fddl/owner/attributes
+ (with-dataset *ds-fddl*
+ (values
+ (length (clsql-sys:list-attributes [alpha]))
+ (length (clsql-sys:list-attributes [alpha] :owner *test-database-user*))
+ (length (clsql-sys:list-attributes [alpha] :owner *test-false-database-user*))))
+ 4 4 0)
+
+(deftest :fddl/owner/attribute-types
+ (with-dataset *ds-fddl*
+ (values
+ (length (clsql:list-attribute-types [alpha]))
+ (length (clsql:list-attribute-types [alpha] :owner *test-database-user*))
+ (length (clsql:list-attribute-types [alpha] :owner *test-false-database-user*))))
+ 4 4 0)
+
+(deftest :fddl/owner/index
+ (with-dataset *ds-fddl*
+ (progn (clsql:create-index [bar] :on [alpha]
+ :attributes '([a] [c]))
+ (values
+ (clsql:index-exists-p [bar] )
+ (clsql:index-exists-p [bar] :owner *test-database-user*)
+ (clsql:index-exists-p [bar] :owner *test-false-database-user*)
+
+ (length (clsql-sys:list-indexes :on [alpha]))
+ (length (clsql-sys:list-indexes :on [alpha] :owner *test-database-user*))
+ (length (clsql-sys:list-indexes :on [alpha] :owner *test-false-database-user*))
+ (progn
+ (clsql:drop-index [bar] :on [alpha]
+ :if-does-not-exist :ignore)
+ (clsql:index-exists-p [bar] :owner *test-database-user*))
+ (clsql:index-exists-p [bar] ))))
+ t t nil
+ 1 1 0
+ nil nil)
+
+(deftest :fddl/owner/sequence
+ (progn (clsql:create-sequence [foo])
+ (values
+ (clsql:sequence-exists-p [foo])
+ (clsql:sequence-exists-p [foo] :owner *test-database-user*)
+ (clsql:sequence-exists-p [foo] :owner *test-false-database-user*)
+
+ (progn
+ (clsql:drop-sequence [foo] :if-does-not-exist :ignore)
+ (clsql:sequence-exists-p [foo] ))))
+ t t nil nil)
+
+
+