> 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".
$ 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