Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lryZO-0003cK-45 for pgsql-general@arkaria.postgresql.org; Sat, 12 Jun 2021 08:00:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lryZM-0005L1-UH for pgsql-general@arkaria.postgresql.org; Sat, 12 Jun 2021 08:00:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lryZM-0005Jc-IS for pgsql-general@lists.postgresql.org; Sat, 12 Jun 2021 08:00:40 +0000 Received: from stz-bg.com ([46.40.123.212] helo=mail.stzbg.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lryZJ-0007jf-9b for pgsql-general@lists.postgresql.org; Sat, 12 Jun 2021 08:00:40 +0000 Received: from www.stz-bg.com (stz-bg.com [IPv6:2a02:6800:0:99::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) (Authenticated sender: condor@stz-bg.com) by mail.stzbg.com (Postfix) with ESMTPSA id 9D1EF2E0E8A for ; Sat, 12 Jun 2021 11:00:35 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stz-bg.com; s=mail; t=1623484835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7KOrefzljfjfAcrN/Okl0vyxTBKoC8kZlUhGO5q4mRs=; b=NS/xOxQfpIH2D9q3qPiB8nmlPB8UQvfVyXMBKPaY+t3hiyH3JefP/xyfRWTrTBU4zp/98o mwRy/duipMJbxV1IbLTi7Lq9x+Mnaweg0eBz8pDYruX3M3829KEXCB+A2IBKtEADHsWNOR UgRvYxHbwn+Yoc/j4dVzYHstPyK4qhI= MIME-Version: 1.0 Date: Sat, 12 Jun 2021 11:00:34 +0300 From: Condor To: pgsql-general Subject: Is there a way to replace select * fields in result ? User-Agent: Roundcube Webmail/1.4.11 Message-ID: <37a2bc0c7c8e90ea7620297e8d23515a@stz-bg.com> X-Sender: condor@stz-bg.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, Is there a way to replace select * fileds in result ? I have select qw.* from table but I want field for example mm to be replaced with custom value like: select qw.*, case whem length(qw.mm) > 0 THEN COALESCE(SUBSTRING(qw.mm, 1, 1), '') ELSE qw.mm END AS qw.mm Is there some way to do that ? Regards, HS