| From: | "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com> |
|---|---|
| To: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
| Cc: | "Kelly Burkhart" <kelly(dot)burkhart(at)gmail(dot)com>, "Shoaib Mir" <shoaibmir(at)gmail(dot)com>, "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, af300wsm(at)gmail(dot)com, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Alter definition of a column |
| Date: | 2007-02-06 07:20:24 |
| Message-ID: | 65937bea0702052320p2c541cd0oe00c27c336cc73ea@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 1/22/07, Jim C. Nasby <jim(at)nasby(dot)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[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | yahoo }.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Martijn van Oosterhout | 2007-02-06 08:11:55 | Re: Fwd: convert(USING utf8_to_iso_8859_15) on Windows |
| Previous Message | Gurjeet Singh | 2007-02-06 06:43:41 | Re: Locking question? |