[SQL] i can't connect after some periode

2008-07-10 Thread aldy

hi all,
i have some problems with my postgresql database server :
i develop some client-server program using postgre as its database (used by 
almost 100 client), my problem comes after some periode of time( some times 
1 day) i can't connect to the database include from pgadmin, and i must 
restart the server and everything back to normal ( im using Win XP as its OS 
and postgre 8.2)

is there any suggetions for me, please??
Thanks

regards,

Aldy


--
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] i can't connect after some periode

2008-07-10 Thread aldy

From: "A. Kretschmer" <[EMAIL PROTECTED]>
Sent: Thursday, July 10, 2008 14:14



First, don't hijack other threads, your mail contains a
References-header:


owkay, i'm sorry for that


Maybe the clients do not close the connection and after some time you
have more than 'max_connections' (Default 100).

You can increase this value in your postgresql.conf.


You can also check, how many active connections are open with 'select *
from pg_stat_activity'.


Hope that helps, Andreas


thanks for the answer,
is there any procedure(utility) or configuration in postgresql which can 
auto close for connection that idle for some minutes


thanks before



am  Thu, dem 10.07.2008, um 13:57:15 +0700 mailte aldy folgendes:

hi all,




i have some problems with my postgresql database server :
i develop some client-server program using postgre as its database (used 
by
almost 100 client), my problem comes after some periode of time( some 
times

1 day) i can't connect to the database include from pgadmin, and i must
restart the server and everything back to normal ( im using Win XP as its
OS and postgre 8.2)
is there any suggetions for me, please??




--
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


[SQL] my rules wont execute

2008-10-20 Thread aldy
hai all,

please help me, i've made a view named bpbkain

CREATE OR REPLACE VIEW gmt.bpbkain AS 
 SELECT bpb.tanggal AS tgl_bukti, n.supplier, bpb.nobukti, n.no_po, 
n.jenis_kain, n.gramasi, n.warna, n.lebar, n.no_inv, n.harga, n.sat_harga, 
COALESCE(sum(netto2.netto), 0::double precision)::numeric(15,2) AS ncqty, 
n.qty, n.bruto, n.order_no, n.style
   FROM gmt.netto n
   LEFT JOIN ( SELECT netto_child.id_netto, sum(netto_child.kg) AS netto
   FROM gmt.netto_child
  GROUP BY netto_child.id_netto
  ORDER BY netto_child.id_netto) netto2 USING (id_netto)
   JOIN gmt.bpb USING (id_bpb)
  GROUP BY bpb.tanggal, n.supplier, bpb.nobukti, n.no_po, n.jenis_kain, 
n.gramasi, n.warna, n.lebar, n.no_inv, n.harga, n.sat_harga, n.order_no, 
n.style, n.qty, n.bruto
  ORDER BY bpb.tanggal, n.supplier, bpb.nobukti, n.no_po, n.jenis_kain, 
n.gramasi, n.warna, n.lebar, n.no_inv, n.harga, n.sat_harga;

ALTER TABLE gmt.bpbkain OWNER TO teoadm;
GRANT SELECT, UPDATE, INSERT, DELETE, REFERENCES, TRIGGER ON TABLE gmt.bpbkain 
TO teoadm;
GRANT SELECT ON TABLE gmt.bpbkain TO pm;
GRANT SELECT, UPDATE, INSERT, TRIGGER ON TABLE gmt.bpbkain TO acct;

i've made the rule too, to update a table while the view changes

CREATE OR REPLACE RULE upd_nett AS
ON UPDATE TO gmt.bpbkain DO INSTEAD  UPDATE gmt.netto SET harga = 
new.harga, sat_harga = new.sat_harga, no_inv = new.no_inv
  WHERE netto.supplier::text = new.supplier::text AND netto.no_po::text = 
new.no_po::text AND netto.jenis_kain::text = new.jenis_kain::text AND 
netto.gramasi::text = new.gramasi::text AND netto.warna::text = new.warna::text 
AND netto.lebar::text = new.lebar::text AND netto.harga = old.harga AND 
netto.sat_harga::text = old.sat_harga::text AND netto.order_no::text = 
new.order_no::text AND netto.no_inv::text = old.no_inv::text;

but when i made some changes to that view it doesn't make any change for my 
table...any body help m