Re: Implicit coercions, choosing types for constants, etc (yet again) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Implicit coercions, choosing types for constants, etc (yet again)
Date
Msg-id 2710.1037033795@sss.pgh.pa.us
Whole thread Raw
In response to Re: Implicit coercions, choosing types for constants, etc  (Dennis Björklund <db@zigo.dhs.org>)
List pgsql-hackers
Dennis Björklund <db@zigo.dhs.org> writes:
> It seems to me that one would like to have a polymorphic typesystem with 
> constraints to handle overloading, subtyping or whatever is needed in 
> SQL.

What we have now is indeed pretty ad-hoc, but a full-blown type
inference system might be overkill.  Not sure.  It would be interesting
to look into it.

> Is there anywhere I can read about the typesystem in SQL in general and 
> postgresql in particular?

There's the user's guide
http://developer.postgresql.org/docs/postgres/typeconv.html
and there's the source code (see src/backend/parser/, particularly
parse_coerce.c, parse_func.c, parse_oper.c).  Not much in between
I'm afraid, but the source code is reasonably well-commented.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: PQescapeBytea v 7.2.3 BUG?
Next
From: "Robert E. Bruccoleri"
Date:
Subject: Re: Problem with 7.3 on Irix with dates before 1970