I would like to read some rtf files I received from an outside source into a table with Postgres.
I am using the pg_stat_file() function to check whether or not the file exists and aim to read its content with pg_read_file().
If the filename contains an umlaut, the function fails.
SELECT pg_stat_file('C:\datafolder\ctköln.rtf', true);
ERROR: could not open file "C:\datafolder\ctköln.rtf" for reading: No such file or directory
SQL state: 58P01
Is there an option to read the file without changing its name? The underlying system is a Windows server.
The file contents will be eventually read into a table.
(U&'C:\\Users\\Public\\ctk\00F6ln.txt- duplicate other backslashes and prefix the string withU&or the C-styleE''version.