Re: Views and triggers more then one row returned by subquery.

2021-01-14 Thread Day, David
Dave From: Tom Lane Sent: Tuesday, January 12, 2021 6:24 PM To: Day, David Cc: pgsql-general@lists.postgresql.org Subject: Re: Views and triggers more then one row returned by subquery. "Day, David" writes: > My presumption of views and instead of t

Views and triggers more then one row returned by subquery.

2021-01-12 Thread Day, David
My presumption of views and instead of trigger behavior is that the VIEW first gets populated with the WHERE filter and then the "DELETE or UPDATE" operation will fire against each of the rendered view rows. ( ? ) If this is true then I can't explain the more then one row returned error. [11-1]

RE: Rename a column if not already renamed.?

2019-08-29 Thread Day, David
nks to all for assistance Dave -Original Message- From: Day, David Sent: Wednesday, August 21, 2019 2:58 PM To: 'Adrian Klaver' ; Tom Lane Cc: Luca Ferrari ; pgsql-gene...@postgresql.org Subject: RE: Rename a column if not already renamed.? Restoring into 11.3 instance

RE: Rename a column if not already renamed.?

2019-08-21 Thread Day, David
rian.kla...@aklaver.com] Sent: Wednesday, August 21, 2019 11:47 AM To: Day, David ; Tom Lane Cc: Luca Ferrari ; pgsql-gene...@postgresql.org Subject: Re: Rename a column if not already renamed.? On 8/21/19 7:52 AM, Day, David wrote: > I agree the function could be improved to deal with both old a

RE: Rename a column if not already renamed.?

2019-08-21 Thread Day, David
: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Tuesday, August 20, 2019 4:57 PM To: Day, David Cc: Luca Ferrari ; pgsql-gene...@postgresql.org Subject: Re: Rename a column if not already renamed.? "Day, David" writes: > The error is something like column already exists and Not sure

RE: Rename a column if not already renamed.?

2019-08-20 Thread Day, David
pg_attribute table following an upgrade. -Original Message- From: Luca Ferrari [mailto:fluca1...@gmail.com] Sent: Tuesday, August 20, 2019 3:41 PM To: Day, David Cc: pgsql-gene...@postgresql.org Subject: Re: Rename a column if not already renamed.? On Tue, Aug 20, 2019 at 9:07 PM Day, David

Rename a column if not already renamed.?

2019-08-20 Thread Day, David
I have a function used by my patch files which attempts to determine if the old column name exists, if so it proceeds with the rename. CREATE OR REPLACE FUNCTION sys.rename_column(schema_table_ regclass, old_name_ text, new_name text) RETURNS boolean LANGUAGE plpgsql AS $function$ BEGIN IF

pglogical extension. - 2 node master <-> master logical replication ?

2019-07-02 Thread Day, David
Anyone with a test scripts or link to an example of bi-directional master using pglogical. ? I am led to believe from the documentation that this should be possible. (?) "Limited multi-master support with conflict resolution exists, but mutual replication connections must be added individually" W

RE: Permission to refresh materialized view

2019-03-13 Thread Day, David
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Wednesday, March 13, 2019 10:24 AM To: Johann Spies ; pgsql-gene...@postgresql.org Subject: Re: Permission to refresh materialized view On 3/13/19 6:27 AM, Johann Spies wrote: > We did run this query: > > /

RE: plpgsql and intarray extension; int[] - int[] operator does not exist ?

2018-11-19 Thread Day, David
ovember 19, 2018 12:56 PM To: Day, David Cc: pgsql-gene...@postgresql.org Subject: Re: plpgsql and intarray extension; int[] - int[] operator does not exist ? "Day, David" writes: > Any suggestions as to why the int[] operations are not understood in the > trigger context.? The

plpgsql and intarray extension; int[] - int[] operator does not exist ?

2018-11-19 Thread Day, David
I have installed the intarray extension installed in the public schema and am attempting to use this in a plpgsql trigger function from another schema. When the triggers executes this I get an exception to the effect { "hint": "No operator matches the given name and argument type(s). You

Instead trigger on a view to update base tables ?

2018-08-07 Thread Day, David
In a view of three joined tables, I install a INSTEAD OF trigger fx on the view. The fx contains a list of felds/columns variable associated to each base tables. When an update operation occurs, I am successfully generating the target list of colums altered on Each base table. ( comparin

RE: attempting to retrieve column names from information schema fails.

2017-12-04 Thread Day, David
out some of the better power tools. Admin skills get rusty. Best Dave -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Monday, December 04, 2017 11:08 AM To: Day, David Cc: pgsql-gene...@postgresql.org Subject: Re: attempting to retrieve column names from informati

attempting to retrieve column names from information schema fails.

2017-12-04 Thread Day, David
Hi, I'm looking on some insights on the following problem on retrieving table column names from the information schema ( postgres 9.6.6 FreeBSD 11.1 ) When my client starts up up. Each thread ( 10 ) run this command. select column_name from information_schema.columns where table_name = 'pep