Re: FDW for PostgreSQL
От | Shigeru Hanada |
---|---|
Тема | Re: FDW for PostgreSQL |
Дата | |
Msg-id | CAEZqfEcTHwN4Vp90fOeTQF=LD5gLNEM+ayR8MFTxzCGqwEg+xA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: FDW for PostgreSQL (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: FDW for PostgreSQL
|
Список | pgsql-hackers |
On Sun, Feb 17, 2013 at 8:44 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Continuing to look at this patch ... I'm wondering if any particular > discussion went into choosing the FDW option names "nspname", "relname", > and "colname". IIRC, there was no deep discussion about those option names. I simply chose "relname" and "nspname" from pg_class and pg_namespace. At that time I thought users would understand those options easily if those names are used in catalog. > These don't seem to me like names that we ought to be > exposing at the SQL command level. Why not just "schema", "table", > "column"? Or perhaps "schema_name", "table_name", "column_name" if you > feel it's essential to distinguish that these are names. I think not-shortened names (words used in documents of conversations) are better now. I prefer "table_name" to "table", because it would be easy to distinguish as name, even if we add new options like "table_foo". Besides, I found a strange(?) behavior in psql \d+ command in no-postfix case, though it wouldn't be a serious problem. In psql \d+ result for postgres_fdw foreign tables, "table" and "column" are quoted, but "schema" is not. Is this behavior of quote_ident() intentional? postgres=# \d+ pgbench1_branches Foreign table "public.pgbench1_branches" Column | Type | Modifiers | FDW Options | Storage | Stats target | Description ----------+---------------+-----------+------------------+----------+--------------+-------------bid | integer | not null | ("column" 'bid') | plain | |bbalance | integer | | | plain | |filler | character(88) | | | extended | | Server: pgbench1 FDW Options: (schema 'public', "table" 'foo') Has OIDs: no We can use "table" and "column" options without quoting (or with quote of course) in CREATE/ALTER FOREIGN TABLE commands, so this is not a barrier against choosing no-postfix names. -- Shigeru HANADA
В списке pgsql-hackers по дате отправления: