Page 1 of 3
pyodbc: export_objects returns nothing for schema
Posted: Tue Feb 25, 2014 9:13 pm
by dbmsuser7
Anyone have any idea why running the query
Code: Select all
select export_objects('', 'myschema')
might fail to return any rows, even if
Code: Select all
select export_objects('', 'myschema.mytable')
does return a row?
Re: pyodbc: export_objects returns nothing for schema
Posted: Tue Feb 25, 2014 9:41 pm
by NorbertKrupa
It may have to do with permissions and/or if there is a schema & table with the same name.
Re: pyodbc: export_objects returns nothing for schema
Posted: Tue Feb 25, 2014 10:34 pm
by dbmsuser7
Thanks for your reply.
I'm positive I have the name right, since the same command works in VSQL, and I also get the name by just deleting '.table' in the string 'schema.table', for which it works.
As for permissions, I'm running as the db superuser.
Re: pyodbc: export_objects returns nothing for schema
Posted: Tue Feb 25, 2014 10:50 pm
by NorbertKrupa
If you run the command through vsql and get the expected results, and not with pyodbc, then it's a permissions issue.
Re: pyodbc: export_objects returns nothing for schema
Posted: Tue Feb 25, 2014 11:23 pm
by id10t
Hi!
[DELETED]
Re: pyodbc: export_objects returns nothing for schema
Posted: Wed Feb 26, 2014 12:04 am
by NorbertKrupa
Can you test the function the OP is referring to (export_objects) ?
Re: pyodbc: export_objects returns nothing for schema
Posted: Wed Feb 26, 2014 12:20 am
by id10t
Hi!
[DELETED]