1. 28 Sep, 1999 5 commits
    • Bruce Momjian's avatar
      I have been working with user defined types and user defined c · 9394d62c
      Bruce Momjian authored
      functions.  One problem that I have encountered with the function
      manager is that it does not allow the user to define type conversion
      functions that convert between user types. For instance if mytype1,
      mytype2, and mytype3 are three Postgresql user types, and if I wish to
      define Postgresql conversion functions like
      
      I run into problems, because the Postgresql dynamic loader would look
      for a single link symbol, mytype3, for both pieces of object code.  If
      I just change the name of one of the Postgresql functions (to make the
      symbols distinct), the automatic type conversion that Postgresql uses,
      for example, when matching operators to arguments no longer finds the
      type conversion function.
      
      The solution that I propose, and have implemented in the attatched
      patch extends the CREATE FUNCTION syntax as follows. In the first case
      above I use the link symbol mytype2_to_mytype3 for the link object
      that implements the first conversion function, and define the
      Postgresql operator with the following syntax
      
      The patch includes changes to the parser to include the altered
      syntax, changes to the ProcedureStmt node in nodes/parsenodes.h,
      changes to commands/define.c to handle the extra information in the AS
      clause, and changes to utils/fmgr/dfmgr.c that alter the way that the
      dynamic loader figures out what link symbol to use.  I store the
      string for the link symbol in the prosrc text attribute of the pg_proc
      table which is currently unused in rows that reference dynamically
      loaded
      functions.
      
      
      Bernie Frankpitt
      9394d62c
    • Bruce Momjian's avatar
      63a85082
    • Bruce Momjian's avatar
      Update TODO list. · bc0595f2
      Bruce Momjian authored
      bc0595f2
    • Tom Lane's avatar
      Fix nodeAgg coredump in case where lower-level plan has · a55888ec
      Tom Lane authored
      an empty targetlist *and* fails to return any tuples, as will happen
      for example with 'SELECT COUNT(1) FROM table WHERE ...' if the where-
      clause selects no tuples.  It's so nice to make a fix by diking out code,
      instead of adding more...
      a55888ec
    • Bruce Momjian's avatar
      Update NT readme. · 04f150e6
      Bruce Momjian authored
      04f150e6
  2. 27 Sep, 1999 22 commits
  3. 26 Sep, 1999 2 commits
    • Tom Lane's avatar
      Modify nodeAgg.c so that no rows are returned for a GROUP BY · be09bc9f
      Tom Lane authored
      with no input rows, per pghackers discussions around 7/22/99.  Clean up
      a bunch of ugly coding while at it; remove redundant re-lookup of
      aggregate info at start of each new GROUP.  Arrange to pfree intermediate
      values when they are pass-by-ref types, so that aggregates on pass-by-ref
      types no longer eat memory.  This takes care of a couple of TODO items...
      be09bc9f
    • Tom Lane's avatar
      Implement constant-expression simplification per Bernard · 40f65241
      Tom Lane authored
      Frankpitt, plus some improvements from yours truly.  The simplifier depends
      on the proiscachable field of pg_proc to tell it whether a function is
      safe to pre-evaluate --- things like nextval() are not, for example.
      Update pg_proc.h to contain reasonable cacheability information; as of
      6.5.* hardly any functions were marked cacheable.  I may have erred too
      far in the other direction; see recent mail to pghackers for more info.
      This update does not force an initdb, exactly, but you won't see much
      benefit from the simplifier until you do one.
      40f65241
  4. 24 Sep, 1999 2 commits
    • Hiroshi Inoue's avatar
      · 95d3d468
      Hiroshi Inoue authored
      This is a patch for cygipc library provided by Yutaka Tanida.
      This is necessary to prevent freezing in cygwin port.
      95d3d468
    • Tom Lane's avatar
      Several changes here, not very related but touching some of the same files. · e812458b
      Tom Lane authored
      * Buffer refcount cleanup (per my "progress report" to pghackers, 9/22).
      * Add links to backend PROC structs to sinval's array of per-backend info,
      and use these links for routines that need to check the state of all
      backends (rather than the slow, complicated search of the ShmemIndex
      hashtable that was used before).  Add databaseOID to PROC structs.
      * Use this to implement an interlock that prevents DESTROY DATABASE of
      a database containing running backends.  (It's a little tricky to prevent
      a concurrently-starting backend from getting in there, since the new
      backend is not able to lock anything at the time it tries to look up
      its database in pg_database.  My solution is to recheck that the DB is
      OK at the end of InitPostgres.  It may not be a 100% solution, but it's
      a lot better than no interlock at all...)
      * In ALTER TABLE RENAME, flush buffers for the relation before doing the
      rename of the physical files, to ensure we don't get failures later from
      mdblindwrt().
      * Update TRUNCATE patch so that it actually compiles against current
      sources :-(.
      You should do "make clean all" after pulling these changes.
      e812458b
  5. 23 Sep, 1999 9 commits