On Mon, Dec 18, 2000 at 12:32:54AM +0100, Thomas SMETS allegedly wrote:
> tsmets=> create sequence author_seq;
> CREATE  
> 
> tsmets=> create table author ( 
> tsmets=>     author_id numeric primary key default
> nextval('author_seq'),  
> tsmets=>     name char(25) not null, 
> tsmets=>     surname char(25) not null
> tsmets=>     );
> NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index
> 'author_pkey' for table 'author'

> Now the question is :
> What is the meaning of the following statement in the table description
> ?
> 
>  Attribute |     Type      |                   Modifier
> -----------+---------------+----------------------------------------------
>  author_id | numeric(30,6) | not null default
> nextval('author_seq'::text)
> 
> Why was my author_id changesdin a "nextval('author_seq'::text)".
> There's no text here ?

nextval takes one parameter of the type text. It's just an explicit typecast.
The output of nextval is a number, as you requested.

I hope this helps,

Mathijs
-- 
"Books constitute capital." 
     Thomas Jefferson 

Reply via email to