1. 10 9月, 2001 25 次提交
    • B
      Attached is a patch to add bytea support to JDBC. · ec0ad674
      Bruce Momjian 提交于
      
      This patch does the following:
      
      - Adds binary datatype support (bytea)
      - Changes getXXXStream()/setXXXStream() methods to be spec compliant
      - Adds ability to revert to old behavior
      
      Details:
      
      Adds support for the binary type bytea.  The ResultSet.getBytes() and
      PreparedStatement.setBytes() methods now work against columns of bytea
      type.  This is a change in behavior from the previous code which assumed
      the column type was OID and thus a LargeObject.  The new behavior is
      more complient with the JDBC spec as BLOB/CLOB are to be used for
      LargeObjects and the getBytes()/setBytes() methods are for the databases
      binary datatype (which is bytea in postgres).
      
      Changes the behavior of the getBinaryStream(), getAsciiStream(),
      getCharacterStream(), getUnicodeStream() and their setXXXStream()
      counterparts.  These methos now work against either the bytea type
      (BinaryStream) or the text types (AsciiStream, CharacterStream,
      UnicodeStream).  The previous behavior was that these all assumed the
      underlying column was of type OID and thus a LargeObject.  The
      spec/javadoc for these methods indicate that they are for LONGVARCHAR
      and LONGVARBINARY datatypes, which are distinct from the BLOB/CLOB
      datatypes.  Given that the bytea and text types support upto 1G, they
      are the LONGVARBINARY and LONGVARCHAR datatypes in postgres.
      
      Added support for turning off the above new functionality.  Given that
      the changes above are not backwardly compatible (however they are more
      spec complient), I added the ability to revert back to the old behavior.
        The Connection now takes an optional parameter named 'compatible'.  If
      the value of '7.1' is passed, the driver reverts to the 7.1 behavior.
      If the parameter is not passed or the value '7.2' is passed the behavior
      is the new behavior.  The mechanism put in place can be used in the
      future when/if similar needs arise to change behavior.  This is
      patterned after how Oracle does this (i.e. Oracle has a 'compatible'
      parameter that behaves in a similar manner).
      
      Misc fixes.  Cleaned up a few things I encountered along the way.
      
      
      Note that in testing the patch I needed to ignore whitespace differences
      in order to get it to apply cleanly (i.e. patch -l -i byteapatch.diff).
      Also this patch introduces a new file
      (src/interfaces/jdbc/org/postgresql/util/PGbytea.java).
      
      Barry Lind
      ec0ad674
    • B
      On Fri, 07 Sep 2001 01:34:46 -0400, Tom Lane wrote: · 6b50f9af
      Bruce Momjian 提交于
      >there is still an unpatched reference to pg_description in
      >getColumns(), in both jdbc1 and jdbc2.
      
      This was introduced by Jeroen's patch (see
      http://fts.postgresql.org/db/mw/msg.html?mid=1032468). Attached
      is a patch that returns getColumns() to using "select
      obj_description()" instead of direct access to pg_description,
      as per the request by Tom.
      
      I've incorporated Jeroen's fix to left outer join with
      pg_attrdef instead of inner join, so getColumns() also returns
      columns without a default value.
      
      I have, however, not included Jeroen's attempt to combine
      multiple queries into one huge multi-join query for better
      performance, because:
      1) I don't know how to do that using obj_description() instead
      of direct access to pg_description
      2) I don't think a performance improvement (if any) in this
      method is very important
      
      Because of the outer join, getColumns() will only work with a
      backend >= 7.1. Since the conditional coding for 7.1/7.2 and
      jdbc1/jdbc2 is already giving me headaches I didn't pursue a
      pre-7.1 solution.
      
      Regards,
      Ren? Pijlman <rene@lab.applinet.nl>
      6b50f9af
    • B
      Attached is a patch that fixes · c69bb04a
      Bruce Momjian 提交于
      ConnectionTest.testTransactionIsolation() in the JDBC driver's
      test suite. This reduces the number of failures of the test
      suite from 7 to 6. The patch fixes the test case itself, rather
      than the driver.
      
      In addition to the change described in my posting below, I fixed
      the part of the test with autocommit enabled. The author of the
      test assumed that setting the transaction isolation level would
      have no effect, but in fact it does. Perhaps the test case
      worked with pre-7.1 behaviour, when the JDBC driver set the
      isolation level in every transaction, instead of using "set
      session characteristics". Anyway, now it works with a backend
      built from current CVS and the behaviour is JDBC compliant.
      
      I also extended the test case by changing the isolation level
      before beginning a transaction and verifying it inside the
      transaction.
      
      Regards,
      Ren? Pijlman
      c69bb04a
    • B
      Bug #1: attribute name when column is type cast: · d70a944e
      Bruce Momjian 提交于
      Given the following table:
      
      test=# \d f
                Table "f"
       Column |  Type   | Modifiers
      --------+---------+-----------
       i      | integer |
       test   | text    |
      
      If I do the following:
      
      test=# insert into f values(1,'test');
      INSERT 139549 1
      test=# select i::int8,test from f;
       ?column? | test
      ----------+------
              1 | test
      (1 row)
      
      It doesn't make much sense that the first column should be called
      '?column?'.
      
      The patch results in the output appearing like this:
      
      test=# select i::int8,test from f;
       i | test
      ---+------
       1 | test
      (1 row)
      
      ----------
      
      Gavin Sherry
      d70a944e
    • B
      > NOTE: in the command.c in three places there (I believe) is a typo: · be18a49d
      Bruce Momjian 提交于
      >
      > "parse error at [the] end of line"
      >
      > Attached patch also fixes it. I noticed this while editing the po file.
      > If I'm wrong, please ignore the command.c.patch. I will revert my translation
      > as well then.
      >
      > --
      > Serguei A. Mokhov
      be18a49d
    • B
      The attached patch should be sufficient to fix libpgtcl. It requires · 9e467671
      Bruce Momjian 提交于
      PostgreSQL to support unicode-conversion, but retains binary
      compatibility among Tcl versions.
      
      However, it neither checks at compile time not at runtime, if support
      for unicode-conversion does really exist and it doesn't prevent the
      user from changing the client encoding after initialization. I think
      there should be warnings about this somewhere in the documentation.
      
      Reinhard Max
      9e467671
    • H
      Change dialog windows. · 0ee85f85
      Hiroshi Inoue 提交于
      0ee85f85
    • H
      1) Fix SQLForeignKeys() in multibyte mode. · 9abd0554
      Hiroshi Inoue 提交于
      2) Fix a bug with NUMERIC scale in case of Parse
        statement option.
      3) Remove a no longer needed loop in CC_send_query().
      
      Hiroshi Inoue
      9abd0554
    • T
      531126c8
    • T
      The usage of kill is incorrect (lacks "data"). Anyway we should use · 35d3c85a
      Tatsuo Ishii 提交于
      pg_ctl instead.
      35d3c85a
    • T
      Fix typo. split does not produce ".". · acb66fc5
      Tatsuo Ishii 提交于
      acb66fc5
    • T
      Fix typo. · 0e76f1bb
      Tatsuo Ishii 提交于
      0e76f1bb
    • T
      Example program lacks RETURN · f8f0ff6b
      Tatsuo Ishii 提交于
      f8f0ff6b
    • T
      Fix typo. · 82b889a0
      Tatsuo Ishii 提交于
      82b889a0
    • T
      Fix typo. · 0d04ffeb
      Tatsuo Ishii 提交于
      0d04ffeb
    • T
      Fix initlocation messages · 16a7ec38
      Tatsuo Ishii 提交于
      16a7ec38
    • B
      Remove INV_ARCHIVE mention in python readme. · da1696b5
      Bruce Momjian 提交于
      da1696b5
    • B
      Remove INV_ARCHIVE mention in perl. · 39d11699
      Bruce Momjian 提交于
      39d11699
    • B
      Remove mention of INV_ARCHIVE. · bb35e499
      Bruce Momjian 提交于
      bb35e499
    • T
      fix typo. · ea41e77c
      Tatsuo Ishii 提交于
      ea41e77c
    • T
      Add missing ';' · aa398e50
      Tatsuo Ishii 提交于
      aa398e50
    • B
      Update TODO list. · 98d04116
      Bruce Momjian 提交于
      98d04116
    • B
      Update TODO list. · df7664c1
      Bruce Momjian 提交于
      df7664c1
    • P
      d07454f5
    • P
      84956e71
  2. 09 9月, 2001 5 次提交
  3. 08 9月, 2001 10 次提交
    • P
      Make the world somewhat safe for (not from) DELETE FROM pg_shadow; · c0d4d547
      Peter Eisentraut 提交于
      Assign the fixed user id 1 to the user created by initdb.
      A stand-alone backend will always set the user id to 1.
      (Consequently, the name of that user is no longer important.)
      
      In stand-alone mode, the user id 1 will have implicit superuser
      status, to allow repairs even if there are no users defined.
      
      Print a warning message when starting in stand-alone mode when no
      users are defined.
      
      Disallow dropping the current user and session user.
      
      Granting/revoking superuser status also grants/revokes usecatupd.
      (Previously, it would never grant it back.  This could lead to "deadlocks".)
      
      CREATE USER and CREATE GROUP will start allocating user ids at 100
      (unless explicitly specified), to prevent accidental creation of a
      superuser (plus some room for future extensions).
      c0d4d547
    • B
      > > A simple and robus solution is in the begin of mbutils.c set default · fdbf796f
      Bruce Momjian 提交于
      > > ClientEncoding to SQL_ASCII (like default DatabaseEncoding). Bruce, can
      > > you change it? It's one line change. Again thanks.
      
       Forget it! A default client encoding must be set by actual database encoding...
      Please apply the small attached patch that solve it better.
      
      Karel Zak
      fdbf796f
    • B
    • B
      Update TODO list. · 20dd23c4
      Bruce Momjian 提交于
      20dd23c4
    • H
      Resolve compile errors on unix. · 4ad1b5b7
      Hiroshi Inoue 提交于
      Rename psqlodbc.def -> psqlodbc_win32.def.
      Improve internal *declare cursor* handling
      a little.
      
      Hiroshi Inoue
      4ad1b5b7
    • T
      Clean up some confusion about where and how to set whereToSendOutput. · 02b1a7fd
      Tom Lane 提交于
      We will no longer try to send elog messages to the client before we have
      initialized backend libpq (oops); however, reporting bogus commandline
      switches via elog does work now (not irrelevant, because of PGOPTIONS).
      Fix problem with inappropriate sending of checkpoint-process messages
      to stderr.
      02b1a7fd
    • B
      Move TESTSUITE file to test/README. · 6b9f9402
      Bruce Momjian 提交于
      6b9f9402
    • T
      Change addlit() to not assume its input is null-terminated, so that we · 09e99a10
      Tom Lane 提交于
      don't have more bugs like the quote-quote-quote-quote one.  Propagate
      fix into ecpg lexer, too.
      09e99a10
    • B
      Attached is a patch that fixes 2 test cases of the JDBC test · b6385efb
      Bruce Momjian 提交于
      suite. This reduces the number of failures from 9 to 7.
      
      Both ConnectionTest and JBuilderTest did not create their own
      tables, which caused these test cases to fail with "relation ...
      does not exist". It appears these test cases relied on tables
      created by the example code elsewhere in the source tree. I've
      added the necessary "create table" and "drop table" statements
      to the test cases, using the column definitions from the example
      code.
      
      While working on that I modified the helper method createTable
      in JDBC2Tests.java to take a table parameter, rather than using
      table names passed via the properties in build.xml. I'm not sure
      what that was good for, and in fact, except for the default
      table name "jdbctest", this functionality wasn't used at all.
      
      Ren? Pijlman
      b6385efb
    • B
      Read transactions don't work on 7.0.x db's 2nd patch · 7066253a
      Bruce Momjian 提交于
      Here is a revised patch with Barry's suggestions implemented
      
      Dave Cramer
      7066253a