Re: [HACKERS] plpgsql: numeric assignment to an integer variable errors out

2010-03-01 Thread Nikhil Sontakke
Hi, > Now it is true that a lot of the uses for that were subsumed when > we added coerce-via-IO to the native cast capabilities; but I'm > still quite scared of what this would break, and I don't see any > field demand for a change. Well, we have had one of our EDB connectors facing issues becau

Re: [HACKERS] plpgsql: numeric assignment to an integer variable errors out

2010-02-26 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Whatever happened to this patch? > > I think we bounced it on the grounds that it would represent a > fundamental change in plpgsql behavior and break a whole lot of > applications. People have been relying on plpgsql's coerce-via-IO > assignment behav

Re: [HACKERS] plpgsql: numeric assignment to an integer variable errors out

2010-02-26 Thread Tom Lane
Bruce Momjian writes: > Whatever happened to this patch? I think we bounced it on the grounds that it would represent a fundamental change in plpgsql behavior and break a whole lot of applications. People have been relying on plpgsql's coerce-via-IO assignment behavior for ten years. If you pre

Re: [HACKERS] plpgsql: numeric assignment to an integer variable errors out

2010-02-26 Thread Bruce Momjian
Whatever happened to this patch? --- Nikhil Sontakke wrote: > Hi, > > wrote: > > > The following plpgsql function errors out with cvs head: > > > > CREATE function test_assign() returns void > > AS > > $$ declare x int; >

Re: [HACKERS] plpgsql: numeric assignment to an integer variable errors out

2009-01-23 Thread Pavel Stehule
Hello I tested patch v2.0, and I thing, so this patch should be used as bug fix. It has same or little bit better speed than current and solve some problems with numeric's implicit casting in plpgsql. But this is only an half solution. The core of problem is in lazy casting of plpgsql. We need to

Re: [HACKERS] plpgsql: numeric assignment to an integer variable errors out

2009-01-21 Thread Pavel Stehule
2009/1/22 Bruce Momjian : > Nikhil Sontakke wrote: >> > > PFA, patch which uses find_coercion_pathway to find a direct >> > > COERCION_PATH_FUNC function and uses that if it is available. Or is there >> > a >> > > better approach? Seems to handle the above issue with this patch. >> > >> > +1 >> > >

Re: [HACKERS] plpgsql: numeric assignment to an integer variable errors out

2009-01-21 Thread Bruce Momjian
Nikhil Sontakke wrote: > > > PFA, patch which uses find_coercion_pathway to find a direct > > > COERCION_PATH_FUNC function and uses that if it is available. Or is there > > a > > > better approach? Seems to handle the above issue with this patch. > > > > +1 > > > > I thing, so some values should b

Re: [HACKERS] plpgsql: numeric assignment to an integer variable errors out

2008-12-29 Thread Nikhil Sontakke
Hi, > > > >> The following plpgsql function errors out with cvs head: > >> > >> CREATE function test_assign() returns void > >> AS > >> $$ declare x int; > >> BEGIN > >> x := 9E3/2; > >> END > >> $$ LANGUAGE 'plpgsql'; > >> > >> postgres=# select test_assign(); > >> ERROR: invalid input syntax fo

Re: [HACKERS] plpgsql: numeric assignment to an integer variable errors out

2008-12-29 Thread Pavel Stehule
2008/12/29 Nikhil Sontakke : > Hi, > > wrote: >> >> The following plpgsql function errors out with cvs head: >> >> CREATE function test_assign() returns void >> AS >> $$ declare x int; >> BEGIN >> x := 9E3/2; >> END >> $$ LANGUAGE 'plpgsql'; >> >> postgres=# select test_assign(); >> ERROR: invali

Re: [HACKERS] plpgsql: numeric assignment to an integer variable errors out

2008-12-29 Thread Nikhil Sontakke
Hi, wrote: > The following plpgsql function errors out with cvs head: > > CREATE function test_assign() returns void > AS > $$ declare x int; > BEGIN > x := 9E3/2; > END > $$ LANGUAGE 'plpgsql'; > > postgres=# select test_assign(); > ERROR: invalid input syntax for integer: "4500.00

[HACKERS] plpgsql: numeric assignment to an integer variable errors out

2008-12-11 Thread Nikhil Sontakke
The following plpgsql function errors out with cvs head: CREATE function test_assign() returns void AS $$ declare x int; BEGIN x := 9E3/2; END $$ LANGUAGE 'plpgsql'; postgres=# select test_assign(); ERROR: invalid input syntax for integer: "4500." CONTEXT: PL/pgSQL function "tes