summaryrefslogtreecommitdiffstats
path: root/test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test.lua')
-rwxr-xr-xtest.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/test.lua b/test.lua
index 36cb690..5eff37a 100755
--- a/test.lua
+++ b/test.lua
@@ -56,10 +56,15 @@ end
local utils = require 'lem.utils'
local postgres = require 'lem.postgres'
-local db = assert(postgres.connect("host=localhost dbname=mydb"))
+local db = assert(postgres.connect([[
+host=localhost
+user=myuser
+password=mypasswd
+dbname=mydb
+]]))
assert(db:exec(
-'CREATE TABLE mytable (id integer PRIMARY KEY, name CHARACTER VARYING)'))
+'CREATE TABLE mytable (id integer PRIMARY KEY, name TEXT)'))
assert(db:exec("COPY mytable FROM STDIN (delimiter ',')"))
assert(db:put('1,alpha\n'))