public inbox for [email protected]  
help / color / mirror / Atom feed
psql formatting question
4+ messages / 4 participants
[nested] [flat]

* psql formatting question
@ 2025-04-02 04:55  Edwin UY <[email protected]>
  0 siblings, 3 replies; 4+ messages in thread

From: Edwin UY @ 2025-04-02 04:55 UTC (permalink / raw)
  To: Pgsql-admin <[email protected]>

Hi,

Apologies to start with as this is run against a RDS database.
TBH, I wish I have non-RDS database to learn PostgreSQL more. I do am
looking for a remote job :-)

Anyway, on to the question.
I am pretty sure the answer will be a NO but maybe it isn't.
Are there any psql settings that I can set to format the output for below
so that the output of settings is wrapped sort of?

=> select name, setting from pg_settings where name like '%extensions%' ;
               name               |



         setting



----------------------------------+-------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------
 rds.allowed_delegated_extensions |
 rds.allowed_extensions           | *
 rds.extensions                   | address_standardizer,
address_standardizer_data_us, amcheck, autoinc, aws_commons, aws_lambda,
aws_s3, bloom, bool
_plperl, btree_gin, btree_gist, citext, cube, dblink, dict_int, dict_xsyn,
earthdistance, flow_control, fuzzystrmatch, h3, h3_postgis, hll, hstore, hs
tore_plperl, hypopg, insert_username, intagg, intarray, ip4r, isn,
jsonb_plperl, lo, log_fdw, ltree, moddatetime, mysql_fdw, old_snapshot,
oracle_fdw,
 orafce, pageinspect, pg_bigm, pg_buffercache, pg_cron, pg_freespacemap,
pg_hint_plan, pg_partman, pg_prewarm, pg_proctab, pg_repack, pg_similarity,
p
g_stat_statements, pg_tle, pg_transport, pg_trgm, pg_visibility, pgactive,
pgaudit, pgcrypto, pglogical, pgrouting, pgrowlocks, pgstattuple, pgtap, pl
coffee, plls, plperl, plpgsql, plprofiler, plrust, pltcl, plv8, postgis,
postgis_raster, postgis_tiger_geocoder, postgis_topology, postgres_fdw,
prefi
x, rdkit, rds_tools, refint, seg, sslinfo, tablefunc, tcn, tds_fdw,
test_parser, tsm_system_rows, tsm_system_time, unaccent, uuid-ossp, vector
(3 rows)

Hoping to get the output like below maybe or something close to it.

               name               |                       setting
 rds.allowed_delegated_extensions |
 rds.allowed_extensions           | *
 rds.extensions                   | address_standardizer,
address_standardizer_data_us, amcheck, autoinc, aws_commons, aws_lambda,
aws_s3, bloom, bool_plperl,
                                    btree_gin, btree_gist, citext, cube,
dblink, dict_int, dict_xsyn, earthdistance, flow_control, fuzzystrmatch,
h3, h3_postgis,
                                    hll, hstore, hstore_plperl, hypopg,
insert_username, intagg, intarray, ip4r, isn, jsonb_plperl, lo, log_fdw,
ltree, moddatetime,
--------
--------


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: psql formatting question
@ 2025-04-02 05:01  David G. Johnston <[email protected]>
  parent: Edwin UY <[email protected]>
  2 siblings, 0 replies; 4+ messages in thread

From: David G. Johnston @ 2025-04-02 05:01 UTC (permalink / raw)
  To: Edwin UY <[email protected]>; +Cc: Pgsql-admin <[email protected]>

On Tuesday, April 1, 2025, Edwin UY <[email protected]> wrote:

>
> Are there any psql settings that I can set to format the output for below
> so that the output of settings is wrapped sort of?
>

Try replacing commas with newlines and see if that result works better for
you.


>
>  rds.allowed_extensions           | *
>  rds.extensions                   | address_standardizer,
> address_standardizer_data_us, amcheck, autoinc, aws_commons, aws_lambda,
> aws_s3, bloom, bool
> _plperl, btree_gin, btree_gist, citext, cube, dblink, dict_int, dict_xsyn,
> earthdistance, flow_control, fuzzystrmatch, h3,
>
> Hoping to get the output like below maybe or something close to it.
>
>                name               |                       setting
>  rds.allowed_delegated_extensions |
>  rds.allowed_extensions           | *
>  rds.extensions                   | address_standardizer,
> address_standardizer_data_us, amcheck, autoinc, aws_commons, aws_lambda,
> aws_s3, bloom, bool_plperl,
>                                     btree_gin, btree_gist, citext, cube,
> dblink, dict_int, dict_xsyn, earthdistance, flow_control,
>

David J.


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: psql formatting question
@ 2025-04-02 11:09  hubert depesz lubaczewski <[email protected]>
  parent: Edwin UY <[email protected]>
  2 siblings, 0 replies; 4+ messages in thread

From: hubert depesz lubaczewski @ 2025-04-02 11:09 UTC (permalink / raw)
  To: Edwin UY <[email protected]>; +Cc: Pgsql-admin <[email protected]>

On Wed, Apr 02, 2025 at 05:55:26PM +1300, Edwin UY wrote:
> Hi,
> 
> Apologies to start with as this is run against a RDS database.
> TBH, I wish I have non-RDS database to learn PostgreSQL more. I do am
> looking for a remote job :-)
> 
> Anyway, on to the question.
> I am pretty sure the answer will be a NO but maybe it isn't.
> Are there any psql settings that I can set to format the output for below
> so that the output of settings is wrapped sort of?

\pset format wrapped

Best regards,

depesz






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: psql formatting question
@ 2025-04-02 13:12  Ron Johnson <[email protected]>
  parent: Edwin UY <[email protected]>
  2 siblings, 0 replies; 4+ messages in thread

From: Ron Johnson @ 2025-04-02 13:12 UTC (permalink / raw)
  To: Pgsql-admin <[email protected]>

On Wed, Apr 2, 2025 at 12:56 AM Edwin UY <[email protected]> wrote:

>
> Hi,
>
> Apologies to start with as this is run against a RDS database.
> TBH, I wish I have non-RDS database to learn PostgreSQL more. I do am
> looking for a remote job :-)
>
> Anyway, on to the question.
> I am pretty sure the answer will be a NO but maybe it isn't.
> Are there any psql settings that I can set to format the output for below
> so that the output of settings is wrapped sort of?
>
> => select name, setting from pg_settings where name like '%extensions%' ;
>                name               |
>
>
>
>            setting
>
>
>
>
> ----------------------------------+-------------------------------------------------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
> -----------------------------------------------------------------------------------------------------------------------------------------------
>  rds.allowed_delegated_extensions |
>  rds.allowed_extensions           | *
>  rds.extensions                   | address_standardizer,
> address_standardizer_data_us, amcheck, autoinc, aws_commons, aws_lambda,
> aws_s3, bloom, bool
> _plperl, btree_gin, btree_gist, citext, cube, dblink, dict_int, dict_xsyn,
> earthdistance, flow_control, fuzzystrmatch, h3, h3_postgis, hll, hstore, hs
> tore_plperl, hypopg, insert_username, intagg, intarray, ip4r, isn,
> jsonb_plperl, lo, log_fdw, ltree, moddatetime, mysql_fdw, old_snapshot,
> oracle_fdw,
>  orafce, pageinspect, pg_bigm, pg_buffercache, pg_cron, pg_freespacemap,
> pg_hint_plan, pg_partman, pg_prewarm, pg_proctab, pg_repack, pg_similarity,
> p
> g_stat_statements, pg_tle, pg_transport, pg_trgm, pg_visibility, pgactive,
> pgaudit, pgcrypto, pglogical, pgrouting, pgrowlocks, pgstattuple, pgtap, pl
> coffee, plls, plperl, plpgsql, plprofiler, plrust, pltcl, plv8, postgis,
> postgis_raster, postgis_tiger_geocoder, postgis_topology, postgres_fdw,
> prefi
> x, rdkit, rds_tools, refint, seg, sslinfo, tablefunc, tcn, tds_fdw,
> test_parser, tsm_system_rows, tsm_system_time, unaccent, uuid-ossp, vector
> (3 rows)
>
> Hoping to get the output like below maybe or something close to it.
>
>                name               |                       setting
>  rds.allowed_delegated_extensions |
>  rds.allowed_extensions           | *
>  rds.extensions                   | address_standardizer,
> address_standardizer_data_us, amcheck, autoinc, aws_commons, aws_lambda,
> aws_s3, bloom, bool_plperl,
>                                     btree_gin, btree_gist, citext, cube,
> dblink, dict_int, dict_xsyn, earthdistance, flow_control, fuzzystrmatch,
> h3, h3_postgis,
>                                     hll, hstore, hstore_plperl, hypopg,
> insert_username, intagg, intarray, ip4r, isn, jsonb_plperl, lo, log_fdw,
> ltree, moddatetime,
> --------
> --------
>

Another formatting possibility:
\pset expanded

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2025-04-02 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-02 04:55 psql formatting question Edwin UY <[email protected]>
2025-04-02 05:01 ` David G. Johnston <[email protected]>
2025-04-02 11:09 ` hubert depesz lubaczewski <[email protected]>
2025-04-02 13:12 ` Ron Johnson <[email protected]>

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