The specific problem I'm trying to solve involves a user table with
some history.
Something like this:
create table user_history (
user_id int
event_time_stamp timestamp
);
I'd like to be able to count the distinct user_ids in this table, even
if it were joined to other tables.
On Wed, Nov 17, 2004 at 06:25:25AM -0800, Riccardo G. Facchini wrote:
>
> --- Richard Huxton <__> wrote:
> >
> > Add a new sequence to your database:
[snip]
> Good idea, but it won't work for what I need.
> I'll be able to do get the nextval('my_session_id') as soon as the
> session initiates, b
Riccardo G. Facchini wrote:
Add a new sequence to your database:
CREATE SEQUENCE my_session_id;
Then, at the start of every session:
SELECT nextval('my_session_id');
and whenever you need the value:
SELECT currval('my_session_id');
Good idea, but it won't work for what I need.
I'll be able t
--- Richard Huxton <__> wrote:
> Achilleus Mantzios wrote:
> > O Richard Huxton Ýãñáøå óôéò Nov 17, 2004 :
> >
> >
> >>Riccardo G. Facchini wrote:
> >>
> >>>hi all,
> >>>
> >>>is there a way to determine the session id on a database session?
> >>>
> >>>I would need to have a unique number whene
On Tue, 16 Nov 2004, Thomas F.O'Connell wrote:
> Hmm. I was more interested in using COUNT( * ) than DISTINCT *.
>
> I want a count of all rows, but I want to be able to specify which
> columns are distinct.
I'm now a bit confused about exactly what you're looking for in the end.
Can you give a s
Achilleus Mantzios wrote:
O Richard Huxton έγραψε στις Nov 17, 2004 :
Riccardo G. Facchini wrote:
hi all,
is there a way to determine the session id on a database session?
I would need to have a unique number whenever a session is started, and
have this available as a function or view result.
Why
--- Achilleus Mantzios <__> wrote:
> O Richard Huxton Ýãñáøå óôéò Nov 17, 2004 :
>
> > Riccardo G. Facchini wrote:
> > > hi all,
> > >
> > > is there a way to determine the session id on a database session?
> > >
> > > I would need to have a unique number whenever a session is
> started, and
>
--- Richard Huxton <__> wrote:
> Riccardo G. Facchini wrote:
> > hi all,
> >
> > is there a way to determine the session id on a database session?
> >
> > I would need to have a unique number whenever a session is started,
> and
> > have this available as a function or view result.
>
> Add a n
O Richard Huxton έγραψε στις Nov 17, 2004 :
> Riccardo G. Facchini wrote:
> > hi all,
> >
> > is there a way to determine the session id on a database session?
> >
> > I would need to have a unique number whenever a session is started, and
> > have this available as a function or view result.
W
Riccardo G. Facchini wrote:
hi all,
is there a way to determine the session id on a database session?
I would need to have a unique number whenever a session is started, and
have this available as a function or view result.
Add a new sequence to your database:
CREATE SEQUENCE my_session_id;
Then,
hi all,
is there a way to determine the session id on a database session?
I would need to have a unique number whenever a session is started, and
have this available as a function or view result.
thanks.
---(end of broadcast)---
TIP 8: explain
On Wed, 17 Nov 2004, Achilleus Mantzios wrote:
O Oleg Bartunov ?? Nov 17, 2004 :
Gary,
if you need really fast solution for you task and dont't afraid
non-standard soltion, take a look on contrib/ltree module.
http://www.sai.msu.su/~megera/postgres/gist/ltree/
Oleg
Oleg how would you co
O Oleg Bartunov έγραψε στις Nov 17, 2004 :
> Gary,
>
> if you need really fast solution for you task and dont't afraid
> non-standard soltion, take a look on contrib/ltree module.
> http://www.sai.msu.su/~megera/postgres/gist/ltree/
>
> Oleg
Oleg how would you compare an ltree solution a
Gary,
if you need really fast solution for you task and dont't afraid
non-standard soltion, take a look on contrib/ltree module.
http://www.sai.msu.su/~megera/postgres/gist/ltree/
Oleg
On Wed, 17 Nov 2004, Gary Stainburn wrote:
On Tuesday 16 November 2004 1:08 pm, sad wrote:
On Tuesday 16
14 matches
Mail list logo