Prepping to break every past release...
Hello,
Something that continues to grind my teeth about our software is that we
are horribly inconsistent with our system catalogs. Now I am fully and
100% aware that changing this will break things in user land but I want
to do it anyway. In order to do that I believe we need to come up with a
very loud, extremely verbose method of communicating to people that 8.5
*will* break things.
It seems to me that the best method would be to follow the
information_schema naming conventions as information_schema is standard
compliant (right?).
Thoughts?
Examples:
postgres=# \d pg_class
Table "pg_catalog.pg_class"
Column | Type | Modifiers
----------------+-----------+-----------
relname | name | not null
relnamespace | oid | not null
[...]
postgres=# \d pg_tables
View "pg_catalog.pg_tables"
Column | Type | Modifiers
-------------+---------+-----------
schemaname | name |
tablename | name |
postgres=# \d pg_stat_user_tables
View "pg_catalog.pg_stat_user_tables"
Column | Type | Modifiers
------------------+--------------------------+-----------
relid | oid |
schemaname | name |
relname | name |
postgres=# \d information_schema.tables
View "information_schema.tables"
Column | Type |
Modifiers
------------------------------+-----------------------------------+-----------
table_catalog | information_schema.sql_identifier |
table_schema | information_schema.sql_identifier |
table_name | information_schema.sql_identifier |
--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997
Joshua D. Drake wrote:
Hello,
Something that continues to grind my teeth about our software is that we
are horribly inconsistent with our system catalogs. Now I am fully and
100% aware that changing this will break things in user land but I want
to do it anyway. In order to do that I believe we need to come up with a
very loud, extremely verbose method of communicating to people that 8.5
*will* break things.It seems to me that the best method would be to follow the
information_schema naming conventions as information_schema is standard
compliant (right?).Thoughts?
What would be the benefit? Apart from satisfying a passion for consistency?
cheers
andrew
On Wed, Mar 4, 2009 at 8:32 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
Hello,
Something that continues to grind my teeth about our software is that we
are horribly inconsistent with our system catalogs. Now I am fully and
100% aware that changing this will break things in user land but I want
to do it anyway. In order to do that I believe we need to come up with a
very loud, extremely verbose method of communicating to people that 8.5
*will* break things.
I assume you'll be putting in the weeks/months of work required to fix
pgAdmin & phpPgAdmin which would be far better spent on new features
than uglifying the code in far nastier ways than the current state of
the catalogs?
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
On Wed, 2009-03-04 at 15:50 -0500, Andrew Dunstan wrote:
It seems to me that the best method would be to follow the
information_schema naming conventions as information_schema is standard
compliant (right?).Thoughts?
What would be the benefit? Apart from satisfying a passion for consistency?
It would lower the cost (intellectually as well as dollars) of
development and administration for every single user of the database.
I can't count how many times I accidentally type tablename versus
table_name or worse relname, etc...
Sincerely,
Joshua D. Drake
--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997
On Wed, 2009-03-04 at 21:01 +0000, Dave Page wrote:
On Wed, Mar 4, 2009 at 8:32 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
Hello,
Something that continues to grind my teeth about our software is that we
are horribly inconsistent with our system catalogs. Now I am fully and
100% aware that changing this will break things in user land but I want
to do it anyway. In order to do that I believe we need to come up with a
very loud, extremely verbose method of communicating to people that 8.5
*will* break things.I assume you'll be putting in the weeks/months of work required to fix
pgAdmin & phpPgAdmin which would be far better spent on new features
than uglifying the code in far nastier ways than the current state of
the catalogs?
*Shrug* long term consistency is the better choice.
Sincerely,
Joshua D. Drake
--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997
On Wed, Mar 4, 2009 at 9:09 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
I assume you'll be putting in the weeks/months of work required to fix
pgAdmin & phpPgAdmin which would be far better spent on new features
than uglifying the code in far nastier ways than the current state of
the catalogs?*Shrug* long term consistency is the better choice.
Easy to say if you're not one of the people for whom such a change
would mean weeks of recoding, the need to start QA'ing everything from
scratch again and a hideous mess of code to cope with after adding
support for a new version with a different catalog schema.
Besides - what percentage of users ever go anywhere near the
catalogs? I'd guess a fraction of a percent of users, and maybe 1 - 5%
of developers.
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
On Wed, 2009-03-04 at 21:14 +0000, Dave Page wrote:
On Wed, Mar 4, 2009 at 9:09 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
*Shrug* long term consistency is the better choice.
Easy to say if you're not one of the people for whom such a change
would mean weeks of recoding, the need to start QA'ing everything from
scratch again and a hideous mess of code to cope with after adding
support for a new version with a different catalog schema.
It is not easy to say. It is correct to say. I am under no illusion that
this will not be painful. As far as "man weeks of recoding". Sorry, I
know that will be tough.
Besides - what percentage of users ever go anywhere near the
catalogs? I'd guess a fraction of a percent of users, and maybe 1 - 5%
of developers.
Any DBA worth his salt uses system catalogs. Lowering the barrier on
uses these catalogs will lead to better and more useful tools as well.
Sincerely,
Joshua D. Drake
--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997
In response to Dave Page <dpage@pgadmin.org>:
On Wed, Mar 4, 2009 at 9:09 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
I assume you'll be putting in the weeks/months of work required to fix
pgAdmin & phpPgAdmin which would be far better spent on new features
than uglifying the code in far nastier ways than the current state of
the catalogs?*Shrug* long term consistency is the better choice.
Easy to say if you're not one of the people for whom such a change
would mean weeks of recoding
Don't those folks have to tweak their code with each new release anyway?
Because those tables are constantly changing? I know we hit problems
with the way triggers are stored in 8.3 compared to earlier versions.
Granted, a sweeping change will necessitate a much larger tweak than
a few changed columns, but the long-term benefit should be cleaner
client code.
Besides - what percentage of users ever go anywhere near the
catalogs? I'd guess a fraction of a percent of users, and maybe 1 - 5%
of developers.
You could always take a survey ... bosses love surveys ...
I, for one, know of lots of code that I've written that accesses those
catalogs. I can't speak for other people.
--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/
On Wed, Mar 4, 2009 at 9:23 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
It is not easy to say. It is correct to say. I am under no illusion that
this will not be painful. As far as "man weeks of recoding". Sorry, I
know that will be tough.
It'll be a complete and utter waste of time, and make a horrible mess
of any client code that has to support multiple versions.
Besides - what percentage of users ever go anywhere near the
catalogs? I'd guess a fraction of a percent of users, and maybe 1 - 5%
of developers.Any DBA worth his salt uses system catalogs. Lowering the barrier on
uses these catalogs will lead to better and more useful tools as well.
Then psql and pgAdmin aren't doing their jobs properly. Tell us what you need.
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
"Joshua D. Drake" <jd@commandprompt.com> writes:
Something that continues to grind my teeth about our software is that we
are horribly inconsistent with our system catalogs. Now I am fully and
100% aware that changing this will break things in user land but I want
to do it anyway. In order to do that I believe we need to come up with a
very loud, extremely verbose method of communicating to people that 8.5
*will* break things.
It seems to me that the best method would be to follow the
information_schema naming conventions as information_schema is standard
compliant (right?).
This isn't happening. Don't waste our time suggesting it.
regards, tom lane
On Wed, Mar 4, 2009 at 9:24 PM, Bill Moran <wmoran@potentialtech.com> wrote:
In response to Dave Page <dpage@pgadmin.org>:
Don't those folks have to tweak their code with each new release anyway?
Because those tables are constantly changing? I know we hit problems
with the way triggers are stored in 8.3 compared to earlier versions.
pg_trigger.tgenabled changed type in 8.3. That's an extremely rare
kind of change however - for example, triggers havent really changed
since at least 7.3 aside from that.
The sort of change JD seems to be suggesting /could/ involve rewriting
virtually every query in pgAdmin, as well as surrounding code.
Granted, a sweeping change will necessitate a much larger tweak than
a few changed columns, but the long-term benefit should be cleaner
client code.
Only if your app only targets one version of the server.
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
On Wed, 2009-03-04 at 21:27 +0000, Dave Page wrote:
On Wed, Mar 4, 2009 at 9:23 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
It is not easy to say. It is correct to say. I am under no illusion that
this will not be painful. As far as "man weeks of recoding". Sorry, I
know that will be tough.It'll be a complete and utter waste of time, and make a horrible mess
of any client code that has to support multiple versions.
No actually it won't. It will make it easier for every product that uses
8.5 and above. Sometimes you have to cut the cord.
Any DBA worth his salt uses system catalogs. Lowering the barrier on
uses these catalogs will lead to better and more useful tools as well.Then psql and pgAdmin aren't doing their jobs properly. Tell us what you need.
That is an interesting argument but honestly off topic for this thread
because that would be a series of new views and functions etc...
Sincerely,
Joshua D. Drake
--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997
On Wed, 2009-03-04 at 16:28 -0500, Tom Lane wrote:
"Joshua D. Drake" <jd@commandprompt.com> writes:
Something that continues to grind my teeth about our software is that we
are horribly inconsistent with our system catalogs. Now I am fully and
100% aware that changing this will break things in user land but I want
to do it anyway. In order to do that I believe we need to come up with a
very loud, extremely verbose method of communicating to people that 8.5
*will* break things.It seems to me that the best method would be to follow the
information_schema naming conventions as information_schema is standard
compliant (right?).This isn't happening. Don't waste our time suggesting it.
I wasn't try to waste anyone's time. I thought doing things correctly
was a goal of this project. Sorry for the noise.
Sincerely,
Joshua D. Drake
regards, tom lane
--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997
Joshua D. Drake wrote:
On Wed, 2009-03-04 at 21:27 +0000, Dave Page wrote:
On Wed, Mar 4, 2009 at 9:23 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
It is not easy to say. It is correct to say. I am under no illusion that
this will not be painful. As far as "man weeks of recoding". Sorry, I
know that will be tough.It'll be a complete and utter waste of time, and make a horrible mess
of any client code that has to support multiple versions.No actually it won't. It will make it easier for every product that uses
8.5 and above. Sometimes you have to cut the cord.
I think this sounds a lot like another request for a set of system views
with nicer names. That way, there'd be no break with backwards
compatibility, and you could use the easier names if you were on the
newer versions.
//Magnus
"Joshua D. Drake" <jd@commandprompt.com> wrote:
It would lower the cost (intellectually as well as dollars) of
development and administration for every single user of the
database.
-1
Any savings couldn't possibly pay for the cost and pain of this, at
least in our shop.
I can't count how many times I accidentally type tablename versus
table_name or worse relname, etc...
I can count the times I have done so on one finger. I don't find it
that hard to keep track of what column names are used in what table.
-Kevin
Magnus Hagander <magnus@hagander.net> writes:
I think this sounds a lot like another request for a set of system views
with nicer names.
What's the state of the newsysviews project, anyway? I don't recall
hearing much about it lately.
regards, tom lane
Joshua D. Drake wrote:
Hello,
Something that continues to grind my teeth about our software is that we
are horribly inconsistent with our system catalogs. Now I am fully and
100% aware that changing this will break things in user land but I want
to do it anyway. In order to do that I believe we need to come up with a
very loud, extremely verbose method of communicating to people that 8.5
*will* break things.It seems to me that the best method would be to follow the
information_schema naming conventions as information_schema is standard
compliant (right?).
Well, honestly, this was one of the reasons why AndrewSN, David and I
pushed NewSysViews. Non-hackers really shouldn't be accessing the
system catalogs directly, and if information_schema doesn't give them
enough data, we should start adding new views to I_S.
--Josh
Tom Lane wrote:
Magnus Hagander <magnus@hagander.net> writes:
I think this sounds a lot like another request for a set of system views
with nicer names.What's the state of the newsysviews project, anyway? I don't recall
hearing much about it lately.
Final verdict was that we need to make it integrate better with
information_schema. At that point, our crew kinda ran out of energy and
it's been on hold ever since. But we've been talking about reviving it
again.
However, given the previous experience, I think we'd like some
reassurance that if NewSysviews was made conistent with
information_schema (and had good code, of course) that Hackers would be
interested in taking it. What nobody has any enthusiasm for is spending
a few dozen hours refactoring it, and then having to justify why we want
it *again*.
--Josh
Well, honestly, this was one of the reasons why AndrewSN, David and I
... and Elein ...
Show quoted text
pushed NewSysViews. Non-hackers really shouldn't be accessing the
system catalogs directly, and if information_schema doesn't give them
enough data, we should start adding new views to I_S.
Bill,
You could always take a survey ... bosses love surveys ...
Done: http://wwwmaster.postgresql.org/community/
--Josh