the column type info can be found in information_schema.column view.
jov
BrianI am assuming it would be a function of psql to right justify text, but I can't find any way to do this.I am running postgresql 9.2.Is there a way to right justify just one text column?Thanks
2013/5/18 Brian Sherwood <bdsher@gmail.com>: > I am running postgresql 9.2. > > I am assuming it would be a function of psql to right justify text, but I > can't find any way to do this. > > Is there a way to right justify just one text column? If you mean have the psql client right-justify a particular text column, no I don't think there's a way to do that. Assuming the column contains single-width characters with no line breaks, you could do something with LPAD along these lines: SELECT LPAD(txtcol, (SELECT MAX(LENGTH(txtcol)) FROM tbl)) FROM tbl HTH Ian Barwick
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера