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

Re: Major upgrade advice

From: "Peter Koczan" <pjkoczan(at)gmail(dot)com>
To: "Roberto Garcia" <roberto(dot)garcia(at)cptec(dot)inpe(dot)br>
Cc: pgsql-admin(at)postgresql(dot)org, "Steve Crawford" <scrawford(at)pinpointresearch(dot)com>
Subject: Re: Major upgrade advice
Date: 2008-06-28 19:27:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Wed, Jun 18, 2008 at 2:00 PM, Roberto Garcia
<roberto(dot)garcia(at)cptec(dot)inpe(dot)br> wrote:
> Just to mention one issue we had here:
> In 8.1 we did this to retrieve all data from a specific date:
> WHERE <timestamp_column> LIKE '2008-05-20%'
> In 8.3 we had to change to:
> WHERE <timestamp_column> >= CAST('2008-05-20' as timestamp) AND
>     <timestamp_column> < CAST('2008-05-21' as timestamp)

Also, don't forget that bareword numbers don't automatically cast to
text anymore.

For instance, assuming col is a text type (char, varchar, text), the query

select * from table where col = 1000

Will throw an error in 8.3 whereas it will work under pre-8.3
releases. You can one either of the following to make it work.

select * from table where col = 1000::text
select * from table where col = '1000'

I've been bitten by that bug a few times.


In response to

pgsql-admin by date

Next:From: Chander GanesanDate: 2008-06-29 13:53:56
Subject: Re: Warm standby server
Previous:From: Domingo Alvarez DuarteDate: 2008-06-27 21:33:38
Subject: Re: Extended security/restriction to any role with login access

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