[postgis-users] viewing a large postgis table with several columns

Brent Wood pcreso at pcreso.com
Tue Jan 24 13:08:16 PST 2006

--- First Last <y2kdis at atenista.net> wrote:

> i have a big postgis table with several columns and whenever i try to 
> display the content of that table using a select statement in 
> postgresql(psql) i get several blank pages, followed by several pages 
> with only dashes as content, then the geometry. it will take several 
> pressings of the space bar before i get to the geometry part even if i 
> limit the number of columns and rows to display in the select statement. 

The normal format used by Postgres to display such output is column headings,
followed by the dashed line, followed by the data. The column widths ae set to
the width of the data, so a line or polygon geometry with a few hundred or
thousand vertices results in a very wide column, hence the spaces to pad the
name to the full column width, followed by a similar length line of dashes. See
below, the spaces each side of "the_geom" followed by the line of dashes, and
extrapolate to a column several thousand characters wide. 

 beacon_loc | fid | gid | id |                      the_geom
 land       |  16 |   1 |  1 |
 land       |  17 |   2 |  2 |

So it may effectively be garbage, but it is just what you asked Postgres for

Generally I find it doesn't make much sense to get a geometry on screen from an
SQL select (but there are occasions when it is useful).


    Brent Wood

More information about the postgis-users mailing list