Rules - Mailing list pgsql-novice

From Jake Stride
Subject Rules
Date
Msg-id 4257A329.3030103@users.sourceforge.net
Whole thread Raw
List pgsql-novice
I'm a bit stuck about something (I think) I want to do with rules.

I have 2 schemas in a database - public and company1. I have a view in
company1 that is made with a left outer join on a table from public and
and a table from company1:

public.table
============
id serial

company1.table
==============
public_table_id int references public.table.id
some_data varchar

company.view
============
SELECT public.table.id, company1.table.some_data FROM public.table LEFT
OUTER JOIN company1.table ON
(public.table.id=company1.table.public_table)id)

What I need to do is, when somebody tries to update the view, if the row
does not exist in company1.table insert it, otherwise do an update.

Is using rules the best way to do it and if so how?

Thanks

Jake

pgsql-novice by date:

Previous
From: "Rodolfo J. Paiz"
Date:
Subject: Re: Getting running totals
Next
From: Erik Dahlstrand
Date:
Subject: Trigger won't execute when using sp with input parameters