1. 01 Aug, 2006 1 commit
  2. 27 Jul, 2006 1 commit
    • Tom Lane's avatar
      Aggregate functions now support multiple input arguments. I also took · 108fe473
      Tom Lane authored
      the opportunity to treat COUNT(*) as a zero-argument aggregate instead
      of the old hack that equated it to COUNT(1); this is materially cleaner
      (no more weird ANYOID cases) and ought to be at least a tiny bit faster.
      Original patch by Sergey Koposov; review, documentation, simple regression
      tests, pg_dump and psql support by moi.
      108fe473
  3. 14 Jul, 2006 1 commit
  4. 11 Jul, 2006 1 commit
  5. 02 Jul, 2006 1 commit
  6. 09 Jun, 2006 1 commit
  7. 07 Jun, 2006 1 commit
    • Bruce Momjian's avatar
      Prepare code to be built by MSVC: · 399a36a7
      Bruce Momjian authored
      	o  remove many WIN32_CLIENT_ONLY defines
      	o  add WIN32_ONLY_COMPILER define
      	o  add 3rd argument to open() for portability
      	o  add include/port/win32_msvc directory for
      	   system includes
      
      Magnus Hagander
      399a36a7
  8. 28 May, 2006 2 commits
    • Tom Lane's avatar
      Fix up pg_dump to do string escaping fully correctly for client encoding · 134b463f
      Tom Lane authored
      and standard_conforming_strings; likewise for the other client programs
      that need it.  As per previous discussion, a pg_dump dump now conforms
      to the standard_conforming_strings setting of the source database.
      We don't use E'' syntax in the dump, thereby improving portability of
      the SQL.  I added a SET escape_strings_warning = off command to keep
      the dumps from getting a lot of back-chatter from that.
      134b463f
    • Alvaro Herrera's avatar
      Don't call PQclear until the struct is really no longer going to be used. · 117d73a9
      Alvaro Herrera authored
      Per Coverity bug #304.  Thanks to Martijn van Oosterhout for reporting it.
      
      Zero out the pointer fields of PGresult so that these mistakes are more
      easily catched, per discussion.
      117d73a9
  9. 26 May, 2006 1 commit
    • Bruce Momjian's avatar
      Use E'' strings internally only when standard_conforming_strings = · 7a846ecc
      Bruce Momjian authored
      'off'. This allows pg_dump output with standard_conforming_strings =
      'on' to generate proper strings that can be loaded into other databases
      without the backslash doubling we typically do.  I have added the
      dumping of the standard_conforming_strings value to pg_dump.
      
      I also added standard backslash handling for plpgsql.
      7a846ecc
  10. 05 Mar, 2006 1 commit
  11. 03 Mar, 2006 1 commit
  12. 02 Mar, 2006 1 commit
    • Tom Lane's avatar
      Fix up pg_dump to emit shell-type definitions at the proper time, to · 181f55e5
      Tom Lane authored
      make use of the recently added ability to create a shell type explicitly.
      
      I also put in place some infrastructure to allow dump/no dump decisions
      to be made separately for each database object, rather than the former
      hardwired 'dump if in a dumpable schema' policy.  This was needed anyway
      for shell types so now seemed a convenient time to do it.  The flexibility
      isn't exposed to the user yet, but is ready for future extensions.
      181f55e5
  13. 21 Feb, 2006 1 commit
    • Tom Lane's avatar
      Fix old pg_dump oversight: default values for domains really need to be dumped · 3666260f
      Tom Lane authored
      by decompiling the typdefaultbin expression, not just printing the typdefault
      text which may be out-of-date or assume the wrong schema search path.  (It's
      the same hazard as for adbin vs adsrc in column defaults.)  The catalogs.sgml
      spec for pg_type implies that the correct procedure is to look to
      typdefaultbin first and consider typdefault only if typdefaultbin is NULL.
      I made dumping of both domains and base types do that, even though in the
      current backend code typdefaultbin is always correct for domains and
      typdefault for base types --- might as well try to future-proof it a little.
      Per bug report from Alexander Galler.
      3666260f
  14. 12 Feb, 2006 2 commits
    • Bruce Momjian's avatar
      Add MSVC support for utility commands and pg_dump. · 58634caa
      Bruce Momjian authored
      Hiroshi Saito
      58634caa
    • 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
  15. 21 Jan, 2006 1 commit
    • 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
  16. 09 Jan, 2006 1 commit
  17. 06 Jan, 2006 1 commit
  18. 03 Dec, 2005 1 commit
    • Tom Lane's avatar
      Treat procedural languages as owned by the bootstrap superuser, rather · e4a9229d
      Tom Lane authored
      than owned by nobody.  This results in cleaner display of language ACLs,
      since the backend's aclchk.c uses the same convention.  AFAICS there is
      no practical difference but it's nice to avoid emitting SET SESSION
      AUTHORIZATION; also this will make it easier to transition pg_dump to
      some future version in which we may include an explicit ownership column
      in pg_language.  Per gripe from David Begley.
      e4a9229d
  19. 22 Nov, 2005 1 commit
  20. 15 Oct, 2005 1 commit
  21. 21 Sep, 2005 1 commit
  22. 05 Sep, 2005 1 commit
    • Tom Lane's avatar
      Implement a preliminary 'template' facility for procedural languages, · e0dedd05
      Tom Lane authored
      as per my recent proposal.  For now the template data is hard-wired in
      proclang.c --- this should be replaced later by a new shared system
      catalog, but we don't want to force initdb during 8.1 beta.  This change
      lets us cleanly load existing dump files even if they contain outright
      wrong information about a PL's support functions, such as a wrong path
      to the shared library or a missing validator function.  Also, we can
      revert the recent kluges to make pg_dump dump PL support functions that
      are stored in pg_catalog.
      While at it, I removed the code in pg_regress that replaced $libdir
      with a hardcoded path for temporary installations.  This is no longer
      needed given our support for relocatable installations.
      e0dedd05
  23. 23 Aug, 2005 1 commit
  24. 15 Aug, 2005 2 commits
  25. 12 Aug, 2005 1 commit
    • Tom Lane's avatar
      Solve the problem of OID collisions by probing for duplicate OIDs · 721e5378
      Tom Lane authored
      whenever we generate a new OID.  This prevents occasional duplicate-OID
      errors that can otherwise occur once the OID counter has wrapped around.
      Duplicate relfilenode values are also checked for when creating new
      physical files.  Per my recent proposal.
      721e5378
  26. 10 Jul, 2005 2 commits
    • Bruce Momjian's avatar
      Add --encoding to pg_dump. · d1cffe2f
      Bruce Momjian authored
      The Problem:  Occassionally a DBA needs to dump a database to a new
      encoding.   In instances where the current encoding, (or lack of an
      encoding, like SQL_ASCII) is poorly supported on the target  database
      server, it can be useful to dump into a particular  encoding.  But,
      currently the only way to set the encoding of  a pg_dump file is to
      change  client_encoding in postgresql.conf and restart postmaster.
      This is more  than a little awkward for production systems.
      
      Magnus Hagander
      d1cffe2f
    • Bruce Momjian's avatar
      This patch implements putting language handlers for the optional PLs · 07931080
      Bruce Momjian authored
      into pg_catalog rather than public, and supports dumping languages whose
      handlers are found there. This will make it easier to drop the public
      schema if desired.
      
      Unlike the previous patch, the comments have been updated and I have
      reformatted some code to meet Alvarro's request to stick to 80 cols. (I
      actually aghree with this - it makes printing the code much nicer).
      
      I think I did the right thing w.r.t versions earlier than 7.3, but I
      have no real way of checking, so that should be checked by someone with
      more/older knowledge than me ;-)
      
      Andrew Dunstan
      07931080
  27. 02 Jul, 2005 1 commit
  28. 01 Jul, 2005 1 commit
  29. 30 Jun, 2005 1 commit
  30. 21 Jun, 2005 1 commit
  31. 07 Jun, 2005 1 commit
  32. 30 Apr, 2005 1 commit
    • Neil Conway's avatar
      GCC 4.0 includes a new warning option, -Wformat-literal, that emits · 47458f8c
      Neil Conway authored
      a warning when a variable is used as a format string for printf()
      and similar functions (if the variable is derived from untrusted
      data, it could include unexpected formatting sequences). This
      emits too many warnings to be enabled by default, but it does
      flag a few dubious constructs in the Postgres tree. This patch
      fixes up the obvious variants: functions that are passed a variable
      format string but no additional arguments.
      
      Most of these are harmless (e.g. the ruleutils stuff), but there
      is at least one actual bug here: if you create a trigger named
      "%sfoo", pg_dump will read uninitialized memory and fail to dump
      the trigger correctly.
      47458f8c
  33. 15 Apr, 2005 1 commit
    • Tom Lane's avatar
      Revert addition of poorly-thought-out DUMP TIMESTAMP archive entry, · 348f856d
      Tom Lane authored
      which induced bug #1597 in addition to having several other misbehaviors
      (like labeling the dump with a completion time having nothing to do with
      reality).  Instead just print out the desired strings where RestoreArchive
      was already emitting the 'PostgreSQL database dump' and
      'PostgreSQL database dump complete' strings.
      348f856d
  34. 12 Apr, 2005 1 commit
    • Tom Lane's avatar
      Add aggsortop column to pg_aggregate, so that MIN/MAX optimization can · 2e7a6889
      Tom Lane authored
      be supported for all datatypes.  Add CREATE AGGREGATE and pg_dump support
      too.  Add specialized min/max aggregates for bpchar, instead of depending
      on text's min/max, because otherwise the possible use of bpchar indexes
      cannot be recognized.
      initdb forced because of catalog changes.
      2e7a6889
  35. 01 Apr, 2005 1 commit
  36. 14 Mar, 2005 1 commit