Re: [SQL] self join

2011-05-17 Thread Jasen Betts
On 2011-05-16, Steve Crawford  wrote:
> On 05/14/2011 07:36 PM, Jasen Betts wrote:
>>
>> use the "NOT IN" operator with a subquery to retch the disallowed
>> values
> Hmmm, "retch" as a synonym for "output"? I've seen more than one case 
> where that is an appropriate description. :)

 :)  was a typo for 'fetch' 


-- 
⚂⚃ 100% natural


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


[SQL] enum data type vs table

2011-05-17 Thread Seb
Hi,

Are there any guidelines for deciding whether to 1) create an enum data
type or 2) create a table with the set of values and then have foreign
keys referencing this table?  Some fields in a database take a small
number of values, and I'm not sure which of these routes to take.  The
enum data type seems like a clean way to handle this without creating a
constellation of tables for all these values, but if one wants to add a
new label to the enum or make changes to it at some point, then the
tables using it have to be recreated, so it's quite rigid.  Have I got
this right?  Thanks.


-- 
Seb


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql