Re: SQL Date Challenge

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: SQL Date Challenge
Дата
Msg-id Pine.LNX.4.30.0106042323430.768-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: SQL Date Challenge  ("Josh Berkus" <josh@agliodbs.com>)
Ответы Re: SQL Date Challenge  ("Josh Berkus" <josh@agliodbs.com>)
Re: SQL Date Challenge  ("Josh Berkus" <josh@agliodbs.com>)
Список pgsql-sql
Josh Berkus writes:

>     I am trying to list all Wednesdays that are *not* in column x.
>
>     This requires me to build a list of all possible Wednesdays (within a
> date range), preferably *without* first having a table of all dates in
> existance!  Some sort of manipulation of the date processor should be
> possible, shouldn't it?

You can't easily build data out of nothing in a declarative way in SQL.
Basically, if you want a list of data you either need to put them in a
table (which you don't want) or list them in the command itself (which you
can't).  This isn't made easier by the fact that functions currently can't
return sets without extreme wizardry.

Your problem is probably solved best if some of the computation is shifted
to the client side.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



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

Предыдущее
От: Alex Pilosov
Дата:
Сообщение: Re: SQL Date Challenge
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Re: SQL Date Challenge