I followed your instructions and those in your link and I managed to get it to connect using ODBC. However, this simple test: require 'luasql.odbc' e = luasql.odbc() c = e:connect 'PostgreSQLtest' r = c:execute 'select * from foo'