Change from 9.6 to 11?

2018-12-20 Thread Chuck Martin
ND usr.Backup_fkey = backup.Usr_pkey AND ombcase.Status_fkey = status.Status_pkey AND event.InsBy::int = usr.Usr_pkey AND event.Event_pkey = 1060071 ORDER BY EventDone, DateTime DESC Chuck Martin Avondale Software

Re: Change from 9.6 to 11?

2018-12-21 Thread Chuck Martin
On Thu, Dec 20, 2018 at 10:12 PM Adrian Klaver wrote: > On 12/20/18 5:51 PM, Chuck Martin wrote: > > Please reply to list also. > Ccing list. > > > > > > > On Thu, Dec 20, 2018 at 7:56 PM Adrian Klaver > <mailto:adrian.kla...@aklaver.com>> wrote: &

getting pg_basebackup to use remote destination

2018-12-29 Thread Chuck Martin
G 11 replication? Everything I find online is very old. Chuck Martin Avondale Software

Re: getting pg_basebackup to use remote destination

2018-12-30 Thread Chuck Martin
On Sun, Dec 30, 2018 at 11:20 AM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 29/12/2018 20:04, Chuck Martin wrote: > > I thought I knew how to do this, but I apparently don't. I have to set > > up a new server as a standby for a PG 11.1 server. The

Re: getting pg_basebackup to use remote destination

2018-12-30 Thread Chuck Martin
he same GB ethernet network. Chuck Martin Avondale Software On Sun, Dec 30, 2018 at 3:28 PM Jeff Janes wrote: > On Sat, Dec 29, 2018 at 2:05 PM Chuck Martin > wrote: > >> I thought I knew how to do this, but I apparently don't. I have to set up >> a new server as a st

Re: getting pg_basebackup to use remote destination

2018-12-31 Thread Chuck Martin
On Mon, Dec 31, 2018 at 12:05 PM Jeff Janes wrote: > On Sun, Dec 30, 2018 at 6:17 PM Chuck Martin > wrote: > >> Maybe I need to rethink ths and take Jeff's advice. I executed this: >> >> pg_basebackup -h [main server's URL] -U postgres -P -v -X s -D >>

Query help

2019-01-01 Thread Chuck Martin
s difficult to parse out since in the real world, many more tables and columns are involved. Chuck Martin Avondale Software

Re: getting pg_basebackup to use remote destination

2019-01-03 Thread Chuck Martin
On Thu, Jan 3, 2019 at 3:46 PM Stephen Frost wrote: > Greetings Chuck, > > * Chuck Martin (clmar...@theombudsman.com) wrote: > > Using iperf, the transfer speed between the two servers (from the main to > > the standby) was 938 Mbits/sec. If I understand the units correctly,

Query help

2019-01-26 Thread Chuck Martin
OIN status ON status_fkey = status_pkey AND lower(statusid) NOT LIKE ('closed%') AND coalesce ( age(ombcase.insdatetime), age(statuschange.insdatetime) ) > '2 months' But this query will return all statuschange records for an ombcase record that has multiple ones. Any suggestio

Re: Query help

2019-01-27 Thread Chuck Martin
Chuck Martin Avondale Software On Sun, Jan 27, 2019 at 2:55 PM Adrian Klaver wrote: > On 1/26/19 3:04 PM, Chuck Martin wrote: > [snip] > Outline form: > > 1) If a record is in ombcase it has a status('in a status') by definition. > > From query below you are

Re: Query help

2019-01-27 Thread Chuck Martin
On Sun, Jan 27, 2019 at 8:07 AM Peter J. Holzer wrote: > On 2019-01-26 18:04:23 -0500, Chuck Martin wrote: > [snip] > > The idea should be obvious, but to explain, insdatetime is set when a new > > record is created in any table. All records in ombcase have a foreign > k

Re: Query help

2019-01-27 Thread Chuck Martin
On Sun, Jan 27, 2019 at 5:27 PM Chuck Martin wrote: > On Sun, Jan 27, 2019 at 8:07 AM Peter J. Holzer wrote: > >> On 2019-01-26 18:04:23 -0500, Chuck Martin wrote: >> [snip] >> > The idea should be obvious, but to explain, insdatetime is set when a >> new &g

HAVING query structured wrong

2019-02-18 Thread Chuck Martin
o how do I get all transactions for each case_pkey? I've read the documentation on WITH clauses (CTEs), but that just left my head spinning. Chuck Martin Avondale Software

Re: HAVING query structured wrong

2019-02-19 Thread Chuck Martin
On Mon, Feb 18, 2019 at 12:37 PM Andrew Gierth wrote: > >>>>> "Chuck" == Chuck Martin writes: > > Chuck> I am trying to create a query that returns all transactions for > Chuck> each person who has a balance over a given amount. I thought > Ch

Re: Where to store Blobs?

2019-03-13 Thread Chuck Martin
I store them as bytea in the database despite the fact that there are benefits to storing them in the file system. The reason is that it is easier to secure access to the database than to secure both the database and provide secure access to the file system. Chuck Martin Avondale Software On

Query not producing expected result

2019-05-01 Thread Chuck Martin
g the data comparison correctly, but don't know why. Chuck Martin Avondale Software

Re: Query not producing expected result

2019-05-01 Thread Chuck Martin
Thanks, guys. It should have been obvious to me, but wasn't. I found the correct result was returned with either AND event.DateTime <= 'May-1-2019 24:00' or AND event.DateTime::date <= 'May-1-2019' The latter seems best. Chuck Martin Avondale Software On W

Re: Query not producing expected result

2019-05-01 Thread Chuck Martin
;May 2, 2019' wouldn't it? I'm not sure one is easier to implement than the other. Chuck Martin Avondale Software On Wed, May 1, 2019 at 1:16 PM Francisco Olarte wrote: > Chuck: > > On Wed, May 1, 2019 at 6:56 PM Chuck Martin > wrote: > > Thanks, guys. It

Re: Query not producing expected result

2019-05-01 Thread Chuck Martin
(given the advice received here) inclined to check the value entered when searching for a date, and if no time is entered, add '24:00' to the date. Chuck Martin Avondale Software On Wed, May 1, 2019 at 1:32 PM Adrian Klaver wrote: > On 5/1/19 10:15 AM, Francisco Olarte wrote: > >

Re: Query not producing expected result

2019-05-01 Thread Chuck Martin
where I once lived). Chuck Martin Avondale Software On Wed, May 1, 2019 at 1:52 PM Francisco Olarte wrote: > On Wed, May 1, 2019 at 7:37 PM Chuck Martin > wrote: > > > > Something like daterange would be a solution in some circumstances, but > this query is a user-generated

Column type changed "spontanously"?

2019-05-09 Thread Chuck Martin
reSQL 9.3.1 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3), 64-bit" What other information would help solve this? Chuck Martin Avondale Software

INSERT where not exists with foreign key

2019-05-20 Thread Chuck Martin
work because the subquery returned more than one value. Of course I want it to return all values, but just one per insert. I can do this outside of Postgres, but would like to learn how to do this with SQL. Chuck Martin Avondale Software