From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Nolan <htfoot@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: field error on refreshed materialized view
Date: Sat, 27 Jan 2024 16:27:09 -0500
Message-ID: <1408869.1706390829@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOzAquK_y4L3pqhU5iq=DKEEg9=eCSu4YJ+e-i0VAtb1HNfNuw@mail.gmail.com>
References: <CAOzAqu+U6h201hE9PNe6jfBFc7G-LmWS973fUTsM+eRzwx3Fvg@mail.gmail.com>
<456737.1706218724@sss.pgh.pa.us>
<CAOzAquJrdL8kCAm2Hh0oTfqzc21XUHaN_dRaU7Lix2RzEuUkSg@mail.gmail.com>
<CAOzAquK_y4L3pqhU5iq=DKEEg9=eCSu4YJ+e-i0VAtb1HNfNuw@mail.gmail.com>
Michael Nolan <htfoot@gmail.com> writes:
> Followup: The problem turned out to be a field in the mysql server
> that was not size-limited to 255 characters and had several rows with
> as many as 299 characters in them. Apparently when using an FDW and
> materialized view in postgresql 10.4, field size limits aren't
> checked, because a query on the matview in the 10.4 system finds those
> records with more than 255 characters in that field.
> So, not a character encoding issue at all.
Hm ... if the foreign table's field was declared as varchar(255),
older PG might've believed that and not rechecked the length while
storing into the matview. Not sure if this behavior change was
intentional or an accidental product of refactoring.
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, htfoot@gmail.com
Subject: Re: field error on refreshed materialized view
In-Reply-To: <1408869.1706390829@sss.pgh.pa.us>
References: <CAOzAqu+U6h201hE9PNe6jfBFc7G-LmWS973fUTsM+eRzwx3Fvg@mail.gmail.com> <456737.1706218724@sss.pgh.pa.us> <CAOzAquJrdL8kCAm2Hh0oTfqzc21XUHaN_dRaU7Lix2RzEuUkSg@mail.gmail.com> <CAOzAquK_y4L3pqhU5iq=DKEEg9=eCSu4YJ+e-i0VAtb1HNfNuw@mail.gmail.com> <1408869.1706390829@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