Thus spake Ilan Fait
> 1) I need to build a trigger that every time I insert into the table
> one of the columns will get +1 number.
The easiest way in PostgreSQL is to simply make the field a serial type.
CREATE TABLE mytable ( id SERIAL PRIMARY KEY, myname TEXT);
> 2) what is equal to 'sysdate' (to get/put the system date in a
> table) in PostGerSQL.
Again, the table definition can handle this.
CREATE TABLE mytable ( id SERIAL PRIMARY KEY, mydate DATE DEFAULT CURRENT_DATE, myname TEXT);
You should check out the docs on the web site. They are quite comprehensive.
--
D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.