Re: [GENERAL] Rule acting as REPLACE INTO behave strange

2009-07-13 Thread IVO GELOV
aint - to enforce at least one of those NULL-able columns to be non-NULL. But you are right - it does not save me from duplicate rows :-( But the BEFORE INSERT trigger does save me :-) Thanks for your time and the fast response. PostgreSQL is great DBMS and its community is nice,too. Best wishes,

[GENERAL] Rule acting as REPLACE INTO behave strange

2009-07-12 Thread IVO GELOV
has 1 row and column DEBIT has value 2 !!! If I execute the script again - then DEBIT becomes 3, another execution - becomes 4 and so on. I do not know how to debug rules in Postgres - the only idea that comes to my mind is "May be the first time both INSERT and UPDATE happens". But my rule is defined as "DO INSTEAD" Can someone more experienced than me explain this ? In the mean time I have replaced the rule with a trigger - and it works like a charm. May be using a trigger is better (and even faster) than using a rule - I am just curious about this strange behaviour. I will teach something new if I understand this situation. Thanks in advance to everyone who answers. Best wishes, IVO GELOV -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Strange behaviour - performance decreases after each TRUNCATE

2008-05-15 Thread IVO GELOV
Hallow. My name is IVO GELOV. Please excuse my English, it is not my primary language. I've started to learn PostgreSQL with version 8.1, doing 2 upgrades - to 8.2.4 and now 8.3.1 I consider myself still a novice. Currently I'm porting our small warehouse application from MySQL

[GENERAL] Strange behaviour - performance decreases after each TRUNCATE

2008-05-15 Thread IVO GELOV
Hallow. My name is IVO GELOV. Please excuse my English, it is not my primary language. I've started to learn PostgreSQL with version 8.1, doing 2 upgrades - to 8.2.4 and now 8.3.1 I consider myself still a novice. Currently I'm porting our small warehouse application from MySQL