Re: [SQL] Unique Number KEY - Mailing list pgsql-sql

From Christophe Labouisse
Subject Re: [SQL] Unique Number KEY
Date
Msg-id m3yalk3hub.fsf@gabuzo.meunet
Whole thread Raw
In response to Unique Number KEY  ("Patrice DUMAS" <pdumas@inforoutes-ardeche.fr>)
List pgsql-sql
CIMPOESU Teodor <teo@digiro.net> writes:

> you have 2 ways to do it:
> 1. try something like
>       CREATE TABLE  STUDENTS(
>            studentID  int4 DEFAULT 'int(now())',
>           studentName text );

Is suspect int(now()) to have a resolution of one second. Therefore
this will not work if you insert more than one record in a second.

Christophe Labouisse : Cinéma, typographie, Unix
christophe.labouisse@dial.oleane.com http://www.multimania.com/gabuzo/
Le cinéma en Lumière : http://www.lumiere.org/

pgsql-sql by date:

Previous
From: David Martinez Cuevas
Date:
Subject: Re: [SQL] CREATE TABLE
Next
From: Sue Hanen
Date:
Subject: Trying to concatenate using a string variable and text