X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 7A85630F0D8 for ; Mon, 23 Jun 2003 09:12:39 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 18647-04 for ; Mon, 23 Jun 2003 06:12:28 -0300 (ADT) Received: from mail.voljatel.si (mail.voljatel.si [217.72.64.15]) by svr1.postgresql.org (Postfix) with ESMTP id 02E6C30F585 for ; Mon, 23 Jun 2003 06:12:28 -0300 (ADT) Received: from mainframe.hide.voljatel.si (pehta.voljatel.si [217.72.64.8]) by mail.voljatel.si (Postfix) with ESMTP id 6241C4BFBA for ; Mon, 23 Jun 2003 11:12:21 +0200 (CEST) From: Jaka Erjavec Reply-To: jaka.erjavec@voljatel.si Organization: Voljatel telekomunikacije d.d. To: pgsql-general@postgresql.org Subject: to_timestamp function Date: Mon, 23 Jun 2003 11:12:20 +0200 User-Agent: KMail/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200306231112.20668.jaka.erjavec@voljatel.si> X-Archive-Number: 200306/1444 X-Sequence-Number: 44372 Hello, I managed to establish postgresql support for accounting in Freeradius. It is logging all of the radius attributes (including Cisco h323) in the database, but the problem is that all this h323 Cisco attributes are set to type string. I found this postgresql function called to_timestamp(), which should be able to convert string in to date. The problem is that Cisco's time format (13:17:22.670 CET Fri Jun 20 2003) somehow does not get completely recognized when using the function in the following way: radius=# select to_timestamp('13:17:22.670 CET Fri Jun 20 2003','HH24:MI TZ Day Mon DD YYYY'); ERROR: to_timestamp(): TZ/tz not supported. So, the question is, what am I doing wrong or is there some bug in this function. postgresql version: radius=# select version(); version --------------------------------------------------------------------- PostgreSQL 7.2.4 on i386-portbld-freebsd4.8, compiled by GCC 2.95.4 (1 row) Thank you! Jaka