Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Patches > Fix \dT enum in...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 11 Topic 3575 of 4253
Post > Topic >>

Fix \dT enum in psql

by david@[EMAIL PROTECTED] (David Fetter) Apr 8, 2008 at 01:40 PM

--gE7i1rD7pdK0Ng3j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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@[EMAIL PROTECTED]
> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@[EMAIL PROTECTED]
 to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

--gE7i1rD7pdK0Ng3j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="psql_enum.patch"

Index: src/bin/psql/describe.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/describe.c,v
retrieving revision 1.166
diff -c -c -r1.166 describe.c
*** src/bin/psql/describe.c	30 Mar 2008 18:10:20 -0000	1.166
--- src/bin/psql/describe.c	8 Apr 2008 20:29:01 -0000
***************
*** 310,317 ****
--- 310,328 ----
  						  "  END AS \"%s\",\n",
  						  gettext_noop("Internal name"),
  						  gettext_noop("Size"));
+ 						  
  	appendPQExpBuffer(&buf,
+ 				"  pg_catalog.array_to_string(\n"
+ 				"  	 ARRAY(\n"
+ 				"		     SELECT e.enumlabel\n"
+ 				"          FROM pg_catalog.pg_enum e\n"
+ 				"          WHERE e.enumtypid = t.oid\n"
+ 				"          ORDER BY e.oid\n"
+ 				"      ),\n"
+ 				"      E'\\n'\n"
+ 				"  ) AS \"%s\",\n"
  				"  pg_catalog.obj_description(t.oid, 'pg_type') as \"%s\"\n",
+ 					  gettext_noop("Elements"),
  					  gettext_noop("Description"));
  
  	appendPQExpBuffer(&buf, "FROM pg_catalog.pg_type t\n"

--gE7i1rD7pdK0Ng3j
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


-- 
Sent via pgsql-patches mailing list (pgsql-patches@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches

--gE7i1rD7pdK0Ng3j--
 




 11 Posts in Topic:
Fix \dT enum in psql
david@[EMAIL PROTECTED]   2008-04-08 13:40:59 
Re: Fix \dT enum in psql
andrew@[EMAIL PROTECTED]   2008-05-01 22:53:00 
Re: Fix \dT enum in psql
david@[EMAIL PROTECTED]   2008-05-01 19:58:38 
Re: Fix \dT enum in psql
andrew@[EMAIL PROTECTED]   2008-05-01 23:07:42 
Re: Fix \dT enum in psql
andrew@[EMAIL PROTECTED]   2008-05-04 18:40:51 
Re: Fix \dT enum in psql
david@[EMAIL PROTECTED]   2008-05-04 15:45:22 
Re: Fix \dT enum in psql
tgl@[EMAIL PROTECTED] (T  2008-05-04 18:54:02 
Re: Fix \dT enum in psql
andrew@[EMAIL PROTECTED]   2008-05-04 19:43:49 
Re: Fix \dT enum in psql
tgl@[EMAIL PROTECTED] (T  2008-05-04 19:49:25 
Re: Fix \dT enum in psql
david@[EMAIL PROTECTED]   2008-05-04 16:58:30 
Re: Fix \dT enum in psql
andrew@[EMAIL PROTECTED]   2008-05-04 20:12:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 5:57:38 CST 2008.