age / timestamp - Mailing list pgsql-novice

From Chr. Rossmanith
Subject age / timestamp
Date
Msg-id 3E7B0055.6020201@neuro.ma.uni-heidelberg.de
Whole thread Raw
Responses Re: age / timestamp  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-novice by date:

Previous
From: John Gunther
Date:
Subject: Re: Problems using palloc in postgresql user C functions
Next
From: "Crombleholme, Roy"
Date:
Subject: table sequence