Re: Add custom properties to a column's definition (pg_attribute)

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Brooke Beacham <brooke(dot)beacham(at)technekes(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Add custom properties to a column's definition (pg_attribute)
Date: 2014-01-09 20:38:58
Message-ID: 52CF08E2.1010104@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 09/01/2014 20:16, Raymond O'Donnell wrote:
> On 09/01/2014 20:08, Brooke Beacham wrote:
>> Can anyone suggest a way to associate a set of custom properties
>> (key/value pairs) with a column's definition (ie pg_attribute)?
>>
>> (without having to replicate/maintain a table of columns separately from
>> the system catalog)
>>
>> For example:
>> * I have a table with 50 columns
>> * I'd like to 'flag' 30 of those columns as group - 'A' and the other 20
>> as group - 'B'
>>
>>
>> So I'd like a way to add custom metdata (k/v pairs) to a column's
>> definition (not the actual rows of data).
>
> You could use the comment facility -
>
> COMMENT ON COLUMN tablename.columnname IS IS '....';

Whoops, sorry, an extra "is" got in there.... should have been:

COMMENT ON COLUMN tablename.columnname IS '....';

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-01-09 20:46:55 Re: pg_restore - selective restore use cases. HINT use DROP CASCADE
Previous Message Raymond O'Donnell 2014-01-09 20:16:35 Re: Add custom properties to a column's definition (pg_attribute)