Re: Re: Removing INNER JOINs

2017-11-30 Thread David Rowley
On 1 December 2017 at 15:34, Andreas Joseph Krogh wrote: > > Can someone please explain, in layman-terms, what the problems with FKs > are related to JOIN-removal? > Pretty much what I just wrote after "Unfortunately not," above, although you asked a few seconds before I

Sv: Re: Removing INNER JOINs

2017-11-30 Thread Andreas Joseph Krogh
På fredag 01. desember 2017 kl. 03:30:21, skrev Simon Riggs < si...@2ndquadrant.com >: On 1 December 2017 at 12:20, David Rowley wrote: > On 1 December 2017 at 02:52, Andreas Joseph Krogh wrote: >> >> I came

Re: Removing INNER JOINs

2017-11-30 Thread David Rowley
On 1 December 2017 at 15:30, Simon Riggs wrote: > On 1 December 2017 at 12:20, David Rowley > wrote: >> The large hurdle which a good workaround was never really found for >> was the fact that foreign key triggers only update the referenced

Re: Removing INNER JOINs

2017-11-30 Thread Simon Riggs
On 1 December 2017 at 12:20, David Rowley wrote: > On 1 December 2017 at 02:52, Andreas Joseph Krogh wrote: >> >> I came across this from Oracle: >> https://oracle-base.com/articles/misc/join-elimination#basic-join-elimination >> >> Needless to

Sv: Re: Removing INNER JOINs

2017-11-30 Thread Andreas Joseph Krogh
På fredag 01. desember 2017 kl. 02:20:19, skrev David Rowley < david.row...@2ndquadrant.com >: On 1 December 2017 at 02:52, Andreas Joseph Krogh wrote: > > I came across this from Oracle:

Re: Removing INNER JOINs

2017-11-30 Thread David Rowley
On 1 December 2017 at 02:52, Andreas Joseph Krogh wrote: > > I came across this from Oracle: > https://oracle-base.com/articles/misc/join-elimination#basic-join-elimination > > Needless to say, this would be very cool to have in PG:-) It would be nice, I agree. > It seems

Re: ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu

2017-11-30 Thread Alan Hodgson
On Thu, 2017-11-30 at 22:59 +, Ben Nachtrieb wrote: > Alan, > >   > > Thank you!  Solution: build them from source on the server? Well, it would be more maintainable to find a source for packages built for your particular OS. Or run a supported OS; that one looks pretty old. Or I guess you

Re: copy error with json/jsonb types

2017-11-30 Thread Michael Paquier
On Thu, Nov 30, 2017 at 3:01 PM, tao tony wrote: > hi dears, > > > I'm using copy and jdbc copyin to build load data to pg,data type in table > is jsonb.postgresql version are 9.6 and 10.0. > > Some records with escape characters would be failed with error"ERROR: >

RE: ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu

2017-11-30 Thread Ben Nachtrieb
Alan, Thank you! Solution: build them from source on the server? Ben From: Alan Hodgson [mailto:ahodg...@lists.simkin.ca] Sent: Thursday, November 30, 2017 3:36 PM To: pgsql-general Subject: Re: ERROR: could not load library libperl.so, PostgreSQL trying to

Re: ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu

2017-11-30 Thread Alan Hodgson
On Thu, 2017-11-30 at 22:20 +, Ben Nachtrieb wrote: >   > > ...to ld.so.conf, I get: > > ERROR:  could not load library > "/var/lib/pgsql10/lib/postgresql/plperl.so": > /var/lib/pgsql10/lib/postgresql/plperl.so: undefined symbol: > Perl_xs_handshake > > SQL state: XX000 It looks to me like

ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu

2017-11-30 Thread Ben Nachtrieb
Hello, I want to use the perl language in a postgres function. I am attempting to: CREATE EXTENSION plperlu ...via pgAdmin 4 connected to postgres 10 and I get this error: ERROR: could not load library "/var/lib/pgsql10/lib/postgresql/plperl.so": libperl.so: cannot open shared object file: No

Re: large numbers of inserts out of memory strategy

2017-11-30 Thread Christopher Browne
On 30 November 2017 at 05:22, Peter J. Holzer wrote: > On 2017-11-29 08:32:02 -0600, Ted Toth wrote: >> Yes I did generate 1 large DO block: >> >> DO $$ >> DECLARE thingid bigint; thingrec bigint; thingdataid bigint; >> BEGIN >> INSERT INTO thing >>

Re: large numbers of inserts out of memory strategy

2017-11-30 Thread Christopher Browne
On 30 November 2017 at 05:22, Peter J. Holzer wrote: > On 2017-11-29 08:32:02 -0600, Ted Toth wrote: >> Yes I did generate 1 large DO block: >> >> DO $$ >> DECLARE thingid bigint; thingrec bigint; thingdataid bigint; >> BEGIN >> INSERT INTO thing >>

Re: Searching for big differences between values

2017-11-30 Thread Laurenz Albe
Durumdara wrote: > Somewhere the users made mistakes on prices (stock). > > I need to search for big differences between values. > For example: > > 20 > 21 > 21,5 > 30 > 28 > .. > 46392 <- > 46392 <- > > But it could be: > > 42300 > 43100 > 44000 > 43800 > 65000 <- > 42100 > > Human eye could

Re: large numbers of inserts out of memory strategy

2017-11-30 Thread Ted Toth
On Thu, Nov 30, 2017 at 4:22 AM, Peter J. Holzer wrote: > On 2017-11-29 08:32:02 -0600, Ted Toth wrote: >> Yes I did generate 1 large DO block: >> >> DO $$ >> DECLARE thingid bigint; thingrec bigint; thingdataid bigint; >> BEGIN >> INSERT INTO thing >>

Re: Searching for big differences between values

2017-11-30 Thread Chris Mair
I need to search for big differences between values. [...] Hi, from an SQL point of view this is not difficult, but you need to carefully define a criteria for the outliers. For example, to find values that are more than a standard deviation away from the mean, do something like this:

copy error with json/jsonb types

2017-11-30 Thread tao tony
hi dears, I'm using copy and jdbc copyin to build load data to pg,data type in table is jsonb.postgresql version are 9.6 and 10.0. Some records with escape characters would be failed with error"ERROR: invalid input syntax for type json" but when using insert they could be executed

Re: large numbers of inserts out of memory strategy

2017-11-30 Thread Peter J. Holzer
On 2017-11-29 08:32:02 -0600, Ted Toth wrote: > Yes I did generate 1 large DO block: > > DO $$ > DECLARE thingid bigint; thingrec bigint; thingdataid bigint; > BEGIN > INSERT INTO thing > (ltn,classification,machine,source,thgrec,flags,serial,type) VALUES >

Re: Searching for big differences between values

2017-11-30 Thread Chris Travers
On Nov 30, 2017 08:35, "Durumdara" wrote: Hello! Somewhere the users made mistakes on prices (stock). I need to search for big differences between values. For example: 20 21 21,5 30 28 .. 46392 <- 46392 <- But it could be: 42300 43100 44000 43800 65000 <- 42100 Human