Skip to content
Snippets Groups Projects
  1. May 23, 2004
  2. May 11, 2004
    • Tom Lane's avatar
      Promote row expressions to full-fledged citizens of the expression syntax, · 2f63232d
      Tom Lane authored
      rather than allowing them only in a few special cases as before.  In
      particular you can now pass a ROW() construct to a function that accepts
      a rowtype parameter.  Internal generation of RowExprs fixes a number of
      corner cases that used to not work very well, such as referencing the
      whole-row result of a JOIN or subquery.  This represents a further step in
      the work I started a month or so back to make rowtype values into
      first-class citizens.
      2f63232d
  3. May 05, 2004
    • Tom Lane's avatar
      ALTER TABLE rewrite. New cool stuff: · 077db40f
      Tom Lane authored
      * ALTER ... ADD COLUMN with defaults and NOT NULL constraints works per SQL
      spec.  A default is implemented by rewriting the table with the new value
      stored in each row.
      
      * ALTER COLUMN TYPE.  You can change a column's datatype to anything you
      want, so long as you can specify how to convert the old value.  Rewrites
      the table.  (Possible future improvement: optimize no-op conversions such
      as varchar(N) to varchar(N+1).)
      
      * Multiple ALTER actions in a single ALTER TABLE command.  You can perform
      any number of column additions, type changes, and constraint additions with
      only one pass over the table contents.
      
      Basic documentation provided in ALTER TABLE ref page, but some more docs
      work is needed.
      
      Original patch from Rod Taylor, additional work from Tom Lane.
      077db40f
  4. Apr 21, 2004
  5. Apr 19, 2004
    • Bruce Momjian's avatar
      Complete TODO item: · 862b20b3
      Bruce Momjian authored
              o -Allow dump/load of CSV format
      
      This adds new keywords to COPY and \copy:
      
              CSV - enable CSV mode (comma separated variable)
              QUOTE - specify quote character
              ESCAPE - specify escape character
              FORCE - force quoting of specified column
      	LITERAL - suppress null comparison for columns
      
      Doc changes included.  Regression updates coming from Andrew.
      862b20b3
  6. Apr 18, 2004
    • Tom Lane's avatar
      Tweak findTargetlistEntry so that bare names occurring in GROUP BY clauses · b5e52b08
      Tom Lane authored
      are sought first as local FROM columns, then as local SELECT-list aliases,
      and finally as outer FROM columns; the former behavior made outer FROM
      columns take precedence over aliases.  This does not change spec
      conformance because SQL99 allows only the first case anyway, and it seems
      more useful and self-consistent.  Per gripe from Dennis Bjorklund 2004-04-05.
      b5e52b08
  7. Apr 05, 2004
  8. Apr 02, 2004
  9. Apr 01, 2004
    • Tom Lane's avatar
      Replace TupleTableSlot convention for whole-row variables and function · 375369ac
      Tom Lane authored
      results with tuples as ordinary varlena Datums.  This commit does not
      in itself do much for us, except eliminate the horrid memory leak
      associated with evaluation of whole-row variables.  However, it lays the
      groundwork for allowing composite types as table columns, and perhaps
      some other useful features as well.  Per my proposal of a few days ago.
      375369ac
  10. Mar 24, 2004
  11. Mar 21, 2004
  12. Mar 17, 2004
    • Tom Lane's avatar
      Reimplement CASE val WHEN compval1 THEN ... WHEN compval2 THEN ... END · 55f7c330
      Tom Lane authored
      so that the 'val' is computed only once, per recent discussion.  The
      speedup is not much when 'val' is just a simple variable, but could be
      significant for larger expressions.  More importantly this avoids issues
      with multiple evaluations of a volatile 'val', and it allows the CASE
      expression to be reverse-listed in its original form by ruleutils.c.
      55f7c330
  13. Mar 15, 2004
    • Tom Lane's avatar
      Remove grotty special-case code in coerce_to_target_type() that · 89ab5c4a
      Tom Lane authored
      implemented casts to varchar and bpchar using a cast-to-text function.
      This is a holdover from before we had pg_cast; it now makes more sense
      to just list these casts in pg_cast.  While at it, add pg_cast entries
      for the other direction (casts from varchar/bpchar) where feasible.
      89ab5c4a
  14. Mar 11, 2004
  15. Mar 09, 2004
  16. Feb 24, 2004
  17. Feb 21, 2004
  18. Feb 19, 2004
  19. Feb 13, 2004
  20. Jan 28, 2004
    • Tom Lane's avatar
      Fix oversight in check_ungrouped_columns optimization that avoids · 31a0f1d3
      Tom Lane authored
      unnecessary checks for complex grouping expressions: we cannot check
      whether the expressions are simple Vars until after we apply
      flatten_join_alias_vars, because in the case of FULL JOIN that routine
      can introduce non-Var expressions.  Per example from Joel Knight.
      31a0f1d3
  21. Jan 23, 2004
  22. Jan 15, 2004
    • Tom Lane's avatar
      Fix permission-checking bug reported by Tim Burgess 10-Feb-03 (this time · cfd7fb7e
      Tom Lane authored
      for sure...).  Rather than relying on the query context of a rangetable
      entry to identify what permissions it wants checked, store a full AclMode
      mask in each RTE, and check exactly those bits.  This allows an RTE
      specifying, say, INSERT privilege on a view to be copied into a derived
      UPDATE query without changing meaning.  Per recent discussion thread.
      initdb forced due to change of stored rule representation.
      cfd7fb7e
  23. Jan 11, 2004
  24. Jan 10, 2004
  25. Jan 07, 2004
    • Neil Conway's avatar
      More janitorial work: remove the explicit casting of NULL literals to a · 192ad63b
      Neil Conway authored
      pointer type when it is not necessary to do so.
      
      For future reference, casting NULL to a pointer type is only necessary
      when (a) invoking a function AND either (b) the function has no prototype
      OR (c) the function is a varargs function.
      192ad63b
    • Tom Lane's avatar
      Apply the core parts of Dennis Bjorklund's patch to allow function · a77e32d7
      Tom Lane authored
      parameters to be declared with names.  pg_proc has a column to store
      names, and CREATE FUNCTION can insert data into it, but that's all as
      yet.  I need to do more work on the pg_dump and plpgsql portions of the
      patch before committing those, but I thought I'd get the bulky changes
      in before the tree drifts under me.
      initdb forced due to pg_proc change.
      a77e32d7
  26. Jan 05, 2004
  27. Dec 17, 2003
  28. Dec 01, 2003
  29. Nov 29, 2003
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  30. Nov 24, 2003
  31. Nov 21, 2003
    • Tom Lane's avatar
      COMMENT ON casts, conversions, languages, operator classes, and · 42ce74bf
      Tom Lane authored
      large objects.  Dump all these in pg_dump; also add code to pg_dump
      user-defined conversions.  Make psql's large object code rely on
      the backend for inserting/deleting LOB comments, instead of trying to
      hack pg_description directly.  Documentation and regression tests added.
      
      Christopher Kings-Lynne, code reviewed by Tom
      42ce74bf
  32. Nov 12, 2003
    • Tom Lane's avatar
      Cross-data-type comparisons are now indexable by btrees, pursuant to my · fa5c8a05
      Tom Lane authored
      pghackers proposal of 8-Nov.  All the existing cross-type comparison
      operators (int2/int4/int8 and float4/float8) have appropriate support.
      The original proposal of storing the right-hand-side datatype as part of
      the primary key for pg_amop and pg_amproc got modified a bit in the event;
      it is easier to store zero as the 'default' case and only store a nonzero
      when the operator is actually cross-type.  Along the way, remove the
      long-since-defunct bigbox_ops operator class.
      fa5c8a05
  33. Nov 09, 2003
    • Tom Lane's avatar
      Add operator strategy and comparison-value datatype fields to ScanKey. · c1d62bfd
      Tom Lane authored
      Remove the 'strategy map' code, which was a large amount of mechanism
      that no longer had any use except reverse-mapping from procedure OID to
      strategy number.  Passing the strategy number to the index AM in the
      first place is simpler and faster.
      This is a preliminary step in planned support for cross-datatype index
      operations.  I'm committing it now since the ScanKeyEntryInitialize()
      API change touches quite a lot of files, and I want to commit those
      changes before the tree drifts under me.
      c1d62bfd
  34. Nov 06, 2003
  35. Nov 05, 2003
    • Tom Lane's avatar
      Fix for this problem: · e4044ba2
      Tom Lane authored
      regression=# select 1 from tenk1 ta cross join tenk1 tb for update;
      ERROR:  no relation entry for relid 3
      
      7.3 said "SELECT FOR UPDATE cannot be applied to a join", which was better
      but still wrong, considering that 7.2 took the query just fine.  Fix by
      making transformForUpdate() ignore JOIN and other special RTE types,
      rather than trying to mark them FOR UPDATE.  The actual error message now
      only appears if you explicitly name the join in FOR UPDATE.
      e4044ba2
  36. Oct 20, 2003
Loading