Commit Graph

41 Commits

Author SHA1 Message Date
Tom Lane bf56f0759b Make OIDs optional, per discussions in pghackers. WITH OIDS is still the
default, but OIDS are removed from many system catalogs that don't need them.
Some interesting side effects: TOAST pointers are 20 bytes not 32 now;
pg_description has a three-column key instead of one.

Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey
has some usefulness; pg_dump dumps comments on indexes, rules, and
triggers in a valid order.

initdb forced.
2001-08-10 18:57:42 +00:00
Tom Lane cb052e0bf1 Fix rule rewriter so that new ordering of ON INSERT actions applies
in cases of qualified rules as well as unqualified ones.  Tweak rules
test to avoid cluttering output with dummy SELECT results.  Update
documentation to match code.
2001-07-09 23:50:32 +00:00
Jan Wieck 8d80b0d980 Statistical system views (yet without the config stuff, but
it's hard to keep such massive changes in sync with the tree
so I need to get it in and work from there now).

Jan
2001-06-22 19:16:24 +00:00
Tom Lane 16ea152b7e Revoke public read access from pg_statistic, create new system view
pg_stats to provide controlled (and, hopefully, more readable) access
to statistics.  Comments on definition of pg_stats welcome.
I didn't force initdb, but the rules regress test will fail until you
do one.
2001-06-14 19:47:25 +00:00
Tom Lane 5ce8ab96f5 Add regress test case for INSERT ... SELECT in rules. 2000-12-05 19:15:49 +00:00
Tom Lane fdbd6ca75e Simplify definition of pg_tables and pg_views views by making use of
new separate relkind for views (per some discussion back in September).
I didn't force initdb, but rules regress test will show differences
until you do one.
2000-11-21 01:11:50 +00:00
Tom Lane d8e582e236 Revert rules.out to non-broken state. I will with difficulty hold my
tongue about the sloppiness of (a) submitting and (b) committing this
file.
2000-10-08 02:51:50 +00:00
Bruce Momjian 7ea8403c8a The beos port in the source tree doesn't even compile. and even
after that dynamic loading isn't working and shared memory handling is
broken.

        Attached with this message, there is a Zip file which contain :

        * beos.diff = patch file generated with difforig
        * beos = folder with beos support files which need to be moved in /
src/backend/port
        * expected = foler with three file for message and precision
difference in regression test
        * regression.diff = rule problem (need to kill the backend manualy)
        * dynloader = dynloader files (they are also in the pacth files,
but there is so much modification that I have join full files)

        Everything works except a problem in 'rules' Is there some problems
with rules in the current tree ? It used to works with last week tree.

Cyril VELTER
2000-10-07 14:39:21 +00:00
Peter Eisentraut 457ac0331c Implement differentiation between CURRENT_USER and SESSION_USER as per SQL.
There is still no effective difference but it will kick in once setuid
functions exist (not included here).  Make old getpgusername() alias for
current_user.
2000-09-19 18:18:04 +00:00
Tom Lane ed5003c584 First cut at full support for OUTER JOINs. There are still a few loose
ends to clean up (see my message of same date to pghackers), but mostly
it works.  INITDB REQUIRED!
2000-09-12 21:07:18 +00:00
Bruce Momjian 332f0f5fc0 Rename rule CURRENT to OLD in source tree. Add mapping for backward
compatiblity with old rules.
2000-06-12 19:40:58 +00:00
Tom Lane 2ae20ef98a Update regression tests for ONLY and other recent changes. 2000-06-10 05:19:26 +00:00
Tom Lane a95eec6792 Add a regress test case for SELECT count(*) FROM view, so that we'll
know if that case ever breaks again...
2000-04-20 00:32:57 +00:00
Thomas G. Lockhart 6456810078 Implement column aliases on views "CREATE VIEW name (collist)".
Implement TIME WITH TIME ZONE type (timetz internal type).
Remap length() for character strings to CHAR_LENGTH() for SQL92
 and to remove the ambiguity with geometric length() functions.
Keep length() for character strings for backward compatibility.
Shrink stored views by removing internal column name list from visible rte.
Implement min(), max() for time and timetz data types.
Implement conversion of TIME to INTERVAL.
Implement abs(), mod(), fac() for the int8 data type.
Rename some math functions to generic names:
 round(), sqrt(), cbrt(), pow(), etc.
Rename NUMERIC power() function to pow().
Fix int2 factorial to calculate result in int4.
Enhance the Oracle compatibility function translate() to work with string
 arguments (from Edwin Ramirez).
Modify pg_proc system table to remove OID holes.
2000-03-14 23:06:59 +00:00
Tom Lane e1a95def8b Quick hack solution so that pg_dump of views works. Needs repair after
Thomas gets back, but better this than nonfunctional pg_dump in the beta.
2000-02-21 20:18:11 +00:00
Tom Lane ee97d103cc To avoid confusion during early beta testing, commit the current rules
test output as expected output.  We'll probably want to change this again
after something's done about the verbosity of column alias display.
2000-02-21 18:42:35 +00:00
Tom Lane 260b6afc79 Update remaining tests for new psql, with the exception of 'arrays',
which is broken in some weird way that I don't understand.  I think it
may be exposing a bug in the new psql --- for one thing, I get different
results when I run psql by hand than the regress script gets.  What
the heck???
2000-01-09 03:48:39 +00:00
Jan Wieck e2aef49694 Added empty TOASTER files and corrected some minor glitches
in regression tests.

Jan
1999-12-21 00:06:44 +00:00
Tom Lane a8ae19ec3d aggregate(DISTINCT ...) works, per SQL spec.
Note this forces initdb because of change of Aggref node in stored rules.
1999-12-13 01:27:21 +00:00
Tom Lane 1891f0e913 Update rules test for extra quoting in rule deparser. 1999-12-06 02:38:56 +00:00
Tom Lane 3eb1c82277 Fix planner and rewriter to follow SQL semantics for tables that are
mentioned in FROM but not elsewhere in the query: such tables should be
joined over anyway.  Aside from being more standards-compliant, this allows
removal of some very ugly hacks for COUNT(*) processing.  Also, allow
HAVING clause without aggregate functions, since SQL does.  Clean up
CREATE RULE statement-list syntax the same way Bruce just fixed the
main stmtmulti production.
CAUTION: addition of a field to RangeTblEntry nodes breaks stored rules;
you will have to initdb if you have any rules.
1999-10-07 04:23:24 +00:00
Tom Lane 0655b1500f Less noisy rule display... 1999-10-04 04:38:46 +00:00
Tom Lane b40ac42efb Teach parse_coerce about non-cachable functions (actually,
make it call eval_const_expressions() so that it doesn't have to know).
1999-10-02 23:29:19 +00:00
Tom Lane cd243d27ce Revise rule-printing routines to use expandable StringInfo buffers, so that
they have no hardwired limit on the length of a rule's text.  Fix a couple
of minor bugs in passing --- deparsed UPDATE queries didn't have quotes
around relation name, and quotes and backslashes in constant values weren't
backslash-quoted.
1999-10-02 01:08:05 +00:00
Tom Lane 9202c4f798 Update rules test expected output to conform to slightly
more verbose results from ruleutils.c changes.
1999-08-28 04:00:41 +00:00
Tom Lane b7883d7e3a parse_coerce fix allows early simplification of one
constant-coercion expression in the rules test.
1999-08-05 02:35:29 +00:00
Tom Lane f851c6b07d Add another ORDER BY to rules test; got tired of it 'failing'
every time I tweak the optimizer...
1999-08-01 04:41:32 +00:00
Tom Lane 2f30d5a34a My recent optimizer changes caused a different plan to
be picked for one of the complex joins in rules test ... leading to
a different output ordering ...
1999-07-27 03:53:54 +00:00
Jan Wieck 98981a9f1c Changed "current." into "old." in rule string backparsing
Jan
1999-06-02 11:52:29 +00:00
Jan Wieck f4fadbe4db Fixed bug in rules event qualification output.
Jan
1999-05-25 08:49:33 +00:00
Jan Wieck fd1647706d Fixed latest regression diff's by omitting viewowner in SELECT from pg_views.
Jan
1999-05-17 09:03:26 +00:00
Jan Wieck c8cc45b2f3 Fixed small bug in ruleutils and added output of pg_views and
pg_rules to rules regression test.

Jan
1999-05-12 17:59:32 +00:00
Tom Lane dbce02f133 Add ORDER BY clauses to some select-from-view operations
in rules regression test, in order to eliminate bogus test 'failures'
that occur due to platform-dependent and join-implementation-dependent
ordering of tuples.  I'm not sure that I got all of the SELECTs that need
ordering clauses --- we may need some more.  But this takes care of the
diffs between my platform and Jan's.
1999-04-15 03:40:50 +00:00
Thomas G. Lockhart dfdb2e5fb0 Remove non-portable queries by replacing getpgusername() with a constant
string.
1999-02-23 07:29:19 +00:00
Bruce Momjian e23623584f change pgsql to postgres 1999-02-22 02:06:38 +00:00
Jan Wieck be948af2e8 Added LIMIT/OFFSET functionality including new regression test for it.
Removed CURRENT keyword for rule queries and changed rules regression
accordingly. CURRENT has beed announced to disappear in v6.5.

Jan
1999-02-08 14:14:32 +00:00
Jan Wieck 566c712c58 Revert some changes from the INTERSECT/EXPECT patch that broke
rule system semantics by having Var nodes referenced across multiple
parsetrees when rules split them.

Added more tests to the rules regression test.

The code in question resulted from v6.3 based development and was
a little careless applied to the v6.5 source tree.

Jan
1999-02-08 01:39:46 +00:00
Jan Wieck 28fc5d7b83 Reenabled parentheses for grouping multiple rule actions and
added this syntax to rules regression test so it will show up
if someone breaks it again.

Jan
1999-02-07 19:02:20 +00:00
Tom Lane 1f27facc90 Add ORDER BY to ensure platform-independent results in rules test. 1998-10-28 19:32:43 +00:00
Bruce Momjian f93b6974f9 Here's a combination of all the patches I'm currently waiting
for against a just updated CVS tree. It contains

        Partial new rewrite system that handles subselects,  view
        aggregate  columns, insert into select from view, updates
        with set col = view-value and select rules restriction to
        view definition.

        Updates  for  rule/view  backparsing utility functions to
        handle subselects correct.


        New system views pg_tables and pg_indexes (where you  can
        see the complete index definition in the latter one).

        Enabling array references on query parameters.

        Bugfix for functional index.

        Little changes to system views pg_rules and pg_views.


    The rule system isn't a release-stopper any longer.

    But  another  stopper  is  that  I  don't  know if the latest
    changes to PL/pgSQL (not already in CVS) made it  compile  on
    AIX. Still wait for some response from Dave.

Jan
1998-10-02 16:28:04 +00:00
Thomas G. Lockhart 5a68fd56cd Consolidate Jan's rules test into one file.
Remove dependency on a specific Postgres user name in the results
 (Check result against CURRENT_USER with a boolean instead).
1998-09-16 14:35:37 +00:00