Search Postgresql Archives

Re: function with unknown params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 9, 2013 at 10:00 PM, giozh <giozh@xxxxxxxx> wrote:
i've declared and implemented e function like:

CREATE OR REPLACE FUNCTION acquistoLotto(m_g INTEGER, grossista VARCHAR(20),
produttore BIGINT, costo INTEGER, dat DATE, descr VARCHAR(120), num_prod
INTEGER) RETURNS VOID AS $$

but when i'm trying to call it like

select acquistoLotto(0, 'grossista', 52187073424, 10, 22/1/2013, 'ciao ciao
ciao', 10);

Seems you missing on how to pass date field. Try this it will work.

postgres=# select acquistoLotto(0, 'grossista', 52187073424, 10, '1-22-2013', 'ciao ciaociao', 10);
 acquistolotto
---------------

(1 row)

or 

postgres=# select acquistoLotto(0, 'grossista', 52187073424, 10, '1-22-2013'::date, 'ciao ciaociao', 10);
 acquistolotto
---------------

(1 row)

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux