On Mon, Jul 24, 2006 at 02:12:39PM +0200, Mario Splivalo wrote:
> Now I run the function again:
>
> l_netsms=# select punimessages();
> NOTICE: Ubacili smo za usera 4162.
> NOTICE: Ubacili smo za usera 4161.
> NOTICE: Ubacili smo za usera 4160.
> NOTICE: Ubacili smo za usera 4159.
> NOTICE: Ubacili smo za usera 4158.
> punimessages
> --------------
> t
> (1 row)
>
> Shouldn't I get errors that I'm violating primary key constraint when
> INSERTing again same data?
No, because punimessages() has a truncate statement that empties
the table each time the function is called. Should that truncate
statement be there?
--
Michael Fuhr