Re: generic builtin functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: generic builtin functions
Date
Msg-id 11179.1131650715@sss.pgh.pa.us
Whole thread Raw
In response to Re: generic builtin functions  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> Maybe my conception of enums is different from yours. My conception is
> basically that of C enums. Where they're purely a creature of the syntax and
> type system. At run-time they don't make any effort to prevent you from
> treating them as integers.

Well, C is notorious for its weak notions of type, so I hardly think
that counts as precedent for what we should do in SQL ;-)

I don't mind offering a cast from enum to integer, at all, but I think
it needs to be explicit-only.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: generic builtin functions
Next
From: Martijn van Oosterhout
Date:
Subject: Re: generic builtin functions