Re: Implicit coercions, choosing types for constants, etc (yet again)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dennis Björklund <db(at)zigo(dot)dhs(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Implicit coercions, choosing types for constants, etc (yet again)
Date: 2002-11-11 16:56:35
Message-ID: 2710.1037033795@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?ISO-8859-1?Q?Dennis_Bj=F6rklund?= <db(at)zigo(dot)dhs(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-11-11 18:08:30 Re: MemSet inline for newNode
Previous Message Joe Conway 2002-11-11 16:43:18 Re: PQescapeBytea v 7.2.3 BUG?