Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1abuKk-0006Sy-JY for pgsql-odbc@arkaria.postgresql.org; Fri, 04 Mar 2016 18:20:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1abuKj-0008IC-T2 for pgsql-odbc@arkaria.postgresql.org; Fri, 04 Mar 2016 18:20:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1abuKN-0007po-1U for pgsql-odbc@postgresql.org; Fri, 04 Mar 2016 18:19:51 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1abuKK-0004vn-Cn for pgsql-odbc@postgresql.org; Fri, 04 Mar 2016 18:19:49 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id EC2AE200C9 for ; Fri, 4 Mar 2016 13:19:46 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Fri, 04 Mar 2016 13:19:46 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=+wkdbZ+uwXI9wnIwlbbPPNy0fU0=; b=YI687+ 5Zu3VA0sbsE1wVn9oW0pUlGm2QKhI1KJqtnp8BRsDTbw5RFExyXA7OjhKBYllg0v 6FI5Sbk9F6ikkHS2IzLM+7pGbOYYyT2T/XPgQOgEKQDXGyKxR3ME0L6ACARsYO6i qC+WYJKQo76Z8ftJ5cKAYKKhp340Lt3PPy0Uk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=+wkdbZ+uwXI9wnI wlbbPPNy0fU0=; b=d8Z9joo19RRm9Qaw4NomgW/Q5xD67+vLd/F34k8/EKlIho3 f3Ovpxp157ZLrORw/3C7Ji3WOj/LuXQG80h8596Iu6ZE8djL8SN2SPjCcS4gTH9a ucM5Dkfq+DmLNCwU6uEflI2COJ8ix54W5SwRu9XiECNNVpGT3Y4k2ojqXMig= X-Sasl-enc: 67HwR9qtWUh/FwTaSMzN7tHgNDd8hGzKpKo50FdQkl8F 1457115586 Received: from killi.site (c-73-225-242-52.hsd1.wa.comcast.net [73.225.242.52]) by mail.messagingengine.com (Postfix) with ESMTPA id 50DEB6801A5; Fri, 4 Mar 2016 13:19:46 -0500 (EST) Subject: Re: Obtaining hundredths of a second data from time data types To: Scott Ferrett , pgsql-odbc@postgresql.org References: <56D92DAB.9010806@ferrettconsulting.com> From: Adrian Klaver Message-ID: <56D9D1C1.4060506@aklaver.com> Date: Fri, 4 Mar 2016 10:19:45 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D92DAB.9010806@ferrettconsulting.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 03/03/2016 10:39 PM, Scott Ferrett wrote: > I am using PostgreSQL 9.5 and the 32bit PostgreSQL ODBC Driver(ANSI) > version 9.05.01.00 on Windows. > > Given a table with the following create script: > create table TestTable( id integer, ts timestamp,ts0 > timestamp(0),ts1 timestamp(1),ts2 timestamp(2),ts3 > timestamp(3),ts4 timestamp(4),ts5 timestamp(5),ts6 timestamp(6),t > time,t0 time(0),t1 time(1),t2 time(2),t3 time(3),t4 > time(4),t5 time(5),t6 time(6),ExtraInfo char(10),constraint > TestTable_PrimaryKey primary key (id)) > > I issue the following INSERT statement: > > INSERT INTO TestTable (id, ts, ts0, ts1, ts2, ts3, ts4, ts5, ts6, t, t0, > t1, t2, t3, t4, t5, t6) VALUES (1, '2001-12-24 01:11:11.111111', > '2001-12-24 01:11:11', '2001-12-24 01:11:11.1', '2001-12-24 > 01:11:11.11', '2001-12-24 01:11:11.111', '2001-12-24 01:11:11.1111', > '2001-12-24 01:11:11.11111', '2001-12-24 01:11:11.111111', > '01:11:11.111111', '01:11:11', '01:11:11.1', '01:11:11.11', > '01:11:11.111', '01:11:11.1111', '01:11:11.11111', '01:11:11.111111') > > I issue a "SELECT * from TestTable" using SQLExecDirect. I use > SQLBindCol to bind the timestamp and time fields to SQL_C_TIMESTAMP data > structures. I then use SQLFetch to retrieve the data. The timestamp > fields return the hundredths of a second information correctly, but the > time fields all return 0 for the hundredths of a second. How can I get > the hundredths of a second values for the time fields using the > PostgreSQL ODBC Driver? So does is show the tenths and/or the fields after the hundredths? Can you show the results of the SELECT query? > > Cheers, > Scott Ferrett > > > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc