interval * numeric operator

Started by Peter Eisentrautabout 18 years ago4 messages
#1Peter Eisentraut
peter_e@gmx.net

There are interval * double precision operators (both ways) but none for
interval * numeric. Adding this would make sense since interval is now
optionally stored as fixed-point internally. Any objections to adding this
in 8.4?

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#2Josh Berkus
josh@agliodbs.com
In reply to: Peter Eisentraut (#1)
Re: interval * numeric operator

Peter Eisentraut wrote:

There are interval * double precision operators (both ways) but none for
interval * numeric. Adding this would make sense since interval is now
optionally stored as fixed-point internally. Any objections to adding this
in 8.4?

+1

I've been casting to Numeric anyway.

--Josh

#3Gregory Stark
stark@enterprisedb.com
In reply to: Josh Berkus (#2)
Re: interval * numeric operator

"Josh Berkus" <josh@agliodbs.com> writes:

Peter Eisentraut wrote:

There are interval * double precision operators (both ways) but none for
interval * numeric. Adding this would make sense since interval is now
optionally stored as fixed-point internally. Any objections to adding this
in 8.4?

+1

I've been casting to Numeric anyway.

Shouldn't the cast be implicit anyways? What does having double precision
operators buy us? Wouldn't it introduce ambiguities?

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Gregory Stark (#3)
Re: interval * numeric operator

Am Donnerstag, 8. November 2007 schrieb Gregory Stark:

Shouldn't the cast be implicit anyways? What does having double precision
operators buy us? Wouldn't it introduce ambiguities?

Unless you use --enable-integer-datetimes, interval is stored as float
internally, so historically, the selection of offered operators is correct.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/