FAQ
Hello

When I derive domain from some type I expect same castings rules.
Minimally for literals. But it's not true:

CREATE DOMAIN sixc AS char(6) NOT NULL;

CREATE OR REPLACE FUNCTION fxx(sixc)
RETURNS sixc AS $$
SELECT 'abcdef'; -- Actual return type is unknown.
$$ LANGUAGE SQL;
SELECT fxx('abcdef');

-- ok
CREATE OR REPLACE FUNCTION fxx(sixc)
RETURNS char(6) AS $$
SELECT 'abcdef';
$$ LANGUAGE SQL;

Regards
Pavel Stehule

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-bugs @
categoriespostgresql
postedApr 15, '08 at 2:04p
activeApr 15, '08 at 2:04p
posts1
users1
websitepostgresql.org
irc#postgresql

1 user in discussion

Pavel Stehule: 1 post

People

Translate

site design / logo © 2021 Grokbase