Re: [GENERAL] BDR error while adding 3rd node to cluster

2015-12-25 Thread Amit Bondwal
Thanks you very much Craig for this help. This is the error due to dns entry I pointed pg3 on two different IP. I regret for wasting your precious time that I could not pick such a small thing. thanks again. On Thu, Dec 24, 2015 at 3:55 PM, Craig Ringer wrote: > > > On 22 December 2015 at 17:00

[GENERAL] Strange syntax with select

2015-12-25 Thread Edson F. Lidorio
Hello, I excuse my ignorance with SQL and my English. I wonder if these procedures are correct or is it a bug? I'm trying to put the result of a select within the v_saldo_ini variable, except I realized that the postgresql created a table with v_saldo_ini variable. See the steps below: CREATE

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Andreas Kretschmer
Edson F. Lidorio wrote: > Hello, > I excuse my ignorance with SQL and my English. > I wonder if these procedures are correct or is it a bug? It's not a bug, but storing the result in a new table is senseless. Why do are doing that? Andreas -- Really, I'm not out to destroy Microsoft. That wi

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Charles Clavadetscher
Hello I am not in clear what your use case is, but you may have a look at that: http://www.depesz.com/2013/02/25/variables-in-sql-what-how-when/ The bottom line is that in a psql interactive session you cannot really set a variable as the result of a select statement (or at least I did

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Edson F. Lidorio
On 25-12-2015 13:09, Charles Clavadetscher wrote: Hello I am not in clear what your use case is, but you may have a look at that: http://www.depesz.com/2013/02/25/variables-in-sql-what-how-when/ The bottom line is that in a psql interactive session you cannot really set a variable as the r

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Melvin Davidson
FYI, it is always wise (and polite) to advise what version of PostgreSQL you are using and what O/S you are using. It would also be nice to know exactly what you are trying to do. IE: What is your use case? That being said, you can assign a result of an expression to a variable in a PostgreSQL fun

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Adrian Klaver
On 12/25/2015 08:37 AM, Melvin Davidson wrote: FYI, it is always wise (and polite) to advise what version of PostgreSQL you are using and what O/S you are using. Actually the OP put that at the bottom of the first post: "I'm using version below PostgreSQL. PostgreSQL 9.4.5 on x86_64-unknown-l

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Adrian Klaver
On 12/25/2015 08:26 AM, Edson F. Lidorio wrote: On 25-12-2015 13:09, Charles Clavadetscher wrote: Hello I am not in clear what your use case is, but you may have a look at that: http://www.depesz.com/2013/02/25/variables-in-sql-what-how-when/ The bottom line is that in a psql interactive s

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Adrian Klaver
On 12/25/2015 08:26 AM, Edson F. Lidorio wrote: I'musing versionbelowPostgreSQL. PostgreSQL 9.4.5 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit -- Edson via pgadmin not accept this syntax. You have any other way to do? Should have added to previous post

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Melvin Davidson
Edson, I've attached a script that shows how to use bash to assign a variable from a SQL statement. On Fri, Dec 25, 2015 at 12:48 PM, Adrian Klaver wrote: > On 12/25/2015 08:26 AM, Edson F. Lidorio wrote: > >> >> >> > >>> >>> I'musing versionbelowPostgreSQL. >>> >>> PostgreSQL 9.4.5 on x86_64-u

Re: [GENERAL] efficient math vector operations on arrays

2015-12-25 Thread Jim Nasby
On 12/24/15 1:56 AM, Pavel Stehule wrote: I don't know any extension that calculate euclid distance, but it should be trivial in C - if you don't need to use generic types and generic operations. Before messing around with that, I'd recommend trying either pl/r or pl/pythonu. -- Jim Nasby, Da

Re: [GENERAL] Shared system resources

2015-12-25 Thread Jim Nasby
On 12/23/15 12:05 PM, Melvin Davidson wrote: As others have pointed out, worrying about someone accessing database shared memory is like worrying about an asteroid striking the earth and wiping out all life. It's a one in a billion chance compared to other security violations that can occur. You

[GENERAL] Recurring and non recurring events.

2015-12-25 Thread Kevin Waterson
I wish to set up a table of recurring, and non-recurring events. I have been looking at http://justatheory.com/computers/databases/postgresql/recurring_events.html which looks nice (complex but nice) and wonder if there was a better option for this in more recent pgsql versions. All pointers grate