Thread

  1. atttypmod

    Bruce Momjian <maillist@candle.pha.pa.us> — 1998-02-19T21:48:26Z

    Just to let people know, pg_attribute.atttypmod is now passed as the
    third parameter to all in and out functions, so it is ready to go for
    people who need this functionality.
    
    We did this by passing it through the backend from TypName and Resdom to
    TupleDesc.
    
    -- 
    Bruce Momjian
    maillist@candle.pha.pa.us
    
    
  2. Re: [HACKERS] atttypmod

    Brett McCormick <brett@work.chicken.org> — 1998-02-20T02:59:43Z

    Which functionality is that?
    
    On Thu, 19 February 1998, at 16:48:26, Bruce Momjian wrote:
    
    > Just to let people know, pg_attribute.atttypmod is now passed as the
    > third parameter to all in and out functions, so it is ready to go for
    > people who need this functionality.
    
    
  3. Re: [HACKERS] atttypmod

    Bruce Momjian <maillist@candle.pha.pa.us> — 1998-02-20T03:04:34Z

    > 
    > 
    > Which functionality is that?
    > 
    > On Thu, 19 February 1998, at 16:48:26, Bruce Momjian wrote:
    > 
    > > Just to let people know, pg_attribute.atttypmod is now passed as the
    > > third parameter to all in and out functions, so it is ready to go for
    > > people who need this functionality.
    > 
    
    Things like decimal types with defined precision.  decimal(10,2).
    
    -- 
    Bruce Momjian
    maillist@candle.pha.pa.us
    
    
  4. Re: [HACKERS] atttypmod

    Brett McCormick <brett@work.chicken.org> — 1998-02-20T03:09:55Z

    How about having output options for types?  I know this can be
    implemented with functions and views, but it would be nice to able to
    output values in different formats by default (such as datetime =>
    seconds since the epoch)
    
    On Thu, 19 February 1998, at 22:04:34, Bruce Momjian wrote:
    
    > > Which functionality is that?
    > > 
    > > On Thu, 19 February 1998, at 16:48:26, Bruce Momjian wrote:
    > > 
    > > > Just to let people know, pg_attribute.atttypmod is now passed as the
    > > > third parameter to all in and out functions, so it is ready to go for
    > > > people who need this functionality.
    > > 
    > 
    > Things like decimal types with defined precision.  decimal(10,2).
    > 
    > -- 
    > Bruce Momjian
    > maillist@candle.pha.pa.us
    
    
  5. Re: [HACKERS] atttypmod

    Bruce Momjian <maillist@candle.pha.pa.us> — 1998-02-20T03:19:57Z

    You could use atttypmod to have a type that has a default output format
    that you specify at type creation time.
    
    > 
    > 
    > How about having output options for types?  I know this can be
    > implemented with functions and views, but it would be nice to able to
    > output values in different formats by default (such as datetime =>
    > seconds since the epoch)
    > 
    > On Thu, 19 February 1998, at 22:04:34, Bruce Momjian wrote:
    > 
    > > > Which functionality is that?
    > > > 
    > > > On Thu, 19 February 1998, at 16:48:26, Bruce Momjian wrote:
    > > > 
    > > > > Just to let people know, pg_attribute.atttypmod is now passed as the
    > > > > third parameter to all in and out functions, so it is ready to go for
    > > > > people who need this functionality.
    > > > 
    > > 
    > > Things like decimal types with defined precision.  decimal(10,2).
    > > 
    > > -- 
    > > Bruce Momjian
    > > maillist@candle.pha.pa.us
    > 
    
    
    -- 
    Bruce Momjian
    maillist@candle.pha.pa.us
    
    
  6. Re: [HACKERS] atttypmod

    Thomas Lockhart <lockhart@alumni.caltech.edu> — 1998-02-20T03:24:54Z

    Brett McCormick wrote:
    
    > How about having output options for types?  I know this can be
    > implemented with functions and views, but it would be nice to able to
    > output values in different formats by default (such as datetime =>
    > seconds since the epoch)
    
    This is a slippery slope. If you have various output options, then you also
    would want to cleanly input those same outputs. There are already some output
    options for date/time, to accomodate the world-wide variations in same. Having
    a fully-general input/output capability for all data types which bypasses
    functions and views seems to be ignoring the power of those existing
    mechanisms...
    
    otoh, we _do_ have to figure out how to implement the decimal/numeric type
    someday, so dive in :)
    
                                                         - Tom
    
    
    
  7. Re: [HACKERS] atttypmod

    Marc Fournier <scrappy@hub.org> — 1998-02-20T03:36:58Z

    On Thu, 19 Feb 1998, Brett McCormick wrote:
    
    > 
    > How about having output options for types?  I know this can be
    > implemented with functions and views, but it would be nice to able to
    > output values in different formats by default (such as datetime =>
    > seconds since the epoch)
    
    	date_part('epoch', 'now'::datetime);
    
    
    > 
    > On Thu, 19 February 1998, at 22:04:34, Bruce Momjian wrote:
    > 
    > > > Which functionality is that?
    > > > 
    > > > On Thu, 19 February 1998, at 16:48:26, Bruce Momjian wrote:
    > > > 
    > > > > Just to let people know, pg_attribute.atttypmod is now passed as the
    > > > > third parameter to all in and out functions, so it is ready to go for
    > > > > people who need this functionality.
    > > > 
    > > 
    > > Things like decimal types with defined precision.  decimal(10,2).
    > > 
    > > -- 
    > > Bruce Momjian
    > > maillist@candle.pha.pa.us
    > 
    
    Marc G. Fournier                                
    Systems Administrator @ hub.org 
    primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 
    
    
    
  8. Re: [HACKERS] atttypmod

    Brett McCormick <brett@work.chicken.org> — 1998-02-20T03:59:35Z

    er, at table creation time?
    
    On Thu, 19 February 1998, at 22:19:57, Bruce Momjian wrote:
    
    > You could use atttypmod to have a type that has a default output format
    > that you specify at type creation time.
    
    
  9. Re: [HACKERS] atttypmod

    Bruce Momjian <maillist@candle.pha.pa.us> — 1998-02-20T04:14:42Z

    > 
    > 
    > er, at table creation time?
    > 
    > On Thu, 19 February 1998, at 22:19:57, Bruce Momjian wrote:
    > 
    > > You could use atttypmod to have a type that has a default output format
    > > that you specify at type creation time.
    > 
    
    
    Oops, yep, table creation time.
    
    -- 
    Bruce Momjian
    maillist@candle.pha.pa.us