Rules

Поиск
Список
Период
Сортировка
От Jake Stride
Тема Rules
Дата
Msg-id 4257A329.3030103@users.sourceforge.net
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: "Rodolfo J. Paiz"
Дата:
Сообщение: Re: Getting running totals
Следующее
От: Erik Dahlstrand
Дата:
Сообщение: Trigger won't execute when using sp with input parameters