public inbox for [email protected]  
help / color / mirror / Atom feed
From: Subramanian,Ramachandran <[email protected]>
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: AW: How to surround a selected value with double quotes?
Date: Mon, 22 Jun 2026 10:59:03 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

Hello, 

 thank you for your reply. I tried FORMAT(%I.%I,schema,tablename) and it works too. I have altered my script accordingly. 

Now to the question why CONCAT and || , I am extremely new to Postgres and Linux .I am working on PG/Linux only since Last November. 😊  I come from 30 yrs of working on mainframes ( DB2 / IMS / REXX) and I tend to simply use what works in DB2 and fix only what does not work.  The short answer is , lack of knowledge and experience. 


Thank you so much for taking the time to reply to my question 😊 

LG

Ram 





Freundliche Grüße

i. A. Ramachandran Subramanian
Zentralbereich Informationstechnologie

Alte Leipziger Lebensversicherung a.G.


Hallesche Krankenversicherung a.G.







Alte Leipziger Lebensversicherung a.G., Alte Leipziger-Platz 1, 61440 Oberursel
Vors. des Aufsichtsrats: Dr. Walter Botermann · Vorstand: Christoph Bohn (Vors.), Dr. Jürgen Bierbaum (stv. Vors.), Frank Kettnaker, Dr. Jochen Kriegmeier, Alexander Mayer, Christian Pape, Wiltrud Pekarek, Udo Wilcsek
Sitz Oberursel (Taunus) · Rechtsform VVaG · Amtsgericht Bad Homburg v. d. H. HRB 1583 · USt.-IdNr. DE 114106814





 
Hallesche Krankenversicherung a.G.,  Löffelstraße 34-38, 70597 Stuttgart
Vors. des Aufsichtsrats: Dr. Walter Botermann · Vorstand: Christoph Bohn (Vors.), Dr. Jürgen Bierbaum (stv. Vors.), Frank Kettnaker, Dr. Jochen Kriegmeier, Alexander Mayer, Christian Pape,
Wiltrud Pekarek, Udo Wilcsek
Sitz Stuttgart · Rechtsform VVaG · Amtsgericht Stuttgart HRB 2686 · USt.-IdNr. DE 147802285
Beiträge zu privaten Kranken- und Pflegekrankenversicherungen unterliegen nicht der Versicherungsteuer (§ 4 Nr. 5 VersStG) · Versicherungsleistungen sowie Umsätze aus Versicherungsvertreter-/Maklertätigkeiten sind umsatzsteuerfrei
 



 
Die Pflichtangaben der ALH Gruppe gemäß § 35a GmbHG bzw. § 80 AktG finden Sie hier: https://www.alte-leipziger.de/impressum 





______________________

ALH Gruppe
Alte Leipziger-Platz 1, 61440 Oberursel
Tel.: +49 (6171) 66-4882
Fax: +49 (6171) 66-800-4882
E-Mail: [email protected]
www.alte-leipziger.de
www.hallesche.de



-----Ursprüngliche Nachricht-----
Von: [email protected] <[email protected]> 
Gesendet: Montag, 22. Juni 2026 12:09
An: Subramanian,Ramachandran IT-md-db <[email protected]>
Cc: [email protected]
Betreff: Re: How to surround a selected value with double quotes?

On Mon, Jun 22, 2026 at 07:46:09AM +0000, Subramanian,Ramachandran wrote:
> #Build the SQL needed to get the list of tables that are approaching the SAFE_XID_GAP
> LIST_OLDEST_UNFROZEN_XID_SQL=" SELECT   \
>        cast (age(PGCL.relfrozenxid) as integer) as GAP, \
>        INTB.table_catalog as DB_NAME,   \
>        "$PORT_NO" , \
>        CONCAT('"',INTB.table_schema,'"') || '.' ||  \
>        CONCAT('"',PGCL.relname,'"') as TABLE_NAME,      \
>        pg_table_size(PGCL.oid) as TABLE_SIZE \

*NEVER* concatenate identifiers. It will lead to bugs. Instead use
format() function (I find it MUCH simpler than quote_ident):

In your case, instead of the concat calls (why concat, if you can do ||, anyway?

select
    format('%I.%I', INTB.table_schema, PGCL.relname) FROM …

depesz


view thread (6+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: AW: How to surround a selected value with double quotes?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox