g == gryzman@gmail.com writes:
g> If you want to store period of time, why store it as varchar ?
g> just store two rows
g> create table foo(
g> n varchar,
g> val date
g> );
g> and store two rows:
g> "start", now(),
g> "end", now()+'something '::interval
g> Wouldn't that do, or is there something I misunderstand ?
Sure, that would work, but I'm having to retrofit this table to an
existing system. Much of the system I'm redesigning, but this piece
isn't too terribly important right now.
g> The approach with vertical structure, is used when people want to
g> store some particular state, say - kind of like structure in C, but in
g> SQL, and they create table for it with all the columns, etc, and have
g> to limit it to one row.
g> On the other hand, you could also use unique index on (1) approach
g> (say if you need more variety of types).
Got it.
--
Brandon