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 w
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
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
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_t
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, 2005-01
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 exte
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 fo
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=OL
Here is my $0.02 :
* when you create "id SERIAL", Postgres remembers to call function nextval on each
insertion,
* the rule's NEW.id item uses the function nextval itself instead of it's result
This explains why the ID's are what you see :
* first of all, you insert the log, calling nextval for t
In the CLUSTER description it says:
"The table is actually copied to a temporary table in index order, then
renamed back to the original name. For this reason, all grant permissions
and other indexes are lost when clustering is performed."
It sure seems to me that rules would get lost along the
10 matches
Mail list logo