Serial not nulla

From: "Shavonne Marietta Wijesinghe" <shavonne(dot)marietta(at)studioform(dot)it>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Serial not nulla
Date: 2008-02-08 11:15:53
Message-ID: 00a401c86a43$f88de120$3102a8c0@dream
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello

I am working with a database that has a Index number defined as Serial NOT NULL

I used this because,
1. I want to make sure that when many users login at the same time the Index number won't be repeated.
2. I don't have to increment it by programming (I use ASP)

But now i have a situation that i need to index numbers. For Example i could have a structure like this

INDEX1 - N_SHEET - TOT_SHEET
1 - 1 - 1
2 - 1 - 3
2 - 2 - 3
2 - 3 - 3

N_SHEET and TOT_SHEET are filled by the user (via web) but i need to hold on to the INDEX. And while userA is filling the 3 row if userB loggs in i need to provide the INDEX1 with 3.

Any idea??

Thanks

Shavonne

Shavonne Wijesinghe
www.studioform.it

Le informazioni contenute nella presente comunicazione e i relativi allegati possono essere riservate e sono, comunque destinate esclusivamente alle persone o alla Società sopra indicati.
La diffusione, distribuzione e/o copiature del documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi dell'art. 616 c.p., che ai sensi del D. Lgs. n. 196/2003.

Se avete ricevuto questo messaggio per errore, Vi preghiamo di distruggerlo e di informarci immediatamente per telefono allo 0039362595044 o inviando un messaggio all'indirizzo e-mail
amministrazione(at)studioform(dot)it

The informations in this communication is confidential and may also be legally privileged. It is intended for the addressee only.
Access to this e-mail by anyone else is unauthorized. It is not to be relied upon by any person other than the addressee, except with our prior written approval. If you received this message please send an e-mail to the sender.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Pascal Tufenkji 2008-02-08 13:02:38 Postgres roles
Previous Message Gary Stainburn 2008-02-08 09:56:58 performance issue - view and derived field