RE: Hey! ORDER BY in VIEWS?

Поиск
Список
Период
Сортировка
От Robby Slaughter
Тема RE: Hey! ORDER BY in VIEWS?
Дата
Msg-id EPEHLKLEHAHLONFOKNHNAENBDCAA.webmaster@robbyslaughter.com
обсуждение исходный текст
Ответ на Re: Hey! ORDER BY in VIEWS?  ("Josh Berkus" <josh@agliodbs.com>)
Список pgsql-sql
Josh:

You wondered:

>What happens if I put an ORDER BY in a view, then call an ORDER BY in a
>query, e.g.:
>
>CREATE VIEW test_view AS
>SELECT client_name, city, zip FROM clients
>WHERE zip IS NOT NULL
>ORDER BY zip;
>
>SELECT * FROM test_view ORDER BY city;
>
>Does the second ORDER BY override or suppliment the view ORDER BY, or is
>it ignored?

I think this question falls into the "Don't ask, don't tell"
category of computer related questions. I can't think of a reason
to design this way, the behavior isn't specified or sensible, so just
don't do it!

Sorry if I'm over-admonishing. Curiosity killed the cat.

-Robby



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

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: Hey! ORDER BY in VIEWS?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Hey! ORDER BY in VIEWS?