Thread

  1. Interval unit format bug

    Gary Clarke <gary@onedb.online> — 2026-04-29T12:00:28Z

    Hello
    
    Applies to all versions and operating systems
    
    Even if I set to verbose, Postgres outputs a very strange abbreviation for interval unit months that nobody else uses or would expect.
    
    [cid:image001.png@01DCD7D8.27386F70]
    
    
    Best Regards
    
    Gary
    
    
    
    [Onedb Red White Logo]
    Gary Clarke
    Onedb CEO
    gary@onedb.online
    +351 9688 20662
    +44 746 223 4269
    www.onedb.online
    
    
    
    
    
  2. Re: Interval unit format bug

    Frank Heikens <frank@elevarq.com> — 2026-04-30T14:03:14Z

    There is something about the presentation in the documentation: https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-INTERVAL-OUTPUT
    
    What would you expect, and how would this be different from the documented output?
    
    
    Best regards,
    
    Frank
    
    
    Ps. Drivers like the JDBC driver can also change the format
    
    
    On Apr 29, 2026, at 5:00 AM, Gary Clarke <gary@onedb.online> wrote:
    
    Hello
    
    Applies to all versions and operating systems
    
    Even if I set to verbose, Postgres outputs a very strange abbreviation for interval unit months that nobody else uses or would expect.
    
    <image001.png>
    
    
    Best Regards
    
    Gary
    
    
    
    <image002.jpg>
    Gary Clarke
    Onedb CEO
    gary@onedb.online<mailto:gary@onedb.online>
    +351 9688 20662
    +44 746 223 4269
    www.onedb.online<http://www.onedb.online/>
    
    
  3. Re: Interval unit format bug

    David G. Johnston <david.g.johnston@gmail.com> — 2026-04-30T14:03:34Z

    On Thu, Apr 30, 2026 at 6:32 AM Gary Clarke <gary@onedb.online> wrote:
    
    >
    > Even if I set to verbose, Postgres outputs a very strange abbreviation for
    > interval unit months that nobody else uses or would expect.
    >
    >
    >
    
    Suggest you use the SQL or ISO variant format then.  We aren't going to
    change what we produce and risk breaking people's stuff.
    
    David J.
    
  4. Re: Interval unit format bug

    Tom Lane <tgl@sss.pgh.pa.us> — 2026-04-30T14:04:58Z

    Gary Clarke <gary@onedb.online> writes:
    > Even if I set to verbose, Postgres outputs a very strange abbreviation for interval unit months that nobody else uses or would expect.
    
    [ shrug... ]  This is documented:
    
    https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-INTERVAL-OUTPUT
    
    If we were to change it now, decades after the fact, what we'd mostly
    accomplish is to break applications.
    
    			regards, tom lane