diff --git a/extra/db/postgresql/ffi/ffi.factor b/extra/db/postgresql/ffi/ffi.factor old mode 100644 new mode 100755 index 23368164a1..1ec6fc46f8 --- a/extra/db/postgresql/ffi/ffi.factor +++ b/extra/db/postgresql/ffi/ffi.factor @@ -1,17 +1,14 @@ -! Copyright (C) 2007 Doug Coleman. +! Copyright (C) 2007, 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. ! tested on debian linux with postgresql 8.1 - USING: alien alien.syntax combinators system ; IN: db.postgresql.ffi -<< -"postgresql" { +<< "postgresql" { { [ win32? ] [ "libpq.dll" ] } { [ macosx? ] [ "/opt/local/lib/postgresql81/libpq.dylib" ] } { [ unix? ] [ "libpq.so" ] } -} cond "cdecl" add-library ->> +} cond "cdecl" add-library >> ! ConnSatusType : CONNECTION_OK HEX: 0 ; inline @@ -75,7 +72,6 @@ TYPEDEF: void* SSL* LIBRARY: postgresql - ! Exported functions of libpq ! make a new client connection to the backend @@ -102,10 +98,6 @@ FUNCTION: PQconninfoOption* PQconndefaults ( ) ; ! free the data structure returned by PQconndefaults() FUNCTION: void PQconninfoFree ( PQconninfoOption* connOptions ) ; -! -! close the current connection and restablish a new one with the same -! parameters -! ! Asynchronous (non-blocking) FUNCTION: int PQresetStart ( PGconn* conn ) ; FUNCTION: PostgresPollingStatusType PQresetPoll ( PGconn* conn ) ; diff --git a/extra/db/postgresql/postgresql.factor b/extra/db/postgresql/postgresql.factor old mode 100644 new mode 100755 index df778cc80d..92e3fa5489 --- a/extra/db/postgresql/postgresql.factor +++ b/extra/db/postgresql/postgresql.factor @@ -39,8 +39,8 @@ M: postgresql-db dispose ( db -- ) M: postgresql-statement bind-statement* ( seq statement -- ) set-statement-params ; -M: postgresql-statement rebind-statement ( seq statement -- ) - bind-statement* ; +M: postgresql-statement reset-statement ( statement -- ) + drop ; M: postgresql-result-set #rows ( result-set -- n ) result-set-handle PQntuples ;