Link to home
Create AccountLog in
Avatar of mikeysmailbox1
mikeysmailbox1

asked on

Postgresql SQL output set column width

Hi

I have some SQL that when it outputs to a file I need to have it set the column to a shorter width.


select app, note, message from abc


output is currently

app                         note                                     message
-----------------------    -----------------------------         ------------------------------------
aaksssjjdjddjdjd    dsssss sssssd ddddd        my message is this long



But needs to be

app                note               message
--------             ------------         ---------------
aakss             dsssss s         my messa


Not sure there is a way to limit the column width on output from psql


Thanks

Mike
ASKER CERTIFIED SOLUTION
Avatar of earth man2
earth man2
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Anything we can help you with ?
Avatar of mikeysmailbox1
mikeysmailbox1

ASKER

Worked great