1. 26 Aug, 2001 5 commits
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
      >>>>The JDBC driver requires · 19a251d0
      Bruce Momjian authored
      >>>>
      >>>> permission java.net.SocketPermission "host:port", "connect";
      >>>>
      >>>>in the policy file of the application using the JDBC driver
      >>>>in the postgresql.jar file.  Since the Socket() call in the
      >>>>driver is not protected by AccessController.doPrivileged() this
      >>>>permission must also be granted to the entire application.
      >>>>
      >>>>The attached diff fixes it so that the connect permission can be
      >>>>restricted just the the postgresql.jar codeBase if desired.
      
      David Daney
      19a251d0
    • Bruce Momjian's avatar
      Here is a patch to the resultmap to make the regression tests work on · 1be615f3
      Bruce Momjian authored
      OU8.
      
      Larry Rosenman
      1be615f3
    • Bruce Momjian's avatar
      The attached file: SerializePatch2.tgz, contains a patch for · f4786925
      Bruce Momjian authored
      org.postgresql.util.Serialize and org.postgresql.jdbc2.PreparedStatement
      that  fixes the ability to "serialize" a simple java class into a
      postgres table.
      
      The current cvs seems completely broken in this support, so the patch
      puts it  into working condition, granted that there are many limitations
      with  serializing java classes into Postgres.
      
      The code to do serialize appears to have been in the driver since
      Postgres  6.4, according to some comments in the source.  My code is not
      adding any  totally new ability to the driver, rather just fixing what
      is there so that  it actually is usable.  I do not think that it should
      affect any existing  functions of the driver that people regularly
      depend on.
      
      The code is activated if you use jdbc2.PreparedStatement and try to
      setObject  some java class type that is unrecognized, like not String or
      not some other  primitive type.  This will cause a sequence of function
      calls that results in  an instance of Serialize being instantiated for
      the class type passed.  The  Serialize constructor will query pg_class
      to see if it can find an existing  table that matches the name of the
      java class. If found, it will continue and  try to use the table to
      store the object, otherwise an SQL exception is  thrown and no harm is
      done.  Serialize.create() has to be used to setup the  table for a java
      class before anything can really happen with this code other  than an
      SQLException (unless by some freak chance a table exists that it  thinks
      it can use).
      
      I saw a difference in Serialize.java between 7.1.3 and 7.2devel that I
      didn't  notice before, so I had to redo my changes from the 7.2devel
      version (why I  had to resend this patch now).  I was missing the
      fixString stuff, which is  nice and is imporant to ensure the inserts
      will not fail due to embedded  single quote or unescaped backslashes. I
      changed that fixString function in  Serialize just a little since there
      is no need to muddle with escaping  newlines: only escaping single quote
      and literal backslashes is needed.  Postgres appears to insert newlines
      within strings without trouble.
      f4786925
  2. 25 Aug, 2001 8 commits
  3. 24 Aug, 2001 9 commits
  4. 23 Aug, 2001 8 commits
  5. 22 Aug, 2001 6 commits
  6. 21 Aug, 2001 4 commits
    • Bruce Momjian's avatar
      Here's a resend of the patch.gz. I gunzip'ed it fine here · e8f7bfc0
      Bruce Momjian authored
      so it may be a transit problem.  Also removed the 'txt' suffix
      in case that was confusing some transport layer trying to be
      too inteligent for our own good.
      
      This may have been because the Array.java class from the
      previous patch didn't seem to have made it into the snapshot
      build for some reason.  This patch should at least fix that issue.
      
      Greg Zoller
      e8f7bfc0
    • Tom Lane's avatar
      Remove special-case treatment of all-zeroes MAC address, per today's · b04e3a25
      Tom Lane authored
      discussion in pgsql-general.
      b04e3a25
    • Bruce Momjian's avatar
      > Ok, where's a "system dependent hack" :) · 5db5c2db
      Bruce Momjian authored
      > It seems that win9x doesn't have the "netmsg.dll" so it defaults to "normal"
      > FormatMessage.
      > I wonder if one could load wsock32.dll or winsock.dll on those systems
      > instead of netmsg.dll.
      >
      > Mikhail, could you please test this code on your nt4 system?
      > Could someone else test this code on a win98/95 system?
      >
      > It works on win2k over here.
      
      It works on win2k here too but not on win98/95 or winNT.
      Anyway, attached is the patch which uses Magnus's my_sock_strerror
      function (renamed to winsock_strerror). The only difference is that
      I put the code to load and unload netmsg.dll in the libpqdll.c
      (is this OK Magnus?).
      
      Mikhail Terekhov
      5db5c2db
    • Tom Lane's avatar
      Restructure pg_opclass, pg_amop, and pg_amproc per previous discussions in · f933766b
      Tom Lane authored
      pgsql-hackers.  pg_opclass now has a row for each opclass supported by each
      index AM, not a row for each opclass name.  This allows pg_opclass to show
      directly whether an AM supports an opclass, and furthermore makes it possible
      to store additional information about an opclass that might be AM-dependent.
      pg_opclass and pg_amop now store "lossy" and "haskeytype" information that we
      previously expected the user to remember to provide in CREATE INDEX commands.
      Lossiness is no longer an index-level property, but is associated with the
      use of a particular operator in a particular index opclass.
      
      Along the way, IndexSupportInitialize now uses the syscaches to retrieve
      pg_amop and pg_amproc entries.  I find this reduces backend launch time by
      about ten percent, at the cost of a couple more special cases in catcache.c's
      IndexScanOK.
      
      Initial work by Oleg Bartunov and Teodor Sigaev, further hacking by Tom Lane.
      
      initdb forced.
      f933766b