Re: unorthodox use of PG for a customer

2018-08-24 Thread Tim Cross
David Gauthier writes: > Hi Everyone: > > I'm going to throw this internal customer request out for ideas, even > though I think it's a bit crazy. I'm on the brink of telling him it's > impractical and/or inadvisable. But maybe someone has a solution. > > He's writing a script/program that ru

Re: unorthodox use of PG for a customer

2018-08-24 Thread Dimitri Maziuk
On 08/24/2018 02:35 PM, Andrew Kerber wrote: > Unless I am missing something, it sounds like you might be able to do this > with an nfs export shared to each workstation. That's no different from polling the central database though, you're just using nfs server and files instead of a db server and

Re: unorthodox use of PG for a customer

2018-08-24 Thread Andrew Kerber
Unless I am missing something, it sounds like you might be able to do this with an nfs export shared to each workstation. But I am not sure if I understood what you were describing either. On Fri, Aug 24, 2018 at 2:22 PM Edson Carlos Ericksson Richter < rich...@simkorp.com.br> wrote: > Em 24/08/2

Re: unorthodox use of PG for a customer

2018-08-24 Thread Edson Carlos Ericksson Richter
Em 24/08/2018 16:07, David Gauthier escreveu: I tried to convince him of the wisdom of one central DB.  I'll try again. >>So are the 58 database(stores) on the workstation going to be working with data independent to each or is the data shared/synced between instances? No, 58 workstations, each

Re: unorthodox use of PG for a customer

2018-08-24 Thread Dimitri Maziuk
On 08/24/2018 02:07 PM, David Gauthier wrote: > > ... He likes the idea of a > separate DB per workarea. He just doesn't gt it. Well there are advantages to that. > But for some reason, he doesn't like > the client/server DB model which would work so nicely here. I'm just > trying to make sur

Re: unorthodox use of PG for a customer

2018-08-24 Thread Adrian Klaver
On 08/24/2018 12:07 PM, David Gauthier wrote: I tried to convince him of the wisdom of one central DB.  I'll try again. >>So are the 58 database(stores) on the workstation going to be working with data independent to each or is the data shared/synced between instances? No, 58 workstations, eac

Re: unorthodox use of PG for a customer

2018-08-24 Thread David Gauthier
I tried to convince him of the wisdom of one central DB. I'll try again. >>So are the 58 database(stores) on the workstation going to be working with data independent to each or is the data shared/synced between instances? No, 58 workstations, each with its own DB. There's a concept of a "worka

Re: unorthodox use of PG for a customer

2018-08-24 Thread Edson Carlos Ericksson Richter
Em 24/08/2018 15:18, David Gauthier escreveu: Hi Everyone: I'm going to throw this internal customer request out for ideas, even though I think it's a bit crazy.  I'm on the brink of telling him it's impractical and/or inadvisable.  But maybe someone has a solution. He's writing a script/pro

Re: unorthodox use of PG for a customer

2018-08-24 Thread Adrian Klaver
On 08/24/2018 11:18 AM, David Gauthier wrote: Hi Everyone: I'm going to throw this internal customer request out for ideas, even though I think it's a bit crazy.  I'm on the brink of telling him it's impractical and/or inadvisable.  But maybe someone has a solution. He's writing a script/pro

Re: unorthodox use of PG for a customer

2018-08-24 Thread James Keener
> he doesn't want the overhead, dependencies and worries of anything like an external DB with a DBA, etc... . He also wants this to be fast. So they're trading consistency concerns for ... not having a central db? Even if your shop requires a DBA for any DB, it sounds like a really bad deal. Jim

unorthodox use of PG for a customer

2018-08-24 Thread David Gauthier
Hi Everyone: I'm going to throw this internal customer request out for ideas, even though I think it's a bit crazy. I'm on the brink of telling him it's impractical and/or inadvisable. But maybe someone has a solution. He's writing a script/program that runs on a workstation and needs to write

Re: How to split an array into columns

2018-08-24 Thread Paul A Jungwirth
On Fri, Aug 24, 2018 at 2:01 AM, a <372660...@qq.com> wrote: > > Say if I have an float8 array: > > id| data > --|--- > a | {1,2} > b | {2,4} > > . . . > > Since I would have around 200,000 rows, I would prefer it having enough > capacity to carry out the calculation such as sum(). Is

Re: Hungarian collation in English Windows server

2018-08-24 Thread Tom Lane
Durumdara writes: > Dear Laurenz! >> You have to install the collation on the Windows maching, not in >> PostgreSQL. > We could add languages. As I remember my coll. told me that Hungarian lang. > pack is installed in that machine. > But maybe this is different thing. > What we need to do to PGSQ

Re: How to split an array into columns

2018-08-24 Thread Tom Lane
Thomas Kellerer writes: > Maybe I am missing something, but: >select id, data[1], data[2] >from the_table; > will work just fine. If the arrays are of varying length, unnest() might be what the OP is looking for. regards, tom lane

Re: PG-Sample | Error | Equality operator for type json

2018-08-24 Thread Abhinav Mehta
BTW - I’ve tried figuring out myself and understood UNION workaround could help, but since it’s via pg-sample so just want to understand if there a quick workaround without tweaking pg-sample itself. > On 24-Aug-2018, at 6:20 PM, Abhinav Mehta wrote: > > Hi Team, > > I’m getting running into

PG-Sample | Error | Equality operator for type json

2018-08-24 Thread Abhinav Mehta
Hi Team, I’m getting running into following issue while executing pg-sample Error DBD::Pg::db do failed: ERROR: could not identify an equality operator for type json LINE 3:SELECT DISTINCT t1.* ^ at ./pg_sample line 296. main::__ANON__

Re: pg_sample

2018-08-24 Thread Abhinav Mehta
Solution, execute this on your linux terminal - $ perl -MCPAN -e 'install Bundle::DBI' $ perl -MCPAN -e 'install DBD::Pg' > On 24-Aug-2018, at 6:13 PM, Ravi Krishna wrote: > >> >> sir have taken pg_sample >> Now i want to run pg_sample with credential but i'm getting this error >> >> Can't l

Re: pg_sample

2018-08-24 Thread Ravi Krishna
> > sir have taken pg_sample > Now i want to run pg_sample with credential but i'm getting this error > > Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5 > /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl > /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .)

Re: pg_sample

2018-08-24 Thread Naveen Dabas
sir have taken pg_sample Now i want to run pg_sample with credential but i'm getting this error Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./pg_sample li

Arrays, casting and "constrained" data types

2018-08-24 Thread Thomas Kellerer
I stumbled across the following: Consider the following (simplified) table: create table test ( val numeric(20,0), ref_val numeric(20,0) ); and the following very simple recursive CTE: with recursive tree as ( select val, array[val] as path from test uni

Re: How to split an array into columns

2018-08-24 Thread Thomas Kellerer
a schrieb am 24.08.2018 um 11:01: > Say if I have an float8 array: > > id| data > --|--- > a | {1,2} > b | {2,4} > > If I could using query to make it looks like this: > > id| data[1] | data[2] > --|--|--- > a | 1 | 2 > b | 2 | 4 > > Since

How to split an array into columns

2018-08-24 Thread a
Say if I have an float8 array: id| data --|--- a | {1,2} b | {2,4} If I could using query to make it looks like this: id| data[1] | data[2] --|--|--- a | 1 | 2 b | 2 | 4 Since I would have around 200,000 rows, I would prefer it having

Re: Hungarian collation in English Windows server

2018-08-24 Thread Durumdara
Dear Laurenz! > You have to install the collation on the Windows maching, not in PostgreSQL. We could add languages. As I remember my coll. told me that Hungarian lang. pack is installed in that machine. But maybe this is different thing. What we need to do to PGSQL see that collation? Would you