Обсуждение: Fix \dT enum in psql
Folks, In psql, \dT doesn't show the elements for enums. Please find patch vs. CVS TIP attached which fixes this per the following TODO item: http://archives.postgresql.org/pgsql-hackers/2008-01/msg00826.php Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
Вложения
David Fetter wrote: > Folks, > > In psql, \dT doesn't show the elements for enums. Please find patch > vs. CVS TIP attached which fixes this per the following TODO item: > > http://archives.postgresql.org/pgsql-hackers/2008-01/msg00826.php > > I don't have a particular problem with this patch - indeed the query in it looks eerily familiar :-) However, I'm wondering if we should wait until a possible rework of the mechanics of enums as recently discussed? Or we could put it in and that way it would have to be redone when enums are rejigged. cheers andrew
On Thu, May 01, 2008 at 10:53:00PM -0400, Andrew Dunstan wrote: > David Fetter wrote: >> Folks, >> >> In psql, \dT doesn't show the elements for enums. Please find >> patch vs. CVS TIP attached which fixes this per the following TODO >> item: >> >> http://archives.postgresql.org/pgsql-hackers/2008-01/msg00826.php > > I don't have a particular problem with this patch - indeed the query > in it looks eerily familiar :-) I can't imagine why ;) > However, I'm wondering if we should wait until a possible rework of > the mechanics of enums as recently discussed? Or we could put it in > and that way it would have to be redone when enums are rejigged. I'm thinking getting it in there soon will keep the bitrot to a minimum. One thing it doesn't include is regression tests. Shall I add a few? Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
David Fetter wrote: > On Thu, May 01, 2008 at 10:53:00PM -0400, Andrew Dunstan wrote: > >> David Fetter wrote: >> >>> Folks, >>> >>> In psql, \dT doesn't show the elements for enums. Please find >>> patch vs. CVS TIP attached which fixes this per the following TODO >>> item: >>> >>> http://archives.postgresql.org/pgsql-hackers/2008-01/msg00826.php >>> >> I don't have a particular problem with this patch - indeed the query >> in it looks eerily familiar :-) >> > > I can't imagine why ;) > > >> However, I'm wondering if we should wait until a possible rework of >> the mechanics of enums as recently discussed? Or we could put it in >> and that way it would have to be redone when enums are rejigged. >> > > I'm thinking getting it in there soon will keep the bitrot to a > minimum. One thing it doesn't include is regression tests. Shall I > add a few? > > > not sure that we do regression tests for psql features ... cheers andrew
David Fetter wrote: > Folks, > > In psql, \dT doesn't show the elements for enums. Please find patch > vs. CVS TIP attached which fixes this per the following TODO item: > > http://archives.postgresql.org/pgsql-hackers/2008-01/msg00826.php > > > I notice that this patch adds an "Elements" column to the output of \dT, which will only be used by enum types. That seems rather ... cluttered. cheers andrew
On Sun, May 04, 2008 at 06:40:51PM -0400, Andrew Dunstan wrote: > > > David Fetter wrote: >> Folks, >> >> In psql, \dT doesn't show the elements for enums. Please find >> patch vs. CVS TIP attached which fixes this per the following TODO >> item: >> >> http://archives.postgresql.org/pgsql-hackers/2008-01/msg00826.php > > I notice that this patch adds an "Elements" column to the output of > \dT, which will only be used by enum types. That seems rather ... > cluttered. Is the name too long, or did you want it rolled into one of the other columns, or...? Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
Andrew Dunstan <andrew@dunslane.net> writes: > I notice that this patch adds an "Elements" column to the output of \dT, > which will only be used by enum types. That seems rather ... cluttered. But it'll only be in \dT+ anyway, no? regards, tom lane
Tom Lane wrote: > Andrew Dunstan <andrew@dunslane.net> writes: > >> I notice that this patch adds an "Elements" column to the output of \dT, >> which will only be used by enum types. That seems rather ... cluttered. >> > > But it'll only be in \dT+ anyway, no? > > > Not in this patch. cheers andrew
Andrew Dunstan <andrew@dunslane.net> writes: > Tom Lane wrote: >> But it'll only be in \dT+ anyway, no? > Not in this patch. Hmmm ... given that a long list of enum members would bloat the output quite a lot, I think I'd vote for putting it in \dT+. regards, tom lane
On Sun, May 04, 2008 at 07:49:25PM -0400, Tom Lane wrote: > Andrew Dunstan <andrew@dunslane.net> writes: > > Tom Lane wrote: > >> But it'll only be in \dT+ anyway, no? > > > Not in this patch. > > Hmmm ... given that a long list of enum members would bloat the > output quite a lot, I think I'd vote for putting it in \dT+. Here's one where it's only in \dT+ Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
Вложения
David Fetter wrote: > On Sun, May 04, 2008 at 07:49:25PM -0400, Tom Lane wrote: > >> Andrew Dunstan <andrew@dunslane.net> writes: >> >>> Tom Lane wrote: >>> >>>> But it'll only be in \dT+ anyway, no? >>>> >>> Not in this patch. >>> >> Hmmm ... given that a long list of enum members would bloat the >> output quite a lot, I think I'd vote for putting it in \dT+. >> > > Here's one where it's only in \dT+ > > Yeah. Committed. cheers andrew