postgresql/src/test/regress/sql
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
..
abstime.sql Changed 1943 to 1947 to fix, other cleanups. 1997-06-01 02:30:25 +00:00
aggregates.sql Reorder tests and move aggregate table data to data/. 1997-04-29 14:29:16 +00:00
alter_table.sql Re-apply Darren's char2-16 removal code. 1998-04-26 04:12:15 +00:00
arrays.sql Re-apply Darren's char2-16 removal code. 1998-04-26 04:12:15 +00:00
boolean.sql Adjust tests to reflect removal of time travel. 1997-12-01 02:46:13 +00:00
box.sql Add inter-type regression tests for geometry, date/time, and numbers. 1997-05-11 15:42:09 +00:00
btree_index.sql Re-apply Darren's char2-16 removal code. 1998-04-26 04:12:15 +00:00
char2.sql Make these self-contained tests...they are testing types, so the tables 1997-04-27 04:36:10 +00:00
char4.sql Make these self-contained tests...they are testing types, so the tables 1997-04-27 04:36:10 +00:00
char8.sql Make these self-contained tests...they are testing types, so the tables 1997-04-27 04:36:10 +00:00
char16.sql Adjust tests to reflect removal of time travel. 1997-12-01 02:46:13 +00:00
char.sql Adjust tests to reflect removal of time travel. 1997-12-01 02:46:13 +00:00
circle.sql Start adding tests for new geometry functions. 1997-07-29 16:22:48 +00:00
comments.sql Add explicit test for various comment syntaxes. 1997-09-18 03:54:19 +00:00
create_aggregate.sql More splits and cleanups... 1997-04-06 08:29:57 +00:00
create_index.sql Re-apply Darren's char2-16 removal code. 1998-04-26 04:12:15 +00:00
create_misc.sql Re-apply Darren's char2-16 removal code. 1998-04-26 04:12:15 +00:00
create_operator.sql Major patch from Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov> 1997-04-22 17:35:09 +00:00
create_table.sql Re-apply Darren's char2-16 removal code. 1998-04-26 04:12:15 +00:00
create_type.sql Major patch from Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov> 1997-04-22 17:35:09 +00:00
create_view.sql More splits and cleanups... 1997-04-06 06:07:13 +00:00
datetime.sql Fix testing problem when 'current' equal to 'now' for separate inserts 1997-11-15 02:55:57 +00:00
destroy.sql Re-apply Darren's char2-16 removal code. 1998-04-26 04:12:15 +00:00
errors.sql From: Darren King <aixssd!darrenk@abs.net> 1997-05-22 00:17:24 +00:00
euc_cn.sql Hi, here are the patches to enhance existing MB handling. This time 1998-06-16 07:29:54 +00:00
euc_jp.sql From: t-ishii@sra.co.jp 1998-04-27 17:10:50 +00:00
euc_kr.sql Hi, here are the patches to enhance existing MB handling. This time 1998-06-16 07:29:54 +00:00
float4.sql Add inter-type regression tests for geometry, date/time, and numbers. 1997-05-11 15:42:09 +00:00
float8.sql Add inter-type regression tests for geometry, date/time, and numbers. 1997-05-11 15:42:09 +00:00
geometry.sql Change ORDER BY to get consistant results with new sorting routines. 1997-09-20 16:34:08 +00:00
hash_index.sql Re-apply Darren's char2-16 removal code. 1998-04-26 04:12:15 +00:00
horology.sql Change ORDER BY to get consistant results with new sorting routines. 1997-09-20 16:34:08 +00:00
int2.sql Add inter-type regression tests for geometry, date/time, and numbers. 1997-05-11 15:42:09 +00:00
int4.sql Add a few tests for unary minus syntax. 1997-09-13 03:16:53 +00:00
int8.sql Include tests for new 8-byte integer. 1998-07-08 14:31:02 +00:00
lseg.sql Start adding tests for new geometry functions. 1997-07-29 16:22:48 +00:00
Makefile Tests for CHECK/DEFAULT 1997-08-28 04:49:34 +00:00
mule_internal.sql Hi, here are the patches to enhance existing MB handling. This time 1998-06-16 07:29:54 +00:00
name.sql Add Darren's char2-16 files. 1998-04-27 13:50:03 +00:00
numerology.sql Add inter-type regression tests for geometry, date/time, and numbers. 1997-05-11 15:42:09 +00:00
oid.sql Make these self-contained tests...they are testing types, so the tables 1997-04-27 04:36:10 +00:00
oidint2.sql Make these self-contained tests...they are testing types, so the tables 1997-04-27 04:36:10 +00:00
oidint4.sql Make these self-contained tests...they are testing types, so the tables 1997-04-27 04:36:10 +00:00
oidname.sql Re-apply Darren's char2-16 removal code. 1998-04-26 04:12:15 +00:00
path.sql Update path and polygon syntax to new conventions. 1997-06-03 14:24:12 +00:00
point.sql Use additional ORDER BY to cope with new sorting routines. 1997-09-24 17:55:38 +00:00
polygon.sql Start adding tests for new geometry functions. 1997-07-29 16:22:48 +00:00
portals_p2.sql There is no partial index onek2_u1_prtl in tests... 1997-05-05 06:43:59 +00:00
portals.sql split out a bunch more tests from misc.source so that the tester knows 1997-04-27 17:40:13 +00:00
random.sql There, I'll leave this alone until Thomas catchs up *grin* 1997-04-27 18:13:54 +00:00
reltime.sql From: Keith Parks <emkxp01@mtcc.demon.co.uk> 1997-05-09 03:26:56 +00:00
sanity_check.sql More splits and cleanups... 1997-04-06 08:29:57 +00:00
select_distinct_on.sql More splits and cleanups... 1997-04-06 08:29:57 +00:00
select_distinct.sql More splits and cleanups... 1997-04-06 08:29:57 +00:00
select_having.sql Include tests for new 8-byte integer. 1998-07-08 14:31:02 +00:00
select_implicit.sql From: David Hartwig <daybee@bellatlantic.net> 1998-08-05 04:49:19 +00:00
select_into.sql More splits and cleanups... 1997-04-06 08:29:57 +00:00
select_views.sql Second query in select_views.sql is replaced. 1998-02-23 13:59:34 +00:00
select.sql Change ORDER BY to get more consistant results. 1997-09-20 16:31:44 +00:00
strings.sql Add test for UNION. 1998-05-29 13:23:02 +00:00
subselect.sql Add new subselect test. 1998-02-18 07:32:17 +00:00
tests "select_implicit" is renamed from "junkfilter" test. 1998-07-09 14:32:58 +00:00
text.sql Adjust tests to reflect removal of time travel. 1997-12-01 02:46:13 +00:00
timespan.sql From: Keith Parks <emkxp01@mtcc.demon.co.uk> 1997-05-09 03:26:56 +00:00
tinterval.sql Update results count to reflect bad entries now being rejected by new decoder. 1997-09-20 16:33:24 +00:00
transactions.sql split out a bunch more tests from misc.source so that the tester knows 1997-04-27 17:40:13 +00:00
triggers.sql Changes due to fixed DEFAULT behaviour. 1997-10-17 09:59:09 +00:00
union.sql Add test for UNION. 1998-05-29 13:23:02 +00:00
varchar.sql Add tests for varchar() and combinations of string types. 1997-12-01 02:48:47 +00:00
view_perms.sql From: Jan Wieck <jwieck@debis.com> 1998-02-27 02:38:15 +00:00