pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedMultiple Index's
5+ messages / 4 participants
[nested] [flat]
* Multiple Index's
@ 2000-09-21 17:12 Brian C. Doyle <bcdoyle@mindspring.com>
2000-09-21 17:28 ` Re: Multiple Index's Stephan Szabo <sszabo@megazone23.bigpanda.com>
2000-09-21 17:28 ` Re: Multiple Index's Mitch Vincent <mitch@venux.net>
2000-09-21 17:29 ` Re: Multiple Index's Mark Volpe <volpe.mark@epamail.epa.gov>
2000-09-21 17:30 ` Re: Multiple Index's Brian C. Doyle <bcdoyle@mindspring.com>
0 siblings, 4 replies; 5+ messages in thread
From: Brian C. Doyle @ 2000-09-21 17:12 UTC (permalink / raw)
To: pgsql-sql
Hello all,
How would I prevent a user from submitting information to a table once they
have already done so for that day. I would need them to be able
information on future dates as well as have information in the table from
past dates from that user.
I am looking for something like insert user_id, date, info where user_id
and date are not the same... does that make sense?
Brian C. Doyle
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Multiple Index's
2000-09-21 17:12 Multiple Index's Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-09-21 17:28 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
3 siblings, 0 replies; 5+ messages in thread
From: Stephan Szabo @ 2000-09-21 17:28 UTC (permalink / raw)
To: Brian C. Doyle <bcdoyle@mindspring.com>; +Cc: pgsql-sql
On Thu, 21 Sep 2000, Brian C. Doyle wrote:
> Hello all,
>
> How would I prevent a user from submitting information to a table once they
> have already done so for that day. I would need them to be able
> information on future dates as well as have information in the table from
> past dates from that user.
>
> I am looking for something like insert user_id, date, info where user_id
> and date are not the same... does that make sense?
If you want the first data to go through, maybe a unique index on
(user_id, date) would work.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Multiple Index's
2000-09-21 17:12 Multiple Index's Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-09-21 17:28 ` Mitch Vincent <mitch@venux.net>
3 siblings, 0 replies; 5+ messages in thread
From: Mitch Vincent @ 2000-09-21 17:28 UTC (permalink / raw)
To: pgsql-sql; Brian C. Doyle <bcdoyle@mindspring.com>
> Hello all,
>
> How would I prevent a user from submitting information to a table once
they
> have already done so for that day.
The best you could probably do is to go back and delete undesired recoords
at the end of the day because if it is as you said, they've already put the
information into the database.
> I would need them to be able
> information on future dates as well as have information in the table from
> past dates from that user.
Not positive what you mean here but just use a date (or timestamp) column in
the table to indicate when the record was added.
> I am looking for something like insert user_id, date, info where user_id
> and date are not the same... does that make sense?
Nope, it doesn't -- at least to me :-)
How about some table structures and some more information, I'm just not
exactly sure what you'd like to do..
-Mitch
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Multiple Index's
2000-09-21 17:12 Multiple Index's Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-09-21 17:29 ` Mark Volpe <volpe.mark@epamail.epa.gov>
3 siblings, 0 replies; 5+ messages in thread
From: Mark Volpe @ 2000-09-21 17:29 UTC (permalink / raw)
To: Brian C. Doyle <bcdoyle@mindspring.com>; +Cc: pgsql-sql
CREATE TABLE user_info(user_id name, entry_date date, info text);
CREATE UNIQUE INDEX user_info_key ON user_info(user_id, entry_date);
"Brian C. Doyle" wrote:
>
> Hello all,
>
> How would I prevent a user from submitting information to a table once they
> have already done so for that day. I would need them to be able
> information on future dates as well as have information in the table from
> past dates from that user.
>
> I am looking for something like insert user_id, date, info where user_id
> and date are not the same... does that make sense?
>
> Brian C. Doyle
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Multiple Index's
2000-09-21 17:12 Multiple Index's Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-09-21 17:30 ` Brian C. Doyle <bcdoyle@mindspring.com>
3 siblings, 0 replies; 5+ messages in thread
From: Brian C. Doyle @ 2000-09-21 17:30 UTC (permalink / raw)
To: pgsql-sql
See if this help
the table has
userid | date | helped_customers
An employ will enter in their userid, the date and how many customer they
helped that day.
What I want to do is prevent the employees from enter the data more than
once a day
At 10:28 AM 9/21/00 -0700, Mitch Vincent wrote:
> > Hello all,
> >
> > How would I prevent a user from submitting information to a table once
>they
> > have already done so for that day.
>
>The best you could probably do is to go back and delete undesired recoords
>at the end of the day because if it is as you said, they've already put the
>information into the database.
>
> > I would need them to be able
> > information on future dates as well as have information in the table from
> > past dates from that user.
>
>Not positive what you mean here but just use a date (or timestamp) column in
>the table to indicate when the record was added.
>
> > I am looking for something like insert user_id, date, info where user_id
> > and date are not the same... does that make sense?
>
>Nope, it doesn't -- at least to me :-)
>
>How about some table structures and some more information, I'm just not
>exactly sure what you'd like to do..
>
>-Mitch
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2000-09-21 17:30 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-09-21 17:12 Multiple Index's Brian C. Doyle <bcdoyle@mindspring.com>
2000-09-21 17:28 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2000-09-21 17:28 ` Mitch Vincent <mitch@venux.net>
2000-09-21 17:29 ` Mark Volpe <volpe.mark@epamail.epa.gov>
2000-09-21 17:30 ` Brian C. Doyle <bcdoyle@mindspring.com>
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