Re: [DOCS] rename of a view

2007-06-29 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > For the ALTER SEQUENCE case, I think it's also a little weird to have an > ALTER SEQUENCE command that modifies some of the properties of a > sequence, but not the sequence's name. While that argument doesn't apply > to ALTER VIEW at the moment, recent hist

Re: [DOCS] rename of a view

2007-06-29 Thread Neil Conway
On Sat, 2007-30-06 at 01:36 -0400, Tom Lane wrote: > No objection to that; it'd square with our treatment of TYPE and DOMAIN > commands. What I'm wondering though is whether the whole patch has > a reason to live at all, as compared to documenting someplace more > prominent than now that ALTER TAB

Re: [DOCS] rename of a view

2007-06-29 Thread David Fetter
On Sat, Jun 30, 2007 at 01:36:22AM -0400, Tom Lane wrote: > Neil Conway <[EMAIL PROTECTED]> writes: > > On Sat, 2007-30-06 at 00:26 -0400, Tom Lane wrote: > >> There is exactly 0 chance of that happening, because it's always > >> worked historically. > > > Agreed, but I think the patch should disa

Re: [DOCS] rename of a view

2007-06-29 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > On Sat, 2007-30-06 at 00:26 -0400, Tom Lane wrote: >> There is exactly 0 chance of that happening, because it's always worked >> historically. > Agreed, but I think the patch should disallow ALTER VIEW ... RENAME on a > non-view, and ALTER SEQUENCE ... REN

Re: [DOCS] rename of a view

2007-06-29 Thread Neil Conway
On Sat, 2007-30-06 at 00:26 -0400, Tom Lane wrote: > There is exactly 0 chance of that happening, because it's always worked > historically. Agreed, but I think the patch should disallow ALTER VIEW ... RENAME on a non-view, and ALTER SEQUENCE ... RENAME on a non-sequence. -Neil ---

Re: [DOCS] rename of a view

2007-06-29 Thread Tom Lane
Euler Taveira de Oliveira <[EMAIL PROTECTED]> writes: > I didn't test your patch, but I think we could disallow ALTER TABLE to > rename sequence and view There is exactly 0 chance of that happening, because it's always worked historically. Personally I don't see a lot of value in this patch at al

Re: [DOCS] rename of a view

2007-06-29 Thread Euler Taveira de Oliveira
David Fetter wrote: pgsql-patches will be more appropriate for a patch. Could you post there so your patch won't be forget? > The attached patch and file implement and document > > ALTER [VIEW | SEQUENCE] RENAME TO > I didn't test your patch, but I think we could disallow ALTER TABLE to ren

Re: [DOCS] rename of a view

2007-06-29 Thread David Fetter
On Fri, Jun 29, 2007 at 11:32:19AM -0700, David Fetter wrote: > On Thu, Jun 28, 2007 at 10:16:51AM -0400, Tom Lane wrote: > > Susanne Ebrecht <[EMAIL PROTECTED]> writes: > > > that works, but there is no hint at the documentation, that you > > > can rename a view via alter table. > > > > It is men

Re: [DOCS] rename of a view

2007-06-29 Thread Susanne Ebrecht
Neil Conway wrote: On Thu, 2007-28-06 at 13:31 +0200, Susanne Ebrecht wrote: Than I just tried: alter table pgview rename to bettername; that works, but there is no hint at the documentation, that you can rename a view via alter table. >From the ALTER TABLE reference page: "The RENA

Re: [DOCS] rename of a view

2007-06-29 Thread David Fetter
On Thu, Jun 28, 2007 at 10:16:51AM -0400, Tom Lane wrote: > Susanne Ebrecht <[EMAIL PROTECTED]> writes: > > that works, but there is no hint at the documentation, that you > > can rename a view via alter table. > > It is mentioned someplace (don't remember where). Where would you > have expected

Re: [DOCS] proposed FAQ entry

2007-06-29 Thread David Gardner
Well the motivation for the question, is to want to track edits to the database. To know who changed what/when, and possibly run a report against that information. I looked through the docs to find the user and session_user variables at: http://www.postgresql.org/docs/8.1/interactive/functions-

Re: [DOCS] proposed FAQ entry

2007-06-29 Thread Magnus Hagander
On Thu, Jun 28, 2007 at 09:06:20PM -0400, Bruce Momjian wrote: > David Gardner wrote: > > Earlier today I was tempted to start storing usesysid's as foreign keys > > in one of my tables by doing: > > SELECT usesysid FROM pg_user WHERE pg_user.usename= user; > > > > My proposed FAQ entry is based