2010/9/15 SAKAMOTO Masahiko <sakamoto.masah...@oss.ntt.co.jp>:
> This is a proposal patch for SQL/MED for 9.1.
>  (1) foreign table DDL support (this proposal):
>     - support for foreign table DDL syntax (CREATE/ALTER FOREIGN TABLE)
>     - Definition of FDW routine interface and system catalogs for it.

I checked the patch. It includes changes for DDL, system catalogs,
information schema, and basic psql support. The patch itself have no useful
works, but we need the parts anyway to support the SQL standard.

I have a couples of comments:

* There are unused types in the patch. They might be used by additional
  patches based on the patch, but should be removed for now.
    - enum GenericOptionFlags.ForeignTableOpt
    - typedef struct FSConnection FSConnection;
    - typedef struct FdwRoutine FdwRoutine;
    - typedef struct FdwReply FdwReply;

 * Needs an error check to SELECT FROM foreign table. It might be replaced
   to actual FDW routines soon, but the current error message is not ideal.
      postgres=# SELECT * FROM ft1;
      ERROR:  could not open file "base/11908/16391": No such file or directory

* Type checks between TABLE and FOREIGN TABLE are a bit inconsistent.
  For example, "ALTER TABLE ADD COLUMN" can add a column to a foreign tables
  but "DROP TABLE" cannot remove foreign tables.
  IMHO, however, we can allow such looseness because operations actually
  forbidden will end with ERRORs without problems.

-- 
Itagaki Takahiro

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to