Hello,
Nice reply Josh.
I wouldn't call your solution 'ugly' at all.
It's an excellent example of a real world need for Postgresql functions.
I've also been looking at other functions at
http://www.brasileiro.net/postgres/cookbook/.
I noticed your name amongst the author's -- nice one -- keep u
Josh Berkus wrote:
> Folks,
>
> Hey, I need to write a date calculation function that calculates the
> date after a number of *workdays* from a specific date. I pretty
> much have the "skip holidays" part nailed down, but I don't have a
> really good way to skip all weekends in the calucla
Folks,
Hey, I need to write a date calculation function that calculates the date
after a number of *workdays* from a specific date. I pretty much have the
"skip holidays" part nailed down, but I don't have a really good way to skip
all weekends in the caluclation. Here's the ideas I've come
Michael,
> SELECT *
> FROM Persons
> WHERE EXTRACT( YEAR FROM AGE(dateofbirth) ) < EXTRACT( YEAR FROM AGE(
> CURRENT_DATE+60, dateofbirth ) )
>
> ... but how do I sort the list ?
Easy:
SELECT person_name, person_department, EXTRACT( YEAR FROM AGE(dateofbirth) )
as their_age
FROM Persons
WH
Achilleus,
> > > The pgsql db is indexed on the
> > > 'authuser' field, and I've run 'analyze logfile'.
> >
> > He also needs to index the bytes field and the traffic field. And run
> ^^^
>
> Index on an aggregate function???
>
> I thoug
On Thu, 2002-06-20 at 13:55, Michael Agbaglo wrote:
> Hi !
>
> there's a nice query for retrieving the people who have their birthday
> in the next n days: (taken from Joe Celko's SQL for Smarties, 1st Ed.,
> p. 76)
>
> SELECT *
> FROM Persons
> WHERE EXTRACT( YEAR FROM AGE(dateofbirth) ) < EX
Hi !
there's a nice query for retrieving the people who have their birthday
in the next n days: (taken from Joe Celko's SQL for Smarties, 1st Ed.,
p. 76)
SELECT *
FROM Persons
WHERE EXTRACT( YEAR FROM AGE(dateofbirth) ) < EXTRACT( YEAR FROM AGE(
CURRENT_DATE+60, dateofbirth ) )
... but how d
On Wednesday 19 Jun 2002 10:19 pm, Tom Lane wrote:
> Steve Wampler <[EMAIL PROTECTED]> writes:
> > An event has: timestamp,event_name,list_of_attributes
> >The list_of_attributes are simple (string) name,value pairs.
> >
> > However, although selection performance isn't a priority, the
> > a
Jan Wieck wrote:
> Bruce Momjian wrote:
> >
> > Wei Weng wrote:
> > > Between Using Limit P, S or using a cursor to start from FETCH ABSOLUTE
> > > S and FETCH NEXT for P times, which one is faster?
> >
> > LIMIT is faster because it doesn't need to generate all the result, in
> > some cases.
>