Skip site navigation (1) Skip section navigation (2)

Re: enums

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: ted(at)php(dot)net
Cc: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: enums
Date: 2005-10-28 02:20:51
Message-ID: 43618B03.8050704@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackers

Ted Rolle wrote:

> This little snippet is great!  The only problem I see is that the 
> enums must be consistent across all modules.
>
> What about loading a variable with a "default" value?  Then it could 
> be adjusted to 'play'.
>
>

You can set a default for a variable using one of these types, as you 
can for any other postgres type:

    create table bar (color rainbow default 'blue');
    insert into bar values(default);

As for any postgres type, the default must be a valid value for the type.

cheers

andrew

In response to

  • Re: enums at 2005-10-27 20:54:36 from Ted Rolle

pgsql-hackers by date

Next:From: Rod TaylorDate: 2005-10-28 02:23:27
Subject: Re: enums
Previous:From: Christopher Kings-LynneDate: 2005-10-28 02:17:22
Subject: Re: TODO Item - Add system view to show free space map

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group