On 11/17/06, Jeff Davis <[EMAIL PROTECTED]> wrote:
Why do you need so many functions though? Won't one SQL function do the
trick?
Regards,
Jeff Davis
You're right, one will do the trick - I was thinking update and
delete, but of course those will be fine with plain rules because the
On 11/16/06, Tom Lane <[EMAIL PROTECTED]> wrote:
Actually, the best way to do that is to attach a default to the view
itself.
CREATE VIEW v AS SELECT ... ;
CREATE RULE ... for insert on v ... ;
ALTER TABLE v ALTER COLUMN c DEFAULT whatever;
In this formulation the rule
On 11/16/06, Jeremy Smith <[EMAIL PROTECTED]> wrote:
On 11/16/06, Jeff Davis <[EMAIL PROTECTED]> wrote:
> create rule "child_with_parent_explicit_insert" as
> on insert to child_with_parent_explicit do instead (
> insert into parent(id,
On 11/16/06, Jeff Davis <[EMAIL PROTECTED]> wrote:
create rule "child_with_parent_explicit_insert" as
on insert to child_with_parent_explicit do instead (
insert into parent(id, foo) values(COALESCE
(new.id,NEXTVAL('parent_id_seq')), new.foo);
insert into
A question about rules:
I am trying to create a rule which handles inserts on a view, and that
rule should insert rows into multiple tables, each one of which
contains some of the columns that the view contains.
What if one of these tables has, for example, a serial primary key?
If I explicitly
inittab which did not have a -i in it so I think that was the
problem?
Jeremy
> From: "Richard Huxton" <[EMAIL PROTECTED]>
> Date: Mon, 26 Feb 2001 14:02:21 -0000
> To: "Jeremy Smith" <[EMAIL PROTECTED]>, "John Clark L. Naldoza"
> <[