1. 21 Dec, 2002 1 commit
  2. 12 Dec, 2002 1 commit
  3. 01 Dec, 2002 1 commit
  4. 29 Nov, 2002 1 commit
  5. 23 Nov, 2002 1 commit
    • Bruce Momjian's avatar
      This patch implements FOR EACH STATEMENT triggers, per my email to · 1b7f3cc0
      Bruce Momjian authored
      -hackers a couple days ago.
      
      Notes/caveats:
      
              - added regression tests for the new functionality, all
                regression tests pass on my machine
      
              - added pg_dump support
      
              - updated PL/PgSQL to support per-statement triggers; didn't
                look at the other procedural languages.
      
              - there's (even) more code duplication in trigger.c than there
                was previously. Any suggestions on how to refactor the
                ExecXXXTriggers() functions to reuse more code would be
                welcome -- I took a brief look at it, but couldn't see an
                easy way to do it (there are several subtly-different
                versions of the code in question)
      
              - updated the documentation. I also took the liberty of
                removing a big chunk of duplicated syntax documentation in
                the Programmer's Guide on triggers, and moving that
                information to the CREATE TRIGGER reference page.
      
              - I also included some spelling fixes and similar small
                cleanups I noticed while making the changes. If you'd like
                me to split those into a separate patch, let me know.
      
      Neil Conway
      1b7f3cc0
  6. 15 Nov, 2002 1 commit
  7. 08 Nov, 2002 1 commit
    • Tom Lane's avatar
      Add extra_float_digits GUC parameter to allow adjustment of displayed · d2c744aa
      Tom Lane authored
      precision for float4, float8, and geometric types.  Set it in pg_dump
      so that float data can be dumped/reloaded exactly (at least on platforms
      where the float I/O support is properly implemented).  Initial patch by
      Pedro Ferreira, some additional work by Tom Lane.
      d2c744aa
  8. 22 Oct, 2002 1 commit
  9. 18 Oct, 2002 1 commit
  10. 16 Oct, 2002 1 commit
  11. 09 Oct, 2002 1 commit
    • Bruce Momjian's avatar
      > Alvaro Herrera <alvherre@atentus.com> writes: · ba8e20a6
      Bruce Momjian authored
      > > I'm looking at pg_dump/common.c:flagInhAttrs() and suspect that it can
      > > be more or less rewritten completely, and probably should to get rigth
      > > all the cases mentioned in the past attisinherited discussion.  Is this
      > > desirable for 7.3?  It can probably be hacked around and the rewrite
      > > kept for 7.4, but I think it will be much simpler after the rewrite.
      >
      > If it's a bug then it's fair game to fix in 7.3.  But keep in mind that
      > pg_dump has to behave at least somewhat sanely when called against older
      > servers ... will your rewrite behave reasonably if the server does not
      > offer attinhcount values?
      
      Nah.  I don't think it's worth it: I had forgotten that older versions
      should be supported.  I just left the code as is and added a
      version-specific test.
      
      This patch allows pg_dump to dump correctly local definition of columns.
      In particular,
      
      CREATE TABLE p1 (f1 int, f2 int);
      CREATE TABLE p2 (f1 int);
      CREATE TABLE c () INHERITS (p1, p2);
      ALTER TABLE ONLY p1 DROP COLUMN f1;
      CREATE TABLE p3 (f1 int);
      CREATE TABLE c2 (f1 int) INHERITS (p3);
      
      Will be dumped as
      CREATE TABLE p1 (f2 int);
      CREATE TABLE p2 (f1 int);
      CREATE TABLE c (f1 int) INHERITS (p1, p2);
      CREATE TABLE c2 (f1 int) INHERITS (p3);
      
      (Previous version will dump
      CREATE TABLE c () INHERITS (p1, p2)
      CREATE TABLE c2 () INHERITS (p3) )
      
      Alvaro Herrera
      ba8e20a6
  12. 24 Sep, 2002 1 commit
  13. 22 Sep, 2002 1 commit
  14. 18 Sep, 2002 1 commit
    • Tom Lane's avatar
      Extend pg_cast castimplicit column to a three-way value; this allows us · b26dfb95
      Tom Lane authored
      to be flexible about assignment casts without introducing ambiguity in
      operator/function resolution.  Introduce a well-defined promotion hierarchy
      for numeric datatypes (int2->int4->int8->numeric->float4->float8).
      Change make_const to initially label numeric literals as int4, int8, or
      numeric (never float8 anymore).
      Explicitly mark Func and RelabelType nodes to indicate whether they came
      from a function call, explicit cast, or implicit cast; use this to do
      reverse-listing more accurately and without so many heuristics.
      Explicit casts to char, varchar, bit, varbit will truncate or pad without
      raising an error (the pre-7.2 behavior), while assigning to a column without
      any explicit cast will still raise an error for wrong-length data like 7.3.
      This more nearly follows the SQL spec than 7.2 behavior (we should be
      reporting a 'completion condition' in the explicit-cast cases, but we have
      no mechanism for that, so just do silent truncation).
      Fix some problems with enforcement of typmod for array elements;
      it didn't work at all in 'UPDATE ... SET array[n] = foo', for example.
      Provide a generalized array_length_coerce() function to replace the
      specialized per-array-type functions that used to be needed (and were
      missing for NUMERIC as well as all the datetime types).
      Add missing conversions int8<->float4, text<->numeric, oid<->int8.
      initdb forced.
      b26dfb95
  15. 07 Sep, 2002 1 commit
  16. 04 Sep, 2002 1 commit
  17. 02 Sep, 2002 1 commit
    • Bruce Momjian's avatar
      I checked all the previous string handling errors and most of them were · a12b4e27
      Bruce Momjian authored
      already fixed by You. However there were a few left and attached patch
      should fix the rest of them.
      
      I used StringInfo only in 2 places and both of them are inside debug
      ifdefs. Only performance penalty will come from using strlen() like all
      the other code does.
      
      I also modified some of the already patched parts by changing
      snprintf(buf, 2 * BUFSIZE, ... style lines to
      snprintf(buf, sizeof(buf), ... where buf is an array.
      
      Jukka Holappa
      a12b4e27
  18. 29 Aug, 2002 1 commit
  19. 28 Aug, 2002 1 commit
  20. 27 Aug, 2002 2 commits
  21. 22 Aug, 2002 3 commits
  22. 20 Aug, 2002 1 commit
  23. 19 Aug, 2002 1 commit
  24. 18 Aug, 2002 2 commits
    • Tom Lane's avatar
      Fix small copy-and-pasteo. · 0556e9cf
      Tom Lane authored
      0556e9cf
    • Peter Eisentraut's avatar
      Make pg_dump output more portable and more pleasing to look at. · c828ec88
      Peter Eisentraut authored
      The -n and -N options were removed.  Quoting is now smart enough to
      supply quotes if and only if necessary.
      
      Numerical types are now printed without quotes, except in cases of
      special values such as NaN.
      
      Boolean values printed as true and false.
      
      Most string literals now do not escape whitespace characters (newlines,
      etc.) for portability.
      
      SET SESSION AUTHORIZATION argument is a string literal, to follow SQL.
      
      Made commands output by pg_dump use consistent spacing and indentation.
      c828ec88
  25. 16 Aug, 2002 2 commits
  26. 15 Aug, 2002 1 commit
    • Bruce Momjian's avatar
      Tom Lane wrote: · b1a5f872
      Bruce Momjian authored
      > There's no longer a separate call to heap_storage_create in that routine
      > --- the right place to make the test is now in the storage_create
      > boolean parameter being passed to heap_create.  A simple change, but
      > it passeth patch's understanding ...
      
      Thanks.
      
      Attached is a patch against cvs tip as of 8:30 PM PST or so. Turned out
      that even after fixing the failed hunks, there was a new spot in
      bufmgr.c which needed to be fixed (related to temp relations;
      RelationUpdateNumberOfBlocks). But thankfully the regression test code
      caught it :-)
      
      Joe Conway
      b1a5f872
  27. 10 Aug, 2002 1 commit
  28. 04 Aug, 2002 1 commit
  29. 02 Aug, 2002 1 commit
    • Tom Lane's avatar
      ALTER TABLE DROP COLUMN works. Patch by Christopher Kings-Lynne, · 38bb77a5
      Tom Lane authored
      code review by Tom Lane.  Remaining issues: functions that take or
      return tuple types are likely to break if one drops (or adds!)
      a column in the table defining the type.  Need to think about what
      to do here.
      
      Along the way: some code review for recent COPY changes; mark system
      columns attnotnull = true where appropriate, per discussion a month ago.
      38bb77a5
  30. 31 Jul, 2002 1 commit
    • Tom Lane's avatar
      Instead of having a configure-time DEFAULT_ATTSTATTARGET, store -1 in · ce7565ab
      Tom Lane authored
      attstattarget to indicate 'use the default'.  The default is now a GUC
      variable default_statistics_target, and so may be changed on the fly.  Along
      the way we gain the ability to have pg_dump dump the per-column statistics
      target when it's not the default.  Patch by Neil Conway, with some kibitzing
      from Tom Lane.
      ce7565ab
  31. 30 Jul, 2002 1 commit
  32. 25 Jul, 2002 1 commit
  33. 24 Jul, 2002 1 commit
    • Peter Eisentraut's avatar
      Remove unused system table columns: · 739adf32
      Peter Eisentraut authored
      pg_language.lancompiler
      pg_operator.oprprec
      pg_operator.oprisleft
      pg_proc.proimplicit
      pg_proc.probyte_pct
      pg_proc.properbyte_cpu
      pg_proc.propercall_cpu
      pg_proc.prooutin_ratio
      pg_shadow.usetrace
      pg_type.typprtlen
      pg_type.typreceive
      pg_type.typsend
      
      Attempts to use the obsoleted attributes of pg_operator or pg_proc
      in the CREATE commands will be greeted by a warning.  For pg_type,
      there is no warning (yet) because pg_dump scripts still contain these
      attributes.
      
      Also remove new but already obsolete spellings
      isVolatile, isStable, isImmutable in WITH clause.  (Use new syntax
      instead.)
      739adf32
  34. 18 Jul, 2002 2 commits