[Feature Request] \dx show "options"

Started by Emanuel Calvoabout 14 years ago8 messages
#1Emanuel Calvo
postgres.arg@gmail.com

Hi guys,

I was thinking that could be great to add a column in \dx showing the available
options for each foreign data wrapper.

Seems reasonable?

--
--
              Emanuel Calvo
              Helpame.com

#2Emanuel Calvo
postgres.arg@gmail.com
In reply to: Emanuel Calvo (#1)
Re: [Feature Request] \dx show "options"

2011/11/9 Emanuel Calvo <postgres.arg@gmail.com>:

Hi guys,

I was thinking that could be great to add a column in \dx showing the available
options for each foreign data wrapper.

Seems reasonable?

Sorry the spam guys,

it necesary the sme for index collations. They appear in "\d+ table"
but with "\di+"
it doesn't describe or show the collation. Maybe a column or in the
description field
could be enough.

--
--
              Emanuel Calvo
              Helpame.com

#3Robert Haas
robertmhaas@gmail.com
In reply to: Emanuel Calvo (#1)
Re: [Feature Request] \dx show "options"

On Wed, Nov 9, 2011 at 7:57 AM, Emanuel Calvo <postgres.arg@gmail.com> wrote:

I was thinking that could be great to add a column in \dx showing the available
options for each foreign data wrapper.

Seems reasonable?

\dx doesn't list foreign data wrappers.

\dew+ lists the actual options supplied to a foreign data wrapper already.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

#4Emanuel Calvo
postgres.arg@gmail.com
In reply to: Robert Haas (#3)
Re: [Feature Request] \dx show "options"

2011/11/9 Robert Haas <robertmhaas@gmail.com>:

On Wed, Nov 9, 2011 at 7:57 AM, Emanuel Calvo <postgres.arg@gmail.com> wrote:

I was thinking that could be great to add a column in \dx showing the available
options for each foreign data wrapper.

Seems reasonable?

\dx doesn't list foreign data wrappers.

I was confused, forget it.

\dew+ lists the actual options supplied to a foreign data wrapper already.

Checked, but the options doesn't appear (the column exists, but is empty).

postgres=# \dew+
List of foreign-data wrappers
Name | Owner | Handler | Validator |
Access privileges | Options
-----------+----------+-------------------+---------------------+-------------------+---------
file_fdw | postgres | file_fdw_handler | file_fdw_validator |
|
mysql_fdw | postgres | mysql_fdw_handler | mysql_fdw_validator |
|
(2 rows)

--
--
              Emanuel Calvo
              Helpame.com

#5Robert Haas
robertmhaas@gmail.com
In reply to: Emanuel Calvo (#4)
Re: [Feature Request] \dx show "options"

On Wed, Nov 9, 2011 at 12:31 PM, Emanuel Calvo <postgres.arg@gmail.com> wrote:

\dew+ lists the actual options supplied to a foreign data wrapper already.

Checked, but the options doesn't appear (the column exists, but is empty).

Well, that just means that you didn't specify any options when you ran
CREATE FOREIGN DATA WRAPPER.

rhaas=# create foreign data wrapper dummy options (foo 'bar');
CREATE FOREIGN DATA WRAPPER
rhaas=# \dew+
List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options
| Description
-------+-------+---------+-----------+-------------------+-------------+-------------
dummy | rhaas | - | - | | (foo 'bar') |
(1 row)

I'm not sure we're talking about the same thing, though.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

#6Emanuel Calvo
postgres.arg@gmail.com
In reply to: Robert Haas (#5)
Re: [Feature Request] \dx show "options"

2011/11/10 Robert Haas <robertmhaas@gmail.com>:

On Wed, Nov 9, 2011 at 12:31 PM, Emanuel Calvo <postgres.arg@gmail.com> wrote:

\dew+ lists the actual options supplied to a foreign data wrapper already.

Checked, but the options doesn't appear (the column exists, but is empty).

Well, that just means that you didn't specify any options when you ran
CREATE FOREIGN DATA WRAPPER.

rhaas=# create foreign data wrapper dummy options (foo 'bar');
CREATE FOREIGN DATA WRAPPER
rhaas=# \dew+
                           List of foreign-data wrappers
 Name  | Owner | Handler | Validator | Access privileges | FDW Options
| Description
-------+-------+---------+-----------+-------------------+-------------+-------------
 dummy | rhaas | -       | -         |                   | (foo 'bar') |
(1 row)

I'm not sure we're talking about the same thing, though.

No. I thought 'options' were the parameters when you create a fdw (example:
host, port, file, etc).

--
--
              Emanuel Calvo
              Helpame.com

#7Robert Haas
robertmhaas@gmail.com
In reply to: Emanuel Calvo (#6)
Re: [Feature Request] \dx show "options"

On Mon, Nov 14, 2011 at 10:45 AM, Emanuel Calvo <postgres.arg@gmail.com> wrote:

2011/11/10 Robert Haas <robertmhaas@gmail.com>:

On Wed, Nov 9, 2011 at 12:31 PM, Emanuel Calvo <postgres.arg@gmail.com> wrote:

\dew+ lists the actual options supplied to a foreign data wrapper already.

Checked, but the options doesn't appear (the column exists, but is empty).

Well, that just means that you didn't specify any options when you ran
CREATE FOREIGN DATA WRAPPER.

rhaas=# create foreign data wrapper dummy options (foo 'bar');
CREATE FOREIGN DATA WRAPPER
rhaas=# \dew+
                           List of foreign-data wrappers
 Name  | Owner | Handler | Validator | Access privileges | FDW Options
| Description
-------+-------+---------+-----------+-------------------+-------------+-------------
 dummy | rhaas | -       | -         |                   | (foo 'bar') |
(1 row)

I'm not sure we're talking about the same thing, though.

No. I thought 'options' were the parameters when you create a fdw (example:
host, port, file, etc).

Each FDW can make its own decisions about which options it wants to
support - the core server support doesn't know anything about how the
data will be used. You can set options on the FDW level, the server
level, the foreign table level, and maybe a few other places.
Normally I would expect things like host and port to be set on the
server level, rather than the foreign data wrapper level.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

#8Emanuel Calvo
postgres.arg@gmail.com
In reply to: Robert Haas (#7)
Re: [Feature Request] \dx show "options"

2011/11/14 Robert Haas <robertmhaas@gmail.com>:

On Mon, Nov 14, 2011 at 10:45 AM, Emanuel Calvo <postgres.arg@gmail.com> wrote:

2011/11/10 Robert Haas <robertmhaas@gmail.com>:

On Wed, Nov 9, 2011 at 12:31 PM, Emanuel Calvo <postgres.arg@gmail.com> wrote:

\dew+ lists the actual options supplied to a foreign data wrapper already.

Checked, but the options doesn't appear (the column exists, but is empty).

Well, that just means that you didn't specify any options when you ran
CREATE FOREIGN DATA WRAPPER.

rhaas=# create foreign data wrapper dummy options (foo 'bar');
CREATE FOREIGN DATA WRAPPER
rhaas=# \dew+
                           List of foreign-data wrappers
 Name  | Owner | Handler | Validator | Access privileges | FDW Options
| Description
-------+-------+---------+-----------+-------------------+-------------+-------------
 dummy | rhaas | -       | -         |                   | (foo 'bar') |
(1 row)

I'm not sure we're talking about the same thing, though.

No. I thought 'options' were the parameters when you create a fdw (example:
host, port, file, etc).

Each FDW can make its own decisions about which options it wants to
support - the core server support doesn't know anything about how the
data will be used.  You can set options on the FDW level, the server
level, the foreign table level, and maybe a few other places.
Normally I would expect things like host and port to be set on the
server level, rather than the foreign data wrapper level.

Gotcha. Thanks Robert! I must report to the fdw creator.

--
--
              Emanuel Calvo
              Helpame.com