1. 18 Jun, 2007 1 commit
    • Tom Lane's avatar
      Arrange for quote_identifier() and pg_dump to not quote keywords that are · 4c310eca
      Tom Lane authored
      unreserved according to the grammar.  The list of unreserved words has gotten
      extensive enough that the unnecessary quoting is becoming a bit of an eyesore.
      To do this, add knowledge of the keyword category to keywords.c's table.
      (Someday we might be able to generate keywords.c's table and the keyword lists
      in gram.y from a common source.)  For the moment, lie about WITH's status in
      the table so it will still get quoted --- this is because of the expectation
      that WITH will become reserved when the SQL recursive-queries patch gets done.
      
      I didn't force initdb because this affects nothing on-disk; but note that a
      few regression tests have changed expected output.
      4c310eca
  2. 11 Jun, 2007 1 commit
    • Tom Lane's avatar
      Support UPDATE/DELETE WHERE CURRENT OF cursor_name, per SQL standard. · 6808f1b1
      Tom Lane authored
      Along the way, allow FOR UPDATE in non-WITH-HOLD cursors; there may once
      have been a reason to disallow that, but it seems to work now, and it's
      really rather necessary if you want to select a row via a cursor and then
      update it in a concurrent-safe fashion.
      
      Original patch by Arul Shaji, rather heavily editorialized by Tom Lane.
      6808f1b1
  3. 26 Apr, 2007 1 commit
    • Neil Conway's avatar
      Rename the newly-added commands for discarding session state. · 16efdb5e
      Neil Conway authored
      RESET SESSION, RESET PLANS, and RESET TEMP are now DISCARD ALL,
      DISCARD PLANS, and DISCARD TEMP, respectively. This is to avoid
      confusion with the pre-existing RESET variants: the DISCARD
      commands are not actually similar to RESET. Patch from Marko
      Kreen, with some minor editorialization.
      16efdb5e
  4. 02 Apr, 2007 1 commit
  5. 19 Mar, 2007 1 commit
    • Jan Wieck's avatar
      Changes pg_trigger and extend pg_rewrite in order to allow triggers and · 0fe16500
      Jan Wieck authored
      rules to be defined with different, per session controllable, behaviors
      for replication purposes.
      
      This will allow replication systems like Slony-I and, as has been stated
      on pgsql-hackers, other products to control the firing mechanism of
      triggers and rewrite rules without modifying the system catalog directly.
      
      The firing mechanisms are controlled by a new superuser-only GUC
      variable, session_replication_role, together with a change to
      pg_trigger.tgenabled and a new column pg_rewrite.ev_enabled. Both
      columns are a single char data type now (tgenabled was a bool before).
      The possible values in these attributes are:
      
           'O' - Trigger/Rule fires when session_replication_role is "origin"
                 (default) or "local". This is the default behavior.
      
           'D' - Trigger/Rule is disabled and fires never
      
           'A' - Trigger/Rule fires always regardless of the setting of
                 session_replication_role
      
           'R' - Trigger/Rule fires when session_replication_role is "replica"
      
      The GUC variable can only be changed as long as the system does not have
      any cached query plans. This will prevent changing the session role and
      accidentally executing stored procedures or functions that have plans
      cached that expand to the wrong query set due to differences in the rule
      firing semantics.
      
      The SQL syntax for changing a triggers/rules firing semantics is
      
           ALTER TABLE <tabname> <when> TRIGGER|RULE <name>;
      
           <when> ::= ENABLE | ENABLE ALWAYS | ENABLE REPLICA | DISABLE
      
      psql's \d command as well as pg_dump are extended in a backward
      compatible fashion.
      
      Jan
      0fe16500
  6. 25 Jan, 2007 1 commit
    • Peter Eisentraut's avatar
      Various fixes in the logic of XML functions: · 22bd156f
      Peter Eisentraut authored
      - Add new SQL command SET XML OPTION (also available via regular GUC) to
        control the DOCUMENT vs. CONTENT option in implicit parsing and
        serialization operations.
      
      - Subtle corrections in the handling of the standalone property in
        xmlroot().
      
      - Allow xmlroot() to work on content fragments.
      
      - Subtle corrections in the handling of the version property in
        xmlconcat().
      
      - Code refactoring for producing XML declarations.
      22bd156f
  7. 23 Jan, 2007 1 commit
  8. 22 Jan, 2007 1 commit
    • Tom Lane's avatar
      Add COST and ROWS options to CREATE/ALTER FUNCTION, plus underlying pg_proc · 5a7471c3
      Tom Lane authored
      columns procost and prorows, to allow simple user adjustment of the estimated
      cost of a function call, as well as control of the estimated number of rows
      returned by a set-returning function.  We might eventually wish to extend this
      to allow function-specific estimation routines, but there seems to be
      consensus that we should try a simple constant estimate first.  In particular
      this provides a relatively simple way to control the order in which different
      WHERE clauses are applied in a plan node, which is a Good Thing in view of the
      fact that the recent EquivalenceClass planner rewrite made that much less
      predictable than before.
      5a7471c3
  9. 09 Jan, 2007 1 commit
    • Tom Lane's avatar
      Support ORDER BY ... NULLS FIRST/LAST, and add ASC/DESC/NULLS FIRST/NULLS LAST · 44317582
      Tom Lane authored
      per-column options for btree indexes.  The planner's support for this is still
      pretty rudimentary; it does not yet know how to plan mergejoins with
      nondefault ordering options.  The documentation is pretty rudimentary, too.
      I'll work on improving that stuff later.
      
      Note incompatible change from prior behavior: ORDER BY ... USING will now be
      rejected if the operator is not a less-than or greater-than member of some
      btree opclass.  This prevents less-than-sane behavior if an operator that
      doesn't actually define a proper sort ordering is selected.
      44317582
  10. 05 Jan, 2007 1 commit
  11. 24 Dec, 2006 1 commit
  12. 21 Dec, 2006 1 commit
  13. 07 Oct, 2006 1 commit
  14. 25 Aug, 2006 1 commit
  15. 12 Aug, 2006 1 commit
  16. 31 Jul, 2006 1 commit
    • Tom Lane's avatar
      Change the bootstrap sequence so that toast tables for system catalogs are · 6e38e34d
      Tom Lane authored
      created in the bootstrap phase proper, rather than added after-the-fact
      by initdb.  This is cleaner than before because it allows us to retire the
      undocumented ALTER TABLE ... CREATE TOAST TABLE command, but the real reason
      I'm doing it is so that toast tables of shared catalogs will now have
      predetermined OIDs.  This will allow a reasonably clean solution to the
      problem of locking tables before we load their relcache entries, to appear
      in a forthcoming patch.
      6e38e34d
  17. 15 Jul, 2006 1 commit
  18. 27 Jun, 2006 1 commit
  19. 05 Mar, 2006 1 commit
  20. 27 Dec, 2005 1 commit
  21. 22 Nov, 2005 1 commit
  22. 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
  23. 19 Nov, 2005 1 commit
    • Andrew Dunstan's avatar
      · daea4d8e
      Andrew Dunstan authored
      DROP objecttype IF EXISTS for the following objects:
        table view index sequence schema type domain conversion
      daea4d8e
  24. 15 Oct, 2005 1 commit
  25. 23 Aug, 2005 1 commit
  26. 31 Jul, 2005 1 commit
  27. 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
  28. 29 Jun, 2005 1 commit
  29. 28 Jun, 2005 2 commits
    • Tom Lane's avatar
      Bring syntax of role-related commands into SQL compliance. To avoid · 0eaa36a1
      Tom Lane authored
      syntactic conflicts, both privilege and role GRANT/REVOKE commands have
      to use the same production for scanning the list of tokens that might
      eventually turn out to be privileges or role names.  So, change the
      existing GRANT/REVOKE code to expect a list of strings not pre-reduced
      AclMode values.  Fix a couple other minor issues while at it, such as
      InitializeAcl function name conflicting with a Windows system function.
      0eaa36a1
    • 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
  30. 26 Jun, 2005 1 commit
  31. 22 Jun, 2005 1 commit
  32. 17 Jun, 2005 1 commit
  33. 14 Jun, 2005 1 commit
  34. 07 May, 2005 1 commit
  35. 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
  36. 29 Aug, 2004 1 commit
  37. 27 Jul, 2004 1 commit
  38. 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
  39. 18 Jun, 2004 1 commit