On Fri, 29 Sep 2023 18:21:02 -0400 Tom Lane wrote: >pf@xxxxxxxxxxx writes: >> As a test, rather than use INSERT, I recently wrote a python test script >> to import some 8M & 33M record files with COPY instead. These worked with >> last weekend's data dump. Next, I wanted to look into importing a subset >> of columns using the below logic; but I'm getting "ERROR: cache lookup >> failed for function 0". Re-running the same full imports that worked >> Saturday, I now get the same error. > >> Could something in the DB cause this "function" error? > >"cache lookup failed" certainly smells like a server internal error, >but we'd have heard about it if the trivial case you show could reach >such a problem. I'm thinking there's things you haven't told us. >What extensions do you have installed? Maybe an event trigger? I have one production DB with fuzzystrmatch installed; but it's not in any other DB. I'm trying to import into a test DB, and not yet at the point of understanding or using triggers. This is a very simple setup, other than the volume of data. The production DB has many tables, mostly in the range of 8M-33M rows. >Also, the reference to ENCODING 'ISO-8859-1' makes me wonder what >encoding conversion is being performed. The source files are mostly UTF-8; some files have the 1/2 (0xbd) character in street addresses, hence the ISO... > regards, tom lane Thanks, Pierre