database design and refactoring - Mailing list pgsql-general

From Luca Ferrari
Subject database design and refactoring
Date
Msg-id 200701031224.12618.fluca1978@infinito.it
Whole thread Raw
Responses Re: database design and refactoring
List pgsql-general
Hi all,
in my database I've got a table with a key that is char string, since it was
supposed to support values like strings. Running the database, the users
decided to place numbers as strings, so values like 00110002 and so on.
Now I was wondering to refactor my database and change the char field into a
numeric one but here comes problems: the field is referenced by other tables
and views.
I guess there's not, but you'll never know until you try: is there a tool or a
way to easily do such refactoring or should I write a program on my own to do
this?

And moreover a database design question: is a better idea to choose always
(when possible) numeric keys? I'm thinking about the database portability,
since not all databases support sequences (that can be used with a concat to
provide an automatic string key).

Thanks,
Luca


pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Index Scanning
Next
From: Ron Johnson
Date:
Subject: Re: queueing via database table?