Re: Pseudo modification of views and triggers (

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: "'jm(dot)poure(at)freesurf(dot)fr'" <jm(dot)poure(at)freesurf(dot)fr>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Pseudo modification of views and triggers (
Date: 2002-02-20 09:33:48
Message-ID: FED2B709E3270E4B903EB0175A49BCB10475C1@dogbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

> -----Original Message-----
> From: Jean-Michel POURE [mailto:jm(dot)poure(at)freesurf(dot)fr]
> Sent: 20 February 2002 09:21
> To: Dave Page
> Cc: pgadmin-hackers(at)postgresql(dot)org
> Subject: Re: [pgadmin-hackers] Pseudo modification of views
> and triggers ( again)
>
>
> Le Mercredi 20 Février 2002 09:17, Dave Page a écrit :
> > BTW, have you been following the discussion on
> pgsql-hackers about the
> > ongoing pl/pgSQL drop column code?
>
> Yes, sounds interesting but the code will probably be very
> close to ours.
> But, didn't we say no PL/pgSQL in our previous discussions?
> pgAdmin2 is
> intended for a large audience, so better if no PL/pgSQL is required.

Yes, you're right - it would just be useful to look at in case
Zoltan/Christopher find any 'gotchas'.

> What I see in pgSchema is a powerfull pseudo "CREATE TABLE
> foo_new AS"
> clause to copy schema information with selected linked
> objects (indexes,
> columns, primary key, triggers, rules, etc...). We only have
> to move data
> between tables, drop the old table and rename the new one.
>
> This is more powerfull than hidding deleted columns AND it
> can be used to
> reorder columns.

Yes. Not to mention that the reverse engineered SQL you disliked so much
will be invaluable in achieving this :-)

> By the way, there seems to be anoyther way to modify a
> primary key : create a
> unique index foo_new, drop the primary key foo, and rename
> foo_new to foo.

That won't work, because pg_index.indisprimary won't be set on the new index
definition. *I think* I remember seeing a posting on pgsql-hackers that
mentioned there was an undocumented way to add a pkey.

BTW, do your passwords work now?

Regards, Dave.

Browse pgadmin-hackers by date

  From Date Subject
Next Message Jean-Michel POURE 2002-02-20 09:36:31 Re: ALTER VIEW
Previous Message Dave Page 2002-02-20 09:23:31 To-Do List