From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | pf(at)pfortin(dot)com, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: cache lookup failed for function 0 |
Date: | 2023-09-29 21:27:48 |
Message-ID: | 8fd58b4c-ef57-3218-b7e3-f087e15db784@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 9/29/23 1:37 PM, pf(at)pfortin(dot)com wrote:
> Hi,
>
> select version();
> PostgreSQL 15.4 on x86_64-mageia-linux-gnu,
> compiled by gcc (Mageia 12.3.0-3.mga9) 12.3.0, 64-bit
>
> 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?
>
>
> Simplified statements; just trying to import a subset of columns:
>
> DROP TABLE IF EXISTS t;
>
> CREATE TABLE IF NOT EXISTS t (
> f1 text, f2 text, f3 text, f4 text, f5 text );
>
> COPY t ( -- import only a subset of columns
I'm going to say it is the
( -- import only a subset of columns
I suspect the -- comment is the issue.
You need to show the actual Python code for a more complete answer.
> f1, f3, f5 ) FROM '/tmp/foo.txt'
> WITH (FORMAT CSV, HEADER, DELIMITER ' ', ENCODING 'ISO-8859-1') ;
>
> ERROR: cache lookup failed for function 0
> Where: COPY t, line 1
> 1 statement failed.
>
> "function"? Is this referring to an implied/internal function? Searching
> has not provided any clue, yet...
>
> There are no user functions in the database:
> ostgres=# \df
> List of functions
> Schema | Name | Result data type | Argument data types | Type
> --------+------+------------------+---------------------+------
> (0 rows)
>
> It feels like something changed since the previously working script no
> longer works...
>
> Clues?
>
> Thanks,
> Pierre
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-09-29 22:21:02 | Re: cache lookup failed for function 0 |
Previous Message | pf | 2023-09-29 20:37:39 | cache lookup failed for function 0 |