pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: czezz <czezz@o2.pl>
To: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: Postgres Maillist <pgsql-admin@postgresql.org>
Subject: Re: display to_timestamp in quotas or convert to char ?
Date: Tue, 05 May 2015 17:09:17 +0200
Message-ID: <5d1b4284.53c7658d.5548dd1d.bf503@o2.pl> (raw)
In-Reply-To: <CA0B2CA1-D2CB-490C-A394-8D3BC376A59A@elevated-dev.com>
References: <22c93a48.7dc1250c.5548946d.f29b0@o2.pl>
	<FA3EDC66-B5A8-461F-8EAD-48124674C7BB@elevated-dev.com>
	<79bfc5f9.244b3aa3.5548d1d4.9c8af@o2.pl>
	<CA0B2CA1-D2CB-490C-A394-8D3BC376A59A@elevated-dev.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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@elevated-dev.com> napisał(a):

> On May 5, 2015, at 8:21 AM, czezz <czezz@o2.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.
> 
> 


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (11+ messages)  latest in thread

Message-ID: <5d1b4284.53c7658d.5548dd1d.bf503@o2.pl>
Permalink:  ../5d1b4284.53c7658d.5548dd1d.bf503@o2.pl/
Also on:    postgresql.org/message-id/5d1b4284.53c7658d.5548dd1d.bf503@o2.pl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: czezz@o2.pl, scott_ribe@elevated-dev.com, laurenz.albe@wien.gv.at
  Subject: Re: display to_timestamp in quotas or convert to char ?
  In-Reply-To: <5d1b4284.53c7658d.5548dd1d.bf503@o2.pl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox