0

I'm trying to UNLOAD table_name and column_name columns from "information_schema.columns" table to S3, but I get an error saying 'Function "has_table_privilege(oid,text)" not supported.' I noticed the data type of these columns is "sql_identifier", which might be the reason for errors.

I tried casting them as varchar but that didn't work either. Anybody aware of a workaround?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
ap_go
  • 69
  • 7
  • You're trying to export a system-created table? That's probably not normal functionality. Try creating a new table, selecting and inserting the data into the new table, then exporting the new table. – John Rotenstein Apr 28 '17 at 00:13
  • @JohnRotenstein - I'm not able to create tables off of information_schema.columns, due to the sql_identifier data type. – ap_go Apr 28 '17 at 14:30
  • Can you skip those particular columns, or do a CAST to convert them to something else? – John Rotenstein Apr 28 '17 at 21:08
  • I cannot skip those columns, and I tried CAST, but I get the same error - 'Function "has_table_privilege(oid,text)" not supported.' – ap_go Apr 29 '17 at 02:13
  • There might be another way to get what you want. Take a look at [List all tables in postgresql information_schema](http://stackoverflow.com/a/16581086/174777). It suggests using `select * from pg_tables where schemaname = 'information_schema'` – John Rotenstein Apr 29 '17 at 03:41

0 Answers0