> A take on a self-join:
>
> SELECT t1.serial, t1.date as dateL, MIN(t2.date) as dateR FROM t t1
> LEFT JOIN t t2 ON t1.serial = t2.serial AND t1.date < t2.date AND
> t2.delivery = 'R'
> WHERE t1.delivery = 'L'
> GROUP BY t1.serial, t1.date
>
> Whether this is any clearer, or runs faster, than
I'm in a strange situation where it makes more sense to give each user
it's own database instead of having a single database with users and
permissions. How does PG deal with that? Is it a problem to have have
say a thousand small databases?
S.
---(end of broadcast)--
Well I'm just toying with an idea. The problem I'm facing is that I
would like clients to only see the tuples that they have created and
own. I guess I'll just skip direct sql access to the db and write some
API on top of it that manages the data. Not a big deal but it
complicates things :-)
S.
--- Stefan Arentz <[EMAIL PROTECTED]> wrote:
> Well I'm just toying with an idea. The problem I'm facing is that I
> would like clients to only see the tuples that they have created and
> own. I guess I'll just skip direct sql access to the db and write some
> API on top of it that manages the da