OSDN Git Service
Peter Eisentraut [Sat, 15 Sep 2001 16:08:59 +0000 (16:08 +0000)]
Markup examples as examples.
Peter Eisentraut [Sat, 15 Sep 2001 00:48:59 +0000 (00:48 +0000)]
Markup examples as examples. Fix formatting of examples.
Peter Eisentraut [Fri, 14 Sep 2001 20:37:55 +0000 (20:37 +0000)]
Some formatting changes, add CSS stylesheet. Include indexes in
documentation tarball builds.
Bruce Momjian [Fri, 14 Sep 2001 17:46:40 +0000 (17:46 +0000)]
> Here's a revised patch. Changes:
>
> 1. Now outputs '\\' instead of '\134' when using encode(bytea, 'escape')
> Note that I ended up leaving \0 as \000 so that there are no ambiguities
> when decoding something like, for example, \0123.
>
> 2. Fixed bug in byteain which allowed input values which were not valid
> octals (e.g. \789), to be parsed as if they were octals.
>
> Joe
>
Here's rev 2 of the bytea string support patch. Changes:
1. Added missing declaration for MatchBytea function
2. Added PQescapeBytea to fe-exec.c
3. Applies cleanly on cvs tip from this afternoon
I'm hoping that someone can review/approve/apply this before beta starts, so
I guess I'd vote (not that it counts for much) to delay beta a few days :-)
Joe Conway
Bruce Momjian [Fri, 14 Sep 2001 17:40:41 +0000 (17:40 +0000)]
Allow '1' in jdbc2 boolean test.
Tatsuo Ishii [Fri, 14 Sep 2001 10:36:52 +0000 (10:36 +0000)]
Remove --enable-unicode-conversion
unicode-conversion is always on if --enable-multibyte is specified
Tatsuo Ishii
Tatsuo Ishii [Fri, 14 Sep 2001 10:28:09 +0000 (10:28 +0000)]
Add semicolon
Tatsuo Ishii [Fri, 14 Sep 2001 10:24:35 +0000 (10:24 +0000)]
Fix typo.
Tatsuo Ishii [Fri, 14 Sep 2001 09:49:00 +0000 (09:49 +0000)]
Fix exmaple
Tatsuo Ishii
Tatsuo Ishii [Fri, 14 Sep 2001 08:47:00 +0000 (08:47 +0000)]
Fix show message
Tatsuo Ishii
Tatsuo Ishii [Fri, 14 Sep 2001 08:24:29 +0000 (08:24 +0000)]
Add semicolon
Tatsuo Ishii
Tatsuo Ishii [Fri, 14 Sep 2001 08:19:55 +0000 (08:19 +0000)]
Example rules do not work.
CREATE RULE bad_rule_combination_1 AS
ON SELECT TO emp
DO INSTEAD
SELECT * FROM toyemp;
CREATE RULE bad_rule_combination_2 AS
ON SELECT TO toyemp
DO INSTEAD
SELECT * FROM emp;
Tatsuo Ishii
Tatsuo Ishii [Fri, 14 Sep 2001 08:05:55 +0000 (08:05 +0000)]
Add semicolon
Tatsuo Ishii [Fri, 14 Sep 2001 07:59:31 +0000 (07:59 +0000)]
Add semicolon
Tatsuo Ishii
Hiroshi Inoue [Fri, 14 Sep 2001 06:46:45 +0000 (06:46 +0000)]
Change an *if condition*.
Hiroshi Inoue
Hiroshi Inoue [Fri, 14 Sep 2001 06:30:37 +0000 (06:30 +0000)]
1) Improve the implementation of *Disallow Premature* for
older versions of servers.
2) Implement SQLProcedures.
Hiroshi Inoue
Bruce Momjian [Fri, 14 Sep 2001 03:21:42 +0000 (03:21 +0000)]
Update TODO list.
Hiroshi Inoue [Fri, 14 Sep 2001 01:50:33 +0000 (01:50 +0000)]
Fix a coversation error with pre 6.4 versions.
Hiroshi Inoue
Bruce Momjian [Fri, 14 Sep 2001 01:23:14 +0000 (01:23 +0000)]
Update TODO list.
Bruce Momjian [Fri, 14 Sep 2001 00:41:06 +0000 (00:41 +0000)]
Update TODO list.
Bruce Momjian [Thu, 13 Sep 2001 22:39:29 +0000 (22:39 +0000)]
Add missing paren to ODBC compiles.
Peter Eisentraut [Thu, 13 Sep 2001 19:40:34 +0000 (19:40 +0000)]
Update compatibility information.
Peter Eisentraut [Thu, 13 Sep 2001 19:05:29 +0000 (19:05 +0000)]
Update compatibility information.
Peter Eisentraut [Thu, 13 Sep 2001 18:17:44 +0000 (18:17 +0000)]
Update compatibility information.
Bruce Momjian [Thu, 13 Sep 2001 17:01:31 +0000 (17:01 +0000)]
Didn't want that jdbc patch in there yet.
Bruce Momjian [Thu, 13 Sep 2001 17:00:34 +0000 (17:00 +0000)]
> I found a problem with PQescapeString (I think). Since it escapes
> null bytes to be literally '\0', the following can happen:
> 1. User inputs string value as "<null byte>##" where ## are digits in the
> range of 0 to 7.
> 2. PQescapeString converts this to "\0##"
> 3. Escaped string is used in a context that causes "\0##" to be evaluated as
> an octal escape sequence.
I agree that this is a problem, though it is not possible to do
anything harmful with it. In addition, it only occurs if there are
any NUL characters in its input, which is very unlikely if you are
using C strings.
The patch below addresses the issue by removing escaping of \0
characters entirely.
> If the goal is to "safely" encode null bytes, and preserve the rest of the
> string as it was entered, I think the null bytes should be escaped as \\000
> (note that if you simply use \000 the same string truncation problem
> occurs).
We can't do that, this would require 4n + 1 bytes of storage for the
result, breaking the interface.
Florian Weimer
Peter Eisentraut [Thu, 13 Sep 2001 15:55:24 +0000 (15:55 +0000)]
Replace ASCII-quotes with proper markup.
Hiroshi Inoue [Thu, 13 Sep 2001 00:27:11 +0000 (00:27 +0000)]
1) Not export ODBC 3.0 functions.
2) (Maybe) fix a bug reported by Mika Muntila.
Peter Eisentraut [Wed, 12 Sep 2001 20:57:28 +0000 (20:57 +0000)]
'chown -R postgres /usr/local/pgsql' is wrong. Need to do some more typing.
Bruce Momjian [Wed, 12 Sep 2001 15:55:00 +0000 (15:55 +0000)]
Attached patch is correction for 'doc/jdbc.sgml' of PostgreSQL 7.1.3.
Correction content:
* I revised a mistake of type (copy and paste).
* I revised multiplicity of description.
Ryouichi Matsuda
Bruce Momjian [Wed, 12 Sep 2001 15:49:10 +0000 (15:49 +0000)]
Followings are proposed fixes to jdbc.sgml(line numbers are for 7.1.3
doc).
Hiroyuki Yatabe
Peter Eisentraut [Wed, 12 Sep 2001 14:06:37 +0000 (14:06 +0000)]
max_locks_per_transaction seems to be a more consistent name than
max_locks_per_xact.
Peter Eisentraut [Wed, 12 Sep 2001 12:14:41 +0000 (12:14 +0000)]
Check both -lrt and -lposix4 for fdatasync, to cover all Solaris versions.
Bruce Momjian [Wed, 12 Sep 2001 04:01:57 +0000 (04:01 +0000)]
It is not fixed and I doubt that it is working fine in current CVS. The
bugfix is in the attached patch. Please apply it. Thanks.
Output must be:
test=# SELECT to_char(485, 'RN');
to_char
-----------------
CDLXXXV
(1 row)
test=# SELECT to_char(485, 'FMRN');
to_char
---------
CDLXXXV
(1 row)
test=# SELECT to_char(1000, 'RN');
to_char
-----------------
M
(1 row)
test=# SELECT to_char(7.2, '"Welcome to"9.9 "release! :-)"');
to_char
-----------------------------
Welcome to 7.2 release! :-)
(1 row)
Karel Zak
Bruce Momjian [Wed, 12 Sep 2001 03:58:15 +0000 (03:58 +0000)]
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.
Bruce Momjian [Wed, 12 Sep 2001 03:03:25 +0000 (03:03 +0000)]
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
Tatsuo Ishii [Wed, 12 Sep 2001 02:13:25 +0000 (02:13 +0000)]
Fix typo (add ;)
Tatsuo Ishii [Wed, 12 Sep 2001 01:55:25 +0000 (01:55 +0000)]
Fix typo (add ;)
Tatsuo Ishii [Wed, 12 Sep 2001 01:22:25 +0000 (01:22 +0000)]
Fix typo.
Peter Eisentraut [Tue, 11 Sep 2001 23:27:10 +0000 (23:27 +0000)]
Link ODBC driver with -lnsl and -lsocket, for Solaris.
reported by Bob Deblier (bob@virtualunlimited.com)
Peter Eisentraut [Tue, 11 Sep 2001 23:20:41 +0000 (23:20 +0000)]
Use gcc -shared rather than gcc -G for shared library linking on Solaris.
suggested by Bob Deblier (bob@virtualunlimited.com)
Peter Eisentraut [Tue, 11 Sep 2001 23:08:07 +0000 (23:08 +0000)]
Invoke on_exit() with correct number and type of arguments.
Peter Eisentraut [Tue, 11 Sep 2001 14:31:23 +0000 (14:31 +0000)]
Look for fdatasync() in librt, for Solaris.
partially from Kenji Sugita
Hiroshi Inoue [Tue, 11 Sep 2001 06:39:20 +0000 (06:39 +0000)]
Fix some multibyte related bugs.
Psqlodbc is 7.01.0007 now.
Hiroshi Inoue
Tatsuo Ishii [Tue, 11 Sep 2001 05:18:59 +0000 (05:18 +0000)]
Implement following item in TODO:
* Reject character sequences those are not valid in their charset
Tatsuo Ishii [Tue, 11 Sep 2001 05:11:59 +0000 (05:11 +0000)]
Add single quote (example given here does not work)
Bruce Momjian [Tue, 11 Sep 2001 05:09:45 +0000 (05:09 +0000)]
Update TODO list.
Tatsuo Ishii [Tue, 11 Sep 2001 04:50:36 +0000 (04:50 +0000)]
Implement following item in TODO:
* Reject character sequences those are not valid in their charset
Tatsuo Ishii [Tue, 11 Sep 2001 02:24:52 +0000 (02:24 +0000)]
Fix regression test in the case of building as root.
Peter Eisentraut [Mon, 10 Sep 2001 23:52:04 +0000 (23:52 +0000)]
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.
Peter Eisentraut [Mon, 10 Sep 2001 23:28:59 +0000 (23:28 +0000)]
Make prep_buildtree harmless when run on top of the source tree.
from Ian Lance Taylor
Peter Eisentraut [Mon, 10 Sep 2001 22:25:48 +0000 (22:25 +0000)]
Add explicit '-print' to 'find' commands.
(partially) from Ian Lance Taylor
Peter Eisentraut [Mon, 10 Sep 2001 21:58:47 +0000 (21:58 +0000)]
Markup and spell-check run over Programmer's Guide (rather incomplete still).
Peter Eisentraut [Mon, 10 Sep 2001 19:34:18 +0000 (19:34 +0000)]
Remove extra space at end of line.
Bruce Momjian [Mon, 10 Sep 2001 15:21:20 +0000 (15:21 +0000)]
Update TODO list.
Bruce Momjian [Mon, 10 Sep 2001 15:07:58 +0000 (15:07 +0000)]
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>
Bruce Momjian [Mon, 10 Sep 2001 15:07:05 +0000 (15:07 +0000)]
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
Bruce Momjian [Mon, 10 Sep 2001 14:55:08 +0000 (14:55 +0000)]
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>
Bruce Momjian [Mon, 10 Sep 2001 14:54:22 +0000 (14:54 +0000)]
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
Bruce Momjian [Mon, 10 Sep 2001 14:53:10 +0000 (14:53 +0000)]
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
Bruce Momjian [Mon, 10 Sep 2001 14:51:33 +0000 (14:51 +0000)]
> 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
Bruce Momjian [Mon, 10 Sep 2001 14:49:12 +0000 (14:49 +0000)]
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
Hiroshi Inoue [Mon, 10 Sep 2001 10:13:30 +0000 (10:13 +0000)]
Change dialog windows.
Hiroshi Inoue [Mon, 10 Sep 2001 08:53:27 +0000 (08:53 +0000)]
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
Tatsuo Ishii [Mon, 10 Sep 2001 08:46:46 +0000 (08:46 +0000)]
Short version of install procedure fails due to lacking chown.
Tatsuo Ishii [Mon, 10 Sep 2001 07:17:01 +0000 (07:17 +0000)]
The usage of kill is incorrect (lacks "data"). Anyway we should use
pg_ctl instead.
Tatsuo Ishii [Mon, 10 Sep 2001 07:11:28 +0000 (07:11 +0000)]
Fix typo. split does not produce ".".
Tatsuo Ishii [Mon, 10 Sep 2001 06:35:34 +0000 (06:35 +0000)]
Fix typo.
Tatsuo Ishii [Mon, 10 Sep 2001 06:30:43 +0000 (06:30 +0000)]
Example program lacks RETURN
Tatsuo Ishii [Mon, 10 Sep 2001 05:57:22 +0000 (05:57 +0000)]
Fix typo.
Tatsuo Ishii [Mon, 10 Sep 2001 05:46:41 +0000 (05:46 +0000)]
Fix typo.
Tatsuo Ishii [Mon, 10 Sep 2001 05:20:23 +0000 (05:20 +0000)]
Fix initlocation messages
Bruce Momjian [Mon, 10 Sep 2001 04:21:14 +0000 (04:21 +0000)]
Remove INV_ARCHIVE mention in python readme.
Bruce Momjian [Mon, 10 Sep 2001 04:19:19 +0000 (04:19 +0000)]
Remove INV_ARCHIVE mention in perl.
Bruce Momjian [Mon, 10 Sep 2001 04:15:41 +0000 (04:15 +0000)]
Remove mention of INV_ARCHIVE.
Tatsuo Ishii [Mon, 10 Sep 2001 03:02:06 +0000 (03:02 +0000)]
fix typo.
Tatsuo Ishii [Mon, 10 Sep 2001 02:46:18 +0000 (02:46 +0000)]
Add missing ';'
Bruce Momjian [Mon, 10 Sep 2001 02:02:37 +0000 (02:02 +0000)]
Update TODO list.
Bruce Momjian [Mon, 10 Sep 2001 00:14:29 +0000 (00:14 +0000)]
Update TODO list.
Peter Eisentraut [Sun, 9 Sep 2001 23:52:12 +0000 (23:52 +0000)]
Markup additions and spell check. (covers Admin Guide)
Peter Eisentraut [Sun, 9 Sep 2001 17:21:59 +0000 (17:21 +0000)]
Markup additions and spell check. (covers User's Guide)
Tatsuo Ishii [Sun, 9 Sep 2001 03:15:56 +0000 (03:15 +0000)]
Add -U, -P, -C options. See README.pgbench for more details.
Tatsuo Ishii [Sun, 9 Sep 2001 01:15:11 +0000 (01:15 +0000)]
Backout Karel's patch
Peter Eisentraut [Sat, 8 Sep 2001 16:46:34 +0000 (16:46 +0000)]
fix markup
Hiroshi Inoue [Sat, 8 Sep 2001 16:20:16 +0000 (16:20 +0000)]
Improve declare/fetch mode a little.
Add a new DSN option for PREPARE hadling.
Hiroshi Inoue
Hiroshi Inoue [Sat, 8 Sep 2001 16:15:28 +0000 (16:15 +0000)]
Apply 7.1.3 changes to the current tree also.
Peter Eisentraut [Sat, 8 Sep 2001 15:24:00 +0000 (15:24 +0000)]
Make the world somewhat safe for (not from) DELETE FROM pg_shadow;
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).
Bruce Momjian [Sat, 8 Sep 2001 14:30:15 +0000 (14:30 +0000)]
> > A simple and robus solution is in the begin of mbutils.c set default
> > 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
Bruce Momjian [Sat, 8 Sep 2001 02:48:53 +0000 (02:48 +0000)]
Move updateCommon() into Win32 block because it is only used there.
Bruce Momjian [Sat, 8 Sep 2001 02:42:53 +0000 (02:42 +0000)]
Update TODO list.
Hiroshi Inoue [Sat, 8 Sep 2001 02:28:41 +0000 (02:28 +0000)]
Resolve compile errors on unix.
Rename psqlodbc.def -> psqlodbc_win32.def.
Improve internal *declare cursor* handling
a little.
Hiroshi Inoue
Tom Lane [Sat, 8 Sep 2001 01:10:21 +0000 (01:10 +0000)]
Clean up some confusion about where and how to set whereToSendOutput.
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.
Bruce Momjian [Fri, 7 Sep 2001 23:34:16 +0000 (23:34 +0000)]
Move TESTSUITE file to test/README.
Tom Lane [Fri, 7 Sep 2001 23:17:14 +0000 (23:17 +0000)]
Change addlit() to not assume its input is null-terminated, so that we
don't have more bugs like the quote-quote-quote-quote one. Propagate
fix into ecpg lexer, too.
Bruce Momjian [Fri, 7 Sep 2001 22:17:48 +0000 (22:17 +0000)]
Attached is a patch that fixes 2 test cases of the JDBC test
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
Bruce Momjian [Fri, 7 Sep 2001 22:17:02 +0000 (22:17 +0000)]
Read transactions don't work on 7.0.x db's 2nd patch
Here is a revised patch with Barry's suggestions implemented
Dave Cramer
Bruce Momjian [Fri, 7 Sep 2001 22:15:55 +0000 (22:15 +0000)]
Patch for jdbc2 ResultSet.java. Looks like performance improvement.
Joseph Shraibman
Bruce Momjian [Fri, 7 Sep 2001 22:02:32 +0000 (22:02 +0000)]
I've attached the fixed version of the patch below. After the
discussion on pgsql-hackers (especially the frightening memory dump in
<12273.
999562219@sss.pgh.pa.us>), we decided that it is best not to
use identifiers from an untrusted source at all. Therefore, all
claims of the suitability of PQescapeString() for identifiers have
been removed.
Florian Weimer
Bruce Momjian [Fri, 7 Sep 2001 21:57:53 +0000 (21:57 +0000)]
Here is my much-promised patch to let people add UNIQUE constraints after
table creation time. Big deal you say - but this patch is the basis of the
next thing which is adding PRIMARY KEYs after table creation time. (Which
is currently impossible without twiddling catalogs)
Rundown
-------
* I have made the makeObjectName function of analyze.c non-static, and
exported it in analyze.h
* I have included analyze.h and defrem.h into command.c, to support
makingObjectNames and creating indices
* I removed the 'case CONSTR_PRIMARY' clause so that it properly fails and
says you can't add primary keys, rather than just doing nothing and
reporting nothing!!!
* I have modified the docs.
Algorithm
---------
* If name specified is null, search for a new valid constraint name. I'm
not sure if I should "lock" my generated name somehow tho - should I open
the relation before doing this step?
* Open relation in access exclusive mode
* Check that the constraint does not already exist
* Define the new index
* Warn if they're doubling up on an existing index
Christopher Kings-Lynne
Bruce Momjian [Fri, 7 Sep 2001 21:55:00 +0000 (21:55 +0000)]
>has anyone ever successfully done copy to/from stdout with the
>tcl-extension for postgreSQL.
>I'm currently using 7.0 and always getting a seg fault when I try to
>read from the database connection after issueing a "COPY table TO
>stdout;" (I'm using the connection handle, *not* the result handle).
>Maybe this is fixed in a later release.
>The README file in src/interfaces/libpgtcl tells me, that this should
>work, but unforunately it doesn't.
Yes, it seems broken. It is a bug in libpgtcl. Are you running Tcl >= 8.3.2?
That's when the Tcl team changed the data structure for channel
callbacks. The change itself was designed to be backward compatible, but I
suspect a related change made the code more sensitive to errors in the
structure (NULL pointers where functions are required). Either that, or
nobody has tried to use libpgtcl with COPY in a long time.
First, I have to say I can't think of a good reason to use PostgreSQL's
COPY command from a Tcl application. I think it should only be used with
psql for importing data from another source into PostgreSQL, or for
exporting PostgreSQL data into another database (but why would anyone do
that?) If it was me, I would stick with SELECT and INSERT and be "SQL
Compliant".
OK, editorial is over. Try applying the patch below to fix
src/interfaces/libpgtcl/pgtclId.c
and let us know if it works. I did little testing on it, but my test did
segfault before and ran fine (copy in and copy out) after the patch. This
is for PostgreSQL-7.1.2 - since you are running older 7.0, I don't know if
this will work, but I suspect it will.
PS It's the absence of PgWatchProc which kills it. I didn't upgrade it
to the "V2" channel type structure, so it should be compatible with older
Tcl's. But aside from gets and puts, I doubt any other file operations
would work on the handle during a copy.
ljb