Re: patch: SQL/MED(FDW) DDL - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: patch: SQL/MED(FDW) DDL
Date
Msg-id AANLkTim62ZKfiJyu7+J7+84rogr=-0eRdHjhgpHYuzMO@mail.gmail.com
Whole thread Raw
In response to patch: SQL/MED(FDW) DDL  (SAKAMOTO Masahiko <sakamoto.masahiko@oss.ntt.co.jp>)
Responses Re: patch: SQL/MED(FDW) DDL
List pgsql-hackers
2010/9/15 SAKAMOTO Masahiko <sakamoto.masahiko@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
removedfor now.   - enum GenericOptionFlags.ForeignTableOpt   - typedef struct FSConnection FSConnection;   - typedef
structFdwRoutine 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
errormessage is not ideal.     postgres=# SELECT * FROM ft1;     ERROR:  could not open file "base/11908/16391": No
suchfile or directory 

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

--
Itagaki Takahiro


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session
Next
From: Fujii Masao
Date:
Subject: Re: Heartbeat between Primary and Standby replicas