Thread: Casting money to numeric(10,2)
I'm trying to migrate several tables from a 6.5.2 DB to a 7.0.2 DB, and having trouble casting money (in the old DB) to numeric(10,2) prior to doing a pg_dump. I can create a table in the 6.5.2 DB with fields of type numeric(10,2), but when I try and insert into this table Ie. insert into new (purchase_price) select purchase_price::numeric(10,2) from old ; I get ERROR: No such function 'numeric' with the specified attributes I tried the 6.5.2 documentation, but it looked to me like this should work. Any suggestions appreciated. Thanks, Ben -- _____________________________________________________________ Ben Stringer Burbong Consultants P/L ACN 092 664 198 ben@burbong.com http://www.burbong.com ph 0402 211 638
I'm using 7.0.2 I think, how can I remove the 8k row limit? Is this removed in 7.1 ? If so, is it worth trying the beta of that? Or is there another way to do it? (I realise this question has probably been asked a hundred times, but I can't find an answer in any of the online docs) Cheers, Mike ____________________________________________________________ Mike Cannon-Brookes - Technology Director, Asia Pacific internet.com Corporation - The Internet Industry Portal Ph: (612) 9290 1088 - Mob: 0416 106090 - The Media Network @ http://australia.internet.com - Meet A Guru @ http://www.breakfastforums.com.au - Subscribe Online @ http://www.enewsletters.com.au ____________________________________________________________
On Thu, Jan 11, 2001 at 04:25:07PM +1100, Mike Cannon-Brookes wrote: > I'm using 7.0.2 I think, how can I remove the 8k row limit? You can recompile and up the page size to ~32K, use large objects, or upgrade to 7.1 > Is this removed in 7.1 ? If so, is it worth trying the beta of that? Or is > there another way to do it? There are others ways (see above), but I'd suggest upgrading. I've been running 7.1 from CVS for a while now (for development) without any major problems. > (I realise this question has probably been asked a hundred times, but I > can't find an answer in any of the online docs) The mailing list archives would probably have lots of answers to this. HTH, Neil -- Neil Conway <neilconway@home.com> Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc Encrypted mail welcomed You can use facts to prove anything that's even remotely true. -- Homer J. Simpson
Ben Stringer <ben@magicrock.net> writes: > I'm trying to migrate several tables from a 6.5.2 DB to a > 7.0.2 DB, and having trouble casting money (in the old DB) > to numeric(10,2) prior to doing a pg_dump. Hm. It doesn't seem that there is a cast path from money to anything, even in latest sources. You might have to resort to dumping the table as-is, then editing the dump file to change the column type from money to numeric in the CREATE TABLE (and edit out all the dollar signs and commas in the data, too). Ugh. regards, tom lane
Beta 3 of 7.1 has been released. You won't have to worry about the row limit and you'll also help check for any possible bugs. :) Adam Lang Systems Engineer Rutgers Casualty Insurance Company http://www.rutgersinsurance.com ----- Original Message ----- From: "Mike Cannon-Brookes" <mcannon@internet.com> To: <pgsql-general@postgresql.org> Sent: Thursday, January 11, 2001 12:25 AM Subject: [GENERAL] Removing the row limit > I'm using 7.0.2 I think, how can I remove the 8k row limit? > > Is this removed in 7.1 ? If so, is it worth trying the beta of that? Or is > there another way to do it? > > (I realise this question has probably been asked a hundred times, but I > can't find an answer in any of the online docs) > > Cheers, > Mike > > ____________________________________________________________ > Mike Cannon-Brookes - Technology Director, Asia Pacific > internet.com Corporation - The Internet Industry Portal > Ph: (612) 9290 1088 - Mob: 0416 106090 > > - The Media Network @ http://australia.internet.com > - Meet A Guru @ http://www.breakfastforums.com.au > - Subscribe Online @ http://www.enewsletters.com.au > ____________________________________________________________ > > >