Skip site navigation (1) Skip section navigation (2)

Re: [GENEAL] dynamically changing table

From: Harald Fuchs <hari(dot)fuchs(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENEAL] dynamically changing table
Date: 2009-03-31 16:41:42
Message-ID: puprfx3ard.fsf@srv.protecting.net (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-general
In article <437FAA9F-DF2D-429E-9856-EB2026B55940(at)solfertje(dot)student(dot)utwente(dot)nl>,
Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl> writes:

> On Mar 30, 2009, at 5:39 PM, A B wrote:
>> Hi,
>> In the next project I'm going to have a number of colums in my tables,
>> but I don't know how many, they change. They all use integers as
>> datatype though.. One day, I get 2 new columns, a week later I loose
>> one column, and so on in a random pattern.


> Ignoring design implications (you got enough replies about that I
> think)...

> You could add the columns you're sure that you need and put the rest
> in an XML field.

<mantra>
If you have a problem and want to solve it using XML, you have two problems.
</mantra>

Why serializing the rest of the data in an XML field?  contrib/hstore
seems to accomplish the same, without the XML overhead.


In response to

Responses

pgsql-general by date

Next:From: justinDate: 2009-03-31 16:48:54
Subject: Re: [HACKERS] string_to_array with empty input
Previous:From: Scott MarloweDate: 2009-03-31 16:33:25
Subject: Re: Space for pg_dump

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group