Re: Expression of check constraint - Mailing list pgsql-general

From Tom Lane
Subject Re: Expression of check constraint
Date
Msg-id 29034.1562251517@sss.pgh.pa.us
Whole thread Raw
In response to Expression of check constraint  (Dirk Mika <Dirk.Mika@mikatiming.de>)
List pgsql-general
Dirk Mika <Dirk.Mika@mikatiming.de> writes:
> 3.    The column ratified is of type character varying(1).  Why is it casted to text?

Type varchar in Postgres is a poor stepchild without any operators
of its own.  Text is the "native" string type and any comparison etc
will require casting varchar to text first.  It happens that the
expression decompilation code will show you those implicit casts
explicitly, but they don't really mean much.

            regards, tom lane



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Error: rows returned by function are not all of the same row type
Next
From: Ashwini Singh
Date:
Subject: PostgreSQL upgrade from 9.4.2 to 9.6.12