Re: [GENERAL] function with unknown params

2013-07-10 Thread Kevin Grittner
giozh wrote: > ok, it works. But why on error message i had that two unknown > data type? if was an error on date type, why it don't signal > that? Because PostgreSQL treats a quoted literal as being of unknown type -- each of these could have matched a parameter of any type, and would have been

Re: [GENERAL] function with unknown params

2013-07-09 Thread Mike Christensen
You passed in: 22/1/2013 Which is 22 divided by 1, divided by 2013 - which is an integer.. On Tue, Jul 9, 2013 at 10:17 AM, giozh wrote: > ok, it works. But why on error message i had that two unknown data type? if > was an error on date type, why it don't signal that? > > > > -- > View this

Re: [GENERAL] function with unknown params

2013-07-09 Thread giozh
ok, it works. But why on error message i had that two unknown data type? if was an error on date type, why it don't signal that? -- View this message in context: http://postgresql.1045698.n5.nabble.com/function-with-unknown-params-tp5763215p5763224.html Sent from the PostgreSQL - general mailin

Re: [GENERAL] function with unknown params

2013-07-09 Thread Alvaro Herrera
giozh 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 > > sele

Re: [GENERAL] function with unknown params

2013-07-09 Thread Raghavendra
On Tue, Jul 9, 2013 at 10:00 PM, giozh 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

[GENERAL] function with unknown params

2013-07-09 Thread giozh
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'