Re: patch: SQL/MED(FDW) DDL

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: SAKAMOTO Masahiko <sakamoto(dot)masahiko(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch: SQL/MED(FDW) DDL
Date: 2010-09-17 02:29:06
Message-ID: AANLkTim62ZKfiJyu7+J7+84rogr=-0eRdHjhgpHYuzMO@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/9/15 SAKAMOTO Masahiko <sakamoto(dot)masahiko(at)oss(dot)ntt(dot)co(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2010-09-17 02:34:46 Re: Heartbeat between Primary and Standby replicas
Previous Message Andrew Dunstan 2010-09-17 02:00:26 Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session