From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dirk Mika <Dirk.Mika@mikatiming.de>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Expression of check constraint
Date: Thu, 04 Jul 2019 10:45:17 -0400
Message-ID: <29034.1562251517@sss.pgh.pa.us> (raw)
In-Reply-To: <DDD8FEB9-CCE9-4951-9022-A58DCC2998C4@mikatiming.de>
References: <DDD8FEB9-CCE9-4951-9022-A58DCC2998C4@mikatiming.de>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, Dirk.Mika@mikatiming.de
Subject: Re: Expression of check constraint
In-Reply-To: <29034.1562251517@sss.pgh.pa.us>
References: <DDD8FEB9-CCE9-4951-9022-A58DCC2998C4@mikatiming.de> <29034.1562251517@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox