Skip to content
Snippets Groups Projects
  1. Jul 02, 2006
    • Bruce Momjian's avatar
      Add FILLFACTOR to CREATE INDEX. · 277807bd
      Bruce Momjian authored
      ITAGAKI Takahiro
      277807bd
    • Bruce Momjian's avatar
      ALTER TABLE ... ADD/DROPS INHERIT (actually INHERIT / NO INHERIT) · 8c092781
      Bruce Momjian authored
      Open items:
      
      There were a few tangentially related issues that have come up that I think
      are TODOs. I'm likely to tackle one or two of these next so I'm interested in
      hearing feedback on them as well.
      
      . Constraints currently do not know anything about inheritance. Tom suggested
        adding a coninhcount and conislocal like attributes have to track their
        inheritance status.
      
      . Foreign key constraints currently do not get copied to new children (and
        therefore my code doesn't verify them). I don't think it would be hard to
        add them and treat them like CHECK constraints.
      
      . No constraints at all are copied to tables defined with LIKE. That makes it
        hard to use LIKE to define new partitions. The standard defines LIKE and
        specifically says it does not copy constraints. But the standard already has
        an option called INCLUDING DEFAULTS; we could always define a non-standard
        extension LIKE table INCLUDING CONSTRAINTS that gives the user the option to
        request a copy including constraints.
      
      . Personally, I think the whole attislocal thing is bunk. The decision about
        whether to drop a column from children tables or not is something that
        should be up to the user and trying to DWIM based on whether there was ever
        a local definition or the column was acquired purely through inheritance is
        hardly ever going to match up with user expectations.
      
      . And of course there's the whole unique and primary key constraint issue. I
        think to get any traction at all on this you have a prerequisite of a real
        partitioned table implementation where the system knows what the partition
        key is so it can recognize when it's a leading part of an index key.
      
      Greg Stark
      8c092781
  2. Jun 29, 2006
  3. Jun 28, 2006
  4. Jun 27, 2006
  5. Jun 26, 2006
    • Tom Lane's avatar
      Change the row constructor syntax (ROW(...)) so that list elements foo.* · ca0d2197
      Tom Lane authored
      will be expanded to a list of their member fields, rather than creating
      a nested rowtype field as formerly.  (The old behavior is still available
      by omitting '.*'.)  This syntax is not allowed by the SQL spec AFAICS,
      so changing its behavior doesn't violate the spec.  The new behavior is
      substantially more useful since it allows, for example, triggers to check
      for data changes with 'if row(new.*) is distinct from row(old.*)'.  Per
      my recent proposal.
      ca0d2197
  6. Jun 19, 2006
  7. Jun 18, 2006
  8. Jun 17, 2006
  9. Jun 16, 2006
  10. Jun 15, 2006
  11. Jun 12, 2006
  12. Jun 06, 2006
    • Tom Lane's avatar
      Make the planner estimate costs for nestloop inner indexscans on the basis · 8a30cc21
      Tom Lane authored
      that the Mackert-Lohmann formula applies across all the repetitions of the
      nestloop, not just each scan independently.  We use the M-L formula to
      estimate the number of pages fetched from the index as well as from the table;
      that isn't what it was designed for, but it seems reasonably applicable
      anyway.  This makes large numbers of repetitions look much cheaper than
      before, which accords with many reports we've received of overestimation
      of the cost of a nestloop.  Also, change the index access cost model to
      charge random_page_cost per index leaf page touched, while explicitly
      not counting anything for access to metapage or upper tree pages.  This
      may all need tweaking after we get some field experience, but in simple
      tests it seems to be giving saner results than before.  The main thing
      is to get the infrastructure in place to let cost_index() and amcostestimate
      functions take repeated scans into account at all.  Per my recent proposal.
      
      Note: this patch changes pg_proc.h, but I did not force initdb because
      the changes are basically cosmetic --- the system does not look into
      pg_proc to decide how to call an index amcostestimate function, and
      there's no way to call such a function from SQL at all.
      8a30cc21
  13. Jun 05, 2006
  14. Jun 03, 2006
  15. Jun 01, 2006
  16. May 31, 2006
  17. May 30, 2006
    • Tom Lane's avatar
      Code review for magic-block patch. Remove separate header file pgmagic.h, · e60cb3a3
      Tom Lane authored
      as this seems only likely to create headaches for module developers.  Put
      the macro in the pre-existing fmgr.h file instead.  Avoid being too cute
      about how many fields we can cram into a word, and avoid trying to fetch
      from a library we've already unlinked.
      Along the way, it occurred to me that the magic block really ought to be
      'const' so it can be stored in the program text area.  Do the same for
      the existing data blocks for PG_FUNCTION_INFO_V1 functions.
      e60cb3a3
    • Bruce Momjian's avatar
      Add pgmagic header block to store compile-time constants: · 01b2168c
      Bruce Momjian authored
      It now only checks four things:
      
      Major version number (7.4 or 8.1 for example)
      NAMEDATALEN
      FUNC_MAX_ARGS
      INDEX_MAX_KEYS
      
      The three constants were chosen because:
      
      1. We document them in the config page in the docs
      2. We mark them as changable in pg_config_manual.h
      3. Changing any of these will break some of the more popular modules:
      
      FUNC_MAX_ARGS changes fmgr interface, every module uses this NAMEDATALEN
      changes syscache interface, every PL as well as tsearch uses this
      INDEX_MAX_KEYS breaks tsearch and anything using GiST.
      
      Martijn van Oosterhout
      01b2168c
    • Bruce Momjian's avatar
      Revert patch, needs more work: · 4d06e86d
      Bruce Momjian authored
      ---------------------------------------------------------------------------
      
      Add dynamic record inspection to PL/PgSQL, useful for generic triggers:
      
        tval2 := r.(cname);
      
      or
      
        columns := r.(*);
      
      Titus von Boxberg
      4d06e86d
    • Bruce Momjian's avatar
      Add dynamic record inspection to PL/PgSQL, useful for generic triggers: · 38c7700f
      Bruce Momjian authored
        tval2 := r.(cname);
      
      or
      
        columns := r.(*);
      
      Titus von Boxberg
      38c7700f
    • Bruce Momjian's avatar
      88ba64d3
    • Bruce Momjian's avatar
      Add regexp_replace() to string functions section. · b6477c62
      Bruce Momjian authored
      Joachim Wieland
      b6477c62
    • Bruce Momjian's avatar
      Update PL documentation: · fcc02c20
      Bruce Momjian authored
      An article at WebProNews quoted from the PG docs as to the merits of
      stored procedures.  I have added a bit more material on their merits,
      as well as making a few changes to improve the introductions to
      PL/Perl and PL/Tcl.
      
      Chris Browne
      fcc02c20
Loading