OSDN Git Service
Tom Lane [Mon, 13 Mar 2000 01:54:07 +0000 (01:54 +0000)]
Remove unnecessary limitations on lengths of bpchar and varchar constants.
Since we detect oversize tuples elsewhere, I see no reason not to allow
string constants that are 'too long' --- after all, they might never get
stored in a tuple at all.
Tom Lane [Mon, 13 Mar 2000 01:52:06 +0000 (01:52 +0000)]
Performance improvement for lexing long strings: increase flex's
YY_READ_BUF_SIZE, which turns out to have nothing to do with buffer size.
It's just a totally arbitrary upper limit on how much data myinput() is
asked for at one time.
Tom Lane [Sun, 12 Mar 2000 20:09:41 +0000 (20:09 +0000)]
Somehow, the variant NATIONAL CHAR [ VARYING ] was missing from the
set of SQL-standard type names that we accept.
Tom Lane [Sun, 12 Mar 2000 19:32:06 +0000 (19:32 +0000)]
Fix performance bug in constant-expression simplifier. After finding
that the inputs to a given operator can be recursively simplified to
constants, it was evaluating the operator using the op's *original*
(unsimplified) arg list, so that any subexpressions had to be evaluated
again. A constant subexpression at depth N got evaluated N times.
Probably not very important in practical situations, but it made us look
real slow in MySQL's 'crashme' test...
Tom Lane [Sun, 12 Mar 2000 18:57:05 +0000 (18:57 +0000)]
Fix performance problem in fireRIRonSubselect: with nested subqueries,
fireRIRonSubselect was invoked twice at each subselect, leading to an
exponential amount of wasted effort.
Tom Lane [Sun, 12 Mar 2000 00:39:52 +0000 (00:39 +0000)]
Clean up grammar's handling of NULL in expressions: a_expr_or_null is
gone, replaced by plain a_expr. The few places where we needed to
distinguish NULL from a_expr are now handled by tests inside the actions
rather than by separate productions. This allows us to accept queries
like 'SELECT 1 + NULL' without requiring parentheses around the NULL.
Tom Lane [Sat, 11 Mar 2000 23:53:41 +0000 (23:53 +0000)]
Further tweaking of logic that decides when to materialize an uncorrelated
subplan: do it if subplan has subplans itself, and always do it if the
subplan is an indexscan. (I originally set it to materialize an indexscan
only if the indexqual is fairly selective, but I dunno what I was
thinking ... an unselective indexscan is still expensive ...)
Tom Lane [Sat, 11 Mar 2000 23:19:50 +0000 (23:19 +0000)]
Make TypeCategory think that NAME is a member of type
category STRING. Also, if UNKNOWNOID is passed in, return UNKNOWN_TYPE
not USER_TYPE.
Tom Lane [Sat, 11 Mar 2000 23:17:47 +0000 (23:17 +0000)]
Further fixes for bogus list-slinging, scribbling on input, etc in type
coercion code. I'm beginning to wonder why we have separate candidate
selection routines for functions, operators, and aggregates --- shouldn't
this code all be unified? But meanwhile,
SELECT 'a' LIKE 'a';
finally works; the code for dealing with unknown input types for operators
was pretty busted.
Peter Eisentraut [Sat, 11 Mar 2000 13:56:24 +0000 (13:56 +0000)]
Karel Zakr's revised patch to fix psql prompt for local host connections.
Tom Lane [Sat, 11 Mar 2000 06:19:00 +0000 (06:19 +0000)]
exec_simple_check_plan() must not allow a plan having initPlans or
subPlans to be considered 'simple'. This fixes reported problem with
'return exists (select 1 from foo);' in plpgsql function.
Tom Lane [Sat, 11 Mar 2000 05:14:06 +0000 (05:14 +0000)]
Finish cleaning up backend's handling of /* ... */ and -- comments,
per pghackers discussion around 20-Feb. Also add specific error messages
for unterminated comments and unterminated quoted strings. These things
are nonissues for input coming from psql, but they do matter for input
coming from other front ends.
Tom Lane [Sat, 11 Mar 2000 03:09:28 +0000 (03:09 +0000)]
Update libpq documentation for PQconndefaults() change. Add section
about thread-safeness of the library.
Tom Lane [Sat, 11 Mar 2000 03:08:37 +0000 (03:08 +0000)]
Change PQconndefaults() to return a malloc'd array, instead of a static
array. This allows processing of conninfo strings to be made thread-safe,
at the cost of a small memory leak in applications that use
PQconndefaults() and are not updated to free the returned array via
the new PQconninfoFree() function. But PQconndefaults() is probably not
used very much, so this seems like a good compromise.
Tom Lane [Sat, 11 Mar 2000 02:57:24 +0000 (02:57 +0000)]
Update perl5's self-test for changed spelling of connection failure
error message.
Peter Eisentraut [Fri, 10 Mar 2000 22:32:59 +0000 (22:32 +0000)]
Okay, this time I *really* added the bug reporting guidelines.
Marc G. Fournier [Fri, 10 Mar 2000 21:46:27 +0000 (21:46 +0000)]
make sure that cvslog is workign right ... no changes but to remove a blank
line
Michael Meskes [Fri, 10 Mar 2000 06:48:46 +0000 (06:48 +0000)]
*** empty log message ***
Bruce Momjian [Thu, 9 Mar 2000 23:22:18 +0000 (23:22 +0000)]
Update TODO list.
Bruce Momjian [Thu, 9 Mar 2000 17:39:34 +0000 (17:39 +0000)]
Remove SHOW after datestyle reset.
Bruce Momjian [Thu, 9 Mar 2000 17:07:32 +0000 (17:07 +0000)]
Fix for bsdi 4.1 shared libraries.
Peter Eisentraut [Thu, 9 Mar 2000 12:00:08 +0000 (12:00 +0000)]
Added bug reporting guidelines
Some corrections in installation procedure
Michael Meskes [Thu, 9 Mar 2000 09:17:16 +0000 (09:17 +0000)]
*** empty log message ***
Tom Lane [Thu, 9 Mar 2000 05:15:33 +0000 (05:15 +0000)]
Redo permissions-checking code so that it does the right thing at APPEND
nodes. The former version failed to check permissions of relations that
were referenced in second and later clauses of UNIONs, and it did not
check permissions of tables referenced via inheritance.
Hiroshi Inoue [Thu, 9 Mar 2000 05:00:26 +0000 (05:00 +0000)]
Trial implementation of ALTER DROP COLUMN.
They are #ifdef'd.
Add -D_DROP_COLUMN_HACK__ compile option
to evaluate it.
Tom Lane [Wed, 8 Mar 2000 23:42:58 +0000 (23:42 +0000)]
Extend #ifdef CLOBBER_FREED_MEMORY debugging option so that memory
freed wholesale by AllocSetReset() is overwritten too.
Tom Lane [Wed, 8 Mar 2000 23:41:00 +0000 (23:41 +0000)]
Repair access-to-already-freed-memory error recently introduced into
VACUUM.
Tom Lane [Wed, 8 Mar 2000 22:03:12 +0000 (22:03 +0000)]
Fix ==-instead-of-= typo that gcc does its level best to point out.
Isn't anybody paying attention to warnings around here?
Tom Lane [Wed, 8 Mar 2000 22:00:19 +0000 (22:00 +0000)]
Clean up gmake warning caused by recent NetBSD patch. <grumble>
Bruce Momjian [Wed, 8 Mar 2000 19:36:19 +0000 (19:36 +0000)]
Hi,
The regression test script runcheck.sh doesn't seem able to
handle the blank line on the end of the resultmap file.
Here's a patch to remove it!!
Keith.
Bruce Momjian [Wed, 8 Mar 2000 01:58:46 +0000 (01:58 +0000)]
I've made a diff against the 7.0beta1 tree that accomplishes several things:
1) adds NetBSD shared lib support on both ELF and a.out platforms
2) replaces "-L$(LIBPQDIR) -lpq" with "$(LIBPQ)" defined in
Makefile.global. This makes it much easier to build stuff in
the source tree after you've already installed the libraries.
3) adds TEMPLATEDIR in Makefile.global that indicates where the
database templates are stored. This separates the template files
from real libraries that are installed in $(LIBDIR).
4) changes include order of <readline/readline.h> and <readline.h>.
The latest GNU readline installs its headers under a readline
subdirectory.
In addition to applying the patch below the following files need to be copied:
backend/port/dynloader:
bsd.h -> netbsd.h
bsd.c -> netbsd.c
include/port:
bsd.h -> netbsd.h
makefiles:
Makefile.bsd -> Makefile.netbsd
It would be great to see this incorporated into the source tree before
the 7.0 release is cut.
Thanks!
-- Johnny C. Lam <lamj@stat.cmu.edu>
Bruce Momjian [Wed, 8 Mar 2000 01:46:47 +0000 (01:46 +0000)]
Bruce and all:
Here's a patch to fix the " '.' not allowed in db path" problem I ran into.
I removed '.' from the set of illegial characters, but added backtick. I also
included an explicit test for attempting include a reference to a parent dir.
How that?
Ross
Bruce Momjian [Wed, 8 Mar 2000 01:44:37 +0000 (01:44 +0000)]
Reversed out inet patch.
Bruce Momjian [Wed, 8 Mar 2000 01:38:59 +0000 (01:38 +0000)]
Hi Peter,
I try change prompt in the psql, but it is set '.' (as '%m') for
non-TCP/IP
connection. This small patch try use uname() information for non-TCP/IP
instead '.'.
Karel
Bruce Momjian [Wed, 8 Mar 2000 01:34:41 +0000 (01:34 +0000)]
Hi,
the to_char() source code is large, here are regression tests for
numeric/timestamp/int8 part. It is probably enough test for formatting
code in the formatting.c module. The others (float4/float8/int4) types
share this formatting code and eventual bugs for these types aren't
few probable.
Patch fix timestamp_to_char() for infinity/invalid timestamp too.
Karel
Bruce Momjian [Tue, 7 Mar 2000 23:58:38 +0000 (23:58 +0000)]
Protects you from coredumps if you do eg. str::int4 where str is a text
field. cf. Tom Lane's <19021.
950544016@sss.pgh.pa.us> 14 Feb hackers
message.
Cheers,
Patrick Welche
Bruce Momjian [Tue, 7 Mar 2000 23:49:31 +0000 (23:49 +0000)]
I've recently written to pgsql-ports about a problem with PG7.0 on NT
(Subj: [PORTS] initdb problem on NT with 7.0). Since nobody helped me,
I had to find out the reson. The difference between NT and Linux (for
instance) is that "open( path, O_RDWR );" opens a file in text mode. So
sometime less block can be read than required.
I suggest a following patch. BTW the situation appeared before, see
hba.c, pqcomm.c and others.
Alexei Zakharov
Tom Lane [Tue, 7 Mar 2000 23:30:53 +0000 (23:30 +0000)]
Someone (probably me) forgot about handling of typecasts applied to
parameters.
Bruce Momjian [Tue, 7 Mar 2000 23:09:34 +0000 (23:09 +0000)]
Fix problems with pg_upgrade found by Kardos, Dr. Andrea
Bruce Momjian [Tue, 7 Mar 2000 23:01:43 +0000 (23:01 +0000)]
Sorting for the inet data type randomly returns the wrong result
when you have networks with the same prefix, but different netmasks.
This is due to the fact that occassionally there is random
(uninitialized?)
data in the extra bits past the point where the netmask cares about
them.
ie (real data from a real live database):
10.0/10 ==
00001010.
00100000.
00100000.
00011000
10.0/11 ==
00001010.
00000000.
00000000.
00000000
^ Bad data, normally never seen
The v4bitncmp() function was only taking one bit length argument so
it would determine that the networks were different, even though
they really aren't (and the netmask test wouldn't be used). This
ONLY happens if the tuple with the longer bit length is used as the
ip_bits() for the v4bitncmp call AND there happens to be junk data
in place in the shorter tuple. Odd and random, but I saw it happen
a couple times so...
Ryan Mooney
Michael Meskes [Tue, 7 Mar 2000 15:11:03 +0000 (15:11 +0000)]
*** empty log message ***
Tatsuo Ishii [Mon, 6 Mar 2000 01:29:54 +0000 (01:29 +0000)]
Add SQL_ASCII encoding test case
Peter Eisentraut [Sun, 5 Mar 2000 14:14:15 +0000 (14:14 +0000)]
Forgot to run autoconf.
(Configure shouldn't really be in CVS ...)
Peter Eisentraut [Sun, 5 Mar 2000 13:30:20 +0000 (13:30 +0000)]
Added configure test for readline's filename_completion_function
Completed psql's \? help
Michael Meskes [Fri, 3 Mar 2000 14:39:26 +0000 (14:39 +0000)]
*** empty log message ***
Michael Meskes [Fri, 3 Mar 2000 13:24:06 +0000 (13:24 +0000)]
*** empty log message ***
Michael Meskes [Fri, 3 Mar 2000 09:56:03 +0000 (09:56 +0000)]
*** empty log message ***
Michael Meskes [Thu, 2 Mar 2000 19:33:59 +0000 (19:33 +0000)]
*** empty log message ***
Michael Meskes [Thu, 2 Mar 2000 12:13:32 +0000 (12:13 +0000)]
*** empty log message ***
Tom Lane [Thu, 2 Mar 2000 04:08:16 +0000 (04:08 +0000)]
Apply a MATERIAL node to the result of an uncorrelated subplan, if it
looks like it will save computation to do so.
Tom Lane [Thu, 2 Mar 2000 04:06:39 +0000 (04:06 +0000)]
Hmm, it seems nodeMaterial has been broken for a good long while;
closing a relcache entry more times than you open it is not cool.
Bruce Momjian [Thu, 2 Mar 2000 02:01:01 +0000 (02:01 +0000)]
Patch for Irix from Mark Dalphin.
Peter Eisentraut [Wed, 1 Mar 2000 21:10:05 +0000 (21:10 +0000)]
More fixes for psql ^C handling, especially during copy. Still doesn't
cope so well with copy to but that will have to wait for the next release.
Also added -X option to prevent reading .psqlrc startup file.
Bruce Momjian [Wed, 1 Mar 2000 19:13:08 +0000 (19:13 +0000)]
New plperl Makefile.
Bruce Momjian [Wed, 1 Mar 2000 19:11:12 +0000 (19:11 +0000)]
Add QNX fixes from Kardos, Dr. Andreas
Tom Lane [Wed, 1 Mar 2000 18:47:43 +0000 (18:47 +0000)]
equalAttr() had its strcmp test backwards :-(
Tom Lane [Wed, 1 Mar 2000 17:14:09 +0000 (17:14 +0000)]
Small performance improvement in comparetup_heap.
Michael Meskes [Wed, 1 Mar 2000 12:49:43 +0000 (12:49 +0000)]
*** empty log message ***
Hiroshi Inoue [Wed, 1 Mar 2000 05:39:24 +0000 (05:39 +0000)]
Change reindex command to work properly with gist/hash/rtree
Tom Lane [Wed, 1 Mar 2000 05:18:20 +0000 (05:18 +0000)]
Simplify parsing of column constraints by treating constraint attributes
as independent clauses in the grammar. analyze.c takes care of putting
the data where it belongs and complaining about invalid combinations.
Also, make TEMP (and TEMPORARY) non-reserved words.
Tatsuo Ishii [Wed, 1 Mar 2000 02:39:46 +0000 (02:39 +0000)]
Remove using puts() to print messages. Instead use TPRINTF.
Jan Wieck [Tue, 29 Feb 2000 12:28:25 +0000 (12:28 +0000)]
Changed execution time of ON <event> RESTRICT referential
integrity triggers to after statement allways. Ignores
deferred state now, closer to SQL3 semantics.
Jan
Bruce Momjian [Mon, 28 Feb 2000 23:32:43 +0000 (23:32 +0000)]
autoconf
Bruce Momjian [Mon, 28 Feb 2000 23:28:41 +0000 (23:28 +0000)]
Update ecpg to use snprintf
Bruce Momjian [Mon, 28 Feb 2000 18:43:07 +0000 (18:43 +0000)]
Update HISTORY file.
Bruce Momjian [Mon, 28 Feb 2000 09:24:47 +0000 (09:24 +0000)]
Update TODO list.
Bruce Momjian [Mon, 28 Feb 2000 08:51:43 +0000 (08:51 +0000)]
Fix comment spacing.
Byron Nikolaidis [Mon, 28 Feb 2000 03:31:36 +0000 (03:31 +0000)]
update to 6.40.0009 and provide WIN32 defines for auto-configured items
such as BLCKSZ and MAXPGPATHLEN?
Bruce Momjian [Mon, 28 Feb 2000 02:21:17 +0000 (02:21 +0000)]
remove extra include.
Byron Nikolaidis [Mon, 28 Feb 2000 00:23:18 +0000 (00:23 +0000)]
missing state transition
Tom Lane [Sun, 27 Feb 2000 21:10:41 +0000 (21:10 +0000)]
Looks like I broke SET variable = DEFAULT awhile ago. Ooops.
Tom Lane [Sun, 27 Feb 2000 21:07:03 +0000 (21:07 +0000)]
Correct bogus syntax in SET example.
Tom Lane [Sun, 27 Feb 2000 19:45:44 +0000 (19:45 +0000)]
Avoid a little bit of unnecessary computation in canonicalize_qual.
Bruce Momjian [Sun, 27 Feb 2000 19:04:06 +0000 (19:04 +0000)]
Update TODO list.
Tom Lane [Sun, 27 Feb 2000 18:54:43 +0000 (18:54 +0000)]
Add lztext to TypeCategory so that lztext OP text cases will work
correctly (the lztext value will be promoted to text automatically).
Tom Lane [Sun, 27 Feb 2000 18:06:28 +0000 (18:06 +0000)]
Jan forgot to increment catversion when adding lztext. Naughty naughty.
Bruce Momjian [Sun, 27 Feb 2000 14:57:16 +0000 (14:57 +0000)]
Update history
Jan Wieck [Sun, 27 Feb 2000 12:02:34 +0000 (12:02 +0000)]
Reactivated LZTEXT data type and changed rule plan- and qual-strings
into lztext.
Jan
Tatsuo Ishii [Sun, 27 Feb 2000 10:21:16 +0000 (10:21 +0000)]
Update expected files due to the psql format change
Tatsuo Ishii [Sun, 27 Feb 2000 10:20:13 +0000 (10:20 +0000)]
Suppress unneccesary message from createdb
Tatsuo Ishii [Sun, 27 Feb 2000 10:15:17 +0000 (10:15 +0000)]
Add SQL_ASCII test case
Tatsuo Ishii [Sun, 27 Feb 2000 10:14:33 +0000 (10:14 +0000)]
Fix multibyte regress results for EUC_CN, EUC_KR and EUC_TW
Tatsuo Ishii [Sun, 27 Feb 2000 10:13:22 +0000 (10:13 +0000)]
Add LinuxPPC mappings
Tom Lane [Sun, 27 Feb 2000 07:44:22 +0000 (07:44 +0000)]
Clean up badly-formatted error messages from pg_connect.
Tom Lane [Sun, 27 Feb 2000 07:31:00 +0000 (07:31 +0000)]
Add Assert() to check for trying to heap_close a relation when the
relcache entry's reference count is zero.
Tom Lane [Sun, 27 Feb 2000 07:18:29 +0000 (07:18 +0000)]
Add 'volatile' declarations to silence gcc warnings about longjmp.
Shouldn't create any portability problems, since we have a configure
test to #define away volatile if the compiler doesn't support it.
Tom Lane [Sun, 27 Feb 2000 03:30:27 +0000 (03:30 +0000)]
Minor improvements in regprocout() and oidvectortypes().
Tom Lane [Sun, 27 Feb 2000 02:48:15 +0000 (02:48 +0000)]
Fix poorly worded error messages for unary operator type resolution
failures. Fix some outright bugs too, including a reference to
uninitialized memory that would cause failures like this one:
select -('
1234567890.
1234567'::text);
ERROR: Unable to locate type oid
2139062143 in catalog
Tom Lane [Sun, 27 Feb 2000 01:33:43 +0000 (01:33 +0000)]
Clean up dependencies for version.o.
This avoids the useless rebuild of pg_version that used to happen on
each build or install pass.
Tom Lane [Sun, 27 Feb 2000 01:26:12 +0000 (01:26 +0000)]
Clean up dependencies for version.o.
Tom Lane [Sun, 27 Feb 2000 01:18:46 +0000 (01:18 +0000)]
Clean up dependencies for version.o.
Tom Lane [Sun, 27 Feb 2000 01:10:31 +0000 (01:10 +0000)]
Fix a couple of inconsistent usages of include <...> vs. include "...".
Bruce Momjian [Sat, 26 Feb 2000 23:22:41 +0000 (23:22 +0000)]
Add 7.0 changes to HISTORY file. This has to go into SGML eventually,
but we should get it out to beta testers.
Tom Lane [Sat, 26 Feb 2000 23:03:12 +0000 (23:03 +0000)]
Add date and time datatype handling to convert_to_scalar. (I was waiting
for Thomas to do the datetime consolidation before touching this, but
it's done now...)
Tom Lane [Sat, 26 Feb 2000 21:13:18 +0000 (21:13 +0000)]
Change rule dumper to produce reasonable output for casts that assign
a specific length or precision, such as foo::char(8). Remove erroneous
removal of user-written casts at the top level of a SELECT target item.
Tom Lane [Sat, 26 Feb 2000 21:11:10 +0000 (21:11 +0000)]
Fix exprTypmod to recognize length-coercion function expressions,
such as bpchar(char_expression, N), and pull out the attrtypmod that
the function is coercing to. This allows correct deduction of the
column type in examples such as
CREATE VIEW v AS SELECT f1::char(8) FROM tbl;
Formerly we labeled v's column as char-of-unknown-length not char(8).
Also, this change causes the parser not to insert a redundant length
coercion function if the user has explicitly casted an INSERT or UPDATE
expression to the right length.
Tom Lane [Sat, 26 Feb 2000 18:31:25 +0000 (18:31 +0000)]
psql's \d command wasn't doing the right things with 'char' (type 18)
fields, nor with bpchar and varchar fields that have typmod -1. The
latter effectively have an unspecified length, so I made them display
as char() and varchar() rather than falsely equating them to char(1)
and varchar(1).
Tom Lane [Sat, 26 Feb 2000 18:13:41 +0000 (18:13 +0000)]
I had managed to break acceptance of "char", which worked in 6.5 to
refer to the single-byte char type. 7.0 was taking it as bpchar(1).
Tom Lane [Sat, 26 Feb 2000 06:36:44 +0000 (06:36 +0000)]
Undo a couple of mistaken applications of NameStr() to StringInfos.
It worked, because they both have fields named 'data', but it's surely
trouble waiting to happen. I wonder whether there are more ...
Tom Lane [Sat, 26 Feb 2000 05:25:55 +0000 (05:25 +0000)]
Shared-memory hashtables have non-extensible directories, which means
it's a good idea to choose the directory size based on the expected
number of entries. But ShmemInitHash was using a hard-wired constant.
Boo hiss. This accounts for recent report of postmaster failure when
asking for 64K or more buffers.