Re: Alter definition of a column - Mailing list pgsql-general

From Gurjeet Singh
Subject Re: Alter definition of a column
Date
Msg-id 65937bea0702052320p2c541cd0oe00c27c336cc73ea@mail.gmail.com
Whole thread Raw
In response to Re: Alter definition of a column  ("Jim C. Nasby" <jim@nasby.net>)
List pgsql-general
On 1/22/07, Jim C. Nasby <jim@nasby.net> wrote:
> kelly=# update pg_attribute set atttypid=25, atttypmod=-1
> kelly-# where attname = 'c1' and attrelid =
> kelly-#     (select oid from pg_class where relname = 'foo');
> UPDATE 1 

<snip>

Also, you could replace that pg_class sub-select with "'foo'::regclass".
 
Interesting....!!!

$ edb-psql.exe edb -c "select  'pg_class'::regclass;"
 regclass
----------
 pg_class
(1 row)

$ edb-psql.exe edb -c "select  'pg_class'::regclass::int;"
 int4
------
 1259
(1 row)

Really interesting....!!


--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com

pgsql-general by date:

Previous
From: "Gurjeet Singh"
Date:
Subject: Re: Locking question?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Fwd: convert(USING utf8_to_iso_8859_15) on Windows