Search Postgresql Archives

Re: limit table to one row

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



g == gryzman@xxxxxxxxx writes:

 g> 2009/6/9 Brandon Metcalf <brandon@xxxxxxxxxxxxxxxxxx>:


 g> > I'm not sure I follow how this solves the problem.

 g> Well, surely if you just need one row, you need single value per key.
 g> And that's the, imo , better solution to that problem, than limiting
 g> number of rows.


Hm.  Maybe I'm looking at the problem incorrectly.  I have a situation
where I need a table like

  CREATE TABLE foo (
    start  DATE,
    length VARCHAR(10),
  );

I need to be able to get one value for each column at any given time.
Specifically, I need to get a value for start and add the value for
length to get a time period.  Since your approach would allow more
than one row, how does it help me?

-- 
Brandon

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux