Thread: About table column names.

About table column names.

From
David BOURIAUD
Date:
Hi the list !
As far as I know, column names for a table can't contain any space,
tabs, and other sort of "exotic" characters. Is there a way to add a
description of a table column anywhere in postgres tables, or does it
have to be handled manually by creating a custum table handling this
kind of datas ? Thanks by advance for any suggestion.
-- 
David BOURIAUD
----------------------------------------------------------
In a world without walls or fences, what use do we have 
for windows or gates ?
----------------------------------------------------------
ICQ#102562021


Re: About table column names.

From
Mark Stosberg
Date:
David BOURIAUD wrote:
> 
> Hi the list !
> As far as I know, column names for a table can't contain any space,
> tabs, and other sort of "exotic" characters. 

In fact, I know you can have at least spaces in your column names, like this:

mark=> create table t ("column one" text);
CREATE

Just put quotes around them. 

> Is there a way to add a
> description of a table column anywhere in postgres tables, or does it
> have to be handled manually by creating a custum table handling this
> kind of datas ? Thanks by advance for any suggestion.

I'm interested in this, too. It seems more useful than having them in a
SQL file...which can sometimes get out of synch with the database. :)
 -mark

http://mark.stosberg.com/


Re: About table column names.

From
Peter Eisentraut
Date:
David BOURIAUD writes:

> Is there a way to add a description of a table column anywhere in
> postgres tables,

COMMENT ON COLUMN table.col IS 'whatever';

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter