From: Bruce Momjian on
Chris Browne wrote:
> - I'd sure like to be able to write queries that *don't* involve
> array smashing or using "grep" on \z output to analyze object
> permissions.

The \z output is an embarrassment, no question about it in my mind.

--
Bruce Momjian <bruce(a)momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ None of us is going to be here forever. +

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

From: Heikki Linnakangas on
On 16/07/10 20:11, Rob Wultsch wrote:
> On Fri, Jul 16, 2010 at 9:56 AM, Robert Haas<robertmhaas(a)gmail.com> wrote:
>> For committers.
>
> Perhaps this discussions should be moved to the General list in order
> to poll the userbase.
>
> My .02 is that SHOW commands (even if they are not compatible) would
> make it much easier for me to make an argument to my boss to at least
> consider moving off another open source database. The show commands
> are in *very* widespread use by the MySQL community even after ~5
> years of having the i_s. The Drizzle team (a radical fork of MySQL)
> very briefly considered removing the SHOW commands and the unanimous
> objections that followed caused that idea to scrapped.

That's for MySQL. I come from a DB2 background, and when I started using
psql years ago, I often typed "LIST TABLES" without thinking much about
it. Not SHOW TABLES, but LIST TABLES.

I bet Oracle users coming to PostgreSQL will try "DESC". Not SHOW
TABLES. As Simon listed, every DBMS out there has a different syntax for
this.

I have nothing against SHOW TABLES (it might cause conflicts in grammar
though), but if we're going to cater to people migrating from MySQL, I
feel we should cater to people migrating from other products too. But
surely we're not going to implement 10 different syntaxes for the same
thing! We could, however, give a hint in the syntax error in all those
cases. That way we're not on the hook to maintain them forever, and we
will be doing people a favor by introducing them to the backslash
commands or information schema, which are more powerful.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

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

From: Rob Wultsch on
On Fri, Jul 16, 2010 at 10:52 AM, Heikki Linnakangas
<heikki.linnakangas(a)enterprisedb.com> wrote:
> On 16/07/10 20:11, Rob Wultsch wrote:
>>
>> On Fri, Jul 16, 2010 at 9:56 AM, Robert Haas<robertmhaas(a)gmail.com>
>> �wrote:
>>>
>>> For committers.
>>
>> Perhaps this discussions should be moved to the General list in order
>> to poll the userbase.
>>
>> My .02 is that SHOW commands (even if they are not compatible) would
>> make it much easier for me to make an argument to my boss to at least
>> consider moving off another open source database. The show commands
>> are in *very* widespread use by the MySQL community even after ~5
>> years of having the i_s. The Drizzle team (a radical fork of MySQL)
>> very briefly considered removing the SHOW commands and the unanimous
>> objections that followed caused that idea to scrapped.
>
> That's for MySQL. I come from a DB2 background, and when I started using
> psql years ago, I often typed "LIST TABLES" without thinking much about it.
> Not SHOW TABLES, but LIST TABLES.
>
> I bet Oracle users coming to PostgreSQL will try "DESC". Not SHOW TABLES. As
> Simon listed, every DBMS out there has a different syntax for this.
>
> I have nothing against SHOW TABLES (it might cause conflicts in grammar
> though), but if we're going to cater to people migrating from MySQL, I feel
> we should cater to people migrating from other products too. But surely
> we're not going to implement 10 different syntaxes for the same thing! We
> could, however, give a hint in the syntax error in all those cases. That way
> we're not on the hook to maintain them forever, and we will be doing people
> a favor by introducing them to the backslash commands or information schema,
> which are more powerful.
>
> --
> �Heikki Linnakangas
> �EnterpriseDB � http://www.enterprisedb.com
>

desc[ribe] also works in MySQL.

Perhaps describe would be a good option:
describe tables
describe table <table name> (or perhaps descrive <object>?)
describe schemas
etc


--
Rob Wultsch
wultsch(a)gmail.com

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

From: Simon Riggs on
On Fri, 2010-07-16 at 20:52 +0300, Heikki Linnakangas wrote:
> On 16/07/10 20:11, Rob Wultsch wrote:
> > On Fri, Jul 16, 2010 at 9:56 AM, Robert Haas<robertmhaas(a)gmail.com> wrote:
> >> For committers.
> >
> > Perhaps this discussions should be moved to the General list in order
> > to poll the userbase.
> >
> > My .02 is that SHOW commands (even if they are not compatible) would
> > make it much easier for me to make an argument to my boss to at least
> > consider moving off another open source database. The show commands
> > are in *very* widespread use by the MySQL community even after ~5
> > years of having the i_s. The Drizzle team (a radical fork of MySQL)
> > very briefly considered removing the SHOW commands and the unanimous
> > objections that followed caused that idea to scrapped.
>
> That's for MySQL. I come from a DB2 background, and when I started using
> psql years ago, I often typed "LIST TABLES" without thinking much about
> it. Not SHOW TABLES, but LIST TABLES.

> I bet Oracle users coming to PostgreSQL will try "DESC". Not SHOW
> TABLES. As Simon listed, every DBMS out there has a different syntax for
> this.

Agreed

> I have nothing against SHOW TABLES

....but SHOW wins, based on numbers of people expecting that

> (it might cause conflicts in grammar
> though)

We don't have t handle it in the grammar. There are no parameters called
"tables", "databases" etc

> , but if we're going to cater to people migrating from MySQL, I
> feel we should cater to people migrating from other products too. But
> surely we're not going to implement 10 different syntaxes for the same
> thing! We could, however, give a hint in the syntax error in all those
> cases.

That's a very sensible suggestion, we should give a hint for all common
commands SHOW, LIST, etc., even though we pick just one to implement.

> That way we're not on the hook to maintain them forever, and we
> will be

> doing people a favor by introducing them to the backslash
> commands

That's a sentence I never thought to see written down

> or information schema, which are more powerful.

and this in no way detracts from that power and standardisation.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Training and Services


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

From: Heikki Linnakangas on
On 16/07/10 21:32, Simon Riggs wrote:
> On Fri, 2010-07-16 at 20:52 +0300, Heikki Linnakangas wrote:
>> I have nothing against SHOW TABLES
>
> ...but SHOW wins, based on numbers of people expecting that

I'm not sure I buy that, but even if it's true, it doesn't seem fair to
do a favor to one group of users, leaving the rest stranded and excluded
forever. Even if SHOW TABLES has a bigger mind-share than the others,
surely the others are not negligible either.

>> , but if we're going to cater to people migrating from MySQL, I
>> feel we should cater to people migrating from other products too. But
>> surely we're not going to implement 10 different syntaxes for the same
>> thing! We could, however, give a hint in the syntax error in all those
>> cases.
>
> That's a very sensible suggestion, we should give a hint for all common
> commands SHOW, LIST, etc., even though we pick just one to implement.

I'm suggesting that we should just add the hint for all of those and be
done with it.

>> doing people a favor by introducing them to the backslash
>> commands
>
> That's a sentence I never thought to see written down

:-). They're not that bad IMHO. \d is short, which is nice. \d and \df
are the commands I routinely use and remember, for anything more
advanced I have to resort to \h. The SHOW TABLES command wouldn't do
more than that anyway.


--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

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