pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to change the ownership of the table?
4+ messages / 4 participants
[nested] [flat]

* How to change the ownership of the table?
@ 2001-01-24 09:12  Ramesh H R <ramesh@easi.soft.net>
  0 siblings, 2 replies; 4+ messages in thread

From: Ramesh H R @ 2001-01-24 09:12 UTC (permalink / raw)
  To: pgsql-sql

Hai

Please, any one guide me how to change the ownership of the table?

Regards,

--
Ramesh HR
Trainee Engineer
EASi Technologies
213, 3rd Main, 4th Cross
Chamrajpet, Bangalore - 560 018
India
Ph.: 660 1086 / 660 2365 / 667 2984 Extn.: 155
Facsimile: 667 5274
www.easi.soft.net






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: How to change the ownership of the table?
@ 2001-01-24 15:34  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Ramesh H R <ramesh@easi.soft.net>
  1 sibling, 1 reply; 4+ messages in thread

From: Tom Lane @ 2001-01-24 15:34 UTC (permalink / raw)
  To: Ramesh H R <ramesh@easi.soft.net>; +Cc: pgsql-sql

Ramesh H R <ramesh@easi.soft.net> writes:
> Please, any one guide me how to change the ownership of the table?

There's an ALTER TABLE command for this in current sources, but I think
it's new in 7.1.  In older releases, you have to reach in by hand and
change the 'relowner' field of the table's pg_class row to match the
'usesysid' field of the pg_shadow entry for the desired new owner.

Working out the exact UPDATE command to use is left as an exercise
for the student ;-)

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: How to change the ownership of the table?
@ 2001-01-24 18:12  Jie Liang <jliang@ipinc.com>
  parent: Ramesh H R <ramesh@easi.soft.net>
  1 sibling, 0 replies; 4+ messages in thread

From: Jie Liang @ 2001-01-24 18:12 UTC (permalink / raw)
  To: Ramesh H R <ramesh@easi.soft.net>; +Cc: pgsql-sql


Hi, there,

I believe that you can use iat least:
pg_dump -t table -f out dbname
then vi out
change the owner (first line -- connnect ...)
then drop the old table and reload new table by
psql dbname < out

If your table have no index or any constraint, 
you can use SELECT * into newtable
then if you have the previlage.

Jie LIANG

Internet Products Inc.

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang@ipinc.com
www.ipinc.com

On Wed, 24 Jan 2001, Ramesh H R wrote:

> Hai
> 
> Please, any one guide me how to change the ownership of the table?
> 
> Regards,
> 
> --
> Ramesh HR
> Trainee Engineer
> EASi Technologies
> 213, 3rd Main, 4th Cross
> Chamrajpet, Bangalore - 560 018
> India
> Ph.: 660 1086 / 660 2365 / 667 2984 Extn.: 155
> Facsimile: 667 5274
> www.easi.soft.net
> 
> 
> 




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: How to change the ownership of the table?
@ 2001-01-25 20:59  Najm Hashmi <najm@mondo-live.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Najm Hashmi @ 2001-01-25 20:59 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Ramesh H R <ramesh@easi.soft.net>; pgsql-sql

>
>
> Working out the exact UPDATE command to use is left as an exercise
> for the student ;-)
>
>                         regards, tom lane

It is funny...... LOL
Najm




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2001-01-25 20:59 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-24 09:12 How to change the ownership of the table? Ramesh H R <ramesh@easi.soft.net>
2001-01-24 15:34 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-01-25 20:59   ` Najm Hashmi <najm@mondo-live.com>
2001-01-24 18:12 ` Jie Liang <jliang@ipinc.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox