Casting - Mailing list pgsql-sql

From Graham Vickrage
Subject Casting
Date
Msg-id NDBBJABDILOPAOOMFJHOOEOADEAA.graham@digitalplanit.com
Whole thread Raw
Responses Re: Casting  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Hi All,

Probably a very simple question, but... I am trying to cast a large number
approx
20 chars into text so I can manipulate it. I have tried

SELECT text(big_number) from table;

but this comes back in the format 3.2304234234233e+15 for example, whis is
no good. I essentially need the last four digits of the number (securing
credit card numbers is the idea), which I can only do by manipulating text
and casting it back.

Does anyone have any suggestions?

Many thanks,

Graham.




pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Help reqd: Copying char to date
Next
From: Mike Finn
Date:
Subject: Calling a trigger from a trigger