Обсуждение: interval function question

Поиск
Список
Период
Сортировка

interval function question

От
"Johnson, Shaunn"
Дата:

Howdy:

Running PostgreSQL 7.2.1 on RedHat Linux 7.2

Can someone tell me or point me to where I can
get information on the function 'interval'?  I'm trying
to replicate that to a client's database that's
running Oracle and MS Access and I don't know
what's similar or the definition of that particular
function.

Thanks.

-X

Re: interval function question

От
Arguile
Дата:
On Thu, 2003-05-08 at 13:01, Johnson, Shaunn wrote:
> Howdy:
>
> Running PostgreSQL 7.2.1 on RedHat Linux 7.2
>
> Can someone tell me or point me to where I can
> get information on the function 'interval'?  I'm trying
> to replicate that to a client's database that's
> running Oracle and MS Access and I don't know
> what's similar or the definition of that particular
> function.

Interval isn't a function in PostgreSQL it's a datatype. In Pg you can
do sensible things like "timestamp - timestamp" to get the difference
between them, that difference is of the type interval.

You might want to read these:

http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/datatype-datetime.html
http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/functions-datetime.html

If you have any questions after browsing through those, feel free to
ask.