Skip to content
Snippets Groups Projects
  1. Sep 04, 2002
  2. Sep 03, 2002
  3. Sep 02, 2002
    • Bruce Momjian's avatar
      > Okay. When you get back to the original issue, the gold is hidden in · 595a5a78
      Bruce Momjian authored
      > src/backend/optimizer/path/indxpath.c; see the "special indexable
      > operators" stuff near the bottom of that file.  (It's a bit of a crock
      > that this code is hardwired there, and not somehow accessed through a
      > system catalog, but it's what we've got at the moment.)
      
      The attached patch re-enables a bytea right hand argument (as compared
      to a text right hand argument), and enables index usage, for bytea LIKE
      
      Joe Conway
      595a5a78
    • 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
    • Bruce Momjian's avatar
      Remove sys/types.h in files that include postgres.h, and hence c.h, · 97ac1032
      Bruce Momjian authored
      because c.h has sys/types.h.
      97ac1032
    • Tom Lane's avatar
      Code review for HeapTupleHeader changes. Add version number to page headers · c7a165ad
      Tom Lane authored
      (overlaying low byte of page size) and add HEAP_HASOID bit to t_infomask,
      per earlier discussion.  Simplify scheme for overlaying fields in tuple
      header (no need for cmax to live in more than one place).  Don't try to
      clear infomask status bits in tqual.c --- not safe to do it there.  Don't
      try to force output table of a SELECT INTO to have OIDs, either.  Get rid
      of unnecessarily complex three-state scheme for TupleDesc.tdhasoids, which
      has already caused one recent failure.  Improve documentation.
      c7a165ad
  4. Sep 01, 2002
    • Tom Lane's avatar
      Mark the float8 -> int8 cast as implicit. This resolves the problem · 3c49c4b1
      Tom Lane authored
      pointed out by Barry Lind: UPDATE bigintcol = 10000000000 fails because
      the constant is initially taken as float8.  We really need a better way,
      but it's not gonna happen for 7.3.
      
      Also, remove int4reltime() function, which is redundant with the
      existing binary-compatibility coercion path from int4 to reltime,
      and probably has been unreachable code for a long while.
      3c49c4b1
    • Tom Lane's avatar
      Code review for domain-constraints patch. Use a new ConstraintTest node · 845a6c3a
      Tom Lane authored
      type for runtime constraint checks, instead of misusing the parse-time
      Constraint node for the purpose.  Fix some damage introduced into type
      coercion logic; in particular ensure that a coerced expression tree will
      read out the correct result type when inspected (patch had broken some
      RelabelType cases).  Enforce domain NOT NULL constraints against columns
      that are omitted from an INSERT.
      845a6c3a
  5. Aug 31, 2002
    • Tom Lane's avatar
      Code review for pg_locks feature. Make shmemoffset of PROCLOCK structs · 1bab464e
      Tom Lane authored
      available (else there's no way to interpret the list links).  Change
      pg_locks view to show transaction ID locks separately from ordinary
      relation locks.  Avoid showing N duplicate rows when the same lock is
      held multiple times (seems unlikely that users care about exact hold
      count).  Improve documentation.
      1bab464e
  6. Aug 30, 2002
    • Bruce Momjian's avatar
      Sir Mordred The Traitor <mordred@s-mail.com> writes: · 9858a3a4
      Bruce Momjian authored
      > Upon invoking a polygon(integer, circle) function a
      > src/backend/utils/adt/geo_ops.c:circle_poly() function will gets
      > called, which suffers from a buffer overflow.
      >
      > 2) A src/backend/adt/utils/geo_ops.c:path_encode() fails to detect a
      > buffer overrun condition. It is called in multiple places, the most
      > interesting are path_out() and poly_out() functions.
      
      > 5) A src/backend/utils/adt/geo_ops.c:path_add() also fails to detect
      > a simple buffer overrun.
      
      I've attached a patch which should fix these problems.
      
      Neil Conway
      9858a3a4
  7. Aug 29, 2002
  8. Aug 28, 2002
  9. Aug 27, 2002
  10. Aug 26, 2002
    • Tom Lane's avatar
      Modify array operations to include array's element type OID in the · 5cabcfcc
      Tom Lane authored
      array header, and to compute sizing and alignment of array elements
      the same way normal tuple access operations do --- viz, using the
      tupmacs.h macros att_addlength and att_align.  This makes the world
      safe for arrays of cstrings or intervals, and should make it much
      easier to write array-type-polymorphic functions; as examples see
      the cleanups of array_out and contrib/array_iterator.  By Joe Conway
      and Tom Lane.
      5cabcfcc
  11. Aug 24, 2002
  12. Aug 22, 2002
    • Bruce Momjian's avatar
      b4f24fed
    • Bruce Momjian's avatar
      This patch should fix the problem. Doesn't include my previous patch · d86dee3e
      Bruce Momjian authored
      for repeat(). Again, somewhat off-the-cuff, so I might have missed
      something...
      
      test=# select lpad('xxxxx',1431655765,'yyyyyyyyyyyyyyyy');
      ERROR:  Requested length too large
      test=# select rpad('xxxxx',1431655765,'yyyyyyyyyyyyyyyy');
      ERROR:  Requested length too large
      
      (That's on a Unicode DB, haven't tested other encodings but AFAICT
      this fix should still work.)
      
      Neil Conway
      d86dee3e
    • Bruce Momjian's avatar
      repeat() fix: · cbe733d7
      Bruce Momjian authored
      > Neil Conway <neilc@samurai.com> writes:
      > > +   /* Check for integer overflow */
      > > +   if (tlen / slen != count)
      > > +           elog(ERROR, "Requested buffer is too large.");
      >
      > What about slen == 0?
      
      Good point -- that wouldn't cause incorrect results or a security
      problem, but it would reject input that we should really accept.
      
      Revised patch is attached.
      
      Neil Conway
      cbe733d7
    • Bruce Momjian's avatar
      As suggested by Tom, this patch restricts the right-hand argument of · a334ae3f
      Bruce Momjian authored
      bytealike to TEXT.
      
      This leaves like_escape_bytea() without anything to do, but I left it in
      place in anticipation of the eventual bytea pattern selectivity
      functions. If there is agreement that this would be the best long term
      solution, I'll take it as a TODO for 7.4.
      
      Joe Conway
      a334ae3f
    • Bruce Momjian's avatar
      Add: · 89260124
      Bruce Momjian authored
      replace(string, from, to)
         -- replaces all occurrences of "from" in "string" to "to"
      split(string, fldsep, column)
         -- splits "string" on "fldsep" and returns "column" number piece
      to_hex(int32_num) & to_hex(int64_num)
         -- takes integer number and returns as hex string
      
      Joe Conway
      89260124
    • Tom Lane's avatar
      Add a bunch of pseudo-types to replace the behavior formerly associated · b663f344
      Tom Lane authored
      with OPAQUE, as per recent pghackers discussion.  I still want to do some
      more work on the 'cstring' pseudo-type, but I'm going to commit the bulk
      of the changes now before the tree starts shifting under me ...
      b663f344
  13. Aug 20, 2002
    • Tom Lane's avatar
      Increase buffer size in cash_words(). Pure paranoia; I don't think the · 0d6f6138
      Tom Lane authored
      code is broken, but any small change in the output format might overrun
      the buffer with the old size.
      0d6f6138
    • Bruce Momjian's avatar
      Allow pg_statistics to be reset by calling pg_stat_reset(). · 5243f9a9
      Bruce Momjian authored
      Christopher Kings-Lynne
      5243f9a9
    • Bruce Momjian's avatar
      · de9801fc
      Bruce Momjian authored
      Add current_database().
      
      > Quick system function to pull out the current database.
      >
      > I've used this a number of times to allow stored procedures to find out
      > where they are.  Especially useful for those that do logging or hit a
      > remote server.
      >
      > It's called current_database() to match with current_user().
      
      It's also a necessity for an informational schema.  The catalog
      (database) name is required in a number of places.
      
      Rod Taylor
      de9801fc
  14. Aug 18, 2002
    • 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
  15. Aug 17, 2002
    • Bruce Momjian's avatar
      Add lock file. · fc68e440
      Bruce Momjian authored
      fc68e440
    • Bruce Momjian's avatar
      [ Newest version of patch applied.] · 82119a69
      Bruce Momjian authored
      This patch is an updated version of the lock listing patch. I've made
      the following changes:
      
          - write documentation
          - wrap the SRF in a view called 'pg_locks': all user-level
            access should be done through this view
          - re-diff against latest CVS
      
      One thing I chose not to do is adapt the SRF to use the anonymous
      composite type code from Joe Conway. I'll probably do that eventually,
      but I'm not really convinced it's a significantly cleaner way to
      bootstrap SRF builtins than the method this patch uses (of course, it
      has other uses...)
      
      Neil Conway
      82119a69
    • Tom Lane's avatar
      Modify pg_dump to dump foreign-key constraints as constraints, not as · a208ea72
      Tom Lane authored
      sets of triggers.  Also modify psql \d command to show foreign key
      constraints as such and hide the triggers.  pg_get_constraintdef()
      function added to backend to support these.  From Rod Taylor, code
      review and some editorialization by Tom Lane.
      a208ea72
  16. Aug 16, 2002
  17. Aug 15, 2002
    • 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
  18. Aug 10, 2002
Loading