BUG #3812: Delphi TADOStored procedure truncates time portion of the ftDateTime parameter using ODBC - Mailing list pgsql-bugs

From A. Ozen Akyurek
Subject BUG #3812: Delphi TADOStored procedure truncates time portion of the ftDateTime parameter using ODBC
Date
Msg-id 200712102030.lBAKULkD035665@wwwmaster.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      3812
Logged by:          A. Ozen Akyurek
Email address:      akyurek@tr.net
PostgreSQL version: 8.2
Operating system:   Windows XP
Description:        Delphi TADOStored procedure truncates time portion of
the ftDateTime parameter using ODBC
Details:

I have a simple function

create or replace function GetDate(adate out timestamp) as $$
begin
  adate := now();
end;
$$language plpgsql;

With that function

select GetDate();

works fine.

But if you use it in Delphi in the following way;

// Delphi code here
procedure TForm1.Button1Click(Sender: TObject);
var t:tdatetime;
begin
  ADOStoredProc1.ExecProc;
  t := ADOStoredProc1.parameters.parambyname('adate').value;
  ShowMessage(DateTimeToStr(t));
end;

Time portion of the result is truncated (e.g instead of 2007-12-10 22:15:38,
the result is 2007-12-10 only)

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] BUG #3799: csvlog skips some logs
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] BUG #3799: csvlog skips some logs