On Sat, Nov 28, 2009 at 5:34 PM, Russell Wallace
<russell.wall...@gmail.com> wrote:
>
> The following bug has been logged online:
>
> Bug reference:      5218
> Logged by:          Russell Wallace
> Email address:      russell.wall...@gmail.com
> PostgreSQL version: 8.4.1
> Operating system:   Windows
> Description:        Easy strategic feature requests
> Details:
>
> (There wasn't a separate form for feature requests, so I'm assuming that
> like most projects, this one files them together with bugs, please let me
> know if that is not the case.)
>
> Can you make Show Databases, Show Tables and Describe (table) work the way
> they do in MySQL? This would make things easier for newbies and would also
> make it easier to port code from MySQL; they would only need to be syntax
> sugar for the corresponding information schema queries, so it would probably
> only take a few lines of code, and would improve PostgreSQL's competitive
> position versus MySQL out of all proportion to the apparent significance of
> these features.
>
> It would be nice if Use (database) could also be made to work, but I'm
> guessing this would not be just a few lines of code. What would be easy and
> still useful, however, would be if it could return a specific error message:
> "you can't do this in Postgres, you always need to supply a database name on
> connection"; again that would make life easier for newbies, and that matters
> a lot for competitive advantage.

Features requests are usually discussed on pgsql-hackers.  I'm not
sure there will be much support for this proposal, although I it did
take me a while to figure out the PostgreSQL equivalents of those
commands when I made the switch.  For interactive use, the psql
backslash-commands are fine, but for scripted access to the schema,
the MySQL way is definitely easier.  One of the problems is that
"show" is already a PostgreSQL verb with an incompatible meaning.

Rather than trying to be compatible with MySQL directly, I think we
might be better off adding a chapter to our documentation explaining
to ex-MySQL users how to accomplish the same things in PostgreSQL.  We
might even think about adding a contrib module with user-defined
functions like show_databases(), show_tables(), describe(text), so
that someone could do SELECT describe('foo'); and get a familiar sort
of output.

...Robert

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

Reply via email to