Skip to content
Snippets Groups Projects
  1. Apr 22, 2006
  2. Apr 15, 2006
    • Bruce Momjian's avatar
      Document that pg_dump -d/-D prevents invalid data from canceling the · 598dfee5
      Bruce Momjian authored
      entire table load.
      598dfee5
    • Tom Lane's avatar
      Support the syntax · 3651a3e6
      Tom Lane authored
      	CREATE AGGREGATE aggname (input_type) (parameter_list)
      along with the old syntax where the input type was named in the parameter
      list.  This fits more naturally with the way that the aggregate is identified
      in DROP AGGREGATE and other utility commands; furthermore it has a natural
      extension to handle multiple-input aggregates, where the basetype-parameter
      method would get ugly.  In fact, this commit fixes the grammar and all the
      utility commands to support multiple-input aggregates; but DefineAggregate
      rejects it because the executor isn't fixed yet.
      I didn't do anything about treating agg(*) as a zero-input aggregate instead
      of artificially making it a one-input aggregate, but that should be considered
      in combination with supporting multi-input aggregates.
      3651a3e6
  3. Apr 06, 2006
    • Tom Lane's avatar
      Fix a bunch of problems with domains by making them use special input functions · 7fdb4305
      Tom Lane authored
      that apply the necessary domain constraint checks immediately.  This fixes
      cases where domain constraints went unchecked for statement parameters,
      PL function local variables and results, etc.  We can also eliminate existing
      special cases for domains in places that had gotten it right, eg COPY.
      
      Also, allow domains over domains (base of a domain is another domain type).
      This almost worked before, but was disallowed because the original patch
      hadn't gotten it quite right.
      7fdb4305
  4. Apr 04, 2006
    • Tom Lane's avatar
      Modify all callers of datatype input and receive functions so that if these · 147d4bf3
      Tom Lane authored
      functions are not strict, they will be called (passing a NULL first parameter)
      during any attempt to input a NULL value of their datatype.  Currently, all
      our input functions are strict and so this commit does not change any
      behavior.  However, this will make it possible to build domain input functions
      that centralize checking of domain constraints, thereby closing numerous holes
      in our domain support, as per previous discussion.
      
      While at it, I took the opportunity to introduce convenience functions
      InputFunctionCall, OutputFunctionCall, etc to use in code that calls I/O
      functions.  This eliminates a lot of grotty-looking casts, but the main
      motivation is to make it easier to grep for these places if we ever need
      to touch them again.
      147d4bf3
  5. Apr 02, 2006
  6. Mar 17, 2006
  7. Mar 08, 2006
  8. Mar 03, 2006
  9. Feb 28, 2006
    • Tom Lane's avatar
      Allow the syntax CREATE TYPE foo, with no parameters, to permit explicit · 8e68d783
      Tom Lane authored
      creation of a shell type.  This allows a less hacky way of dealing with
      the mutual dependency between a datatype and its I/O functions: make a
      shell type, then make the functions, then define the datatype fully.
      We should fix pg_dump to handle things this way, but this commit just deals
      with the backend.
      
      Martijn van Oosterhout, with some corrections by Tom Lane.
      8e68d783
  10. Feb 26, 2006
  11. Feb 19, 2006
  12. Feb 14, 2006
  13. Feb 13, 2006
  14. Feb 12, 2006
    • Tom Lane's avatar
      Fix broken markup. · 1ac1526e
      Tom Lane authored
      1ac1526e
    • Bruce Momjian's avatar
      Revert patch becaues of locking concerns: · 04a2b54c
      Bruce Momjian authored
      Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
      
      Joachim Wieland
      04a2b54c
    • Bruce Momjian's avatar
      > Actually, if you submit a patch that says either "SCROLL is the · 92a26489
      Bruce Momjian authored
      default"
      > or "NO SCROLL is the default", it will be rejected as incorrect.  The
      > reason is that the default behavior is different from either of these,
      > as is explained in the NOTES section.
      
      Ok, so *that's* where the bit about the query plan being simple enough.
      Based on that, ISTM that it should be premissable for us to decide that
      a cursor requiring a sort isn't "simple enough" to support SCROLL.
      
      In any case, here's a patch that makes the non-standard behavior easier
      for people to find.
      
      Jim C. Nasby
      92a26489
    • Bruce Momjian's avatar
      Add psql option: · 0f57851e
      Bruce Momjian authored
      	-1 or --single-transaction
      
      Simon Riggs
      0f57851e
    • Bruce Momjian's avatar
      I've created a new shared catalog table pg_shdescription to store · f9a726aa
      Bruce Momjian authored
      comments on cluster global objects like databases, tablespaces, and
      roles.
      
      It touches a lot of places, but not much in the way of big changes.  The
      only design decision I made was to duplicate the query and manipulation
      functions rather than to try and have them handle both shared and local
      comments.  I believe this is simpler for the code and not an issue for
      callers because they know what type of object they are dealing with.
      This has resulted in a shobj_description function analagous to
      obj_description and backend functions [Create/Delete]SharedComments
      mirroring the existing [Create/Delete]Comments functions.
      
      pg_shdescription.h goes into src/include/catalog/
      
      Kris Jurka
      f9a726aa
    • Bruce Momjian's avatar
      Please find enclosed a patch that lets you use \c to connect · 07bae9c0
      Bruce Momjian authored
      (optionally) to a new host and port without exiting psql.  This
      eliminates, IMHO, a surprise in that you can now connect to PostgreSQL
      on a differnt machine from the one where you started your session. This
      should help people who use psql as an administrative tool.
      
      David Fetter
      07bae9c0
  15. Feb 11, 2006
  16. Feb 04, 2006
  17. Jan 22, 2006
  18. Jan 21, 2006
    • Bruce Momjian's avatar
      Add GRANT ON SEQUENCE syntax to support sequence-only permissions. · 4789e988
      Bruce Momjian authored
      Continue to support GRANT ON [TABLE] for sequences for backward
      compatibility;  issue warning for invalid sequence permissions.
      
      [Backward compatibility warning message.]
      
      Add USAGE permission for sequences that allows only currval() and
      nextval(), not setval().
      
      Mention object name in grant/revoke warnings because of possible
      multi-object operations.
      4789e988
  19. Jan 20, 2006
  20. Jan 18, 2006
    • Neil Conway's avatar
      Add a new system view, pg_cursors, that displays the currently available · 33e06ebc
      Neil Conway authored
      cursors. Patch from Joachim Wieland, review and ediorialization by Neil
      Conway. The view lists cursors defined by DECLARE CURSOR, using SPI, or
      via the Bind message of the frontend/backend protocol. This means the
      view does not list the unnamed portal or the portal created to implement
      EXECUTE. Because we do list SPI portals, there might be more rows in
      this view than you might expect if you are using SPI implicitly (e.g.
      via a procedural language).
      
      Per recent discussion on -hackers, the query string included in the
      view for cursors defined by DECLARE CURSOR is based on
      debug_query_string. That means it is not accurate if multiple queries
      separated by semicolons are submitted as one query string. However,
      there doesn't seem a trivial fix for that: debug_query_string
      is better than nothing. I also changed SPI_cursor_open() to include
      the source text for the portal it creates: AFAICS there is no reason
      not to do this.
      
      Update the documentation and regression tests, bump the catversion.
      33e06ebc
  21. Jan 16, 2006
  22. Jan 15, 2006
  23. Jan 13, 2006
    • Tom Lane's avatar
      Document that CREATE OPERATOR CLASS amounts to granting public execute · 7d6d02b6
      Tom Lane authored
      permissions on the functions and operators contained in the opclass.
      Since we already require superuser privilege to create an operator class,
      there's no expansion-of-privilege hazard here, but if someone were to get
      the idea of building an opclass containing functions that need security
      restrictions, we'd better warn them off.  Also, change the permission
      checks from have-execute-privilege to have-ownership, and then comment
      them all out since they're dead code anyway under the superuser restriction.
      7d6d02b6
    • Tom Lane's avatar
      Require the issuer of CREATE TYPE to own the functions mentioned in the · 1564e92c
      Tom Lane authored
      type definition.  Because use of a type's I/O conversion functions isn't
      access-checked, CREATE TYPE amounts to granting public execute permissions
      on the functions, and so allowing it to anybody means that someone could
      theoretically gain access to a function he's not supposed to be able to
      execute.  The parameter-type restrictions already enforced by CREATE TYPE
      make it fairly unlikely that this oversight is meaningful in practice,
      but still it seems like a good idea to plug the hole going forward.
      Also, document the implicit grant just in case anybody gets the idea of
      building I/O functions that might need security restrictions.
      1564e92c
Loading