From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Spec on pg_cast table/CREATE CAST command |
Date: | 2002-07-16 17:33:43 |
Message-ID: | Pine.LNX.4.44.0207152143170.2259-100000@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Command syntax is
CREATE CAST (source AS target) WITH FUNCTION name(arg) [AS ASSIGNMENT]
in compliance with SQL99 (AS ASSIGNMENT means implicitly invokable).
Declaration of binary compatible casts:
CREATE CAST (source AS target) WITHOUT FUNCTION [AS ASSIGNMENT]
Does not have to be implicit (although it must be for use in function
argument resultion, etc.). You must declare both directions explicitly.
Cast functions must be immutable. This is following SQL99 as well.
Compatibility:
The old way to create casts has already been broken in 1.5 ways: the
introduction of the implicit flag and the introduction of schemas. To
maintain full compatibility we'd have to revert to making the implicit
flag the default, which would undermine the compliance of the new CREATE
CAST command from the start.
Hence I suggest that we migrate through pg_dump: User-defined functions
that would have been casts up to 7.2 will emit an appropriate CREATE CAST
command. This in combination with a release note will also give the users
a better chance to inspect the dump and adjust the cast specifications for
implicitness as they wish.
Comments?
--
Peter Eisentraut peter_e(at)gmx(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-07-16 17:54:29 | Re: BlockNumber fixes |
Previous Message | Bruce Momjian | 2002-07-16 17:07:43 | Re: pg_views.definition |