1. 04 Feb, 2006 1 commit
    • Andrew Dunstan's avatar
      · f8b54fe6
      Andrew Dunstan authored
      DROP IF EXISTS for ROLE/USER/GROUP
      f8b54fe6
  2. 31 Jan, 2006 1 commit
    • Tom Lane's avatar
      Restructure planner's handling of inheritance. Rather than processing · 8a1468af
      Tom Lane authored
      inheritance trees on-the-fly, which pretty well constrained us to considering
      only one way of planning inheritance, expand inheritance sets during the
      planner prep phase, and build a side data structure that can be consulted
      later to find which RTEs are members of which inheritance sets.  As proof of
      concept, use the data structure to plan joins against inheritance sets more
      efficiently: we can now use indexes on the set members in inner-indexscan
      joins.  (The generated plans could be improved further, but it'll take some
      executor changes.)  This data structure will also support handling UNION ALL
      subqueries in the same way as inheritance sets, but that aspect of it isn't
      finished yet.
      8a1468af
  3. 28 Dec, 2005 1 commit
    • Tom Lane's avatar
      Implement SQL-compliant treatment of row comparisons for < <= > >= cases · 6e077097
      Tom Lane authored
      (previously we only did = and <> correctly).  Also, allow row comparisons
      with any operators that are in btree opclasses, not only those with these
      specific names.  This gets rid of a whole lot of indefensible assumptions
      about the behavior of particular operators based on their names ... though
      it's still true that IN and NOT IN expand to "= ANY".  The patch adds a
      RowCompareExpr expression node type, and makes some changes in the
      representation of ANY/ALL/ROWCOMPARE SubLinks so that they can share code
      with RowCompareExpr.
      
      I have not yet done anything about making RowCompareExpr an indexable
      operator, but will look at that soon.
      
      initdb forced due to changes in stored rules.
      6e077097
  4. 20 Dec, 2005 1 commit
  5. 22 Nov, 2005 2 commits
  6. 21 Nov, 2005 1 commit
    • Alvaro Herrera's avatar
      Implement DROP OWNED and REASSIGN OWNED. These new commands facilitate the · cec3b0a9
      Alvaro Herrera authored
      process of dropping roles by dropping objects owned by them and privileges
      granted to them, or giving the owned objects to someone else, through the
      use of the data stored in the new pg_shdepend catalog.
      
      Some refactoring of the GRANT/REVOKE code was needed, as well as ALTER OWNER
      code.  Further cleanup of code duplication in the GRANT code seems necessary.
      
      Implemented by me after an idea from Tom Lane, who also provided various kind
      of implementation advice.
      
      Regression tests pass.  Some tests for the new functionality are also added,
      as well as rudimentary documentation.
      cec3b0a9
  7. 20 Nov, 2005 1 commit
  8. 14 Nov, 2005 1 commit
    • Tom Lane's avatar
      Restore the former RestrictInfo field valid_everywhere (but invert the flag · 1bdf124b
      Tom Lane authored
      sense and rename to "outerjoin_delayed" to more clearly reflect what it
      means).  I had decided that it was redundant in 8.1, but the folly of this
      is exposed by a bug report from Sebastian Böck.  The place where it's
      needed is to prevent orindxpath.c from cherry-picking arms of an outer-join
      OR clause to form a relation restriction that isn't actually legal to push
      down to the relation scan level.  There may be some legal cases that this
      forbids optimizing, but we'd need much closer analysis to determine it.
      1bdf124b
  9. 15 Oct, 2005 1 commit
  10. 01 Aug, 2005 2 commits
  11. 31 Jul, 2005 1 commit
  12. 26 Jul, 2005 1 commit
    • Tom Lane's avatar
      Add a role property 'rolinherit' which, when false, denotes that the role · af019fb9
      Tom Lane authored
      doesn't automatically inherit the privileges of roles it is a member of;
      for such a role, membership in another role can be exploited only by doing
      explicit SET ROLE.  The default inherit setting is TRUE, so by default
      the behavior doesn't change, but creating a user with NOINHERIT gives closer
      adherence to our current reading of SQL99.  Documentation still lacking,
      and I think the information schema needs another look.
      af019fb9
  13. 02 Jul, 2005 1 commit
    • Tom Lane's avatar
      Teach planner about some cases where a restriction clause can be · cc5e80b8
      Tom Lane authored
      propagated inside an outer join.  In particular, given
      LEFT JOIN ON (A = B) WHERE A = constant, we cannot conclude that
      B = constant at the top level (B might be null instead), but we
      can nonetheless put a restriction B = constant into the quals for
      B's relation, since no inner-side rows not meeting that condition
      can contribute to the final result.  Similarly, given
      FULL JOIN USING (J) WHERE J = constant, we can't directly conclude
      that either input J variable = constant, but it's OK to push such
      quals into each input rel.  Per recent gripe from Kim Bisgaard.
      Along the way, remove 'valid_everywhere' flag from RestrictInfo,
      as on closer analysis it was not being used for anything, and was
      defined backwards anyway.
      cc5e80b8
  14. 28 Jun, 2005 1 commit
    • Tom Lane's avatar
      Replace pg_shadow and pg_group by new role-capable catalogs pg_authid · 7762619e
      Tom Lane authored
      and pg_auth_members.  There are still many loose ends to finish in this
      patch (no documentation, no regression tests, no pg_dump support for
      instance).  But I'm going to commit it now anyway so that Alvaro can
      make some progress on shared dependencies.  The catalog changes should
      be pretty much done.
      7762619e
  15. 26 Jun, 2005 1 commit
  16. 22 Jun, 2005 1 commit
  17. 17 Jun, 2005 1 commit
  18. 09 Jun, 2005 1 commit
    • Tom Lane's avatar
      Simplify the planner's join clause management by storing join clauses · a31ad27f
      Tom Lane authored
      of a relation in a flat 'joininfo' list.  The former arrangement grouped
      the join clauses according to the set of unjoined relids used in each;
      however, profiling on test cases involving lots of joins proves that
      that data structure is a net loss.  It takes more time to group the
      join clauses together than is saved by avoiding duplicate tests later.
      It doesn't help any that there are usually not more than one or two
      clauses per group ...
      a31ad27f
  19. 05 Jun, 2005 1 commit
    • Tom Lane's avatar
      Remove planner's private fields from Query struct, and put them into · 9ab4d981
      Tom Lane authored
      a new PlannerInfo struct, which is passed around instead of the bare
      Query in all the planning code.  This commit is essentially just a
      code-beautification exercise, but it does open the door to making
      larger changes to the planner data structures without having to muck
      with the widely-known Query struct.
      9ab4d981
  20. 28 Apr, 2005 1 commit
    • Tom Lane's avatar
      Implement sharable row-level locks, and use them for foreign key references · bedb78d3
      Tom Lane authored
      to eliminate unnecessary deadlocks.  This commit adds SELECT ... FOR SHARE
      paralleling SELECT ... FOR UPDATE.  The implementation uses a new SLRU
      data structure (managed much like pg_subtrans) to represent multiple-
      transaction-ID sets.  When more than one transaction is holding a shared
      lock on a particular row, we create a MultiXactId representing that set
      of transactions and store its ID in the row's XMAX.  This scheme allows
      an effectively unlimited number of row locks, just as we did before,
      while not costing any extra overhead except when a shared lock actually
      has to be shared.   Still TODO: use the regular lock manager to control
      the grant order when multiple backends are waiting for a row lock.
      
      Alvaro Herrera and Tom Lane.
      bedb78d3
  21. 07 Apr, 2005 1 commit
    • Neil Conway's avatar
      Add a "USING" clause to DELETE, which is equivalent to the FROM clause · f5ab0a14
      Neil Conway authored
      in UPDATE. We also now issue a NOTICE if a query has _any_ implicit
      range table entries -- in the past, we would only warn about implicit
      RTEs in SELECTs with at least one explicit RTE.
      
      As a result of the warning change, 25 of the regression tests had to
      be updated. I also took the opportunity to remove some bogus whitespace
      differences between some of the float4 and float8 variants. I believe
      I have correctly updated all the platform-specific variants, but let
      me know if that's not the case.
      
      Original patch for DELETE ... USING from Euler Taveira de Oliveira,
      reworked by Neil Conway.
      f5ab0a14
  22. 06 Apr, 2005 1 commit
    • Tom Lane's avatar
      Merge Resdom nodes into TargetEntry nodes to simplify code and save a · ad161bcc
      Tom Lane authored
      few palloc's.  I also chose to eliminate the restype and restypmod fields
      entirely, since they are redundant with information stored in the node's
      contained expression; re-examining the expression at need seems simpler
      and more reliable than trying to keep restype/restypmod up to date.
      
      initdb forced due to change in contents of stored rules.
      ad161bcc
  23. 29 Mar, 2005 1 commit
    • Tom Lane's avatar
      Fix grammar for IN/OUT/INOUT parameters. This commit doesn't actually · eb47ee48
      Tom Lane authored
      implement any new feature, it just pushes the 'not implemented' error
      message deeper into the backend.  I also tweaked the grammar to accept
      Oracle-ish parameter syntax (parameter name first), as well as the
      SQL99 standard syntax (parameter mode first), since it was easy and
      people will doubtless try to use both anyway.
      eb47ee48
  24. 14 Mar, 2005 1 commit
    • Neil Conway's avatar
      Allow ALTER FUNCTION to change a function's strictness, volatility, and · c0696554
      Neil Conway authored
      whether or not it is a security definer. Changing a function's strictness
      is required by SQL2003, and the other capabilities make sense. Also, allow
      an optional RESTRICT noise word to be specified, for SQL conformance.
      
      Some trivial regression tests added and the documentation has been
      updated.
      c0696554
  25. 10 Mar, 2005 1 commit
    • Tom Lane's avatar
      Make the behavior of HAVING without GROUP BY conform to the SQL spec. · 595ed2a8
      Tom Lane authored
      Formerly, if such a clause contained no aggregate functions we mistakenly
      treated it as equivalent to WHERE.  Per spec it must cause the query to
      be treated as a grouped query of a single group, the same as appearance
      of aggregate functions would do.  Also, the HAVING filter must execute
      after aggregate function computation even if it itself contains no
      aggregate functions.
      595ed2a8
  26. 27 Jan, 2005 1 commit
  27. 31 Dec, 2004 1 commit
    • PostgreSQL Daemon's avatar
      · 2ff50159
      PostgreSQL Daemon authored
      Tag appropriate files for rc3
      
      Also performed an initial run through of upgrading our Copyright date to
      extend to 2005 ... first run here was very simple ... change everything
      where: grep 1996-2004 && the word 'Copyright' ... scanned through the
      generated list with 'less' first, and after, to make sure that I only
      picked up the right entries ...
      2ff50159
  28. 11 Dec, 2004 1 commit
    • Tom Lane's avatar
      Instead of supposing (wrongly, in the general case) that the rowtype · 12b1b5d8
      Tom Lane authored
      of an inheritance child table is binary-compatible with the rowtype of
      its parent, invent an expression node type that does the conversion
      correctly.  Fixes the new bug exhibited by Kris Shannon as well as a
      lot of old bugs that would only show up when using multiple inheritance
      or after altering the parent table.
      12b1b5d8
  29. 05 Nov, 2004 1 commit
    • Tom Lane's avatar
      Create 'default_tablespace' GUC variable that supplies a TABLESPACE · 98e8b480
      Tom Lane authored
      clause implicitly whenever one is not given explicitly.  Remove concept
      of a schema having an associated tablespace, and simplify the rules for
      selecting a default tablespace for a table or index.  It's now just
      (a) explicit TABLESPACE clause; (b) default_tablespace if that's not an
      empty string; (c) database's default.  This will allow pg_dump to use
      SET commands instead of tablespace clauses to determine object locations
      (but I didn't actually make it do so).  All per recent discussions.
      98e8b480
  30. 29 Aug, 2004 2 commits
  31. 22 Aug, 2004 1 commit
  32. 02 Aug, 2004 1 commit
  33. 12 Jul, 2004 1 commit
    • Tom Lane's avatar
      Remove TABLESPACE option of CREATE SEQUENCE; sequences will now always · c14a43f6
      Tom Lane authored
      live in database or schema's default tablespace, as per today's discussion.
      Also, remove some unused keywords from the grammar (PATH, PENDANT,
      VERSION), and fix ALSO, which was added as a keyword but not added
      to the keyword classification lists, thus making it worse-than-reserved.
      c14a43f6
  34. 25 Jun, 2004 1 commit
  35. 18 Jun, 2004 1 commit
  36. 09 Jun, 2004 1 commit
    • Tom Lane's avatar
      Support assignment to subfields of composite columns in UPDATE and INSERT. · 7e64dbc6
      Tom Lane authored
      As a side effect, cause subscripts in INSERT targetlists to do something
      more or less sensible; previously we evaluated such subscripts and then
      effectively ignored them.  Another side effect is that UPDATE-ing an
      element or slice of an array value that is NULL now produces a non-null
      result, namely an array containing just the assigned-to positions.
      7e64dbc6
  37. 30 May, 2004 1 commit