Re: [SQL] CREATE TABLE - Mailing list pgsql-sql

From David Martinez Cuevas
Subject Re: [SQL] CREATE TABLE
Date
Msg-id Pine.LNX.4.04.9902261440390.11046-100000@mail.estadistica.unam.mx
Whole thread Raw
In response to CREATE TABLE  (Ingrith Andrea Correa Vargas <i-correa@uniandes.edu.co>)
List pgsql-sql
On Thu, 25 Feb 1999, Ingrith Andrea Correa Vargas wrote:

>
> Hello!

Hola Ingrith

>
> I have a question:
>
> I want to create a table with a column wich will have a DEFAULT
> user-function value.
> Can you write an example, with the right syntax?!
>
> I have been making some examples, but I always have a syntax error that I
> can't solve.
>
> Thank you in advance, and I'll be waiting for a response!

This an example of what you want
create sequence seq_master;
create table master ( id int default (nextval('seq_master')));

Obviously, 'nextval' is not a user defined function, but i guess you can
use one of yours.

NOTICE: I'm using PGSQL 6.3-2

Suerte.


David Martinez Cuevas
     Office 622-60-72      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
     Home 565-25-17          "Eat Linux, Drink Linux...  SMOKE LINUX "
                           @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@




pgsql-sql by date:

Previous
From: "Jackson, DeJuan"
Date:
Subject: RE: [SQL] Unique Number KEY
Next
From: Christophe Labouisse
Date:
Subject: Re: [SQL] Unique Number KEY