Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2eab-0000si-Ux for pgsql-sql@arkaria.postgresql.org; Tue, 17 May 2016 12:59:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b2eab-0005Rm-HI for pgsql-sql@arkaria.postgresql.org; Tue, 17 May 2016 12:59:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b2eZe-0004OW-Uc for pgsql-sql@postgresql.org; Tue, 17 May 2016 12:58:10 +0000 Received: from mbob.nabble.com ([162.253.133.15]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2eZa-0007GY-R9 for pgsql-sql@postgresql.org; Tue, 17 May 2016 12:58:09 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mbob.nabble.com (Postfix) with ESMTP id 2488527B9A5C for ; Tue, 17 May 2016 05:41:37 -0700 (PDT) Date: Tue, 17 May 2016 05:58:04 -0700 (MST) From: gmb To: pgsql-sql@postgresql.org Message-ID: <1463489884675-5903959.post@n5.nabble.com> Subject: Handle untype-cast string as VARCHAR instead of TEXT MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Hi all I'm dealing with a system where string values is queried but not necessary type-cast. E.g. SELECT case when some_value=1 then 'some string' else 'another string' end FROM some_table; This will return a column cast as type TEXT; Is there some configuration option (or hack?) available which will return above as VARCHAR ? I'm using 3rd party software where a VARCHAR value displays much better than TEXT. I know best practice will be to type-cast , but I'm hoping for a quick-fix here :) Regards -- View this message in context: http://postgresql.nabble.com/Handle-untype-cast-string-as-VARCHAR-instead-of-TEXT-tp5903959.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql