pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Storing a range of numbers
3+ messages / 3 participants
[nested] [flat]

* Re: Storing a range of numbers
@ 2004-02-06 13:56  CoL <col@mportal.hu>
  0 siblings, 1 reply; 3+ messages in thread

From: CoL @ 2004-02-06 13:56 UTC (permalink / raw)
  To: pgsql-sql

hi,

Chris Fisher wrote:

> Hi,
> 
> Is it possible to store a numeric range in a row and query for it, or 
> would I have to use two rows containing the minimum and maximum limits?

or you can have one column, with array type. than the first element is 
the min value the second is the max:) Question is: is it good for your 
applications or not, how woud you use it, etc.

C.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Storing a range of numbers
@ 2004-02-06 20:17  Chris Fisher <essensus@comcast.net>
  parent: CoL <col@mportal.hu>
  0 siblings, 1 reply; 3+ messages in thread

From: Chris Fisher @ 2004-02-06 20:17 UTC (permalink / raw)
  To: pgsql-sql



CoL wrote:

> or you can have one column, with array type. than the first element is 
> the min value the second is the max:) Question is: is it good for your 
> applications or not, how woud you use it, etc.

I thought about using an array but it seems overly complicated for what 
I'm doing.  Two rows will work fine ... a numeric range type seemed 
obvious at the time so I figured I just missed it in the documentation 
or something.

Thanks for the reply.

Chris



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Storing a range of numbers
@ 2004-02-07 20:53  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Chris Fisher <essensus@comcast.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2004-02-07 20:53 UTC (permalink / raw)
  To: Chris Fisher <essensus@comcast.net>; +Cc: pgsql-sql

Chris Fisher <essensus@comcast.net> writes:
> ... a numeric range type seemed 
> obvious at the time so I figured I just missed it in the documentation 
> or something.

The "seg" datatype implemented by contrib/seg might be what you want.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-02-07 20:53 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-02-06 13:56 Re: Storing a range of numbers CoL <col@mportal.hu>
2004-02-06 20:17 ` Chris Fisher <essensus@comcast.net>
2004-02-07 20:53   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox