OSDN Git Service

pg-rex/syncrep.git
21 years agoThis is a quick patch to fix a crash in pgquery_dictresult() introduced
Bruce Momjian [Wed, 28 Aug 2002 20:18:58 +0000 (20:18 +0000)]
This is a quick patch to fix a crash in pgquery_dictresult() introduced
recently. I just ran into it while running a set of python test scripts,
and I'm not sure who the normal maintainer is for interfaces/python.

John Nield

21 years agoThe following small patch provides a couple of minor updates (against
Bruce Momjian [Wed, 28 Aug 2002 20:18:29 +0000 (20:18 +0000)]
The following small patch provides a couple of minor updates (against
CVS HEAD):

Amended "strings" regression test. TOAST tests now insert two values
with storage set to "external", to exercise properly the TOAST slice
routines which fetch only a subset of the chunks.

Changed now-misleading comment on AlterTableCreateToastTable in
tablecmds.c, because both columns of the index on a toast table are now
used.

John Gray

21 years agoAdd mention of foreign key dependency and SERIAL in 7.2 data restores.
Bruce Momjian [Wed, 28 Aug 2002 20:17:44 +0000 (20:17 +0000)]
Add mention of foreign key dependency and SERIAL in 7.2 data restores.

Note can probably be removed after a couple of releases.

Rod Taylor

21 years agoDump ALTER DATABASE/USER ... SET ...
Peter Eisentraut [Wed, 28 Aug 2002 18:25:05 +0000 (18:25 +0000)]
Dump ALTER DATABASE/USER ... SET ...

21 years agoRemove:
Bruce Momjian [Wed, 28 Aug 2002 16:45:11 +0000 (16:45 +0000)]
Remove:

< * Remove PGPASSWORD because it is insecure on some OS's, in 7.4

21 years agoUpdate info about relkind and pg_type entries for composite-types patch.
Tom Lane [Wed, 28 Aug 2002 15:02:55 +0000 (15:02 +0000)]
Update info about relkind and pg_type entries for composite-types patch.

21 years agoAllow FOR UPDATE to appear after LIMIT/OFFSET to match MySQL syntax and as
Bruce Momjian [Wed, 28 Aug 2002 14:35:37 +0000 (14:35 +0000)]
Allow FOR UPDATE to appear after LIMIT/OFFSET to match MySQL syntax and as
a more logical ordering.

21 years agoFix compile warning.
Tom Lane [Tue, 27 Aug 2002 21:50:23 +0000 (21:50 +0000)]
Fix compile warning.

21 years agoFlush output streams before calling pg_dump subprocess.
Peter Eisentraut [Tue, 27 Aug 2002 21:33:41 +0000 (21:33 +0000)]
Flush output streams before calling pg_dump subprocess.

21 years agoAdd:
Bruce Momjian [Tue, 27 Aug 2002 21:16:13 +0000 (21:16 +0000)]
Add:

>  o Add SET SCHEMA

21 years agoDisable use of -c and -a together in pg_dump; they don't make sense together.
Bruce Momjian [Tue, 27 Aug 2002 21:04:58 +0000 (21:04 +0000)]
Disable use of -c and -a together in pg_dump;  they don't make sense together.

21 years agoBring comments back in sync with code.
Tom Lane [Tue, 27 Aug 2002 20:54:47 +0000 (20:54 +0000)]
Bring comments back in sync with code.

21 years agoThrow error on pg_atoi(''), regression adjustments.
Bruce Momjian [Tue, 27 Aug 2002 20:29:11 +0000 (20:29 +0000)]
Throw error on pg_atoi(''), regression adjustments.

21 years agoEnable locale, so case conversion (identifier processing) and number
Peter Eisentraut [Tue, 27 Aug 2002 20:16:49 +0000 (20:16 +0000)]
Enable locale, so case conversion (identifier processing) and number
formatting (\timing) works correctly.  Change "Total time" to "Time"
since there is nothing that "total" refers to.  Remove non-multibyte
code.

21 years agoReimplement pg_dumpall in C. Currently no change in functionality,
Peter Eisentraut [Tue, 27 Aug 2002 18:57:26 +0000 (18:57 +0000)]
Reimplement pg_dumpall in C.  Currently no change in functionality,
except that it's more robust, reconnects less often, and is NLS'ed.

21 years agoAdd '+' mention in \? help. More clean of \? to do.
Bruce Momjian [Tue, 27 Aug 2002 18:28:29 +0000 (18:28 +0000)]
Add '+' mention in \? help.  More clean of \? to do.

21 years agoMake change for pg_locks table.
Bruce Momjian [Tue, 27 Aug 2002 18:06:00 +0000 (18:06 +0000)]
Make change for pg_locks table.

21 years agoThe attached patch implements the password packet length sanity check
Bruce Momjian [Tue, 27 Aug 2002 16:21:51 +0000 (16:21 +0000)]
The attached patch implements the password packet length sanity check
(using an elog(LOG) ), as well as includes a few more comment fixes.

Neil Conway

21 years agoAdd:
Bruce Momjian [Tue, 27 Aug 2002 16:19:46 +0000 (16:19 +0000)]
Add:

> * Allow free space map to be auto-sized or warn when it is too small

21 years agoAdd error code emails.
Bruce Momjian [Tue, 27 Aug 2002 15:31:32 +0000 (15:31 +0000)]
Add error code emails.

21 years agoAdd most of Neil Conway's cleanups.
Bruce Momjian [Tue, 27 Aug 2002 15:15:23 +0000 (15:15 +0000)]
Add most of Neil Conway's cleanups.

21 years agoMore connection timeout cleanups.
Bruce Momjian [Tue, 27 Aug 2002 15:02:50 +0000 (15:02 +0000)]
More connection timeout cleanups.

21 years agoCleanup of libpq connection timeout code.
Bruce Momjian [Tue, 27 Aug 2002 14:49:52 +0000 (14:49 +0000)]
Cleanup of libpq connection timeout code.

21 years agoAdd:
Bruce Momjian [Tue, 27 Aug 2002 14:17:14 +0000 (14:17 +0000)]
Add:

> * Allow REINDEX to rebuild all indexes, remove /contrib/reindex
>  o Allow CLUSTER to cluster all tables, remove clusterdb

21 years agoAdd fsm sizes.
Bruce Momjian [Tue, 27 Aug 2002 14:06:05 +0000 (14:06 +0000)]
Add fsm sizes.

21 years agoPREPARE/EXECUTE statements. Patch by Neil Conway, some kibitzing
Tom Lane [Tue, 27 Aug 2002 04:55:12 +0000 (04:55 +0000)]
PREPARE/EXECUTE statements.  Patch by Neil Conway, some kibitzing
from Tom Lane.

21 years agoDone:
Bruce Momjian [Tue, 27 Aug 2002 04:30:24 +0000 (04:30 +0000)]
Done:

>  o -Cluster all tables at once using pg_index.indisclustered set during

21 years agoAdd to mmap discussion.
Bruce Momjian [Tue, 27 Aug 2002 04:09:01 +0000 (04:09 +0000)]
Add to mmap discussion.

21 years agoThis patch updates the lock listing code to use Joe Conway's new
Bruce Momjian [Tue, 27 Aug 2002 04:00:28 +0000 (04:00 +0000)]
This patch updates the lock listing code to use Joe Conway's new
anonymous return type SRF code. It gets rid of the superflous
'pg_locks_result' that Bruce/Tom had commented on. Otherwise, no
changes in functionality.

Neil Conway

21 years agoThis is a 2 line patch to src/interfaces/perl5/GNUMakefile that fixes
Bruce Momjian [Tue, 27 Aug 2002 03:57:11 +0000 (03:57 +0000)]
This is a 2 line patch to src/interfaces/perl5/GNUMakefile that fixes
the 'override CPPFLAGS' to include the source directory during compile,
and makes the install target look in the proper place for the man page.

Changes are only required when building outside the source directory.

J. R. Nield

21 years agoThis patches replaces a few more usages of strcpy() and sprintf() when
Bruce Momjian [Tue, 27 Aug 2002 03:56:35 +0000 (03:56 +0000)]
This patches replaces a few more usages of strcpy() and sprintf() when
copying into a fixed-size buffer (in this case, a buffer of
NAMEDATALEN bytes). AFAICT nothing to worry about here, but worth
fixing anyway...

Neil Conway

21 years agoCleanup of SGML
Bruce Momjian [Tue, 27 Aug 2002 03:55:17 +0000 (03:55 +0000)]
Cleanup of SGML

21 years agoI attach a little patch to make CLUSTER set and reset the indisclustered
Bruce Momjian [Tue, 27 Aug 2002 03:38:28 +0000 (03:38 +0000)]
I attach a little patch to make CLUSTER set and reset the indisclustered
bit on the indexes.

I also attach clusterdb and clusterdb.sgml; both of them are blatant
rips of vacuumdb and vacuumdb.sgml, but get the job done.  Please review
them, as I'm probably making a lot of mistakes with SGML and I can't
compile it here.

vacuumdb itself is not very comfortable to use when the databases have
passwords, because it has to connect once for each table (I can probably
make it connect only once for each database; should I?).  Because of
this I added a mention of PGPASSWORDFILE in the documentation, but I
don't know if that is the correct place for that.

Alvaro Herrera

21 years agoAdd to skip list in check_guc
Bruce Momjian [Tue, 27 Aug 2002 03:06:16 +0000 (03:06 +0000)]
Add to skip list in check_guc

21 years agoComment cleanup.
Bruce Momjian [Tue, 27 Aug 2002 03:02:31 +0000 (03:02 +0000)]
Comment cleanup.

21 years agoScript cleanups.
Bruce Momjian [Tue, 27 Aug 2002 03:01:13 +0000 (03:01 +0000)]
Script cleanups.

21 years agoClean up script.
Bruce Momjian [Tue, 27 Aug 2002 02:54:39 +0000 (02:54 +0000)]
Clean up script.

21 years agoAdd check_guc utility to compare guc.c and postgresql.conf.sample.
Bruce Momjian [Tue, 27 Aug 2002 02:52:42 +0000 (02:52 +0000)]
Add check_guc utility to compare guc.c and postgresql.conf.sample.

21 years agoFix units in postgresql.conf.
Bruce Momjian [Tue, 27 Aug 2002 02:50:41 +0000 (02:50 +0000)]
Fix units in postgresql.conf.

21 years agoAdd OS X link line example for external functions.
Bruce Momjian [Mon, 26 Aug 2002 23:22:47 +0000 (23:22 +0000)]
Add OS X link line example for external functions.

21 years agoAdd discussion of pre-write pages to WAL.
Bruce Momjian [Mon, 26 Aug 2002 23:14:15 +0000 (23:14 +0000)]
Add discussion of pre-write pages to WAL.

21 years agoAdd:
Bruce Momjian [Mon, 26 Aug 2002 23:13:37 +0000 (23:13 +0000)]
Add:

>   partial page writes [wal]

21 years agoAdd:
Bruce Momjian [Mon, 26 Aug 2002 23:02:21 +0000 (23:02 +0000)]
Add:

> * Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT

21 years agoAdd units to postgresql.conf file.
Bruce Momjian [Mon, 26 Aug 2002 22:23:07 +0000 (22:23 +0000)]
Add units to postgresql.conf file.

21 years agoRemove:
Bruce Momjian [Mon, 26 Aug 2002 22:02:20 +0000 (22:02 +0000)]
Remove:

<  o Add plsh server-side shell language (Peter E)

21 years ago*** empty log message ***
Bruce Momjian [Mon, 26 Aug 2002 22:01:50 +0000 (22:01 +0000)]
*** empty log message ***

21 years agoAdd to selfjoin DELETE todo.
Bruce Momjian [Mon, 26 Aug 2002 21:52:00 +0000 (21:52 +0000)]
Add to selfjoin DELETE todo.

21 years agoAdd:
Bruce Momjian [Mon, 26 Aug 2002 21:35:32 +0000 (21:35 +0000)]
Add:

> * Allow DELETE to handle table aliases for self-joins [delete]

21 years agoAdd delete selfjoin item.
Bruce Momjian [Mon, 26 Aug 2002 21:35:01 +0000 (21:35 +0000)]
Add delete selfjoin item.

21 years agoAdd info on disabled triggers.
Bruce Momjian [Mon, 26 Aug 2002 20:03:10 +0000 (20:03 +0000)]
Add info on disabled triggers.

21 years agoAdd:
Bruce Momjian [Mon, 26 Aug 2002 20:02:45 +0000 (20:02 +0000)]
Add:

> * Allow triggers to be disabled [trigger]

21 years agoIncrease WIDTH_THRESHOLD from 256 to 1K. This addresses recent observation
Tom Lane [Mon, 26 Aug 2002 18:45:57 +0000 (18:45 +0000)]
Increase WIDTH_THRESHOLD from 256 to 1K.  This addresses recent observation
that ANALYZE would not gather any stats for a CHAR(255) column.  I still
think a width threshold is appropriate for the reasons mentioned in the
code, but we can loosen it at least.

21 years agoModify array operations to include array's element type OID in the
Tom Lane [Mon, 26 Aug 2002 17:54:02 +0000 (17:54 +0000)]
Modify array operations to include array's element type OID in the
array header, and to compute sizing and alignment of array elements
the same way normal tuple access operations do --- viz, using the
tupmacs.h macros att_addlength and att_align.  This makes the world
safe for arrays of cstrings or intervals, and should make it much
easier to write array-type-polymorphic functions; as examples see
the cleanups of array_out and contrib/array_iterator.  By Joe Conway
and Tom Lane.

21 years agoAdd 'return' file.
Bruce Momjian [Mon, 26 Aug 2002 17:40:27 +0000 (17:40 +0000)]
Add 'return' file.

21 years agoAdd return tuple count item to TODO.
Bruce Momjian [Mon, 26 Aug 2002 17:40:00 +0000 (17:40 +0000)]
Add return tuple count item to TODO.

21 years agoAdd:
Bruce Momjian [Mon, 26 Aug 2002 17:39:31 +0000 (17:39 +0000)]
Add:

> * Return proper effected tuple count from complex commands [return]

21 years agoAdd anther sequential scan email.
Bruce Momjian [Mon, 26 Aug 2002 17:14:29 +0000 (17:14 +0000)]
Add anther sequential scan email.

21 years agoAdd mention of 1 terrabyte databases.
Bruce Momjian [Mon, 26 Aug 2002 01:05:43 +0000 (01:05 +0000)]
Add mention of 1 terrabyte databases.

21 years ago*** empty log message ***
Bruce Momjian [Mon, 26 Aug 2002 01:04:44 +0000 (01:04 +0000)]
*** empty log message ***

21 years agoAdd raw file discussion to performance TODO.detail.
Bruce Momjian [Mon, 26 Aug 2002 01:04:13 +0000 (01:04 +0000)]
Add raw file discussion to performance TODO.detail.

21 years agoDone:
Bruce Momjian [Mon, 26 Aug 2002 00:52:40 +0000 (00:52 +0000)]
Done:

> * -Disallow TRUNCATE on tables that are involved in referential constraints

21 years agoAdd to tablespaces discussion.
Bruce Momjian [Mon, 26 Aug 2002 00:22:53 +0000 (00:22 +0000)]
Add to tablespaces discussion.

21 years agoAdd to tablespaces file.
Bruce Momjian [Mon, 26 Aug 2002 00:19:33 +0000 (00:19 +0000)]
Add to tablespaces file.

21 years agoAdd Bob Devine's name to the optimizer README.
Bruce Momjian [Sun, 25 Aug 2002 22:39:37 +0000 (22:39 +0000)]
Add Bob Devine's name to the optimizer README.

21 years agoAdd file describing error message format.
Bruce Momjian [Sun, 25 Aug 2002 20:36:14 +0000 (20:36 +0000)]
Add file describing error message format.

21 years agoAdd:
Bruce Momjian [Sun, 25 Aug 2002 20:30:30 +0000 (20:30 +0000)]
Add:

> * Make error messages more consistent [error]

21 years agoClean up comments to be careful about the distinction between variable-
Tom Lane [Sun, 25 Aug 2002 17:20:01 +0000 (17:20 +0000)]
Clean up comments to be careful about the distinction between variable-
width types and varlena types, since with the introduction of CSTRING as
a more-or-less-real type, these concepts aren't identical.  I've tried to
use varlena consistently to denote datatypes with typlen = -1, ie, they
have a length word and are potentially TOASTable; while the term variable
width covers both varlena and cstring (and, perhaps, someday other types
with other rules for computing the actual width).  No code changes in this
commit except for renaming a couple macros.

21 years agoUpdate docs for 7.2.2 release info.
Bruce Momjian [Sun, 25 Aug 2002 14:34:24 +0000 (14:34 +0000)]
Update docs for 7.2.2 release info.

21 years agoUpdate Japanese FAQ, from Jun Kuwamura
Bruce Momjian [Sun, 25 Aug 2002 12:58:44 +0000 (12:58 +0000)]
Update Japanese FAQ, from Jun Kuwamura

21 years agoThe cstring datatype can now be copied, passed around, etc. The typlen
Tom Lane [Sat, 24 Aug 2002 15:00:47 +0000 (15:00 +0000)]
The cstring datatype can now be copied, passed around, etc.  The typlen
value '-2' is used to indicate a variable-width type whose width is
computed as strlen(datum)+1.  Everything that looks at typlen is updated
except for array support, which Joe Conway is working on; at the moment
it wouldn't work to try to create an array of cstring.

21 years agoDone:
Bruce Momjian [Sat, 24 Aug 2002 11:24:58 +0000 (11:24 +0000)]
Done:

> * -SELECT cash_out(2) crashes because of opaque

21 years agoEnhancements to how queries with bind values are stored internally and sent to
Barry Lind [Fri, 23 Aug 2002 20:45:49 +0000 (20:45 +0000)]
Enhancements to how queries with bind values are stored internally and sent to
the server.  Previously we allocated a new String object for the entire final
query we were sending to the database.  If you had a big query, or especially
if you had large bind values you ended up with essentially two copies in memory.
This change will reuse the existing objects and therefore should take 1/2 the
memory it does today for a given query.  This restructuring will also allow
in the future the ability to stream bytea data to the server instead of the current approach of pulling it all into memory.
I also fixed a test that was failing on a 7.2 database.
Also renamed some internal variables and some minor cleanup.

 Modified Files:
  jdbc/org/postgresql/core/QueryExecutor.java
  jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
  jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
  jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
  jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
  jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java

21 years agoFurther cleanup around the edges of OPAQUE/pseudotype changes. Correct
Tom Lane [Fri, 23 Aug 2002 16:41:38 +0000 (16:41 +0000)]
Further cleanup around the edges of OPAQUE/pseudotype changes.  Correct
the declarations of some index access method support functions.  Support
SQL functions returning VOID.

21 years agoAdapt for SRF(Set Returning Function).
Tatsuo Ishii [Fri, 23 Aug 2002 08:19:49 +0000 (08:19 +0000)]
Adapt for SRF(Set Returning Function).

21 years agoNot sure how I fixed it the first time, but here's a fix for another
Bruce Momjian [Fri, 23 Aug 2002 04:27:19 +0000 (04:27 +0000)]
Not sure how I fixed it the first time, but here's a fix for another
instance in which the docs mention that 'NAMEDATALEN == 32".

Neil Conway

21 years agoAdd space.k>
Bruce Momjian [Fri, 23 Aug 2002 03:10:44 +0000 (03:10 +0000)]
Add space.k>

21 years agoAdd:
Bruce Momjian [Fri, 23 Aug 2002 03:10:15 +0000 (03:10 +0000)]
Add:

> * Allow xlog directory location to be specified during initdb, perhaps
>   using symlinks

21 years agoPatch resolve ERROR problem for non-goog query_txt.
Bruce Momjian [Fri, 23 Aug 2002 02:56:36 +0000 (02:56 +0000)]
Patch resolve ERROR problem for non-goog query_txt.

Teodor Sigaev

21 years agoThis patch updates the CREATE OPERATOR sgml docs for the new default
Bruce Momjian [Fri, 23 Aug 2002 02:54:18 +0000 (02:54 +0000)]
This patch updates the CREATE OPERATOR sgml docs for the new default
settings of NAMEDATALEN. I looked through the docs for other
references to NAMEDATALEN, but this is the only one I could find.

Neil Conway

21 years agoUpdate Russian FAQ.
Bruce Momjian [Fri, 23 Aug 2002 02:53:20 +0000 (02:53 +0000)]
Update Russian FAQ.

21 years agoAdd:
Bruce Momjian [Fri, 23 Aug 2002 02:46:39 +0000 (02:46 +0000)]
Add:

> * Add GUC parameter to print queries that generate errors

21 years agoVery minor copy-editing.
Tom Lane [Fri, 23 Aug 2002 01:28:17 +0000 (01:28 +0000)]
Very minor copy-editing.

21 years agoAdd note that explains that \df omits functions it thinks are I/O functions.
Tom Lane [Fri, 23 Aug 2002 01:27:44 +0000 (01:27 +0000)]
Add note that explains that \df omits functions it thinks are I/O functions.

21 years agoUpdate reference to value of NAMEDATALEN. Someone needs to troll the
Tom Lane [Fri, 23 Aug 2002 00:33:24 +0000 (00:33 +0000)]
Update reference to value of NAMEDATALEN.  Someone needs to troll the
docs and find the other obsolete statements that no doubt lurk.

21 years agoUpdate contrib regression tests for OPAQUE datatype changes.
Tom Lane [Fri, 23 Aug 2002 00:04:52 +0000 (00:04 +0000)]
Update contrib regression tests for OPAQUE datatype changes.

21 years agoSince the plpgsql test has been part of the standard regression tests
Tom Lane [Thu, 22 Aug 2002 23:33:43 +0000 (23:33 +0000)]
Since the plpgsql test has been part of the standard regression tests
for a good long while, I see no reason to maintain this original copy.

21 years agoTranspose info from src/pl/plpgsql/test/README into standard regression test file.
Tom Lane [Thu, 22 Aug 2002 23:31:48 +0000 (23:31 +0000)]
Transpose info from src/pl/plpgsql/test/README into standard regression test file.

21 years agoMark 7.2.2 as newest release.
Bruce Momjian [Thu, 22 Aug 2002 23:20:52 +0000 (23:20 +0000)]
Mark 7.2.2 as newest release.

21 years agoUpdate FAQ.
Bruce Momjian [Thu, 22 Aug 2002 23:20:25 +0000 (23:20 +0000)]
Update FAQ.

21 years agoRemove all traces of the ODBC driver, which is now on GBorg as the psqlodbc
Marc G. Fournier [Thu, 22 Aug 2002 22:43:14 +0000 (22:43 +0000)]
Remove all traces of the ODBC driver, which is now on GBorg as the psqlodbc
project ...

21 years agoFix bit rot in pg_dump's ability to dump from 7.2 and 7.1 servers.
Tom Lane [Thu, 22 Aug 2002 21:35:50 +0000 (21:35 +0000)]
Fix bit rot in pg_dump's ability to dump from 7.2 and 7.1 servers.

21 years agoFixed-size buffer in dumpClasses is not big enough anymore given the
Tom Lane [Thu, 22 Aug 2002 21:29:34 +0000 (21:29 +0000)]
Fixed-size buffer in dumpClasses is not big enough anymore given the
addition of a column list clause to the COPY command.  Spotted by
Martin Renters.

21 years agoImprove wording of upgrade section.
Bruce Momjian [Thu, 22 Aug 2002 15:31:07 +0000 (15:31 +0000)]
Improve wording of upgrade section.

21 years agoCode review for recent TRUNCATE changes. Tighten relation-kind check,
Tom Lane [Thu, 22 Aug 2002 14:23:36 +0000 (14:23 +0000)]
Code review for recent TRUNCATE changes.  Tighten relation-kind check,
tighten foreign-key check (a self-reference should not prevent TRUNCATE),
improve error message, cause a relation's TOAST table to be truncated
along with the relation.

21 years agoCommit updated repeat() patch, from Neil Conway
Bruce Momjian [Thu, 22 Aug 2002 05:05:19 +0000 (05:05 +0000)]
Commit updated repeat() patch, from  Neil Conway

21 years agoFix for documention:
Bruce Momjian [Thu, 22 Aug 2002 04:56:44 +0000 (04:56 +0000)]
Fix for documention:

>>" It's also possible to select no escape character by writing ESCAPE ''.
>>In this case there is no way to turn off the special meaning of
>>underscore and percent signs in the pattern."

Joe Conway

21 years agoThis patch should fix the problem. Doesn't include my previous patch
Bruce Momjian [Thu, 22 Aug 2002 04:55:05 +0000 (04:55 +0000)]
This patch should fix the problem. Doesn't include my previous patch
for repeat(). Again, somewhat off-the-cuff, so I might have missed
something...

test=# select lpad('xxxxx',1431655765,'yyyyyyyyyyyyyyyy');
ERROR:  Requested length too large
test=# select rpad('xxxxx',1431655765,'yyyyyyyyyyyyyyyy');
ERROR:  Requested length too large

(That's on a Unicode DB, haven't tested other encodings but AFAICT
this fix should still work.)

Neil Conway

21 years agorepeat() fix:
Bruce Momjian [Thu, 22 Aug 2002 04:54:20 +0000 (04:54 +0000)]
repeat() fix:

> Neil Conway <neilc@samurai.com> writes:
> > +   /* Check for integer overflow */
> > +   if (tlen / slen != count)
> > +           elog(ERROR, "Requested buffer is too large.");
>
> What about slen == 0?

Good point -- that wouldn't cause incorrect results or a security
problem, but it would reject input that we should really accept.

Revised patch is attached.

Neil Conway

21 years ago> > I had great difficulty in finding how to change the search path, so here
Bruce Momjian [Thu, 22 Aug 2002 04:52:17 +0000 (04:52 +0000)]
> > I had great difficulty in finding how to change the search path, so here
> > is a patch to add some cross-referencing.

Oliver Elphick

21 years ago# Disallow TRUNCATE on tables that are involved in referential
Bruce Momjian [Thu, 22 Aug 2002 04:51:06 +0000 (04:51 +0000)]
# Disallow TRUNCATE on tables that are involved in referential
constraints

The issue with finding and removing foreign key constraints is no longer
an issue, so please apply the attached.

It does NOT check for rules or on delete triggers (old style foreign
keys) as those are difficult to deal with (remove, truncate, re-add).

Rod Taylor