Changing column types

From: Paul Lambert <paul(dot)lambert(at)autoledgers(dot)com(dot)au>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Changing column types
Date: 2007-08-05 23:06:11
Message-ID: 46B657E3.6060204@autoledgers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Owing to a problem with the way access and a couple of other programs
I've found handle text columns in PG as something they call 'memo', I
want to change all of the text columns in my database to varchar.
There's about 600 text columns all up, so I'm looking for a quick way of
doing this.

Is there any way, using the system catalogues - pg_tables, pg_attributes
etc that I can automatically change all text type fields to varchar or
am I better of just recreating the schema?

--
Paul Lambert
Database Administrator
AutoLedgers

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2007-08-05 23:07:43 Re: pg_dump of only the structure from a client such as ruby
Previous Message Perry Smith 2007-08-05 21:31:08 pg_dump of only the structure from a client such as ruby