From: Robert Haas on 17 Jul 2010 10:02 On Jul 16, 2010, at 11:02 PM, Stephen Frost <sfrost(a)snowman.net> wrote: > * Robert Haas (robertmhaas(a)gmail.com) wrote: >> Why must the backslash commands be more powerful than any alternative >> we might come up with? > > Because they encode alot of information in a character- something which > is next to impossible to do in "english". I don't think that "terse" and "powerful" are the same thing. One of my beefs with the backslash commands is that the syntax is not cleanly extensible. We have S and + as postfix modifiers, and that's fairly comprehensible, but as soon as you think about going much further with it, it starts to seem like alphabet soup. In fact, we're pretty close to alphabet soup already. Without looking at the help, what does \db do? What are the commands to list casts, conversions, and comments, respectively? What syntax would you propose for a backslash command to list comments, but only those on a certain object type? If you don't think we should have a backslash command for that, can you write an SQL query that lists comments on built-in aggregates in less than two minutes? How many people do you think can do it at all? I think "LIST COMMENTS ON SYSTEM AGGREGATES" would be an epic step forward in usability. ....Robert -- 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: "Kevin Grittner" on 17 Jul 2010 11:14 Tim Landscheidt <tim(a)tim-landscheidt.de> wrote: > One major flaw I see is that the fractional precision is > fixed. Not only petrol stations split cents. Well, I've never paid a petrol station a fraction of a cent; I've only seen *rates* of money per some unit of measure with fractional cents. If you're being accurate about assigning types, a rate like that is no more money than speed is a distance. Likewise for everywhere else I can think of such fractional cents -- for example, hourly pay rates or tax mill rates on assessed value. These all (in my experience) are multiplied by a number in the unit of measure of the divisor to get a money amount without fractional cents before you do anything with actual *money*. While others may have had some contrary experience, I've worked with many types of businesses, non-profit organizations, and government agencies for 38 years, and can't recall having seen anywhere that what you describe would cause a problem, when the type is used correctly. -Kevin -- 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: "Joshua D. Drake" on 17 Jul 2010 17:12 On Sat, 2010-07-17 at 09:02 -0500, Robert Haas wrote: > On Jul 16, 2010, at 11:02 PM, Stephen Frost <sfrost(a)snowman.net> wrote: > > * Robert Haas (robertmhaas(a)gmail.com) wrote: > >> Why must the backslash commands be more powerful than any alternative > >> we might come up with? > > > > Because they encode alot of information in a character- something which > > is next to impossible to do in "english". > > I don't think that "terse" and "powerful" are the same thing. One of my beefs with the backslash commands is that the syntax is not cleanly extensible. We have S and + as postfix modifiers, and that's fairly comprehensible, but as soon as you think about going much further with it, it starts to seem like alphabet soup. > > In fact, we're pretty close to alphabet soup already. Without looking at the help, what does \db do? What are the commands to list casts, conversions, and comments, respectively? What syntax would you propose for a backslash command to list comments, but only those on a certain object type? If you don't think we should have a backslash command for that, can you write an SQL query that lists comments on built-in aggregates in less than two minutes? How many people do you think can do it at all? > > I think "LIST COMMENTS ON SYSTEM AGGREGATES" would be an epic step forward in usability. +1 JD > > ...Robert -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579 Consulting, Training, Support, Custom Development, Engineering -- 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: Pavel Stehule on 17 Jul 2010 17:16 2010/7/17 Joshua D. Drake <jd(a)commandprompt.com>: > On Sat, 2010-07-17 at 09:02 -0500, Robert Haas wrote: >> On Jul 16, 2010, at 11:02 PM, Stephen Frost <sfrost(a)snowman.net> wrote: >> > * Robert Haas (robertmhaas(a)gmail.com) wrote: >> >> Why must the backslash commands be more powerful than any alternative >> >> we might come up with? >> > >> > Because they encode alot of information in a character- something which >> > is next to impossible to do in "english". >> >> I don't think that "terse" and "powerful" are the same thing. One of my beefs with the backslash commands is that the syntax is not cleanly extensible. We have S and + as postfix modifiers, and that's fairly comprehensible, but as soon as you think about going much further with it, it starts to seem like alphabet soup. >> >> In fact, we're pretty close to alphabet soup already. Without looking at the help, what does \db do? What are the commands to list casts, conversions, and comments, respectively? What syntax would you propose for a backslash command to list comments, but only those on a certain object type? If you don't think we should have a backslash command for that, can you write an SQL query that lists comments on built-in aggregates in less than two minutes? How many people do you think can do it at all? >> >> I think "LIST COMMENTS ON SYSTEM AGGREGATES" would be an epic step forward in usability. Every time I like psql from one reason, It is clean, what is SQL (server side) command and what is psql command (backslash command). So I am against to implement similar commands. Regards Pavel Stehule > > +1 > > JD > >> >> ...Robert > > -- > PostgreSQL.org Major Contributor > Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579 > Consulting, Training, Support, Custom Development, Engineering > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- 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: Stefan Kaltenbrunner on 17 Jul 2010 17:30
On 07/17/2010 04:02 PM, Robert Haas wrote: > On Jul 16, 2010, at 11:02 PM, Stephen Frost<sfrost(a)snowman.net> wrote: >> * Robert Haas (robertmhaas(a)gmail.com) wrote: >>> Why must the backslash commands be more powerful than any alternative >>> we might come up with? >> >> Because they encode alot of information in a character- something which >> is next to impossible to do in "english". > > I don't think that "terse" and "powerful" are the same thing. One of my beefs with the backslash commands is that the syntax is not cleanly extensible. We have S and + as postfix modifiers, and that's fairly comprehensible, but as soon as you think about going much further with it, it starts to seem like alphabet soup. > > In fact, we're pretty close to alphabet soup already. Without looking at the help, what does \db do? What are the commands to list casts, conversions, and comments, respectively? What syntax would you propose for a backslash command to list comments, but only those on a certain object type? If you don't think we should have a backslash command for that, can you write an SQL query that lists comments on built-in aggregates in less than two minutes? How many people do you think can do it at all? > > I think "LIST COMMENTS ON SYSTEM AGGREGATES" would be an epic step forward in usability. uh oh - that actually sounds like a big step backwards to me - it's inventing extremely verbose pseudo english syntax for something that we currently do with a trivial and easy to remember backslash command. Do we really need to invent a completely new language for this? Once you extend that syntax to what you are proposing (ie provide a way to filter like "LIST COMMENTS ON SYSTEM AGGREGATES WITH NUMERIC INPUT") you basically reinvented a query language - ever heard of SQL or QUEL? I'm not sure where to draw the line but implementing a proper shortcut interface for cammands is something taht should be done on the client side because not every client is the same and the needs of psql might be radically different from any other client (like pgadmin or a fancy Web 2.0 AJAX thingy - those will likely always use custom catalog queries). Maybe a differnet way to look at the whole thing is to reconsider our own catalogs (anyone remember newsysview?) and add a bunch of views to abstract away most of the current complexity for these usecases? Stefan -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |