age / timestamp

From: "Chr(dot) Rossmanith" <cr(at)neuro(dot)ma(dot)uni-heidelberg(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: age / timestamp
Date: 2003-03-21 12:06:45
Message-ID: 3E7B0055.6020201@neuro.ma.uni-heidelberg.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

some time ago I've upgraded from PostgreSQL 7.0.3 to PostgreSQL 7.1.3.
First I've only moved tables to the new database system, now I'd like to
move views, too. But I'm having problems with a view using the "age()"
function. In the 7.0.3 system the view "V_PatientAge" is defined as follows:

NeuroTest=> \d "V_PatientAge"
View "V_PatientAge"
Attribute | Type | Modifier
------------+----------+----------
pid | integer |
eid | integer |
date_trunc | interval |
View definition: SELECT "PatientInfo".pid, "ExamInfo".eid,
date_trunc('year'::text, age(timestamp("ExamInfo"."ExamDate"),
timestamp("PatientInfo"."PatientBirthdate"))) AS date_trunc FROM
"PatientInfo", "ExamInfo" WHERE ("PatientInfo".pid = "ExamInfo".pid);

I can create this view in the 7.1.3 system sucessfully but if I try a
select I get the error message:

ERROR: Unable to decode timestamp

The two DB systems run on two different machines, both linux boxes.

Does anybody have an idea how to solve this problem?

Thank you,

Christina Rossmanith

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message A.Bhuvaneswaran 2003-03-21 12:13:03 Re: table sequence
Previous Message Crombleholme, Roy 2003-03-21 11:16:33 table sequence