Re: Creating exponential sequences - Mailing list pgsql-novice

From Rod Kreisler
Subject Re: Creating exponential sequences
Date
Msg-id JNEGKNDJGBKLBDGPOPFOIEJNDCAA.rod@23net.net
Whole thread Raw
In response to Re: Creating exponential sequences  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
My last example should have used an int8.

Not in some instances.  For example, I'm working on a structure for a real
estate db.  Each property has about 15 different attributes that are best
described as sets, e.g. rooms (kitchen, living room, utility, family room,
etc)  Each set is limited and 64 would more than suffice for all of them.
As it is a 1:M join table is required to link the properties to each
attribute.  Now the number of elements in each set varies, rooms would be
the largest with an average of around 11, some will only be two or three.
We are projecting 500,000 properties within the first 6 months.  That would
equate to a 1:M join table containing 5.5 million entries.  We will almost
exclusively be querying for one property at a time, so grabbing a single
value from the main property table (which we will have to query anyway)
would be preferable.

> -----Original Message-----
> From: pgsql-novice-owner@postgresql.org
> [mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Tom Lane
> Sent: Monday, October 07, 2002 11:13 PM
> To: Rod Kreisler
> Cc: pgsql-novice@postgresql.org
> Subject: Re: [NOVICE] Creating exponential sequences
>
>
> Rod Kreisler <rod@23net.net> writes:
> > Is there any way to create an exponential sequence rather than
> incremental?
> > What I would like is a sequence that would start at 1 and grow
> exponentially
> > by 2.  (i.e. 1,2,4,8,16,32....)
>
> A sequence that will bomb out after 32 or 64 increments seems of limited
> use ...
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
>


pgsql-novice by date:

Previous
From: Rod Kreisler
Date:
Subject: Re: Creating exponential sequences
Next
From: Adam Witney
Date:
Subject: Re: postgresql with mac os x (darwin)