Re: pl/pgsql function with argument of type DATE

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: Bojan <bojank(at)brandcomms(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pl/pgsql function with argument of type DATE
Date: 2008-06-12 09:14:49
Message-ID: 162867790806120214k26cfdb6en1e876aea816ec66a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2008/6/10 Bojan <bojank(at)brandcomms(dot)com>:
> How to invoke function which has arguments declared as type "date"?
>
>
>
> I want to make function which will return a list of all dates between
> starting and ending
>
> date which are two arguments of that function. I tried with:
>
>
>
> select * from foo(2008-06-01, 2008-06-09)

it's nonsense :) you call foo with values (2001, 1993)

Pavel
>
> select * from foo('2008-06-01', '2008-06-09')
>
>
>
> but type mismatch (date vs integer) error occurs.
>
>
>
> Thanks,
>
>
>
> Bojan
>
>
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 270.0.0/1486 - Release Date: 05/06/2008
> 18:29
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Zoltan Boszormenyi 2008-06-12 11:39:54 Re: Heavily fragmented table and index data in 8.0.3
Previous Message Dave Page 2008-06-12 08:33:36 Re: pgAdmin complains about vacuuming required after fresh 8.1 install