dynamic rules?

Поиск
Список
Период
Сортировка
От Christopher Dedels
Тема dynamic rules?
Дата
Msg-id 20040604043444.845E4D1B1DF@svr1.postgresql.org
обсуждение исходный текст
Ответы Re: dynamic rules?
Список pgsql-sql
Is it possible to create a select rule that returns results depending on a
where clause in the original select statement?

For Example (oversimplified):

CREATE TABLE one (data int);
CREATE TABLE two (data int);

I make the query:
SELECT data FROM number WHERE type=1;

If the type is 1 (type=1) I want to return 'SELECT data FROM one;'
If the type is 2 (type=2) I want to return 'SELECT data FROM two;'

Thanks,

Chris



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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Difference between two times as a numeric value in a stored procedure.
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: dynamic rules?