Using Max() with timestamps

More
10 years 2 days ago #27 by paulsk
paulsk created the topic: Using Max() with timestamps
[PGNP32-1.2.8.1110]

I have a table 'Messages' containing a column 'Posted' of type timestamp without time zone.

I need to get the newest table entry. The current SQL is
SELECT Max(m.Posted) AS LastMessage FROM Messages m
which works okay for Oracle and Sqlserver for .NET 2.0 and also Oracle, Sqlserver and Postgres for Java. But it fails with your driver with the following exception when the resultset tries to be read using either rs[0] or rs[("LastMessage")]

System.Data.OleDb.OleDbException - "Accessor validation was deferred and was performed while the method returned data. The binding was invalid for this column or parameter."

The Max() function has been successfully used with Integer type columns, but fails with timestamps. I do not have a workaround for this either.

Please Log in or Create an account to join the conversation.

More
10 years 2 days ago #29 by Moderator
Moderator replied the topic: Re: Using Max() with timestamps
This is a known issue.It is result of limitations in expression type evaluation engine in version 1.2.8.

We have fixed it in version 1.3 and considering to migrate some of that code into 1.2.8.

Please Log in or Create an account to join the conversation.

More
10 years 2 days ago #32 by paulsk
paulsk replied the topic: Re: Using Max() with timestamps
This problem is the only driver problem that I cannot workaround and it either needs to be fixed in 1.2.8 or the 1.3 release needs to be done very soon.

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #34 by paulsk
paulsk replied the topic: Re: Using Max() with timestamps
Since the 1.3 release is expected around the middle of summer 2009, when will the 1.2.8 be patched to contain a fix for this?

It is the last problem which is preventing me from releasing my project for final testing.

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #35 by Moderator
Moderator replied the topic: Re: Using Max() with timestamps
We'll try to migrate the fix from 1.3 and send you 1.2.8 trial build in a couple of days.

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #36 by paulsk
paulsk replied the topic: Re: Using Max() with timestamps
That would be much appreciated :D

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #37 by Moderator
Moderator replied the topic: Re: Using Max() with timestamps
We have the fix and we are going to publish trial builds by weekend. I'll update this post with the links to the install modules when they are ready.

Update: here are the links to installation modules:
[url:e6u16kay]http://www.pgoledb.com/downloads/PGNP32-1.2.8.1120.exe[/url:e6u16kay] (32-bit)
[url:e6u16kay]http://www.pgoledb.com/downloads/PGNP64-1.2.8.1120.exe[/url:e6u16kay] (64-bit)

Let us know if you will have any questions.

Please Log in or Create an account to join the conversation.

Time to create page: 0.140 seconds
Powered by Kunena Forum