pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
When I executed type cast functions. The postgres normal concatenation operator query was breaking.
2+ messages / 2 participants
[nested] [flat]

* When I executed type cast functions. The postgres normal concatenation operator query was breaking.
@ 2012-08-17 08:11 Saravanakumar Ramasamy <rsk@zoniac.com>
  2012-08-20 16:08 ` Re: When I executed type cast functions. The postgres normal concatenation operator query was breaking. Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 1 reply; 2+ messages in thread

From: Saravanakumar Ramasamy @ 2012-08-17 08:11 UTC (permalink / raw)
  To: pgsql-admin; +Cc: 'Gnanakumar' <gnanam@zoniac.com>; senthil@zoniac.com; rsk@zoniac.com

Hi All. 

Now I am using postgres 9.1.3 version . Before I am used 8.2.22 after I
upgraded 9.1.3. Upgraded was successfully completed. 

 

In Postgres 8.2.22

#------------------#

POSTGRES8222=# select TO_NUMBER('12345678',9999999999.99);

 to_number

-----------

  12345678

(1 row)

 

POSTGRES8222=# select a ||'$'|| b from test;

 ?column?

----------

 1$abcdef

 2$ghijkl

 3$3456

(3 rows)

 

STATUS : Both queries are executed well.

 

After upgrade In Postgres 9.1.3

#----------------------------------#

Problem 1 :

===========

beforetypecast=# select TO_NUMBER('12345678',9999999999.99);

ERROR:  function to_number(unknown, numeric) does not exist

LINE 1: select TO_NUMBER('12345678',9999999999.99);

               ^

HINT:  No function matches the given name and argument types. You might need
to add explicit type casts.

EXCEPTION

org.postgresql.util.PSQLException: ERROR: function to_number(numeric,
numeric) does not exist

Hint: No function matches the given name and argument types. You might need
to add explicit type casts.

Position: 150

 

Problem 2 :

============

beforetypecast=# select a ||'$'|| b from test;

 ?column?

----------

 1$abcdef

 2$ghijkl

 3$3456

(3 rows)

 

ERROR : No

 

I found solution. That solution is 13 implicit type cast. When I executed
type cast functions. The postgres normal concatenation operator query was
breaking. The error are follows

 

Problem 1 :

============

 

aftertypecast=# select TO_NUMBER('12345678',9999999999.99);

 to_number

-----------

  12345678

(1 row)

ERROR : No

 

Problem 2 :

============

aftertypecast=# select a ||'$'|| b from test;

ERROR:  operator is not unique: numeric || unknown

LINE 1: select a ||'$'|| b from test;

                 ^

HINT:  Could not choose a best candidate operator. You might need to add
explicit type casts.

 

********** Error **********

ERROR: operator is not unique: numeric || unknown

SQL state: 42725

Hint: Could not choose a best candidate operator. You might need to add
explicit type casts.

Character: 10

 

With Regards, 

Saravanakumar Ramasamy.

 

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: When I executed type cast functions. The postgres normal concatenation operator query was breaking.
  2012-08-17 08:11 When I executed type cast functions. The postgres normal concatenation operator query was breaking. Saravanakumar Ramasamy <rsk@zoniac.com>
@ 2012-08-20 16:08 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 0 replies; 2+ messages in thread

From: Kevin Grittner @ 2012-08-20 16:08 UTC (permalink / raw)
  To: pgsql-admin; rsk@zoniac.com; +Cc: 'Gnanakumar' <gnanam@zoniac.com>; senthil@zoniac.com

"Saravanakumar Ramasamy" <rsk@zoniac.com> wrote:
 
> Now I am using postgres 9.1.3 version . Before I am used 8.2.22
 
> ERROR:  function to_number(unknown, numeric) does not exist
 
> HINT:  No function matches the given name and argument types. You
> might need to add explicit type casts.
 
> I found solution. That solution is 13 implicit type cast. When I
> executed type cast functions [concatenations started breaking]
 
> ERROR:  operator is not unique: numeric || unknown
 
> HINT:  Could not choose a best candidate operator. You might need
> to add explicit type casts.
 
This was also posted on StackOverflow:
 
http://stackoverflow.com/questions/12007988/when-i-executed-type-cast-functions-the-postgres-normal-...
 
The accepted solution there was basically to drop the 13 implicit
casts which were added in an attempt to maintain pre-8.3 behavior,
and to change code which counted on the implicit casts which were
eliminated in 8.3.
 
-Kevin




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2012-08-20 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-08-17 08:11 When I executed type cast functions. The postgres normal concatenation operator query was breaking. Saravanakumar Ramasamy <rsk@zoniac.com>
2012-08-20 16:08 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox