summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-06-30 19:28:29 +0000
committerTed Trask <ttrask01@yahoo.com>2014-06-30 19:28:29 +0000
commit16fa3390594d7316429287c1453d944cd68febf4 (patch)
treed09e580ca279ce25ff177033568ddb9591f94e49
parent26d839823382a7245617fd1e08bafb402dda3f42 (diff)
downloadacf-lib-16fa3390594d7316429287c1453d944cd68febf4.tar.bz2
acf-lib-16fa3390594d7316429287c1453d944cd68febf4.tar.xz
Modify db to only report tables in public schema for postgresql
We can add proper schema support in the future
-rw-r--r--db.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/db.lua b/db.lua
index 214cf39..3236e1a 100644
--- a/db.lua
+++ b/db.lua
@@ -126,7 +126,7 @@ end
export.listtables = function(dbobject)
local result = {}
if dbobject.engine == mymodule.engine.postgresql then
- local tab = dbobject.getselectresponse("SELECT tablename FROM pg_tables WHERE tablename !~* 'pg_*' ORDER BY tablename ASC")
+ local tab = dbobject.getselectresponse("SELECT tablename FROM pg_tables WHERE tablename !~* 'pg_*' AND schemaname = 'public' ORDER BY tablename ASC")
for i,t in ipairs(tab) do
result[#result+1] = t.tablename
end