Commit Graph

13505 Commits

Author SHA1 Message Date
Tom Lane 976246cc7e 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.
2002-08-24 15:00:47 +00:00
Bruce Momjian cf4d885c67 Done:
> * -SELECT cash_out(2) crashes because of opaque
2002-08-24 11:24:58 +00:00
Barry Lind fe2dec75a9 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
2002-08-23 20:45:49 +00:00
Tom Lane a2a3192802 Further cleanup around the edges of OPAQUE/pseudotype changes. Correct
the declarations of some index access method support functions.  Support
SQL functions returning VOID.
2002-08-23 16:41:38 +00:00
Tatsuo Ishii cf7ee638a7 Adapt for SRF(Set Returning Function). 2002-08-23 08:19:49 +00:00
Bruce Momjian 6415ffe7af 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
2002-08-23 04:27:19 +00:00
Bruce Momjian 77072f891b Add space.k> 2002-08-23 03:10:44 +00:00
Bruce Momjian ec2c71ad39 Add:
> * Allow xlog directory location to be specified during initdb, perhaps
>   using symlinks
2002-08-23 03:10:15 +00:00
Bruce Momjian 52ee800ed3 Patch resolve ERROR problem for non-goog query_txt.
Teodor Sigaev
2002-08-23 02:56:36 +00:00
Bruce Momjian 2e0e430659 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
2002-08-23 02:54:18 +00:00
Bruce Momjian b5ccfc216a Update Russian FAQ. 2002-08-23 02:53:20 +00:00
Bruce Momjian 3d801dbb1c Add:
> * Add GUC parameter to print queries that generate errors
2002-08-23 02:46:39 +00:00
Tom Lane ebddac07a9 Very minor copy-editing. 2002-08-23 01:28:17 +00:00
Tom Lane 6bd8a1c2d3 Add note that explains that \df omits functions it thinks are I/O functions. 2002-08-23 01:27:44 +00:00
Tom Lane 41ff800bb2 Update reference to value of NAMEDATALEN. Someone needs to troll the
docs and find the other obsolete statements that no doubt lurk.
2002-08-23 00:33:24 +00:00
Tom Lane ceb9e60e8e Update contrib regression tests for OPAQUE datatype changes. 2002-08-23 00:04:52 +00:00
Tom Lane 14a760882a 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.
2002-08-22 23:33:43 +00:00
Tom Lane 40faa4a590 Transpose info from src/pl/plpgsql/test/README into standard regression test file. 2002-08-22 23:31:48 +00:00
Bruce Momjian ec35e4592d Mark 7.2.2 as newest release. 2002-08-22 23:20:52 +00:00
Bruce Momjian 0540b2b59d Update FAQ. 2002-08-22 23:20:25 +00:00
Marc G. Fournier 5a303f878e Remove all traces of the ODBC driver, which is now on GBorg as the psqlodbc
project ...
2002-08-22 22:43:14 +00:00
Tom Lane 03a7625a3a Fix bit rot in pg_dump's ability to dump from 7.2 and 7.1 servers. 2002-08-22 21:35:50 +00:00
Tom Lane 19b3c55261 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.
2002-08-22 21:29:34 +00:00
Bruce Momjian 5530b0c666 Improve wording of upgrade section. 2002-08-22 15:31:07 +00:00
Tom Lane 0f1112923c 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.
2002-08-22 14:23:36 +00:00
Bruce Momjian b4f24fed7a Commit updated repeat() patch, from Neil Conway 2002-08-22 05:05:19 +00:00
Bruce Momjian 090884bed3 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
2002-08-22 04:56:44 +00:00
Bruce Momjian d86dee3edd 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
2002-08-22 04:55:05 +00:00
Bruce Momjian cbe733d752 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
2002-08-22 04:54:20 +00:00
Bruce Momjian c76f5aa530 > > I had great difficulty in finding how to change the search path, so here
> > is a patch to add some cross-referencing.

Oliver Elphick
2002-08-22 04:52:17 +00:00
Bruce Momjian 47b37a6bfa # 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
2002-08-22 04:51:06 +00:00
Bruce Momjian dac22ee43c Add:
> * Allow bytea to handle LIKE with non-TEXT patterns
2002-08-22 04:47:31 +00:00
Bruce Momjian a334ae3f22 As suggested by Tom, this patch restricts the right-hand argument of
bytealike to TEXT.

This leaves like_escape_bytea() without anything to do, but I left it in
place in anticipation of the eventual bytea pattern selectivity
functions. If there is agreement that this would be the best long term
solution, I'll take it as a TODO for 7.4.

Joe Conway
2002-08-22 04:45:11 +00:00
Bruce Momjian c7e7672937 Oops, we got duplicate oids from patches again; pick a unique one. 2002-08-22 04:41:06 +00:00
Bruce Momjian 89260124db Add:
replace(string, from, to)
   -- replaces all occurrences of "from" in "string" to "to"
split(string, fldsep, column)
   -- splits "string" on "fldsep" and returns "column" number piece
to_hex(int32_num) & to_hex(int64_num)
   -- takes integer number and returns as hex string

Joe Conway
2002-08-22 03:24:01 +00:00
Bruce Momjian f6353c6ee4 Remove libpq++ SGML documentation. 2002-08-22 03:17:38 +00:00
Bruce Momjian ff1793f036 Remove erroneous character from Makefile due to editor error. 2002-08-22 02:18:45 +00:00
Marc G. Fournier da4683fbe1 Okay, libpq++ is moved to GBorg, and all traces of it have been removed
from the core repository ... I haven't *moved* the libpq++ files out of the
tree, mainly as we want to keep them in place for past branches ...

Peter, I think I've covered all the files I need, and re-ran autoconf to make
sure the configure file is in place properly ...
2002-08-22 00:15:14 +00:00
Tom Lane b663f3443b Add a bunch of pseudo-types to replace the behavior formerly associated
with OPAQUE, as per recent pghackers discussion.  I still want to do some
more work on the 'cstring' pseudo-type, but I'm going to commit the bulk
of the changes now before the tree starts shifting under me ...
2002-08-22 00:01:51 +00:00
Peter Eisentraut 606c9b9d4f Add --help and --version options. Message cleanup. NLS. 2002-08-21 22:24:34 +00:00
Bruce Momjian d46e3dc00f Changes made so new conversion Makefiles will build out of the source tree. 2002-08-21 21:33:55 +00:00
Peter Eisentraut 41c92ace2f Move PO files into subdirectories separate from the source code. 2002-08-21 20:42:27 +00:00
Peter Eisentraut b7a5917a61 Add sys/types.h to common includes. 2002-08-21 17:20:58 +00:00
Bruce Momjian 0f9f2feee4 Fix bad markup detected by Alvaro Herrera 2002-08-21 16:08:19 +00:00
Bruce Momjian cbe19208ee Fix markup, Alvaro Herrera. 2002-08-21 05:25:49 +00:00
Tom Lane 091ff0931d Use a non-duplicate OID for pg_lock_status. 2002-08-20 19:23:07 +00:00
Peter Eisentraut 6faf8024fa Enable large file support.
Use off_t and size_t in pg_dump to handle file offset arithmetic correctly.
2002-08-20 17:54:45 +00:00
Tom Lane 0d6f613817 Increase buffer size in cash_words(). Pure paranoia; I don't think the
code is broken, but any small change in the output format might overrun
the buffer with the old size.
2002-08-20 16:46:29 +00:00
Tom Lane 9318fa8541 Update expected files for recent changes of domain tests.
From Rod Taylor.
2002-08-20 16:37:03 +00:00
Bruce Momjian ebe1be1321 This patch improves the behavior of FOUND in PL/PgSQL. In Oracle,
FOUND is set whenever a SELECT INTO returns > 0 rows, *or* when an
INSERT, UPDATE, or DELETE affects > 0 rows. We implemented the first
part of this behavior, but not the second.

I also improved the documentation on the various situations in which
FOUND can be set (excluding inside FOR loops, which I still need to
think about), and added some regression tests for this behavior.

Neil Conway
2002-08-20 05:28:24 +00:00