Re: Re: ALTER DROP COLUMN

Поиск
Список
Период
Сортировка
От Brent R. Matzelle
Тема Re: Re: ALTER DROP COLUMN
Дата
Msg-id 20010213144030.3464.qmail@web311.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: Re: ALTER DROP COLUMN  (Tomas Berndtsson <tomas@nocrew.org>)
Ответы Re: Re: ALTER DROP COLUMN
Список pgsql-general
--- Tomas Berndtsson <tomas@nocrew.org> wrote:
> "Len Morgan" <len-morgan@crcom.net> writes:
>
> > >So how is this useful for anything beyond a toy database?
> > >
> > >This inability to drop a column makes it hard to follow an
> "extreme
> > >programming" style of development, where one designs only
> as much into
> > >the database schema as is needed at the moment (DTSTTCPW,
> YAGNI).
> > >When I do that I often find that I need to drop columns (in
> favor of
> > >other columns of different types) as I evolve the schema to
> support
> > >ever more complex applications.  PostgreSQL makes this a
> bit harder
> > >than it needs to be.
> >
> > I would content that any moderately complex database design
> that starts at
> > the keyboard instead of a pad of paper (i.e., DESIGNED) is
> going to have
> > more problems than a "toy" database.  Postgres is used in
> many "real"
> > applications but more than likely they were thought out and
> designed before
> > committing to tables.
>
> For me, who has developed a few databases with web interfaces,
> this
> isn't very easy, because the end user isn't always (read:
> almost
> never) very good at explaining exactly what he/she wants, or
> they come
> up with things they want later, after they've used the system
> for a
> while. They, as users, don't realise that what seems to be
> small
> changes to them, might need some redesigning of the database.
> As a
> programmer, I can't tell the users that we can't make the
> change,
> because they should've thought of it from the start.
>
>
> Tomas

You might also try dumping the database, dropping and
re-creating the database, and then hacking the dump to add,
delete, alter columns.  That way the original structure should
remain intact.

I have been in the same situation as you many times where users
request alterations that can seriously screw up your original
structure.  However, it is your responsibility to inform them
that any change, no matter how small can require a lot of
development time.

If they are requesting very frequent changes then the project
should return to the design (paper) phase that Len spoke of.  I
know it's not as fun as poking around in the database, but it
can save you loads of time and headaches.

Brent


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

В списке pgsql-general по дате отправления:

Предыдущее
От: Jean-Arthur Silve
Дата:
Сообщение: How to limit the size of pg_log ??
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Re: [ANNOUNCE] Request for speakers at O'Reilly conference