diff options
author | Emil Renner Berthing <esmil@mailme.dk> | 2013-01-30 00:16:27 +0100 |
---|---|---|
committer | Emil Renner Berthing <esmil@mailme.dk> | 2013-01-31 15:57:32 +0100 |
commit | 69ccd279951c1b2816e6b650d2275fb39ff15b10 (patch) | |
tree | 5db58c483158113fde1d646b8470e649dc9df85f /test.lua | |
parent | 43334b08b318449f42ae25f0ac8878070f7d9402 (diff) | |
download | lem-postgres-69ccd279951c1b2816e6b650d2275fb39ff15b10.tar.gz lem-postgres-69ccd279951c1b2816e6b650d2275fb39ff15b10.tar.xz lem-postgres-69ccd279951c1b2816e6b650d2275fb39ff15b10.zip |
test: connect with password and fix newsleeper
Diffstat (limited to 'test.lua')
-rwxr-xr-x | test.lua | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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')) |