tpetry / laravel-postgresql-enhanced

Support for many missing PostgreSQL specific features
MIT License
773 stars 31 forks source link

Support foreign data wrapper extensions #54

Open kdevan opened 1 year ago

kdevan commented 1 year ago

Is it possible to support something like FDW here? It seems to me this might be along the lines of adding table grammar, somewhat similar to the storage parameters.

The process to create foreign data wrapper tables is something like this:

  1. https://www.postgresql.org/docs/current/sql-createserver.html
  2. https://www.postgresql.org/docs/current/sql-createforeigntable.html

Depending on feedback I would be open to trying to do a PR for this.

I personally use the file_fdw and I've seen that postgres_fdw is fairly popular. There's lots of more experimental ones too.

tpetry commented 1 year ago

I am open to that feature. I‘ve used fdw in the past and it is awesome. But it is also problematic as some statements need superuser access level to execute. And your Laravel application should never run with access rights that broad…