Re: INSERT rule

Поиск
Список
Период
Сортировка
От Darko Prenosil
Тема Re: INSERT rule
Дата
Msg-id 001401c45dff$8d7d4fa0$1e82bfd5@darko
обсуждение исходный текст
Ответ на INSERT rule  (Darko Prenosil <darko.prenosil@finteh.hr>)
Список pgsql-hackers
God, that was so obvious !
Thanks (again).

Regards !

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Darko Prenosil" <darko.prenosil@finteh.hr>
Cc: <pgsql-hackers@postgresql.org>
Sent: Tuesday, June 29, 2004 4:18 PM
Subject: Re: [HACKERS] INSERT rule


> Darko Prenosil <darko.prenosil@finteh.hr> writes:
> > Just wrote a function that takes view name as argument and generates
INSERT,
> > UPDATE and DELETE rules for that view. It is working OK (thanks to Tom),
but
> > I have trouble with INSERT rule.
> > When inserting directly into table, default values are filled in when
the
> > field is not in the insert target list, but when using rule system field
is
> > filled with NULL.
>
> You want to attach the defaults directly to the view, viz
> ALTER TABLE view ALTER COLUMN col SET DEFAULT whatever;
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
>



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: lock timeout patch
Следующее
От: "Darko Prenosil"
Дата:
Сообщение: Re: User Privileges using dblink