Skip site navigation (1) Skip section navigation (2)

Re: Problems with avg on interval data type

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: lockhart(at)fourpalms(dot)org, jeremy(at)horizonlive(dot)com, pgsql-bugs(at)postgresql(dot)org, Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problems with avg on interval data type
Date: 2001-05-19 06:21:18
Message-ID: 3B0610DE.774EFFC0@alumni.caltech.edu (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
> > Single-field signed integers (and unsigned integers?) must be acceptable
> > for a time zone specification (pretty sure this is covered in the SQL
> > spec).
> But surely there is other context cuing you that the number is a
> timezone?  In any case, you weren't proposing that interval_in
> should accept '8' as a timezone ...

In the particular case I mentioned, any context is gone by the time the
parser gets beyond gram.y (and that is well before the constant is
evaluated). The general point is that in this case (and perhaps some
other cases) there is a need to convert an interval into a time zone, so
the specification of either or both had better be self consistant.

We do not have an explicit timezone type which could make different
assumptions about units on unadorned integers (and I'd like to avoid
defining a new type for this purpose since SQL9x seems to think that
"interval" should be enough). I'd also like to avoid *requiring* the
full brain damage of SQL9x interval specifications such as Peter
mentioned; we may support it, but should not require it since it is
truely horrid.

                       - Thomas

In response to

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2001-05-19 08:06:37
Subject: Re: Fix for tablename in targetlist
Previous:From: Bruce MomjianDate: 2001-05-19 03:58:52
Subject: Re: force of last XID

pgsql-bugs by date

Next:From: Ondrej PalkovskyDate: 2001-05-19 11:11:47
Subject: Failing backend on plpgsql function
Previous:From: Tom LaneDate: 2001-05-19 01:14:21
Subject: Re: Problems with avg on interval data type

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group