Commit Graph

1646 Commits

Author SHA1 Message Date
Marc G. Fournier 338c54cbc1 From: Jan Wieck <jwieck@debis.com>
Hi,

    as  proposed here comes the first patch for the query rewrite
    system.

  <for details, see archive dated Mon, 17 Aug 1998>
1998-08-18 00:49:04 +00:00
Thomas G. Lockhart a8bcb8bc58 Update for changes to gram.y. 1998-08-17 16:08:54 +00:00
Thomas G. Lockhart 73fae67a0d Allow NOT LIKE, IN, NOT IN, BETWEEN, and NOT BETWEEN expressions
in constraint clauses.
 IN and NOT IN only allow constaints, not subselects.
Jose' Soares' new reference docs pointed out the discrepency.
 Updating the docs too...
1998-08-17 16:08:34 +00:00
Thomas G. Lockhart 15f82836bf Use the parser macro IS_BINARY_COMPATIBLE() to allow more success
in type checking for DEFAULT contraint clauses.
Could do more type coersion later...
1998-08-17 16:03:31 +00:00
Marc G. Fournier 9312033071 Date: Sun, 16 Aug 1998 14:56:48 -0400
From: Tom Lane <tgl@sss.pgh.pa.us>
Attached is a patch for this weekend's work on libpq.  I've dealt
with several issues:

        <for details: see message, in pgsql-patches archive for above data>
1998-08-17 03:50:43 +00:00
Thomas G. Lockhart efc9a91db9 Allow a null pointer to be returned from get_opname().
Previously, had thrown an error, but looking for alternate strategies
 for table indices utilization would prefer to continue.
1998-08-16 05:38:41 +00:00
Thomas G. Lockhart 4c91723d35 Check for null pointer returned from get_opname().
Don't bother checking for alternate strategies if so
 since it was more likely a function or some other non-operator anyway.
1998-08-16 05:37:04 +00:00
Thomas G. Lockhart 0f19904360 Check for null pointer returned from get_opname(). 1998-08-16 05:35:35 +00:00
Thomas G. Lockhart 402b47cffa Disable not-ready-to-use support code for the line data type.
Bracket things with #ifdef ENABLE_LINE_TYPE.
The line data type has always been used internally to support other types,
 but I/O routines have never been defined for it.
1998-08-16 04:06:55 +00:00
Thomas G. Lockhart 21d1e474f5 Some old cleanup fixes for close_ps() from G. Thaker. 1998-08-15 06:45:10 +00:00
Thomas G. Lockhart 6912beea70 Allow binary-compatible indices to be considered when checking for valid
indices for restriction clauses containing a constant.
Note that if an index does not match directly (usually because the types
 on both side of the clause don't match), and if a binary-compatible index
 is identified, then the operator function will be replaced by a new
 one. Should not be a problem, but be sure that if types are listed as
 being binary compatible (in parse_coerce.h) then the comparison functions
 are also binary-compatible, giving equivalent results.
1998-08-14 16:13:07 +00:00
Thomas G. Lockhart 94f42ed389 Include OID as a built-in type. 1998-08-14 16:07:00 +00:00
Bruce Momjian c7fe2543b8 fix typo. 1998-08-11 22:39:33 +00:00
Bruce Momjian a968e4f60e Strategy cleanups. 1998-08-11 20:55:52 +00:00
Bruce Momjian 024d5f74ba index strategy cleanup 1998-08-11 19:32:39 +00:00
Bruce Momjian f22c6f9237 the following patch fixes a bug in the oracle compatibility
functions btrim() ltrim() and rtrim().

    The error was that the character after the set  was  included
    in the tests (ptr2 pointed to the character after the vardata
    part of set if no match found,  so  comparing  *ptr  or  *end
    against *ptr2 MAY match -> strip).


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being
right. # # Let's break this rule - forgive me.
# #======================================== jwieck@debis.com (Jan
Wieck) #
1998-08-11 18:38:07 +00:00
Bruce Momjian 79c8d2e3a0 Change owner from oid to int4 type. 1998-08-11 18:28:49 +00:00
Bruce Momjian 8ed36c3dba More op_class cleanup. 1998-08-11 14:32:03 +00:00
Bruce Momjian 2d13c5f1e2 Update flowchart. 1998-08-10 14:32:46 +00:00
Bruce Momjian 956b91a944 Cleanups of optimizer. 1998-08-10 04:49:39 +00:00
Bruce Momjian 2d32d909b5 Cleanup optimizer function names and clarify code. 1998-08-10 02:26:40 +00:00
Bruce Momjian a08dc16c47 New pgindent. 1998-08-09 04:59:10 +00:00
Bruce Momjian 111b80ce00 cleanups. 1998-08-09 04:17:38 +00:00
Bruce Momjian e46df2ff6e OPTIMIZER_DEBUG additions. 1998-08-07 05:02:32 +00:00
Bruce Momjian af5fde7491 Make large objects their own relkind type. Fix dups in pg_class_mb
files.  Fix sequence creation hack for relkind type.
1998-08-06 05:13:14 +00:00
Marc G. Fournier a1627a1d64 From: David Hartwig <daybee@bellatlantic.net>
I have attached a patch to allow GROUP BY and/or ORDER BY function or
expressions.  Note worthy items:

1. The expression or function need not be in the target list.
Example:
            SELECT  name FROM foo GROUP BY lower(name);

2.   Simplified the grammar to use expressions only.

3.  Cleaned up earlier patch in this area to make use of existing
utility functions.

3.  Reduced some of the members in the SortGroupBy parse node.   The
original data members were redundant with the new expression node.
(MUST do a "make clean" now)

4.  Added a new parse node "JoinUsing".   The JOIN USING clause was
overloading this SortGroupBy structure.   With the afore mentioned
reduction of members, the two clauses lost all their commonality.

5.  A bug still exist where, if a function or expression is GROUPed BY,
and an aggregate function does not include a attribute from the
expression or function, the backend crashes.   (or something like
that)   The bug pre-dates this patch.    Example:

    SELECT lower(a) AS lowcase, count(b) FROM foo GROUP BY lowcase;
                 *** BOOM  ***

    --Also when not in target list
    SELECT  count(b) FROM foo GROUP BY lower(a);
                *** BOOM  AGAIN ***
1998-08-05 04:49:19 +00:00
Bruce Momjian 1c9a125096 OR processing cleanup. 1998-08-04 18:42:39 +00:00
Bruce Momjian 0b44238841 Fix encoding grammer problem. 1998-08-04 17:37:48 +00:00
Bruce Momjian d9be0ff432 MergeSort was sometimes called mergejoin and was confusing. Now
it is now only mergejoin.
1998-08-04 16:44:31 +00:00
Bruce Momjian 7db9ea5c1e EXPLAIN VERBOSE prints the plan, and now pretty-prints the plan to
the postmaster log file.
1998-08-04 15:00:28 +00:00
Bruce Momjian f71b671bd5 Make EXPLAIN show output more clearly. 1998-08-04 04:50:15 +00:00
Bruce Momjian c8b42a6151 Update flow chart. 1998-08-04 00:42:14 +00:00
Bruce Momjian 439a2af0bc Update mark/reset index code for multiple indexes, (OR code).
Thanks for Vadim for fixes.
1998-08-03 19:41:35 +00:00
Bruce Momjian b88e9784b6 Cleanup of OR processing. 1998-08-03 05:49:24 +00:00
Thomas G. Lockhart 7665e7b0a8 Allows the following query to succeed: "SELECT NULL ORDER BY 1;"
There are three or four cases in transformSortClause() and I had fixed
only one case for UNION. A second case is now fixed, in the same way; I
assigned INT4OID to the column type for the "won't actually happen"
sort. Didn't want to skip the code entirely, since the backend needs to
_try_ a sort to get the NULLs right. I'm not certain under what
circumstances the other cases are invoked and these are not yet
fixed up, though perhaps they don't need to be...
1998-08-02 13:34:26 +00:00
Bruce Momjian 39844ac2c3 Fix for OR handling with multiple indexes. 1998-08-02 07:10:38 +00:00
Bruce Momjian 2c6b370e64 Cleanup of OR fix. 1998-08-01 22:44:55 +00:00
Bruce Momjian 0a2e5cdfc9 Allow index use with OR clauses. 1998-08-01 22:12:13 +00:00
Marc G. Fournier 0668aa8817 Adrian Hall reported a problem to me that snprintf() doesn't exist in, at
least, Solaris 2.5.1.  We use it in backend/utils/adt/int8.c.

Add a check to configure so that we see if it exists or not, and, if not,
compile in snprintf.c from backend/port, which was taken from, and falls under
the same Berkeley license as us, the FreeBSD libc/stdio ...
1998-08-01 19:30:29 +00:00
Vadim B. Mikheev 0d78e8c112 Lmgr cleanup, new locking modes for LLL. 1998-08-01 15:26:38 +00:00
Vadim B. Mikheev 83d3626b1f Matching clauses to functional indices was broken, now fixed. 1998-07-31 15:10:40 +00:00
Vadim B. Mikheev f73fc6eb29 Fix scan adjustment. 1998-07-30 05:05:05 +00:00
Vadim B. Mikheev be8300b18f Use Snapshot in heap access methods. 1998-07-27 19:38:40 +00:00
Marc G. Fournier 5979d73841 From: t-ishii@sra.co.jp
As Bruce mentioned, this is due to the conflict among changes we made.
Included patches should fix the problem(I changed all MB to
MULTIBYTE). Please let me know if you have further problem.

P.S. I did not include pathces to configure and gram.c to save the
file size(configure.in and gram.y modified).
1998-07-26 04:31:41 +00:00
Bruce Momjian e05aa52a55 Update flowchart. Add arrow. 1998-07-26 02:17:55 +00:00
Bruce Momjian 01a651aaf9 Fix compile error. Make transaction/work optional on all transaction
statements.  More cleanups of psql help.  Fix for shift/reduce on
UNION in subselect.
1998-07-26 01:18:09 +00:00
Bruce Momjian d8d0aa019b Update psql help syntax to remove <> and uppercaese keywords. 1998-07-25 00:17:30 +00:00
Bruce Momjian 809fc91fdd Fix HAVING patch missing cast. 1998-07-24 15:54:10 +00:00
Bruce Momjian 128d827d4b I'm sorry, but I think I introduced a little bug with my last patch.
Everyone using an [NOT] EXISTS subquery will have noticed that
already.

The bug is in "subselect.c" in the function "SS_process_sublinks()".

Here the whole function as it *SHOULD BE*:

Stephan
1998-07-24 04:03:10 +00:00
Marc G. Fournier bf00bbb0c4 I really hope that I haven't missed anything in this one...
From: t-ishii@sra.co.jp

Attached are patches to enhance the multi-byte support.  (patches are
against 7/18 snapshot)

* determine encoding at initdb/createdb rather than compile time

Now initdb/createdb has an option to specify the encoding. Also, I
modified the syntax of CREATE DATABASE to accept encoding option. See
README.mb for more details.

For this purpose I have added new column "encoding" to pg_database.
Also pg_attribute and pg_class are changed to catch up the
modification to pg_database.  Actually I haved added pg_database_mb.h,
pg_attribute_mb.h and pg_class_mb.h. These are used only when MB is
enabled. The reason having separate files is I couldn't find a way to
use ifdef or whatever in those files. I have to admit it looks
ugly. No way.

* support for PGCLIENTENCODING when issuing COPY command

commands/copy.c modified.

* support for SQL92 syntax "SET NAMES"

See gram.y.

* support for LATIN2-5
* add UNICODE regression test case
* new test suite for MB

New directory test/mb added.

* clean up source files

Basic idea is to have MB's own subdirectory for easier maintenance.
These are include/mb and backend/utils/mb.
1998-07-24 03:32:46 +00:00