1. 03 8月, 2002 1 次提交
    • T
      ALTER TABLE DROP COLUMN works. Patch by Christopher Kings-Lynne, · 38bb77a5
      Tom Lane 提交于
      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
  2. 01 8月, 2002 1 次提交
    • T
      Instead of having a configure-time DEFAULT_ATTSTATTARGET, store -1 in · ce7565ab
      Tom Lane 提交于
      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
  3. 20 7月, 2002 1 次提交
    • B
      oid is needed, it is added at the end of the struct (after the null · b0f5086e
      Bruce Momjian 提交于
      bitmap, if present).
      
      Per Tom Lane's suggestion the information whether a tuple has an oid
      or not is carried in the tuple descriptor.  For debugging reasons
      tdhasoid is of type char, not bool.  There are predefined values for
      WITHOID, WITHOUTOID and UNDEFOID.
      
      This patch has been generated against a cvs snapshot from last week
      and I don't expect it to apply cleanly to current sources.  While I
      post it here for public review, I'm working on a new version against a
      current snapshot.  (There's been heavy activity recently; hope to
      catch up some day ...)
      
      This is a long patch;  if it is too hard to swallow, I can provide it
      in smaller pieces:
      
      Part 1:  Accessor macros
      Part 2:  tdhasoid in TupDesc
      Part 3:  Regression test
      Part 4:  Parameter withoid to heap_addheader
      Part 5:  Eliminate t_oid from HeapTupleHeader
      
      Part 2 is the most hairy part because of changes in the executor and
      even in the parser;  the other parts are straightforward.
      
      Up to part 4 the patched postmaster stays binary compatible to
      databases created with an unpatched version.  Part 5 is small (100
      lines) and finally breaks compatibility.
      
      Manfred Koizar
      b0f5086e
  4. 17 7月, 2002 1 次提交
  5. 16 7月, 2002 2 次提交
  6. 13 7月, 2002 1 次提交
    • T
      Second phase of committing Rod Taylor's pg_depend/pg_constraint patch. · 7c6df91d
      Tom Lane 提交于
      pg_relcheck is gone; CHECK, UNIQUE, PRIMARY KEY, and FOREIGN KEY
      constraints all have real live entries in pg_constraint.  pg_depend
      exists, and RESTRICT/CASCADE options work on most kinds of DROP;
      however, pg_depend is not yet very well populated with dependencies.
      (Most of the ones that are present at this point just replace formerly
      hardwired associations, such as the implicit drop of a relation's pg_type
      entry when the relation is dropped.)  Need to add more logic to create
      dependency entries, improve pg_dump to dump constraints in place of
      indexes and triggers, and add some regression tests.
      7c6df91d
  7. 07 7月, 2002 1 次提交
  8. 01 7月, 2002 1 次提交
    • T
      First phase of applying Rod Taylor's pg_depend patch. This just adds · 131f801d
      Tom Lane 提交于
      RESTRICT/CASCADE syntax to the DROP commands that need it, and propagates
      the behavioral option through the parser to the routines that execute
      drops.  Doesn't do anything useful yet, but I figured I'd commit these
      changes so I could get out of the parser area while working on the rest.
      131f801d
  9. 17 6月, 2002 1 次提交
  10. 22 5月, 2002 1 次提交
    • T
      Remove global variable scanCommandId in favor of storing a command ID · 959e61e9
      Tom Lane 提交于
      in snapshots, per my proposal of a few days ago.  Also, tweak heapam.c
      routines (heap_insert, heap_update, heap_delete, heap_mark4update) to
      be passed the command ID to use, instead of doing GetCurrentCommandID.
      For catalog updates they'll still get passed current command ID, but
      for updates generated from the main executor they'll get passed the
      command ID saved in the snapshot the query is using.  This should fix
      some corner cases associated with functions and triggers that advance
      current command ID while an outer query is still in progress.
      959e61e9
  11. 21 5月, 2002 1 次提交
    • T
      Restructure indexscan API (index_beginscan, index_getnext) per · 44fbe20d
      Tom Lane 提交于
      yesterday's proposal to pghackers.  Also remove unnecessary parameters
      to heap_beginscan, heap_rescan.  I modified pg_proc.h to reflect the
      new numbers of parameters for the AM interface routines, but did not
      force an initdb because nothing actually looks at those fields.
      44fbe20d
  12. 18 5月, 2002 1 次提交
  13. 13 5月, 2002 1 次提交
    • T
      Get rid of long-since-vestigial Iter node type, in favor of adding a · 3389a110
      Tom Lane 提交于
      returns-set boolean field in Func and Oper nodes.  This allows cleaner,
      more reliable tests for expressions returning sets in the planner and
      parser.  For example, a WHERE clause returning a set is now detected
      and complained of in the parser, not only at runtime.
      3389a110
  14. 28 4月, 2002 1 次提交
    • T
      Support toasting of shared system relations, and provide toast tables for · c06f6a6b
      Tom Lane 提交于
      pg_database, pg_shadow, pg_group, all of which now have potentially-long
      fields.  Along the way, get rid of SharedSystemRelationNames list: shared
      rels are now identified in their include/pg_catalog/*.h files by a
      BKI_SHARED_RELATION macro, while indexes and toast rels inherit sharedness
      automatically from their parent table.  Fix some bugs with failure to detoast
      pg_group.grolist during ALTER GROUP.
      c06f6a6b
  15. 27 4月, 2002 2 次提交
  16. 24 4月, 2002 2 次提交
  17. 23 4月, 2002 2 次提交
  18. 20 4月, 2002 2 次提交
    • T
      Change naming rule for ON SELECT rules of views: they're all just · 6d6ca216
      Tom Lane 提交于
      _RETURN now, since there's no need to keep 'em unique anymore.
      6d6ca216
    • T
      pg_trigger's index on tgrelid is replaced by a unique index on · 20173716
      Tom Lane 提交于
      (tgrelid, tgname).  This provides an additional check on trigger name
      uniqueness per-table (which was already enforced by the code anyway).
      With this change, RelationBuildTriggers will read the triggers in
      order by tgname, since it's scanning using this index.  Since a
      predictable trigger ordering has been requested for some time, document
      this behavior as a feature.  Also document that rules fire in name
      order, since yesterday's changes to pg_rewrite indexing cause that too.
      20173716
  19. 19 4月, 2002 1 次提交
    • T
      Rule names are now unique per-relation, rather than unique globally. · b3120804
      Tom Lane 提交于
      DROP RULE and COMMENT ON RULE syntax adds an 'ON tablename' clause,
      similar to TRIGGER syntaxes.  To allow loading of existing pg_dump
      files containing COMMENT ON RULE, the COMMENT code will still accept
      the old syntax --- but only if the target rulename is unique across
      the whole database.
      b3120804
  20. 16 4月, 2002 1 次提交
    • B
      CATALOG VERSION UPDATED: · bbae09c2
      Bruce Momjian 提交于
      The indexes on most system catalogs are named with the suffix "_index";
      not so with TOAST table indexes, which use "_idx". This trivial patch
      changes TOAST table index names to use the "_index" suffix for
      consistency.
      
      Neil Conway
      bbae09c2
  21. 15 4月, 2002 2 次提交
    • T
      The contents of command.c, creatinh.c, define.c, remove.c and rename.c · 71dc300a
      Tom Lane 提交于
      have been divided according to the type of object manipulated - so ALTER
      TABLE code is in tablecmds.c, aggregate commands in aggregatecmds.c and
      so on.
      
      A few common support routines remain in define.c (prototypes in
      src/include/commands/defrem.h).
      
      No code has been changed except for includes to reflect the new files.
      The prototypes for aggregatecmds.c, functioncmds.c, operatorcmds.c,
      and typecmds.c remain in src/include/commands/defrem.h.
      
      From John Gray <jgray@azuli.co.uk>
      71dc300a
    • B
      Fix comment dashes. · 872911bc
      Bruce Momjian 提交于
      872911bc
  22. 13 4月, 2002 1 次提交
  23. 12 4月, 2002 1 次提交
  24. 02 4月, 2002 2 次提交
  25. 01 4月, 2002 1 次提交
  26. 31 3月, 2002 1 次提交
  27. 30 3月, 2002 2 次提交
  28. 27 3月, 2002 1 次提交
  29. 23 3月, 2002 1 次提交
  30. 22 3月, 2002 3 次提交
    • T
      A little further progress on schemas: push down RangeVars into · 108a0ec8
      Tom Lane 提交于
      addRangeTableEntry calls.  Remove relname field from RTEs, since
      it will no longer be a useful unique identifier of relations;
      we want to encourage people to rely on the relation OID instead.
      Further work on dumping qual expressions in EXPLAIN, too.
      108a0ec8
    • T
      Change the aclchk.c routines to uniformly use OIDs to identify the · 56c9b73c
      Tom Lane 提交于
      objects to be privilege-checked.  Some change in their APIs would be
      necessary no matter what in the schema environment, and simply getting
      rid of the name-based interface entirely seems like the best way.
      56c9b73c
    • T
      First phase of SCHEMA changes, concentrating on fixing the grammar and · 95ef6a34
      Tom Lane 提交于
      the parsetree representation.  As yet we don't *do* anything with schema
      names, just drop 'em on the floor; but you can enter schema-compatible
      command syntax, and there's even a primitive CREATE SCHEMA command.
      No doc updates yet, except to note that you can now extract a field
      from a function-returning-row's result with (foo(...)).fieldname.
      95ef6a34