From 16fa3390594d7316429287c1453d944cd68febf4 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 30 Jun 2014 19:28:29 +0000 Subject: Modify db to only report tables in public schema for postgresql We can add proper schema support in the future --- db.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3