1. 27 Sep, 1999 1 commit
    • Bruce Momjian's avatar
      Lots of patches coming in from me today :-) · e0e7daef
      Bruce Momjian authored
      When drawing up a very simple "text-drawing" of how the negotiation is done,
      I realised I had done this last part (fallback) in a very stupid way. Patch
      #4 fixes this, and does it in a much better way.
      
      Included is also the simple text-drawing of how the negotiation is done.
      
      //Magnus
      e0e7daef
  2. 31 Aug, 1999 1 commit
    • Tom Lane's avatar
      Update frontend libpq to remove limits on query lengths, · ab5cafa5
      Tom Lane authored
      error/notice message lengths, and number of fields per tuple.  Add
      pqexpbuffer.c/.h, a frontend version of backend's stringinfo module.
      This is first step in applying Mike Ansley's long-query patches,
      even though he didn't do any of these particular changes...
      ab5cafa5
  3. 19 Jul, 1999 2 commits
  4. 17 Jul, 1999 1 commit
  5. 17 Jun, 1999 1 commit
  6. 25 May, 1999 1 commit
  7. 03 May, 1999 1 commit
    • Bruce Momjian's avatar
      here are some patches for 6.5.0 which I already submitted but have never · 210055ad
      Bruce Momjian authored
      been applied. The patches are in the .tar.gz attachment at the end:
      
      varchar-array.patch     this patch adds support for arrays of bpchar() and
                              varchar(), which where always missing from postgres.
      
                              These datatypes can be used to replace the _char4,
                              _char8, etc., which were dropped some time ago.
      
      block-size.patch        this patch fixes many errors in the parser and other
                              program which happen with very large query statements
                              (> 8K) when using a page size larger than 8192.
      
                              This patch is needed if you want to submit queries
                              larger than 8K. Postgres supports tuples up to 32K
                              but you can't insert them because you can't submit
                              queries larger than 8K. My patch fixes this problem.
      
                              The patch also replaces all the occurrences of `8192'
                              and `1<<13' in the sources with the proper constants
                              defined in include files. You should now never find
                              8192 hardwired in C code, just to make code clearer.
      
      
      --
      Massimo Dal Zotto
      210055ad
  8. 29 Mar, 1999 1 commit
  9. 21 Feb, 1999 1 commit
    • Marc G. Fournier's avatar
      · 8c3e8a8a
      Marc G. Fournier authored
      From: Tatsuo Ishii <t-ishii@sra.co.jp>
      
      Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef
      NOT_USED" for current. I have tested these patches in that the
      postgres binaries are identical.
      8c3e8a8a
  10. 18 Feb, 1999 1 commit
  11. 13 Feb, 1999 1 commit
  12. 05 Feb, 1999 1 commit
  13. 04 Feb, 1999 1 commit
  14. 27 Jan, 1999 1 commit
    • Marc G. Fournier's avatar
      · 2ae5d516
      Marc G. Fournier authored
      From: Tatsuo Ishii <t-ishii@sra.co.jp>
      
      Included patches fix a portability problem of unsetenv() used in
      6.4.2 multi-byte support. unsetenv() is only avaliable on FreeBSD and
      Linux so I decided to replace with putenv().
      2ae5d516
  15. 17 Jan, 1999 2 commits
  16. 14 Oct, 1998 1 commit
  17. 13 Oct, 1998 1 commit
    • Marc G. Fournier's avatar
      · 4fff1dad
      Marc G. Fournier authored
      From: Peter Gucwa <pg@softcomputer.com>
      
      Here are patches needed to complie under AIX 4.2.
      I changed configure.in, pqcomm.c, config.h.in, and fe-connect.c.
      Also I had to install flex because lex did not want to translate pgc.l.
      4fff1dad
  18. 01 Oct, 1998 1 commit
  19. 20 Sep, 1998 1 commit
  20. 18 Sep, 1998 1 commit
  21. 03 Sep, 1998 1 commit
    • Bruce Momjian's avatar
      Attached is a patch to remove the definitions of libpq's internal · f71d0cf6
      Bruce Momjian authored
      structs from libpq-fe.h, as we previously discussed.
      
      There turned out to be sloppy coding practices in more places than
      I had realized :-(, but all in all I think it was a well-worth-while
      exercise.
      
      I ended up adding several routines to libpq's API in order to respond
      to application requirements that were exposed by this work.  I owe the
      docs crew updates for libpq.sgml to describe these changes.  I'm way too
      tired to work on the docs tonight, however.
      
      This is the last major change I intend to submit for 6.4.  I do want
      to see if I can make libpgtcl work with Tcl 8.0 before we go final,
      but hopefully that will be a minor bug fix.
      f71d0cf6
  22. 01 Sep, 1998 1 commit
  23. 17 Aug, 1998 1 commit
    • Marc G. Fournier's avatar
      · 93120330
      Marc G. Fournier authored
      Date: Sun, 16 Aug 1998 14:56:48 -0400
      From: Tom Lane <tgl@sss.pgh.pa.us>
      Attached is a patch for this weekend's work on libpq.  I've dealt
      with several issues:
      
              <for details: see message, in pgsql-patches archive for above data>
      93120330
  24. 09 Aug, 1998 1 commit
    • Bruce Momjian's avatar
      · e6311b4a
      Bruce Momjian authored
      The attached patch implements some changes that were discussed a
      couple weeks ago on the hackers and interfaces lists:
      
      1. When the backend sends a NOTICE message and closes the connection
         (typically, because it was told to by the postmaster after
         another backend coredumped), libpq will now print the notice
         and close the connection cleanly.  Formerly, the frontend app
         would usually terminate ungracefully due to a SIGPIPE.  (I am
         not sure if 6.3.2 behaved that way, but the current cvs sources
         do...)
      
      2. libpq's various printouts to stderr are now fed through a single
         "notice processor" routine, which can be overridden by the
         application to direct notices someplace else.  This should ease
         porting libpq to Windows.
      
      I also noticed and fixed a problem in PQprint: when sending output
      to a pager subprocess, it would disable SIGPIPE in case the pager
      terminates early (this is good) --- but afterwards it reset SIGPIPE
      to SIG_DFL, rather than restoring the application's prior setting
      (bad).
      
      			regards, tom lane
      e6311b4a
  25. 26 Jul, 1998 1 commit
    • Marc G. Fournier's avatar
      · 5979d738
      Marc G. Fournier authored
      From: t-ishii@sra.co.jp
      
      As Bruce mentioned, this is due to the conflict among changes we made.
      Included patches should fix the problem(I changed all MB to
      MULTIBYTE). Please let me know if you have further problem.
      
      P.S. I did not include pathces to configure and gram.c to save the
      file size(configure.in and gram.y modified).
      5979d738
  26. 24 Jul, 1998 1 commit
    • Marc G. Fournier's avatar
      · bf00bbb0
      Marc G. Fournier authored
      I really hope that I haven't missed anything in this one...
      
      From: t-ishii@sra.co.jp
      
      Attached are patches to enhance the multi-byte support.  (patches are
      against 7/18 snapshot)
      
      * determine encoding at initdb/createdb rather than compile time
      
      Now initdb/createdb has an option to specify the encoding. Also, I
      modified the syntax of CREATE DATABASE to accept encoding option. See
      README.mb for more details.
      
      For this purpose I have added new column "encoding" to pg_database.
      Also pg_attribute and pg_class are changed to catch up the
      modification to pg_database.  Actually I haved added pg_database_mb.h,
      pg_attribute_mb.h and pg_class_mb.h. These are used only when MB is
      enabled. The reason having separate files is I couldn't find a way to
      use ifdef or whatever in those files. I have to admit it looks
      ugly. No way.
      
      * support for PGCLIENTENCODING when issuing COPY command
      
      commands/copy.c modified.
      
      * support for SQL92 syntax "SET NAMES"
      
      See gram.y.
      
      * support for LATIN2-5
      * add UNICODE regression test case
      * new test suite for MB
      
      New directory test/mb added.
      
      * clean up source files
      
      Basic idea is to have MB's own subdirectory for easier maintenance.
      These are include/mb and backend/utils/mb.
      bf00bbb0
  27. 18 Jul, 1998 1 commit
  28. 09 Jul, 1998 2 commits
    • Marc G. Fournier's avatar
      · bd029bcb
      Marc G. Fournier authored
      From: Tom Lane <tgl@sss.pgh.pa.us>
      
      The attached patches respond to discussion that was on pgsql-hackers
      around the beginning of June (see thread "libpgtcl bug (and symptomatic
      treatment)").  The changes are:
      
      1. Remove code in connectDB that throws away the password after making
      a connection.  This doesn't really add much security IMHO --- a bad guy
      with access to your client's address space can likely extract the
      password anyway, to say nothing of what he might do directly.  And
      there's the serious shortcoming that it prevents PQreset() from working
      if the database requires a password.
      
      2. Fix coredump problem: fe_sendauth did not guard against being handed
      a NULL password pointer.  (This is the proximate cause of the coredump-
      during-PQreset problem that Magosanyi Arpad complained of last month.)
      
      3. Remove highly questionable "error recovery" logic in libpgtcl's
      pg_exec statement.
      
      I believe the consensus of the discussion last month was in favor of
      #1 and #3, but I'm just now getting around to making the change.
      I realized that #2 was a bug in process of looking at the change.
      bd029bcb
    • Marc G. Fournier's avatar
      · a0659e3e
      Marc G. Fournier authored
      From: Tom Lane <tgl@sss.pgh.pa.us>
      
      Making PQrequestCancel safe to call in a signal handler turned out to be
      much easier than I feared.  So here are the diffs.
      
      Some notes:
        * I modified the postmaster's packet "iodone" callback interface to allow
          the callback routine to return a continue-or-drop-connection return
          code; this was necessary to allow the connection to be closed after
          receiving a Cancel, rather than proceeding to launch a new backend...
          Being a neatnik, I also made the iodone proc have a typechecked
          parameter list.
        * I deleted all code I could find that had to do with OOB.
        * I made some edits to ensure that all signals mentioned in the code
          are referred to symbolically not by numbers ("SIGUSR2" not "2").
          I think Bruce may have already done at least some of the same edits;
          I hope that merging these patches is not too painful.
      a0659e3e
  29. 07 Jul, 1998 1 commit
    • Marc G. Fournier's avatar
      · b27af0d9
      Marc G. Fournier authored
      From: "Dr. Michael Meskes" <meskes@online-club.de>
      
      My first try at libpq. This one enables the two styles we agreed upon for
      database descriptors.
      b27af0d9
  30. 03 Jul, 1998 2 commits
    • Bruce Momjian's avatar
      win32 cleanup · 9f9644d0
      Bruce Momjian authored
      9f9644d0
    • Bruce Momjian's avatar
      Hello! · c765b4b0
      Bruce Momjian authored
      Through some minor changes, I have been able to compile the libpq
      client libraries on the Win32 platform. Since the libpq communications
      part has been rewritten, this has become much easier. Enclosed is
      a patch that will allow at least Microsoft Visual C++ to compile
      libpq into both a static and a dynamic library.  I will take a look
      at porting the psql frontend as well, but I figured it was a good
      idea to send in these patches first - so no major changes are done
      to the files before it gets applied (if it does).
      
      Regards,
        Magnus Hagander
      c765b4b0
  31. 21 Jun, 1998 1 commit
  32. 16 Jun, 1998 1 commit
    • Bruce Momjian's avatar
      Hi, here are the patches to enhance existing MB handling. This time · cb7cbc16
      Bruce Momjian authored
      I have implemented a framework of encoding translation between the
      backend and the frontend. Also I have added a new variable setting
      command:
      
      SET CLIENT_ENCODING TO 'encoding';
      
      Other features include:
      	Latin1 support more 8 bit cleaness
      
      See doc/README.mb for more details. Note that the pacthes are
      against May 30 snapshot.
      
      Tatsuo Ishii
      cb7cbc16
  33. 15 Jun, 1998 1 commit
  34. 06 May, 1998 1 commit
    • Bruce Momjian's avatar
      What I've done: · edbd5139
      Bruce Momjian authored
      1. Rewritten libpq to allow asynchronous clients.
      
      2. Implemented client side of cancel protocol in library,
         and patched psql.c to send a cancel request upon SIGINT.  The
         backend doesn't notice it yet :-(
      
      3. Implemented 'Z' protocol message addition and renaming of
         copy in/out start messages.  These are implemented conditionally,
         ie, the client protocol version is checked; so the code should
         still work with 1.0 clients.
      
      4. Revised protocol and libpq sgml documents (don't have an SGML
         compiler, though, so there may be some markup glitches here).
      
      
      What remains to be done:
      
      1. Implement addition of atttypmod field to RowDescriptor messages.
         The client-side code is there but ifdef'd out.  I have no idea
         what to change on the backend side.  The field should be sent
         only if protocol >= 2.0, of course.
      
      2. Implement backend response to cancel requests received as OOB
         messages.  (This prolly need not be conditional on protocol
         version; just do it if you get SIGURG.)
      
      3. Update libpq.3.  (I'm hoping this can be generated mechanically
         from libpq.sgml... if not, will do it by hand.)  Is there any
         other doco to fix?
      
      4. Update non-libpq interfaces as necessary.  I patched libpgtcl
         so that it would compile, but haven't tested it.  Dunno what
         needs to be done with the other interfaces.
      
      Have at it!
      
      Tom Lane
      edbd5139
  35. 21 Apr, 1998 1 commit
  36. 26 Mar, 1998 1 commit
    • Bruce Momjian's avatar
      I have been troubled by a segmentation fault when reloading from · f07c7bf4
      Bruce Momjian authored
      a dumpall.  This has been happening when a second \connect is
      encountered.
      
      The faulty code was in fe-connect.c, where the memory for the user
      password was freed, but the pointer itself was not set to NULL.
      Later, the memory was reused and the password appeared not to be
      empty, so that an attempt was made to reference it.
      
      Oliver Elphick
      f07c7bf4