From: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
---|---|
To: | PgSQL General ML <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to do? |
Date: | 2003-08-06 01:49:23 |
Message-ID: | 1060134562.5335.67.camel@haggis |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 2003-08-05 at 06:59, Robert Partyka wrote:
> At 16:14 03-08-02 -0500, you wrote:
> >On Fri, 2003-08-01 at 11:44, Robert Partyka wrote:
> > > Ron Johnson wrote:
> > > > No, but slightly ambiguous, at least for my old brain.
> > > I will try to by more unequivocal this time :)
> >
> >So you want to pass query result sets between connections, so that
> >each subsequent connection can query the previous connection's
> >results?
>
> Rather i select result on one connection and pass identification
> information of one field to next connection.
You want to pass the OIDs of a result set from conn1 to conn2?
> > > Shridhar Daithankar wrote:
> > > > select oid,name from a;
> > > I know it, but i have to have not oid's but row numbers :) such like :
> > > table "test"
> > > offset | value
> > > -----------+------------
> > > 1 | AC43
> > > 2 | AC4X
> > > 3 | AX43
> > > 4 | ACX3
> > > ....
> > > n | XC4A
> > >
> > > the best will be without using sequence :)
> > >
> > > Shridhar Daithankar wrote:
> > > > I didn't get that.. could you please elaborate?
> > >
> > > Franco Bruno Borghesi wrote:
> > > > And about the rows before and after that you ask, I don't understand...
> > > based on what you mean
> > > > *before* and *after*? you don't have an order by clause.
> > >
> > > > And what do you mean with "I know that in result is record with e.g.
> > > uid='AC13A1'"?
> > > > You know this uid *before* sending the query? is it part of your <where
> > > statement>? can you use
> > > > this value as a hard coded condition for a subquery?
> > >
> > > Ok, so its goes something like that:
> > >
> > > lets say i have select query: select a,b,uid from foo where c='bar'
> > order by a;
> > >
> > > with results like that:
> > > a | b | uid
> > > ----+----+------
> > > 2 |x | AC01
> > > 2 |w | AC43
> > > 4 |d | AC88
> > > 4 |a | AC13
> > > ...
> > > 7 |c | AC22
> > >
> > >
> > > and lets say I selected this before and I know that there is uid='AC88';
> > >
> > > and in another connection (in lets say next requested www php script )
> > > without selecting all
> > > this data or even full list of only uid`s and making sequence scan row by
> > > row I wont to get
> > > something like that from select I have write above:
> > >
> > > a | b | uid
> > > ----+----+------
> > > 2 |w | AC43
> > > 4 |d | AC88
> > > 4 |a | AC13
> > > (3 rows)
> > >
> > > if there is row before and row next of uid='AC88' or
> > >
> > > a | b | uid
> > > ----+----+------
> > > 2 |w | AC43
> > > 4 |d | AC88
> > > (2 rows)
> > > if uid='AC88' is last one row
> > >
> > > or
> > >
> > > a | b | uid
> > > ----+----+------
> > > 4 |d | AC88
> > > 4 |a | AC13
> > > (2 rows)
> > > if uid='AC88' is first row
> > >
> > > I hope its more understandable than before :)
--
+-----------------------------------------------------------------+
| Ron Johnson, Jr. Home: ron(dot)l(dot)johnson(at)cox(dot)net |
| Jefferson, LA USA |
| |
| "I'm not a vegetarian because I love animals, I'm a vegetarian |
| because I hate vegetables!" |
| unknown |
+-----------------------------------------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Welty | 2003-08-06 01:56:43 | Re: indices and cidr/inet type |
Previous Message | Stephen Robert Norris | 2003-08-06 01:18:53 | pg_dump corrupts database? |