> how can i use unix timestamp as a data type?
You don't want to. Really.
> i thought that the timestamp data type use the unix timestamp but
> found out that it didnt.. :(
Right. One second resolution and limited range was considered a problem.
> do i need to use an int data type for holding unix timestamp or there
> is a data type which was build specialy for that?
I would suggest using the native timestamp type. You can convert back
and forth using various techniques, but you should find that the
examples below give you a good start:
lockhart=# select date_part('epoch',timestamp 'now');
date_part
-----------
997993780
lockhart=# select timestamp(integer '997993780');
timestamp
------------------------
2001-08-16 20:29:40+00
hth
- Thomas