Hello Markus, Wednesday, March 22, 2006, 8:12:35 PM, you wrote:
MB> Well, send the table descriptions, please. \d towar max3 | smallint | default 0 max4 | smallint | default 0 typik | character varying(1) | default '_'::character varying id_grupa_rabatowa | integer | not null default 0 id_jednostka_miary | integer | not null default 0 id_vat | integer | not null default 0 id_typ_towaru | integer | not null default 0 id_dostawcy | integer | not null default 0 grupa_produkcji | smallint | dodatek | boolean | not null default false policzalne | boolean | not null default true simport | character varying(50) | czy_procent | boolean | not null default false subtyp | character varying(35) | kontofk | character varying(40) | typks | character varying(30) | nazwarodzaju | character varying(50) | nazwakatalogu | character varying(250) | waluta | character varying(3) | not null default 'PLN'::character varying bank | character varying(5) | not null default 'NBP'::character varying procent_do_wyceny | smallint | not null default 0 waga | numeric(24,4) | not null default 0 cena_z | numeric(24,4) | not null default 0 ilosc_paczkowa | numeric(24,4) | not null default 0 ilosc_jed | numeric(24,4) | not null default 1 ilosc_nom | numeric(24,4) | not null default 1 odpad | numeric(24,4) | not null default 0 cena_jedn | numeric(24,4) | not null default 0 roboczojednostka | numeric(24,4) | not null default 0 Indexes: "towar_pkey" PRIMARY KEY, btree (id_towar) "towar_key1" btree (key1) "towar_key2" btree (key2) Foreign-key constraints: "$1" FOREIGN KEY (id_grupa_rabatowa) REFERENCES grupa_rabatowa(id_grupa_rabatowa) ON UPDATE CASCADE ON DELETE SET NULL "$2" FOREIGN KEY (id_jednostka_miary) REFERENCES jednostka_miary(id_jednostka_miary) ON UPDATE CASCADE ON DELETE SET NULL "$3" FOREIGN KEY (id_vat) REFERENCES vat(id_vat) ON UPDATE CASCADE ON DELETE SET NULL "$4" FOREIGN KEY (id_typ_towaru) REFERENCES typ_towaru(id_typ_towaru) ON UPDATE CASCADE ON DELETE SET NULL "$5" FOREIGN KEY (id_dostawcy) REFERENCES dostawcy(id_dostawcy) ON UPDATE CASCADE ON DELETE SET NULL Triggers: towar_domyslne BEFORE INSERT ON towar FOR EACH ROW EXECUTE PROCEDURE domyslne_ustawienia() zmiana_wagi AFTER UPDATE ON towar FOR EACH ROW EXECUTE PROCEDURE waga_przelicz() -- Best regards, Maciej mailto:[EMAIL PROTECTED] ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match