Re: display to_timestamp in quotas or convert to char ?

From: czezz <czezz(at)o2(dot)pl>
To: =?UTF-8?Q?Scott_Ribe?=<scott_ribe(at)elevated-dev(dot)com>
Cc: =?UTF-8?Q?Albe_Laurenz?=<laurenz(dot)albe(at)wien(dot)gv(dot)at>, =?UTF-8?Q?Postgres_Maillist?=<pgsql-admin(at)postgresql(dot)org>
Subject: Re: display to_timestamp in quotas or convert to char ?
Date: 2015-05-05 15:09:17
Message-ID: 5d1b4284.53c7658d.5548dd1d.bf503@o2.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,
ya, that is the background of this story.

There is one internal app in my company that frequently runs into specific error - related to that query.
Its actually not Devs team who reject to look at this but support team (which is one step before devs)
So, now showing them this same query with added to_char() they should "shut-the-front-door" and send it to correction.

...though its really difficult with them.

Anyway thank you all for your help :)

BR,
czezz

Dnia 5 maja 2015 16:47 Scott Ribe <scott_ribe(at)elevated-dev(dot)com> napisał(a):

> On May 5, 2015, at 8:21 AM, czezz <czezz(at)o2(dot)pl> wrote:
> >
> > This is because this query is executed/hardcoded in application.
> > And by executing it like this I can prove devs that there is a problem.
>
> So you were really looking for an explanation of why it didn’t work, in order to pass along to people whom you’re having trouble convincing? OK, didn’t get that from your post, now it makes sense. It just seemed odd that you seemed to be ignoring the most correct (and easy) solution ;-)
>
> Anyway, now the we understand that… PostgreSQL used to be more aggressive about automatically casting text types to more specific types. I suspect, though I don’t recall for sure, that this query would have worked on some earlier versions. Later versions removed some of the automatic casting, because it was found that those casts caused problems—that sometimes they would cause accidental type mismatches to be executed instead of flagged, and produce incorrect results instead of an error message, so the decision was made that if you want to compare mismatched types, you have to be explicit about it.
>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Andres Freund 2015-05-05 15:40:30 Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0
Previous Message Scott Ribe 2015-05-05 14:47:38 Re: display to_timestamp in quotas or convert to char ?