I've been running "SELECT cdb_usertables FROM CDB_UserTables('public')" over the CartoDB SQL API, but I'm getting 0 rows in return (although, notably, no authentication error).

It was my impression that callers no longer needed an API key to query public tables: https://github.com/CartoDB/cartodb-postgresql/issues/36

Am I doing something wrong?

Related: Get list of all tables in CartoDB account with SQL statement?

1 Answer 1


After looking at the tests in the https://github.com/CartoDB/cartodb-postgresql for CDB_UserTables(), I tried:

SELECT 'public',CDB_UserTables('public') ORDER BY 2;

and that still didn't work. This did though:

SELECT CDB_UserTables('all');

  • Also, for some reason doing SELECT CDB_UserTables('private') seems to work as well, just not SELECT CDB_UserTables('public'). Not sure why, since all of my tables are public by necessity, since I'm not able to make private tables. Jan 6, 2015 at 23:18
  • @Kartones I believe the problem is on line 24: the first argument 'public' should be 'publicuser' Jan 7, 2015 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.