Re: [SQL] nextval

Jerome Alet <alet@unice.fr>

From: Jerome ALET <alet@unice.fr>
To: patrice@idf.net
Cc: pgsql-sql@postgresql.org
Date: 1998-05-28T10:01:07Z
Lists: pgsql-sql
Patrice Hédé wrote:
> Maybe you should consider doing it with a default value as :
> 
> CREATE TABLE auteurs (numero_auteur int4 default nextval('seq_auteurs'),
>                       nom_auteur    text,
>                       prenom_auteur text,
>                       email_auteur  text
>                      );
> 
> and then, you don't need to create a rule.
> 

Yes, I already know that solution, but I wondered why mine was bad (the
forgotten '') and finally I think I've found a (maybe already known) bug
in CREATE RULE (look at the results in my previous message).

Thanks.

bye,

Jerome ALET - alet@unice.fr - http://cortex.unice.fr/~jerome
Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 
28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE