Re: [SQL] nextval - Mailing list pgsql-sql

From Jerome ALET
Subject Re: [SQL] nextval
Date
Msg-id 356D35E3.3B5EC4A1@unice.fr
Whole thread Raw
In response to Re: [SQL] nextval  (Patrice Hédé <patrice@idf.net>)
Responses Re: [SQL] nextval  (Marin D <marin@cybernet.bg>)
List 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

pgsql-sql by date:

Previous
From: Patrice Hédé
Date:
Subject: Re: [SQL] nextval
Next
From: Marin D
Date:
Subject: Re: [SQL] nextval