On Tue, Apr 6, 2010 at 10:08 AM, Ignacio Balcarce
<ignacio(dot)balcarce(at)vivatia(dot)com> wrote:
> ERROR: el valor null para la columna «seq_id» viola la restricción not null
>
> CONTEXT: sentencia SQL: «INSERT INTO thuban_seq(seq_id) VALUES
> (to_char(now(),'YYYYMMDD') || ( $1 +1)) RETURNING seq_id»
>
> PL/pgSQL function "thuban_sp_generateid" line 19 at sentencia SQL
>
¿Por que $1 si la función no tiene parámetros?
Si entiendo bien, te esta convirtiendo todo a NULL por este parámetro.
¿No podés usar la variable id que estás calculando?
Sds
Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com