Simple time math with " No such function 'time_timespan' with the specified attributes " error
| От | HINKLEY,DUANE (Non-HP-Boise,ex1)" |
|---|---|
| Тема | Simple time math with " No such function 'time_timespan' with the specified attributes " error |
| Дата | |
| Msg-id | 2FABBD0C77DAD211971F00A0C9DEFC332E1959@xboi04.boi.hp.com обсуждение исходный текст |
| Список | pgsql-general |
I'm doing a billing system and trying to get postgresql to calculate the
difference in time. Every way I do it I get an error with the time_timespan
function.
Here's an example:
billsys=> select stoptime - starttime from jobdetail;
ERROR: No such function 'time_timespan' with the specified attributes
Here's the data:
id|number | date|starttime|stoptime|duration|description
--+--------+----------+---------+--------+--------+----------------
1|1175 |09-09-1999|10:30:00 |11:30:00| |test
billsys=> \d jobdetail
Table = jobdetail
+----------------------------------+----------------------------------+-----
--+
| Field | Type |
Length|
+----------------------------------+----------------------------------+-----
--+
| id | int4 not null default nextval('" |
4 |
| number | char() |
8 |
| date | date |
4 |
| starttime | time |
8 |
| stoptime | time |
8 |
| duration | timespan |
12 |
| description | char() |
100 |
+----------------------------------+----------------------------------+-----
--+
Index: jobdetail_id_key
В списке pgsql-general по дате отправления: