Lists: | pgsql-hackers |
---|
From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-22 23:36:38 |
Message-ID: | 1D935988-0153-4224-89B8-AC4384D82270@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Patch attached.
Best,
David
Attachment | Content-Type | Size |
---|---|---|
enum_value.patch | application/octet-stream | 2.9 KB |
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-22 23:48:53 |
Message-ID: | 4CEB0165.9070808@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 11/22/2010 06:36 PM, David E. Wheeler wrote:
> Patch attached.
Thanks, I'll look at this shortly. I think it needs a little bit more,
which I'll do. In particular, we should now avoid using the word 'value'
to refer to the internal representation of an enum - that will just be
confusing.
cheers
andrew
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-22 23:57:15 |
Message-ID: | 20576.1290470235@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
"David E. Wheeler" <david(at)kineticode(dot)com> writes:
> Patch attached.
Most of those changes seem like they make it less readable, not more so.
In particular I don't find it an improvement to replace "textual label"
with "textual value". I think of "value" as meaning some abstract
notion of a particular enum member, which is not identical to the
concrete text string that represents it. If you consider them the same
thing then renaming an enum value would be a meaningless concept.
Maybe instead of "textual label", we should say "name"? But that
doesn't seem like quite le mot juste either. "label" is actually a
pretty good word for the text representation of an enum value.
regards, tom lane
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "David E(dot) Wheeler" <david(at)kineticode(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-23 00:38:40 |
Message-ID: | 4CEB0D10.7040302@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 11/22/2010 06:57 PM, Tom Lane wrote:
> "David E. Wheeler"<david(at)kineticode(dot)com> writes:
>> Patch attached.
> Most of those changes seem like they make it less readable, not more so.
> In particular I don't find it an improvement to replace "textual label"
> with "textual value". I think of "value" as meaning some abstract
> notion of a particular enum member, which is not identical to the
> concrete text string that represents it. If you consider them the same
> thing then renaming an enum value would be a meaningless concept.
>
> Maybe instead of "textual label", we should say "name"? But that
> doesn't seem like quite le mot juste either. "label" is actually a
> pretty good word for the text representation of an enum value.
Oh my boots and buttons. I think we're splitting some very fine hairs
here. A few weeks back you were telling us that label wasn't a very good
word and shouldn't be sanctified in the SQL.
I don't mind that much leaving it as it is, but we do seem to be
straining at gnats a bit.
cheers
andrew
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | "David E(dot) Wheeler" <david(at)kineticode(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-23 00:46:34 |
Message-ID: | 21845.1290473194@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 11/22/2010 06:57 PM, Tom Lane wrote:
>> Maybe instead of "textual label", we should say "name"? But that
>> doesn't seem like quite le mot juste either. "label" is actually a
>> pretty good word for the text representation of an enum value.
> Oh my boots and buttons. I think we're splitting some very fine hairs
> here. A few weeks back you were telling us that label wasn't a very good
> word and shouldn't be sanctified in the SQL.
It isn't a very good word for the abstract value, IMO, but the text
representation is a different concept.
regards, tom lane
From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-23 00:48:17 |
Message-ID: | 7B9B6993-2875-4779-820E-406CAF44DFCF@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Nov 22, 2010, at 4:46 PM, Tom Lane wrote:
>> Oh my boots and buttons. I think we're splitting some very fine hairs
>> here. A few weeks back you were telling us that label wasn't a very good
>> word and shouldn't be sanctified in the SQL.
>
> It isn't a very good word for the abstract value, IMO, but the text
> representation is a different concept.
But that's the thing we've been talking about all along! It's now
ALTER ENUM ADD VALUE 'FOO';
But that sets the text value, the label, not the abstract value.
Boots and buttons indeed.
David
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-23 00:48:31 |
Message-ID: | AANLkTimiGa22HJFCj8_aZcsZfPfAgmE9yxn4VfOTj3sx@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, Nov 22, 2010 at 7:46 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> On 11/22/2010 06:57 PM, Tom Lane wrote:
>>> Maybe instead of "textual label", we should say "name"? But that
>>> doesn't seem like quite le mot juste either. "label" is actually a
>>> pretty good word for the text representation of an enum value.
>
>> Oh my boots and buttons. I think we're splitting some very fine hairs
>> here. A few weeks back you were telling us that label wasn't a very good
>> word and shouldn't be sanctified in the SQL.
>
> It isn't a very good word for the abstract value, IMO, but the text
> representation is a different concept.
+1 for what Andrew said.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-23 01:38:48 |
Message-ID: | 4CEB1B28.20807@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
All,
Whatever we pick, someone will be confused by it and about equal numbers
regardless. Let's just stick with the current patch.
Or we could call it "extraint conclusions". ;-)
--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com
From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-23 02:03:13 |
Message-ID: | 4CEB20E1.7030606@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 11/22/10 5:38 PM, Josh Berkus wrote:
> All,
>
> Whatever we pick, someone will be confused by it and about equal numbers
> regardless. Let's just stick with the current patch.
... "original patch". Sorry. Let's not fiddle with the names.
>
> Or we could call it "extraint conclusions". ;-)
>
>
--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com
From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-23 19:01:33 |
Message-ID: | BDDBDEA9-DAE3-4429-8013-4D1E741F164B@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Nov 22, 2010, at 6:03 PM, Josh Berkus wrote:
> ... "original patch". Sorry. Let's not fiddle with the names.
To be clear, as things stand now, the new command is:
ALTER TYPE name ADD VALUE new_enum_value [ { BEFORE | AFTER } existing_enum_value ]
So while the term in the SQL statement is "VALUE," it's called a "label" in the documentation. I think that's confusing. Does anyone else?
Best
David
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-23 19:48:07 |
Message-ID: | AANLkTi=+s6bq1n2tFE5=0VKZrbaT2HCm6gcWoDP85bVG@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, Nov 23, 2010 at 2:01 PM, David E. Wheeler <david(at)kineticode(dot)com> wrote:
> On Nov 22, 2010, at 6:03 PM, Josh Berkus wrote:
>
>> ... "original patch". Sorry. Let's not fiddle with the names.
>
> To be clear, as things stand now, the new command is:
>
> ALTER TYPE name ADD VALUE new_enum_value [ { BEFORE | AFTER } existing_enum_value ]
>
> So while the term in the SQL statement is "VALUE," it's called a "label" in the documentation. I think that's confusing. Does anyone else?
Yes. As between the two options, I favor changing the command. And
let's also paint it pink.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-23 19:49:57 |
Message-ID: | 0F924ED1-4114-4156-A2C2-2A7F8DF0AD99@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Nov 23, 2010, at 11:48 AM, Robert Haas wrote:
>> So while the term in the SQL statement is "VALUE," it's called a "label" in the documentation. I think that's confusing. Does anyone else?
>
> Yes. As between the two options, I favor changing the command. And
> let's also paint it pink.
Would that go with Andrew's boots and buttons?
Best,
David
From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-23 19:52:06 |
Message-ID: | 1290541927.10258.14849.camel@jd-desktop |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, 2010-11-23 at 14:48 -0500, Robert Haas wrote:
> On Tue, Nov 23, 2010 at 2:01 PM, David E. Wheeler <david(at)kineticode(dot)com> wrote:
> > On Nov 22, 2010, at 6:03 PM, Josh Berkus wrote:
> >
> >> ... "original patch". Sorry. Let's not fiddle with the names.
> >
> > To be clear, as things stand now, the new command is:
> >
> > ALTER TYPE name ADD VALUE new_enum_value [ { BEFORE | AFTER } existing_enum_value ]
> >
> > So while the term in the SQL statement is "VALUE," it's called a "label" in the documentation. I think that's confusing. Does anyone else?
>
> Yes. As between the two options, I favor changing the command. And
> let's also paint it pink.
We discussed this at West remember? When asked to paint a wall black we
ask, "which shade?".
JD
--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: s/LABEL/VALUE/ for ENUMs |
Date: | 2010-11-28 01:09:11 |
Message-ID: | 201011280109.oAS19BZ10011@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Josh Berkus wrote:
> All,
>
> Whatever we pick, someone will be confused by it and about equal numbers
> regardless. Let's just stick with the current patch.
>
> Or we could call it "extraint conclusions". ;-)
I vote for "extraint confusions".
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +