1. 08 Aug, 2002 7 commits
  2. 07 Aug, 2002 2 commits
  3. 06 Aug, 2002 12 commits
  4. 05 Aug, 2002 6 commits
  5. 04 Aug, 2002 13 commits
    • Tom Lane's avatar
      Temporary solution for XLogDir breakage. · 44582cd8
      Tom Lane authored
      44582cd8
    • Tom Lane's avatar
      1be01431
    • Tom Lane's avatar
      e053d207
    • Bruce Momjian's avatar
      Another backend_pid rename. · 32465bfc
      Bruce Momjian authored
      32465bfc
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
      Attached are two patches to implement and document anonymous composite · 9218689b
      Bruce Momjian authored
      types for Table Functions, as previously proposed on HACKERS. Here is a
      brief explanation:
      
      1. Creates a new pg_type typtype: 'p' for pseudo type (currently either
           'b' for base or 'c' for catalog, i.e. a class).
      
      2. Creates new builtin type of typtype='p' named RECORD. This is the
           first of potentially several pseudo types.
      
      3. Modify FROM clause grammer to accept:
           SELECT * FROM my_func() AS m(colname1 type1, colname2 type1, ...)
           where m is the table alias, colname1, etc are the column names, and
           type1, etc are the column types.
      
      4. When typtype == 'p' and the function return type is RECORD, a list
           of column defs is required, and when typtype != 'p', it is
      disallowed.
      
      5. A check was added to ensure that the tupdesc provide via the parser
           and the actual return tupdesc match in number and type of
      attributes.
      
      When creating a function you can do:
           CREATE FUNCTION foo(text) RETURNS setof RECORD ...
      
      When using it you can do:
           SELECT * from foo(sqlstmt) AS (f1 int, f2 text, f3 timestamp)
             or
           SELECT * from foo(sqlstmt) AS f(f1 int, f2 text, f3 timestamp)
             or
           SELECT * from foo(sqlstmt) f(f1 int, f2 text, f3 timestamp)
      
      Included in the patches are adjustments to the regression test sql and
      expected files, and documentation.
      
      p.s.
           This potentially solves (or at least improves) the issue of builtin
           Table Functions. They can be bootstrapped as returning RECORD, and
           we can wrap system views around them with properly specified column
           defs. For example:
      
           CREATE VIEW pg_settings AS
             SELECT s.name, s.setting
             FROM show_all_settings()AS s(name text, setting text);
      
           Then we can also add the UPDATE RULE that I previously posted to
           pg_settings, and have pg_settings act like a virtual table, allowing
           settings to be queried and set.
      
      
      Joe Conway
      9218689b
    • Tom Lane's avatar
      Fix obsolete comment. · 35d39ba0
      Tom Lane authored
      35d39ba0
    • Thomas G. Lockhart's avatar
      Minor clarification or fix of typos. · ffef7206
      Thomas G. Lockhart authored
      ffef7206
    • Thomas G. Lockhart's avatar
    • Thomas G. Lockhart's avatar
      Implement IS OF and IS NOT OF type predicate. · eb121ba2
      Thomas G. Lockhart authored
       Can now do queries of the form: SELECT value IS OF (integer, float8);
      Define macros for handling typmod manipulation for date/time types.
       Should be more robust than all of that brute-force inline code.
      Rename macros for masking and typmod manipulation to put TIMESTAMP_
       or INTERVAL_ in front of the macro name, to reduce the possibility
       of name space collisions.
      Allow bit string constants without fully-specified length declaration.
      Try implementing CREATE TABLE/OF as a mapping to inheritance.
       May be appropriate, or may be replace later with something more exactly
       like one might expect from databases without the feature.
      eb121ba2
    • Thomas G. Lockhart's avatar
      Implement IS OF type predicate. Can now do queries of the form: · 7c1e67bd
      Thomas G. Lockhart authored
       select value IS OF (integer, float8);
      7c1e67bd
    • Thomas G. Lockhart's avatar
      Add guard code to protect from buffer overruns on long date/time input · b71310d8
      Thomas G. Lockhart authored
       strings. Should go back in and look at doing this a bit more elegantly
       and (hopefully) cheaper. Probably not too bad anyway, but it seems a
       shame to scan the strings twice: once for length for this buffer overrun
       protection, and once to parse the line.
      Remove use of pow() in date/time handling; was already gone from everything
       *but* the time data types.
      Define macros for handling typmod manipulation for date/time types.
       Should be more robust than all of that brute-force inline code.
      Rename macros for masking and typmod manipulation to put TIMESTAMP_
       or INTERVAL_ in front of the macro name, to reduce the possibility
       of name space collisions.
      b71310d8