NULL -> f

[ ] [ ] catch -> [ ] catch [ ] when
ifte -> if
cvs
Doug Coleman 2005-09-27 04:54:53 +00:00
parent 5c966a354e
commit 0505f630d3
3 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@ win32? [
! "postgresql" "dll" "stdcall" add-library
] [
"postgresql" "libpq.so" "cdecl" add-library
] ifte
] if
[ "postgresql.factor" ]
[ "contrib/postgresql/" swap append run-file ] each

View File

@ -31,11 +31,12 @@ USING: kernel postgresql alien errors io ;
: do-query-drop-nofail ( PGconn query -- PGresult * )
[ do-query ]
catch
[
"non-fatal error, continuing" print
drop
PQclear ! clear memory
] catch ;
] when ;
! just a basic demo
: run-test ( -- )

View File

@ -88,7 +88,7 @@ FUNCTION: PGconn* PQsetdbLogin ( char* pghost, char* pgport,
! PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL)
: PQsetdb ( M_PGHOST M_PGPORT M_PGOPT M_PGTTY M_DBNAME -- PGconn* )
NULL NULL PQsetdbLogin ;
f f PQsetdbLogin ;
! close the current connection and free the PGconn data structure
FUNCTION: void PQfinish ( PGconn* conn ) ;