Re: [SQL] avg() with floating-point types

2006-01-01 Thread Michael Fuhr
On Sun, Jan 01, 2006 at 04:40:18PM -0800, George Pavlov wrote: > The datatype of both city.latitude and postal_code.latitude is > number(16,12). > > This works, but I would like to understand why there is sometimes a > discrepancy between avg(pc.latitude) and what actually gets inserted > into the

Re: [SQL] avg() with floating-point types

2006-01-01 Thread Tom Lane
"George Pavlov" <[EMAIL PROTECTED]> writes: > The datatype of both city.latitude and postal_code.latitude is > number(16,12). > This works, but I would like to understand why there is sometimes a > discrepancy between avg(pc.latitude) and what actually gets inserted > into the city table -- is it t

[SQL] avg() with floating-point types

2006-01-01 Thread George Pavlov
I have city and postal_code tables linked by city_postal_code through a city_id and postal_code_id. The postal_codes have latitude/longitude, the cities don't. I want to set the city lat/long to the average of the associated postal codes (abstract for a minute on whether that actually makes sense f

[SQL] exceptions in rules

2006-01-01 Thread chester c young
is there any way within a rule to raise an exception? __ Yahoo! for Good - Make a difference this year. http://brand.yahoo.com/cybergivingweek2005/ ---(end of broadcast)--- TIP 4: Have you

[SQL] session variables in 8.0

2006-01-01 Thread chester c young
understand that in 8.0 pg has session variables. cannot find in doc how to use them. __ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com ---(end of broadcast)-

[SQL] plpgsql triggers in rules

2006-01-01 Thread chester c young
is is possible for to have a "do instead" trigger on a view that is a plpgsql function? __ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com ---(end of broadcast)---