Re: Inconsistent error message for varchar(n) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Inconsistent error message for varchar(n)
Date
Msg-id 2017111.1636916427@sss.pgh.pa.us
Whole thread Raw
In response to Re: Inconsistent error message for varchar(n)  (Japin Li <japinli@hotmail.com>)
Responses Re: Inconsistent error message for varchar(n)
List pgsql-hackers
[ Please trim quotes appropriately when replying.  Nobody wants to
  read the whole history of the thread to get to your comment. ]

Japin Li <japinli@hotmail.com> writes:
> Oh! I didn't consider this situation.  Since the max size of varchar cannot
> exceed 10485760, however, I cannot find this in documentation [1]. Is there
> something I missed? Should we mention this in the documentation?
> [1] https://www.postgresql.org/docs/devel/datatype-character.html

I dunno, that section doesn't really get into implementation limits.
For comparison, it doesn't bring up the point that string values are
constrained to 1GB; that's dealt with elsewhere.  Since the limit on
typmod is substantially more than that, I'm not sure there's much point
in mentioning it specifically.  Maybe there's a case for mentioning the
1GB limit here, though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: JIT doing duplicative optimization?
Next
From: Tom Lane
Date:
Subject: Re: Inconsistent error message for varchar(n)