Commit Graph

10671 Commits

Author SHA1 Message Date
Bruce Momjian 33a82e7fd8 Here's some matching documentation, including some other
undocumented items in TD.

Should doc patches alse be sent to pgsql-patches, or do I
have to subscribe to pgsql-docs?

The archive link for pgsql-patches is broken, and I don't
see any patches in spot checking the archive for pgsql-docs.

-Brad McLean.
2001-09-12 03:58:15 +00:00
Bruce Momjian 148f94b98f I noticed that plpython does not make the relid available inside
a trigger the way that pltcl does.

Here's a little patch that adds it in.

-Brad McLean
2001-09-12 03:03:25 +00:00
Tatsuo Ishii 3b99f74d95 Fix typo (add ;) 2001-09-12 02:13:25 +00:00
Tatsuo Ishii 2d12bc1ea1 Fix typo (add ;) 2001-09-12 01:55:25 +00:00
Tatsuo Ishii 7dc4a45ae7 Fix typo. 2001-09-12 01:22:25 +00:00
Peter Eisentraut 9b35cce9ee Link ODBC driver with -lnsl and -lsocket, for Solaris.
reported by Bob Deblier (bob@virtualunlimited.com)
2001-09-11 23:27:10 +00:00
Peter Eisentraut 3278314847 Use gcc -shared rather than gcc -G for shared library linking on Solaris.
suggested by Bob Deblier (bob@virtualunlimited.com)
2001-09-11 23:20:41 +00:00
Peter Eisentraut 93a9cc8533 Invoke on_exit() with correct number and type of arguments. 2001-09-11 23:08:07 +00:00
Peter Eisentraut a8d474195e Look for fdatasync() in librt, for Solaris.
partially from Kenji Sugita
2001-09-11 14:31:23 +00:00
Hiroshi Inoue 0521051b0b Fix some multibyte related bugs.
Psqlodbc is 7.01.0007 now.

Hiroshi Inoue
2001-09-11 06:39:20 +00:00
Tatsuo Ishii 7e99cea816 Implement following item in TODO:
* Reject character sequences those are not valid in their charset
2001-09-11 05:18:59 +00:00
Tatsuo Ishii 95dc7785b5 Add single quote (example given here does not work) 2001-09-11 05:11:59 +00:00
Bruce Momjian 14fa192d46 Update TODO list. 2001-09-11 05:09:45 +00:00
Tatsuo Ishii e1de3e0833 Implement following item in TODO:
* Reject character sequences those are not valid in their charset
2001-09-11 04:50:36 +00:00
Tatsuo Ishii d7f3cbc288 Fix regression test in the case of building as root. 2001-09-11 02:24:52 +00:00
Peter Eisentraut ef5602d72c When testing for source and build tree equality, and test -ef doesn't work,
fall back to `cd $srcdir && /bin/pwd` = `/bin/pwd`.  One of these ought to
work, and if not, prep_buildtree is harmless.
2001-09-10 23:52:04 +00:00
Peter Eisentraut 7505e5d0cd Make prep_buildtree harmless when run on top of the source tree.
from Ian Lance Taylor
2001-09-10 23:28:59 +00:00
Peter Eisentraut 8f3627d89b Add explicit '-print' to 'find' commands.
(partially) from Ian Lance Taylor
2001-09-10 22:25:48 +00:00
Peter Eisentraut a457d33516 Markup and spell-check run over Programmer's Guide (rather incomplete still). 2001-09-10 21:58:47 +00:00
Peter Eisentraut 51ba1c5a8c Remove extra space at end of line. 2001-09-10 19:34:18 +00:00
Bruce Momjian 0682c26ed5 Update TODO list. 2001-09-10 15:21:20 +00:00
Bruce Momjian 3ef5bebb72 Attached is a patch that fixes DatabaseMetaDataTest in the JDBC
driver's test suite. With previous patches applied, this reduces
the number of failures of the test suite from 6 to 4. The patch
fixes the test case itself, rather than the driver.

Details:

1) The driver correctly provided DatabaseMetaData about the sort
order of NULLs. This was confirmed by Peter Eisentraut on
pgsql-hackers. I fixed the test to accept/require the current
behaviour, and made it dependent on the backend version. See
nullsAreSortedAtStart(), nullsAreSortedAtEnd(),
nullsAreSortedHigh() and nullsAreSortedLow().

2) DatabaseMetaData.supportsOrderByUnrelated() correctly
returned true (an ORDER BY clause can contain columns that are
not in the SELECT clause), but the test case required false.
Fixed that.

3) Replaced deprecated assert() of junit.framework.TestCase by
assertEquals(), assertTrue() and assertNotNull(). This is
because assert will be a new keyword in Java 1.4.

4) Replaced assert(message,false) by the more elegant
fail(message).

Regards,
Ren? Pijlman <rene@lab.applinet.nl>
2001-09-10 15:07:58 +00:00
Bruce Momjian ec0ad67403 Attached is a patch to add bytea support to JDBC.
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
2001-09-10 15:07:05 +00:00
Bruce Momjian 6b50f9af33 On Fri, 07 Sep 2001 01:34:46 -0400, Tom Lane wrote:
>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>
2001-09-10 14:55:08 +00:00
Bruce Momjian c69bb04acc Attached is a patch that fixes
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
2001-09-10 14:54:22 +00:00
Bruce Momjian d70a944e0a Bug #1: attribute name when column is type cast:
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
2001-09-10 14:53:10 +00:00
Bruce Momjian be18a49d39 > NOTE: in the command.c in three places there (I believe) is a typo:
>
> "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
2001-09-10 14:51:33 +00:00
Bruce Momjian 9e46767161 The attached patch should be sufficient to fix libpgtcl. It requires
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
2001-09-10 14:49:12 +00:00
Hiroshi Inoue 0ee85f853f Change dialog windows. 2001-09-10 10:13:30 +00:00
Hiroshi Inoue 9abd055405 1) Fix SQLForeignKeys() in multibyte mode.
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
2001-09-10 08:53:27 +00:00
Tatsuo Ishii 531126c854 Short version of install procedure fails due to lacking chown. 2001-09-10 08:46:46 +00:00
Tatsuo Ishii 35d3c85ac0 The usage of kill is incorrect (lacks "data"). Anyway we should use
pg_ctl instead.
2001-09-10 07:17:01 +00:00
Tatsuo Ishii acb66fc5bf Fix typo. split does not produce ".". 2001-09-10 07:11:28 +00:00
Tatsuo Ishii 0e76f1bb1a Fix typo. 2001-09-10 06:35:34 +00:00
Tatsuo Ishii f8f0ff6b57 Example program lacks RETURN 2001-09-10 06:30:43 +00:00
Tatsuo Ishii 82b889a044 Fix typo. 2001-09-10 05:57:22 +00:00
Tatsuo Ishii 0d04ffeb0d Fix typo. 2001-09-10 05:46:41 +00:00
Tatsuo Ishii 16a7ec386e Fix initlocation messages 2001-09-10 05:20:23 +00:00
Bruce Momjian da1696b5c1 Remove INV_ARCHIVE mention in python readme. 2001-09-10 04:21:14 +00:00
Bruce Momjian 39d1169939 Remove INV_ARCHIVE mention in perl. 2001-09-10 04:19:19 +00:00
Bruce Momjian bb35e499ea Remove mention of INV_ARCHIVE. 2001-09-10 04:15:41 +00:00
Tatsuo Ishii ea41e77c22 fix typo. 2001-09-10 03:02:06 +00:00
Tatsuo Ishii aa398e5034 Add missing ';' 2001-09-10 02:46:18 +00:00
Bruce Momjian 98d04116d3 Update TODO list. 2001-09-10 02:02:37 +00:00
Bruce Momjian df7664c166 Update TODO list. 2001-09-10 00:14:29 +00:00
Peter Eisentraut d07454f559 Markup additions and spell check. (covers Admin Guide) 2001-09-09 23:52:12 +00:00
Peter Eisentraut 84956e71a3 Markup additions and spell check. (covers User's Guide) 2001-09-09 17:21:59 +00:00
Tatsuo Ishii ba708ea3dc Add -U, -P, -C options. See README.pgbench for more details. 2001-09-09 03:15:56 +00:00
Tatsuo Ishii d330f09a56 Backout Karel's patch 2001-09-09 01:15:11 +00:00
Peter Eisentraut 1a63ef056e fix markup 2001-09-08 16:46:34 +00:00