[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: String to use in luasql env:connect()????
- From: Steve Litt <slitt@...>
- Date: Fri, 14 Jan 2011 06:48:35 -0500
I managed to get luasql installed on my Ubuntu box (the box at the meeting was
gentoo). Using psql (the CLI tool that comes with Postgres), I created
database testlua, user slitt. Within testlua I created table testt with
columns fname and lname, both type text.
Then I ran the following program:
-- load driver
-- create environment object
envv = assert (luasql.postgres())
-- connect to data source
con = assert (envv:connect("testlua", "slitt", nil))
Which produced the following output:
/usr/bin/lua: ./junk.lua:8: LuaSQL: Error connecting to database.
[C]: in function 'assert'
./junk.lua:8: in main chunk
So it looks to me like it accepted the require statement, and
luasql.postgres() didn't return nil, but the envv:connect() failed. I ran this
program as user slitt, same as the owner of database testlua. I tried all
sorts of combinations as arguments to the connect(), but they all produced the
Does anyone know a diagnostic test I can do to narrow down this problem? Does
anyone know of documentation of the connect() function better than the docs at
Recession Relief Package