Skip to content
  1. Apr 20, 2007
  2. Feb 21, 2007
  3. Dec 11, 2006
  4. Nov 26, 2006
    • emarsden's avatar
      [pg @ 2006-11-26 18:05:11 by emarsden] · 429be41f
      emarsden authored
      Make sure we consume the ReadyForQuery packet that is generated when
      closing a prepared statement or portal, or the packet can be
      misinterpreted by a later query, leading to data loss. Fix from Robert
      J. Macomber.
      
      darcs-hash:7ef83e38bdbd39d64bf602a5bfa60133234b743c
  5. Nov 20, 2006
    • emarsden's avatar
      [pg @ 2006-11-20 20:50:36 by emarsden] · 22cb3e7f
      emarsden authored
      Add an ABORT keyword argument to PG-DISCONNECT (from Robert J.
      Macomber <pgsql@rojoma.com>), as per CL:CLOSE.
      
        "I've run into a problem with pg-disconnect if something abnormal
         happens to the database connection -- if the database goes away for a
         restart while pg has a connection open, for example.  When this
         happens, pg-disconnect fails, and the socket file descriptor is left
         open (presumably for a finalizer to clean up), also raising a new
         error from the unwind-protect in with-pg-connection.  To guard against
         the possibility, I've added an :abort parameter to pg-disconnect, like
         cl:close has, and made with-pg-connection call it with :abort t if the
         body exits abnormally, in the same way that with-open-file operates.
         When :abort is true, the modified pg-disconnect closes the database
         connection ungracefully, including making the close call abort
         (otherwise, sbcl at keast tries to flush the stream, raising another
         error if the database isn't there anymore)."
      
      darcs-hash:aad628cf0093846dca55fe4f8fa47b0db89249c2
      22cb3e7f
  6. Nov 19, 2006
    • emarsden's avatar
      [pg @ 2006-11-19 18:47:58 by emarsden] · d74a5aa1
      emarsden authored
      Allow encoding used for socket communication with the backend to be
      specified as a keyword argument to PG-CONNECT, for cases where
      rebinding *PG-CLIENT-ENCODING* is inconvenient.
      
      Add a simple test for encoding support.
      
      (From Attila Lendvai <attila.lendvai@gmail.com>)
      
      darcs-hash:9f1f315eb332972142eadea0eff9cb70e5702ece
      d74a5aa1
  7. Oct 22, 2006
    • emarsden's avatar
      [pg @ 2006-10-22 19:25:51 by emarsden] · 8a24b325
      emarsden authored
      Fixes to the prepared statement support, in order to implement precise
      error reporting. Deadlocks were possible with previous version, where
      pg-dot-lisp would be blocked waiting for input from the backend that
      never arrived.
      
      Also some code cleanups.
      
      darcs-hash:0588a2f36bb19982641cd4e7f147578e669feb59
      8a24b325
    • emarsden's avatar
      [pg @ 2006-10-22 15:48:45 by emarsden] · f0bed50a
      emarsden authored
      Allow NULL values for bound variables in prepared statements. Bug
      pointed out by Steve Purcell <steve@sanityinc.com>.
      
      darcs-hash:0def4f65865e39ec833ed7213f93e8a8eafe7f25
      f0bed50a
  8. Sep 24, 2006
  9. Sep 19, 2006
    • emarsden's avatar
      [pg @ 2006-09-19 06:57:28 by emarsden] · cb43a340
      emarsden authored
      Remove the limit on maximum message size when using the v3 protocol
      (from Johan Ur Riise <johan@riise-data.no>).
      
      darcs-hash:0fb3e5b4e207dd2ec0b6e6c4705339b35d0b0fa9
      cb43a340
  10. Sep 18, 2006
    • emarsden's avatar
      [pg @ 2006-09-18 21:37:48 by emarsden] · db8fb92c
      emarsden authored
      Fix problems with text data in prepared statements. Unlike the rest of
      the protocol, strings are not sent NUL-terminated.
      
      darcs-hash:b01e28d05c35a2c534fff313c34c30c4d0a1e4b5
      db8fb92c
  11. Sep 15, 2006
  12. Aug 28, 2006
    • emarsden's avatar
      [pg @ 2006-08-28 20:08:00 by emarsden] · 606e1f92
      emarsden authored
      Fixes to client-encoding support, based on a bug report from Johan Ur
      Riise <johan@riise-data.no>. Not tested very heavily (but the tests
      work in UTF-8 mode with unicode-enabled SBCL and CLISP).
      
      darcs-hash:ad4154ce4c456179f353b980697e6d052f5e631b
      606e1f92
  13. Oct 18, 2005
    • pvaneynde's avatar
      [pg @ 2005-10-18 13:07:27 by pvaneynde] · 9b899499
      pvaneynde authored
      Modified sbcl unicode support, works for me.
      Moved requires into asdf package, otherwise we get asdf package problems, unknown if it works with other lisps
      
      darcs-hash:033df81cf627c24fdcd34df9adab60e10377fd4c
      9b899499
  14. Jul 17, 2005
    • emarsden's avatar
      [pg @ 2005-07-17 15:48:06 by emarsden] · 8aac175a
      emarsden authored
      Make PGLO-READ a generic function, with specializations on the v2 and
      v3 protocols. The difference is necessary because the v2 protocol
      reads large-object data in text, whereas the v3 protocol changed to
      use a binary format.
      
      darcs-hash:6639fd1b9dd10ca051ea03d7e2fbff94c0d917e2
      8aac175a
    • emarsden's avatar
      [pg @ 2005-07-17 13:46:50 by emarsden] · b6cc021f
      emarsden authored
      Three fixes from Björn Lindberg <d95-bli@nada.kth.se>:
      
         - Two trivial bugs with regards to use with Allegro
      
         - Handling of the special timestamp values infinity and -infinity. They
           gave an error, but now returns the symbols :INFINITY and :-INFINITY
           respectively.
      
         - A bug in the version 3 of the protocol, where it would return NIL for
           fields in the database containing the empty string, rather than an
           empty string.
      
      darcs-hash:504e8e152c17d5b4a0d4aa402c8fe52e71647eef
      b6cc021f
  15. Sep 19, 2004
  16. Aug 13, 2004
    • emarsden's avatar
      [pg @ 2004-08-13 16:50:37 by emarsden] · db1a2b4c
      emarsden authored
      Implement binary-mode transfers for large-object operations in the v3
      protocol. The v2 protocol transfers arguments in binary mode, but the
      v3 protocol requires the client to specify for each argument of a
      FunctionCall whether it is encoded as binary or as text.
      
        - add possibility to send (unsigned-byte 8) arguments to function calls
      
        - add a method READ-OCTETS-FROM-PACKET that reads raw octets
      
        - make PG-IMPORT and PG-EXPORT use binary I/O
      
        - PGLO-READ reads data in binary
      
        - change the large-object tests to use binary I/O (fixes the pglo test)
      
      darcs-hash:bda38e377fe3d2bf89d34065e942299e065fdd90
      db1a2b4c
  17. Aug 11, 2004
  18. Apr 22, 2004
    • emarsden's avatar
      [pg @ 2004-04-22 17:00:12 by emarsden] · d9088e3e
      emarsden authored
      Comment-only patch: mark the places in the v3-protocol code where charset
      encoding problems will have to be addressed.
      
      It's probably not worth going through the v2-protocol code to fix these
      issues, since it has too many places where READ-CSTRING is confused with
      READ-OCTET-ARRAY.
      
      darcs-hash:9571ebcd90ed9e3e9fb4d92f13594bdb1dd0f5c4
      d9088e3e
  19. Apr 21, 2004
    • emarsden's avatar
      [pg @ 2004-04-21 19:27:46 by emarsden] · 955c8163
      emarsden authored
      A provisional fix for large object support: the test case (whose
      large-object component only runs on CMUCL) was resetting the connection
      during the IMPORT/EXPORT test, due to an unexpected #\V packet
      (FunctionCallResponse) in DO-FOLLOWUP-QUERY. It's still not clear why a
      FunctionCallResponse should be received anywhere other than in FN.
      This test is currently failing due to CR -> "\012" corruption that I haven't
      debugged.
      
      darcs-hash:5068c028cbcd6cc537dc5cb7b506615c652636ad
      955c8163
  20. Apr 01, 2004
    • emarsden's avatar
      [pg @ 2004-04-01 18:35:19 by emarsden] · 62b1b80f
      emarsden authored
      - add md5 authentication (thanks to Brian Mastenbrook). Uses Pierre Mai's
          portable md5.lisp library, that has been added to the project (with extra
          EVAL-WHENness to please OpenMCL and ACL).
      
          Tested with CMUCL, SBCL, OpenMCL, CLISP, ACL 6.1. ABCL does not compile
          md5.lisp, probably for more EVAL-WHEN reasons. Only tested with PostgreSQL
          version 7.4.
      
      darcs-hash:76581bd5b619a8e593164743a8ff044357c680cb
      62b1b80f
  21. Mar 20, 2004
  22. Mar 17, 2004
    • emarsden's avatar
      [pg @ 2004-03-17 18:15:26 by emarsden] · 7c74c67e
      emarsden authored
      - fix bogus type declaration
      
       - remove bogus use of CMUCL's finalization (can't reference dying
         object from the finalizer)
      
      darcs-hash:67e7f91b83b64b9c6f358169b76a4f9103af4cbd
      7c74c67e
  23. Mar 09, 2004
  24. Mar 08, 2004
    • emarsden's avatar
      [pg @ 2004-03-08 18:12:45 by emarsden] · b72984c9
      emarsden authored
      - improvements to the system-dependent functionality: OpenMCL is
          able to use a local connection to the backend; most
          implementations resignal connection errors as a postgres-error.
      
        - fixes to the lowlevel code
      
      darcs-hash:81350b160619ff22468166aa3f1928c8f75d9b7e
      b72984c9
    • emarsden's avatar
      [pg @ 2004-03-08 16:45:16 by emarsden] · ee9ceffa
      emarsden authored
      - fix to the lowlevel factorization
      
       - modify parameter handling in v3 protocol to add parameters to the
         connection object, instead of issuing a warning
      
      darcs-hash:82327edc147c2403516468713a8c403b5b6d0648
      ee9ceffa
    • emarsden's avatar
      [pg @ 2004-03-08 15:01:53 by emarsden] · 65ce6b3f
      emarsden authored
      More factorization of lowlevel functions between v2 and v3 protocols.
      
      darcs-hash:aef9e7feac79e0d6b749d3ff999a62e1f50c4d69
      65ce6b3f
    • pvaneynde's avatar
      [pg @ 2004-03-08 14:37:31 by pvaneynde] · ece69c91
      pvaneynde authored
      pg.lisp:
       - make print-object more robust
       - added documentation to the defgenerics
       - added some declarations
      v3-protocol.lisp:
       - make errors restartable as we hope to
          sync again with the db
       - return errors from read-packet because
         sometimes it is the only clue we get
          that there is no more output
       - replaced arefs with the faster elt
       - unified query followup into do-followup-query
       - added pbe (prepare bind execute) support
      
      darcs-hash:e653a05855cd686b77743af27656951ce93ffafc
      ece69c91
  25. Mar 05, 2004
    • emarsden's avatar
      [pg @ 2004-03-05 18:08:08 by emarsden] · e981262b
      emarsden authored
      Integrate Peter Van Eynde's v3 protocol support:
      
         - create PGCON-V2 and PGCON-V3 classes
         - PG-CONNECT attempts to connect using v3 protocol, and falls back
           to v2 protocol for older backends; return a PGCON-V2 or PGCON-V3
           object
         - PG-EXEC and FN and PG-DISCONNECT are generic functions that
           dispatch on the connection type
         - protocol code split into v2-protocol.lisp and v3-protocol.lisp
      
      TBD: cleaning up the notification & error reporting support, and
      factorizing more code between the two protocol versions.
      
      Also split code out into multiple files:
      
         - large-object support
         - metainformation about databases
         - parsing and type coercion support
         - utility functions and macros
      
      darcs-hash:00b6e900f7b48953d959f95e55c26ecee52efb37
      e981262b