Index: src/backend/utils/adt/genfile.c =================================================================== --- src/backend/utils/adt/genfile.c (head) +++ src/backend/utils/adt/genfile.c (working copy) @@ -136,7 +136,7 @@ FreeFile(file); pfree(filename); - PG_RETURN_TEXT_P(buf); + PG_RETURN_BYTEA_P(buf); } /* Index: src/include/catalog/pg_proc.h =================================================================== --- src/include/catalog/pg_proc.h (head) +++ src/include/catalog/pg_proc.h (working copy) @@ -3290,7 +3290,7 @@ DATA(insert OID = 2623 ( pg_stat_file PGNSP PGUID 12 1 0 0 f f f t f v 1 0 2249 "25" "{25,20,1184,1184,1184,1184,16}" "{i,o,o,o,o,o,o}" "{filename,size,access,modification,change,creation,isdir}" _null_ pg_stat_file _null_ _null_ _null_ )); DESCR("return file information"); -DATA(insert OID = 2624 ( pg_read_file PGNSP PGUID 12 1 0 0 f f f t f v 3 0 25 "25 20 20" _null_ _null_ _null_ _null_ pg_read_file _null_ _null_ _null_ )); +DATA(insert OID = 2624 ( pg_read_file PGNSP PGUID 12 1 0 0 f f f t f v 3 0 17 "25 20 20" _null_ _null_ _null_ _null_ pg_read_file _null_ _null_ _null_ )); DESCR("read text from a file"); DATA(insert OID = 2625 ( pg_ls_dir PGNSP PGUID 12 1 1000 0 f f f t t v 1 0 25 "25" _null_ _null_ _null_ _null_ pg_ls_dir _null_ _null_ _null_ )); DESCR("list all files in a directory");