| Commit message (Collapse) | Author | Age |
... | |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
the declarations of some index access method support functions. Support
SQL functions returning VOID.
|
|
|
|
| |
for a good long while, I see no reason to maintain this original copy.
|
|
|
|
| |
file.
|
|
|
|
| |
project ...
|
| |
|
|
|
|
|
| |
addition of a column list clause to the COPY command. Spotted by
Martin Renters.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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 ...
|
|
|
|
|
|
| |
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 ...
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Use off_t and size_t in pg_dump to handle file offset arithmetic correctly.
|
|
|
|
|
| |
code is broken, but any small change in the output format might overrun
the buffer with the old size.
|
|
|
|
| |
From Rod Taylor.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
- don't fail type-sanity checks if a domain exists
Rod Taylor
|
|
|
|
| |
Christopher Kings-Lynne
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Quick system function to pull out the current database.
>
> I've used this a number of times to allow stored procedures to find out
> where they are. Especially useful for those that do logging or hit a
> remote server.
>
> It's called current_database() to match with current_user().
It's also a necessity for an informational schema. The catalog
(database) name is required in a number of places.
Rod Taylor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for the last two releases.
Modified Files:
jdbc/org/postgresql/Driver.java.in
jdbc/org/postgresql/PG_Stream.java
Removed Files:
jdbc/org/postgresql/core/BytePoolDim1.java
jdbc/org/postgresql/core/BytePoolDim2.java
jdbc/org/postgresql/core/MemoryPool.java
jdbc/org/postgresql/core/ObjectPool.java
jdbc/org/postgresql/core/SimpleObjectPool.java
|
|
|
|
|
| |
cause SERIAL column declaration not to imply UNIQUE, so that this can be
done without creating an extra index.
|
|
|
|
|
|
|
|
|
|
| |
latent wrong-struct-type bugs and makes the coding style more uniform,
since the majority of places working with lists of column names were
already using Strings not Idents. While at it, remove vestigial
support for Stream node type, and otherwise-unreferenced nodes.h entries
for T_TupleCount and T_BaseNode.
NB: full recompile is recommended due to changes of Node type numbers.
This shouldn't force an initdb though.
|
|
|
|
| |
It pfree() wrong pointer.
|
|
|
|
| |
required changes to copyfuncs/equalfuncs.
|
|
|
|
|
| |
been missing forever; surprising it wasn't noticed before. The other
additions are, um, sloppiness in certain recent feature additions.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
when two equal() targetlist items were to be added to an ORDER BY or
DISTINCT list. Although indeed this would make sorting fractionally
faster by sometimes saving a comparison, it confuses the heck out of
later stages of processing, because it makes it look like the user
wrote DISTINCT ON rather than DISTINCT. Bug reported by joe@piscitella.com.
|
|
|
|
| |
master and slave tables.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The -n and -N options were removed. Quoting is now smart enough to
supply quotes if and only if necessary.
Numerical types are now printed without quotes, except in cases of
special values such as NaN.
Boolean values printed as true and false.
Most string literals now do not escape whitespace characters (newlines,
etc.) for portability.
SET SESSION AUTHORIZATION argument is a string literal, to follow SQL.
Made commands output by pg_dump use consistent spacing and indentation.
|