Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ypdio-0001Fv-SU for pgsql-admin@arkaria.postgresql.org; Tue, 05 May 2015 14:21:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ypdio-0004bs-7o for pgsql-admin@arkaria.postgresql.org; Tue, 05 May 2015 14:21:18 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ypdin-0004bk-5f for pgsql-admin@postgresql.org; Tue, 05 May 2015 14:21:17 +0000 Received: from moh3-ve1.go2.pl ([193.17.41.30]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Ypdih-000106-0E for pgsql-admin@postgresql.org; Tue, 05 May 2015 14:21:13 +0000 Received: from moh3-ve1.go2.pl (unknown [10.0.0.117]) by moh3-ve1.go2.pl (Postfix) with ESMTP id 77717A6A024; Tue, 5 May 2015 16:21:09 +0200 (CEST) Received: from o2.pl (unknown [10.0.0.140]) by moh3-ve1.go2.pl (Postfix) with SMTP; Tue, 5 May 2015 16:21:09 +0200 (CEST) Subject: =?UTF-8?Q?Re:_display_to=5Ftimestamp?= =?UTF-8?Q?_in_quotas_or_convert_to_char_=3F?= From: =?UTF-8?Q?czezz?= To: =?UTF-8?Q?Scott_Ribe?= Cc: =?UTF-8?Q?Albe_Laurenz?=, pgsql-admin@postgresql.org In-Reply-To: References: <22c93a48.7dc1250c.5548946d.f29b0@o2.pl> <70aed348.7ad50e54.5548c47d.1e1de@o2.pl> Mime-Version: 1.0 Message-ID: <79bfc5f9.244b3aa3.5548d1d4.9c8af@o2.pl> Date: Tue, 05 May 2015 16:21:08 +0200 X-Originator: 84.74.156.204 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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. Dnia 5 maja 2015 15:56 Scott Ribe napisa=C5= =82(a): > On May 5, 2015, at 7:24 AM, czezz wrote: > >=20 > > have already tried to convert timestamp to char like you suggested but= that lead to another error. > >=20 > > First, simply execution with NO conversion - to make sure it works like= that:=20=20 > > Server2=3D# select to_timestamp('2015-05-04 22:13:14.000', 'YYYY/MM/DD-= HH24:MI:SS.FF3'); > > to_timestamp > > ------------------------ > > 2015-05-04 22:13:14+02 > > (1 row) > >=20 > > Secondly, to_char(): > > Server2=3D# select to_char(to_timestamp('2015-05-04 22:13:14.000', 'YYY= Y/MM/DD-HH24:MI:SS.FF3')); > > ERROR: function to_char(timestamp with time zone) does not exist > > LINE 1: select to_char(to_timestamp('2015-05-04 22:13:14.000', 'YYYY... > > ^ > > HINT: No function matches the given name and argument types. You might= need to add explicit type casts. > >=20 > > And this HINT seems to be odd. >=20 > WHY are you still trying to convert to_char??? Convert the varchar field = to_timestamp and be done with it. >=20 >=20 --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin