You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tom Lane
9511304752
Rearrange the querytree representation of ORDER BY/GROUP BY/DISTINCT items
...
as per my recent proposal:
1. Fold SortClause and GroupClause into a single node type SortGroupClause.
We were already relying on them to be struct-equivalent, so using two node
tags wasn't accomplishing much except to get in the way of comparing items
with equal().
2. Add an "eqop" field to SortGroupClause to carry the associated equality
operator. This is cheap for the parser to get at the same time it's looking
up the sort operator, and storing it eliminates the need for repeated
not-so-cheap lookups during planning. In future this will also let us
represent GROUP/DISTINCT operations on datatypes that have hash opclasses
but no btree opclasses (ie, they have equality but no natural sort order).
The previous representation simply didn't work for that, since its only
indicator of comparison semantics was a sort operator.
3. Add a hasDistinctOn boolean to struct Query to explicitly record whether
the distinctClause came from DISTINCT or DISTINCT ON. This allows removing
some complicated and not 100% bulletproof code that attempted to figure
that out from the distinctClause alone.
This patch doesn't in itself create any new capability, but it's necessary
infrastructure for future attempts to use hash-based grouping for DISTINCT
and UNION/INTERSECT/EXCEPT.
18 years ago
..
acl.h
Update copyrights in source tree to 2008.
18 years ago
array.h
Add array_fill() to create arrays initialized with a value.
18 years ago
ascii.h
Update copyrights in source tree to 2008.
18 years ago
builtins.h
Implement SQL-spec RETURNS TABLE syntax for functions.
18 years ago
cash.h
Add $PostgreSQL$ markers to a lot of files that were missing them.
18 years ago
catcache.h
Improve our #include situation by moving pointer types away from the
18 years ago
combocid.h
Update copyrights in source tree to 2008.
18 years ago
date.h
Get rid of a bunch of #ifdef HAVE_INT64_TIMESTAMP conditionals by inventing
18 years ago
datetime.h
Update copyrights in source tree to 2008.
18 years ago
datum.h
Update copyrights in source tree to 2008.
18 years ago
dynahash.h
Update copyrights in source tree to 2008.
18 years ago
dynamic_loader.h
Update copyrights in source tree to 2008.
18 years ago
elog.h
Repair two places where SIGTERM exit could leave shared memory state
18 years ago
errcodes.h
Support SQL/PSM-compatible CASE statement in plpgsql.
18 years ago
flatfiles.h
Standard pgindent run for 8.1.
20 years ago
fmgrtab.h
Update copyrights in source tree to 2008.
18 years ago
formatting.h
Const-ify the arguments of str_tolower() and friends to suppress compile
18 years ago
geo_decls.h
Update copyrights in source tree to 2008.
18 years ago
guc.h
Use guc.c's parse_int() instead of pg_atoi() to parse fillfactor in
18 years ago
guc_tables.h
Fix postgres --describe-config for guc enums, breakage noted by Alvaro.
18 years ago
help_config.h
Update copyrights in source tree to 2008.
18 years ago
hsearch.h
Update copyrights in source tree to 2008.
18 years ago
inet.h
Change the declaration of struct varlena so that the length word is
18 years ago
int8.h
Clean up some problems with redundant cross-type arithmetic operators. Add
18 years ago
inval.h
Improve our #include situation by moving pointer types away from the
18 years ago
logtape.h
Update copyrights in source tree to 2008.
18 years ago
lsyscache.h
Rearrange the querytree representation of ORDER BY/GROUP BY/DISTINCT items
18 years ago
memutils.h
Update copyrights in source tree to 2008.
18 years ago
nabstime.h
Update copyrights in source tree to 2008.
18 years ago
numeric.h
Update copyrights in source tree to 2008.
18 years ago
palloc.h
If pnstrdup is going to be promoted to a generally available function,
18 years ago
pg_crc.h
Update copyrights in source tree to 2008.
18 years ago
pg_locale.h
Make to_char()'s localized month/day names depend on LC_TIME, not LC_MESSAGES.
18 years ago
pg_lzcompress.h
This patch addresses some issues in TOAST compression strategy that
18 years ago
pg_rusage.h
Update copyrights in source tree to 2008.
18 years ago
plancache.h
Adjust things so that the query_string of a cached plan and the sourceText of
18 years ago
portal.h
Adjust things so that the query_string of a cached plan and the sourceText of
18 years ago
ps_status.h
Add GUC update_process_title to control whether 'ps' display is updated
20 years ago
rel.h
Improve our #include situation by moving pointer types away from the
18 years ago
relcache.h
Improve our #include situation by moving pointer types away from the
18 years ago
resowner.h
Update copyrights in source tree to 2008.
18 years ago
selfuncs.h
Change patternsel() so that instead of switching from a pure
18 years ago
snapmgr.h
Improve snapshot manager by keeping explicit track of snapshots.
18 years ago
snapshot.h
Improve snapshot manager by keeping explicit track of snapshots.
18 years ago
syscache.h
Convert the list of syscache names from a series of #define's into an enum,
18 years ago
timestamp.h
Add timestamp and timestamptz versions of generate_series().
18 years ago
tqual.h
Move the HTSU_Result enum definition into snapshot.h, to avoid including
18 years ago
tuplesort.h
Improve our #include situation by moving pointer types away from the
18 years ago
tuplestore.h
Add a new tuplestore API function, tuplestore_putvalues(). This is
18 years ago
typcache.h
Update copyrights in source tree to 2008.
18 years ago
tzparser.h
Update copyrights in source tree to 2008.
18 years ago
uuid.h
Fix some missed copyright updates.
18 years ago
varbit.h
Update copyrights in source tree to 2008.
18 years ago
xml.h
Turn xmlbinary and xmloption GUC variables into enumsTurn xmlbinary and
18 years ago