Re: rule on view in pgschema - Mailing list pgadmin-hackers

From Dave Page
Subject Re: rule on view in pgschema
Date
Msg-id 03AF4E498C591348A42FC93DEA9661B8259F2A@mail.vale-housing.co.uk
Whole thread Raw
List pgadmin-hackers

> -----Original Message-----
> From: frank_lupo [mailto:frank_lupo@email.it]
> Sent: 08 April 2003 10:56
> To: Dave Page
> Cc: pgadmin-hackers
> Subject: Re: [pgadmin-hackers] rule on view in pgschema
>
>
>
>
> In pgschema.pgview is present this routine.
>
> Friend Property Let Name(ByVal vData As String)
> If inIDE Then: On Error GoTo 0: Else: On Error GoTo
> Err_Handler objServer.iLogEvent "Entering " & App.Title &
> ":pgView.Property Let Name(" & vData & ")", etFullDebug Dim
> szSQL As String
>
>   szSQL = "ALTER TABLE " & FormattedID & " RENAME TO " &
> QUOTE & vData & QUOTE
>   objServer.ExecSQL szSQL, cnDatabase
>   szName = vData
>   Identifier = vData
>
>   Exit Property
> Err_Handler:  objServer.iLogError Err.Number, Err.Description
> End Property
>
>
> This is a error?

No, ALTER TABLE will rename anything in pg_class. It works with
sequences as well.

Regards, Dave


pgadmin-hackers by date:

Previous
From: "frank_lupo"
Date:
Subject: Re: rule on view in pgschema
Next
From: "Dave Page"
Date:
Subject: Re: rule on view in pgschema