[ADMIN] Rules

2010-06-15 Thread Ricardo Bayley
Hi Fellows, I have a table with 55 columns or so, plus one extra column of datatype geometry, I am using PostGIS. I intend to split my table into 3 tables. So each may have 25 to 30 columns each. I've created a View which relates all 3 tables with their pk and fk accordingly. This VIEW has a

[ADMIN] Rules/Triggers executio order

2006-10-18 Thread Benjamin Krajmalnik
I have a partitioned table to which I route datausing a trigger. I am changing it to use a set of rules which executes "INSTEAD" on insert. The parent table currently has a trigger. The system is a live system. I would prefer to not have to suspend the data flow. If I create the rules,

Re: [ADMIN] Rules/Triggers executio order

2006-10-18 Thread Jim C. Nasby
On Wed, Oct 18, 2006 at 06:42:21PM -0600, Benjamin Krajmalnik wrote: I have a partitioned table to which I route data using a trigger. I am changing it to use a set of rules which executes INSTEAD on insert. The parent table currently has a trigger. The system is a live system. I would

[ADMIN] Rules on a view overwrite default values. Any way to reinstate them?

2005-01-03 Thread Bradley Kieser
Hi, I use views extensively to implement security on tables. This requires each table to have a view. All updates, inserts and deletes take place through the view. The view has rules for each of these operations defining security for that table. Under other conditions, the view also removes

Re: [ADMIN] Rules on a view overwrite default values. Any way to

2005-01-03 Thread Scott Marlowe
On Mon, 2005-01-03 at 11:02, Bradley Kieser wrote: Hi, I use views extensively to implement security on tables. This requires each table to have a view. All updates, inserts and deletes take place through the view. The view has rules for each of these operations defining security for

Re: [ADMIN] Rules on a view overwrite default values. Any way to

2005-01-03 Thread Bradley Kieser
Hey Scott, that's ingenious, only thing is that I use NOT NULL for many data columns too, where the value may or may not be passed in. Will try with a COALESCE and will post back here. Thx again! Brad Scott Marlowe wrote: On Mon, 2005-01-03 at 11:02, Bradley Kieser wrote: Hi, I use views

Re: [ADMIN] Rules on a view overwrite default values. Any way to

2005-01-03 Thread Bradley Kieser
Hmm... I have tested this and it works a treat for cols that I ONLY want to put the default values into, but sadly the coalesce function doesn't accept default as one of its parameters, so I can't use this for columns that I want to default only if null. :-( Scott Marlowe wrote: On Mon,

Re: [ADMIN] Rules on a view overwrite default values. Any way to reinstate them?

2005-01-03 Thread Tom Lane
Bradley Kieser [EMAIL PROTECTED] writes: The problem is that rules on a view mean that the default values for NOT NULL columns (used extensively) no longer trigger! The way you're supposed to fix this is to attach default values to the view itself. ALTER TABLE myview ALTER COLUMN updated_time

Re: [ADMIN] Rules on a view overwrite default values. Any way to

2005-01-03 Thread Stephan Szabo
On Mon, 3 Jan 2005, Bradley Kieser wrote: Hi, I use views extensively to implement security on tables. This requires each table to have a view. All updates, inserts and deletes take place through the view. The view has rules for each of these operations defining security for that table.

Re: [ADMIN] Rules on a view overwrite default values. Any way to

2005-01-03 Thread Bradley Kieser
Thanks Tom and Stephan! This works perfectly! Brad Tom Lane wrote: Bradley Kieser [EMAIL PROTECTED] writes: The problem is that rules on a view mean that the default values for NOT NULL columns (used extensively) no longer trigger! The way you're supposed to fix this is to attach default

[ADMIN] rules

2004-05-19 Thread Jie Liang
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 18, 2004 5:19 PM To: Nico De Ranter Cc: postgres-list Subject: Re: [ADMIN] IDENT authentication failed but I'm not using ident Nico De Ranter [EMAIL PROTECTED] writes: \connect: FATAL: IDENT

[ADMIN] rules

2004-05-19 Thread Jie Liang
According to the document of rule: CREATE RULE rulename AS ON delete TO mytablename DO ( delete from aaa where id=OLD.id; Delete from bbb where id=OLD.id; Delete from ccc where id=OLD.id ); Should work, but it doesn't, what wrong with it? Even I use { } Jie Liang

Re: [ADMIN] rules

2004-05-19 Thread Jie Liang
Sorry, wrong question. -Original Message- From: Jie Liang Sent: Wednesday, May 19, 2004 10:20 AM To: Tom Lane Cc: postgres-list; [EMAIL PROTECTED] Subject: [ADMIN] rules According to the document of rule: CREATE RULE rulename AS ON delete TO mytablename DO ( delete from aaa where id

[ADMIN] Rules - Functions - Permissions

2001-11-19 Thread AKACIA
Hi, I'm trying create a SECURE TIER in my DB. I need dummys tables that accept INSERTS from any users, then execute a RULE that insert the datas into the REAL table. The REAL tables accept INSERT only from postgres user. This work fine ! But when I need the RULE calls a FUNCTION (plpgsql) for

[ADMIN] rules problem

2000-05-08 Thread Vladimir V. Zolotych
Hello all, Encountered the problem with using RULEs. Cannot log (e.g. write some info about insertions into sepearate table) insertions properly. Detailed description (not long or sophisticated) follows: I do: 1) CREATE TABLE colors (id SERIAL, color TEXT); 2) Create table for log info: CREATE

RE: [ADMIN] rules problem

2000-05-08 Thread Nicolas Huillard
id) Yours, Nicolas Huillard G.H.S Directeur Technique Tél : +33 1 43 21 16 66 Fax : +33 1 56 54 02 18 mailto:[EMAIL PROTECTED] http://www.ghs.fr -Message d'origine- De: Vladimir V. Zolotych [SMTP:[EMAIL PROTECTED]] Date: lundi 8 mai 2000 18:00 À: [EMAIL PROTECTED] Objet: [AD

[ADMIN] rules bug

2000-04-30 Thread Vladimir V. Zolotych
Hello all, Have the problem with using RULEs (is it a RULE's bug?): Do the following: 1) Create table 'num' with column of a type SERIAL, e.g. CREATE TABLE num (id SERIAL, num INT4); 2) Create table 'num_log' (for logging insertions in table 'num'), e.g. CREATE TABLE num_log (num_id INT4,

[ADMIN] Rules and clustering

1999-10-24 Thread Jacques B. Dimanche
Hello There, I noticed that if I have rules set on a table and if I do a cluster index-name on the table, it deletes all the rules. Is this normal? I am just wondering as I would like to cluster the data occasionally. I am not sure if this is a bug, or it is supposed to drop all