Re: Cosmetically-varying casts added to view definitions

From: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Cosmetically-varying casts added to view definitions
Date: 2018-07-30 23:29:58
Message-ID: CAD3a31VvLp_hp8sVcJM4A85QC1-qj2XDtdYAAkM96SR1uyn0gA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jul 30, 2018 at 4:10 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 07/30/2018 02:26 PM, Ken Tanzer wrote:
>
> > This doesn't impair the view's functionality, so I can't necessarily
> > complain. But it does make it harder for me to know if the views were
> > recreated correctly. I'd be curious to know what is going on here, and
> > if there's any way to avoid this behavior.
>
> The only way I can think of to maintain a consistent definition is to
> always create the view from the original definition:
>
> CREATE VIEW test_tmp AS (SELECT 1 FROM l_payment_form WHERE
> payment_form_code IN ('CREDIT_CARD','OTHER'));
>

Thanks Adrian. I do have what are supposed to be the original view
definitions, but I'm less than 100% confident they are accurate and
up-to-date, which is why I thought to use the actual definitions as
stored. Might have to rethink that one though, or just take a leap of
faith that the views will functionally be the same!

Cheers,
Ken

p.s., I forgot to mention this in my original post, but for the record, PG
version 9.6.9.

--
AGENCY Software
A Free Software data system
By and for non-profits
*http://agency-software.org/ <http://agency-software.org/>*
*https://demo.agency-software.org/client
<https://demo.agency-software.org/client>*
ken(dot)tanzer(at)agency-software(dot)org
(253) 245-3801

Subscribe to the mailing list
<agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe> to
learn more about AGENCY or
follow the discussion.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2018-07-30 23:32:14 Re: Restore relhaspkey in PostgreSQL Version 11 Beta
Previous Message Adrian Klaver 2018-07-30 23:25:08 Re: Design of a database table