Re: [GENERAL] [R] Issues with RPostgres

2015-08-27 Thread John McKown
On Thu, Aug 27, 2015 at 4:19 PM, Abraham Mathew wrote: "test" is not in the postgres database. In fact, there is no table or column named "test" The user is "postgres" and the dbname is also "postgres" On Thu, Aug 27, 2015 at 4:13 PM, John McKown wrote: > On Thu, Aug 27, 2015 at 3:50 PM, Ab

Re: [GENERAL] [R] Issues with RPostgres

2015-08-27 Thread John McKown
On Thu, Aug 27, 2015 at 3:50 PM, Abraham Mathew wrote: > > Yeah, thought that could be an issue. Unfortunately, I've had issues > setting a normal user id and then having postgres identify the password > associated with it. Using postgres was the only thing that worked. > > ## CONNECT TO LOCALHOS

Re: [GENERAL] Unusual psql behavior

2015-08-27 Thread Adrian Klaver
On 08/27/2015 01:38 PM, Tom Lane wrote: Adrian Klaver writes: I am seeing something I cannot figure out when using psql. This is what I see: psql (9.4.4) Type "help" for help. production_5432=> select from cell_per ; -- (56 rows) I believe this is the expected output for a table with

Re: [GENERAL] Unusual psql behavior

2015-08-27 Thread Tom Lane
Adrian Klaver writes: > I am seeing something I cannot figure out when using psql. > This is what I see: > psql (9.4.4) > Type "help" for help. > production_5432=> select from cell_per ; > -- > (56 rows) I believe this is the expected output for a table with 56 rows and zero columns. (It's pr

[GENERAL] Unusual psql behavior

2015-08-27 Thread Adrian Klaver
Postgres 9.4.4. I am seeing something I cannot figure out when using psql. This is what I see: psql (9.4.4) Type "help" for help. production_5432=> select from cell_per ; -- (56 rows) This is when I am logged in as system user aklaver. If I log in as another user on the same machine I see t

Re: [GENERAL] $libdir/mysql_fdw

2015-08-27 Thread Adrian Klaver
On 08/27/2015 10:46 AM, Ryan King - NOAA Affiliate wrote: When attempting to create the required functions and extensions for the MySQL FDW, I get the following errors: dbname=# CREATE FUNCTION mysql_fdw_handler() RETURNS fdw_handler AS '$libdir/mysql_fdw' LANGUAGE C STRICT; ERROR: could not a

Re: [GENERAL] UPDATE an updatable view

2015-08-27 Thread Jerry Sievers
David Nelson writes: >>> So in the UPDATE statement, I only provided a value for last_user. But the >>> first test of the trigger function tests for a NULL value of >>> NEW.empname. Since >>> I did not provide one, I was expecting it to be NULL and an exception to >>> be thrown. Am I just misunde

[GENERAL] $libdir/mysql_fdw

2015-08-27 Thread Ryan King - NOAA Affiliate
When attempting to create the required functions and extensions for the MySQL FDW, I get the following errors: dbname=# CREATE FUNCTION mysql_fdw_handler() RETURNS fdw_handler AS '$libdir/mysql_fdw' LANGUAGE C STRICT; ERROR: could not access file "$libdir/mysql_fdw": No such file or directory d

Re: [GENERAL] ERROR: collation "latin1_general_ci" for encoding "UTF8" does not exist

2015-08-27 Thread Adrian Klaver
On 08/27/2015 06:47 AM, ss wrote: I have started writting query since a day on postGreS my query is : CREATE TABLE IF NOT EXISTS utilisateurs ( SEQU_NK SERIAL PRIMARY KEY NOT NULL UNIQUE, UTILISATEUR_NK bigint NOT NULL, NOM varchar(25) COLLATE latin1_general_ci NOT NU

[GENERAL] ERROR: collation "latin1_general_ci" for encoding "UTF8" does not exist

2015-08-27 Thread ss
I have started writting query since a day on postGreS my query is : CREATE TABLE IF NOT EXISTS utilisateurs ( SEQU_NK SERIAL PRIMARY KEY NOT NULL UNIQUE, UTILISATEUR_NK bigint NOT NULL, NOM varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', PASSE varchar(40) C

Re: [GENERAL] two factor authentication for pgadmin iii

2015-08-27 Thread John R Pierce
On 8/26/2015 11:55 PM, Nima Azizzadeh wrote: Hello, I'm going to create two factor authentication for pgadmin server... you mean postgresql server, don't you? pgadmin is a client program/utility. I'm using postgresql 9.4 with pgadmin III on Linux Mint 17.2 32bit... I already have 1 password

Re: [GENERAL] UPDATE an updatable view

2015-08-27 Thread David Nelson
>> So in the UPDATE statement, I only provided a value for last_user. But the >> first test of the trigger function tests for a NULL value of >> NEW.empname. Since >> I did not provide one, I was expecting it to be NULL and an exception to >> be thrown. Am I just misunderstanding how things work? I

[GENERAL] BDR setup - bdr_node_join_wait_for_ready()

2015-08-27 Thread cchee-ob
What exactly does bdr_node_wait_for_ready() do? I've been trying to setup BDR on an existing database and once I run the select bdr.bdr_node_wait_for_ready(); command on the 2nd node after running the bdr.bdr_group_join() command it just hangs . I've done the same setup procedure on brand new nod

Re: [GENERAL] UPDATE an updatable view

2015-08-27 Thread Adrian Klaver
On 08/27/2015 09:07 AM, David Nelson wrote: Good morning all, I am creating an updatable view on a set of tables, and just ran into unexpected (or more likely misunderstood) behavior with the UPDATE statement. If an attribute is not explicitly listed in the UPDATE statement, the NEW value appear

[GENERAL] UPDATE an updatable view

2015-08-27 Thread David Nelson
Good morning all, I am creating an updatable view on a set of tables, and just ran into unexpected (or more likely misunderstood) behavior with the UPDATE statement. If an attribute is not explicitly listed in the UPDATE statement, the NEW value appears to be populated with the OLD value. Unless I

Re: [GENERAL] BDR questions?

2015-08-27 Thread Alvaro Herrera
Ray Stell wrote: > Is there an preferred BDR? Should there be a mailing-list? This is the list for BDR questions. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-general mailing list (pgsql-g

[GENERAL] BDR questions?

2015-08-27 Thread Ray Stell
Is there an preferred BDR? Should there be a mailing-list? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Adrian Klaver
On 08/27/2015 06:33 AM, Christopher BROWN wrote: Hello Adrian, Yep, Charles' explanation helped me understand what was going on. Before that, I was as confused as you were (in your first reply) about how access_mode could be NULL (with the same reasoning). In any case, thanks for your links ; I

Re: [GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Charles Clavadetscher
Hi > -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Adrian Klaver > Sent: Donnerstag, 27. August 2015 15:41 > To: Christopher BROWN > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Strange TRIGGER failur

Re: [GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Adrian Klaver
On 08/27/2015 06:33 AM, Christopher BROWN wrote: Hello Adrian, Yep, Charles' explanation helped me understand what was going on. Before that, I was as confused as you were (in your first reply) about how access_mode could be NULL (with the same reasoning). In any case, thanks for your links ; I

Re: [GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Christopher BROWN
Hello Adrian, Yep, Charles' explanation helped me understand what was going on. Before that, I was as confused as you were (in your first reply) about how access_mode could be NULL (with the same reasoning). In any case, thanks for your links ; I did try searching the web for the answer before p

Re: [GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Christopher BROWN
Hello Charles, Your first suggestion effectively matches what I did as a workaround, with the advantage that your suggestion explicitly orders the columns and has an explanation attached... and your second suggestion seems to match what I was originally trying to do. I was, perhaps naively, tryin

Re: [GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Adrian Klaver
On 08/27/2015 04:49 AM, Christopher BROWN wrote: Hello, I'm new to this list but have been using PostgreSQL for a moment. I've encountered an error using PostgreSQL 9.4.4 which can be reproduced using the SQL below. The trigger "init_store_ldap_profiles_trigger" fails if the function "init_sto

Re: [GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Adrian Klaver
On 08/27/2015 04:49 AM, Christopher BROWN wrote: Hello, I'm new to this list but have been using PostgreSQL for a moment. I've encountered an error using PostgreSQL 9.4.4 which can be reproduced using the SQL below. The trigger "init_store_ldap_profiles_trigger" fails if the function "init_sto

Re: [GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Charles Clavadetscher
Another possibility is CREATE OR REPLACE FUNCTION init_store_ldap_profiles() RETURNS TRIGGER AS $$ DECLARE r RECORD; BEGIN FOR r IN SELECT id, ref_ldap_department, ref_ldap_title, access_mode FROM application.store_ldap_profile_defaults WHERE format = NEW.format

Re: [GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Charles Clavadetscher
Hello You declare your variable r as of type application.store_ldap_profile_defaults%rowtype, but then select only 4 of the 5 fields of the table to put in there. The last one (happens to be access_mode is then null). The structures don’t match. That may explain this behaviour. This wor

[GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Christopher BROWN
Hello, I'm new to this list but have been using PostgreSQL for a moment. I've encountered an error using PostgreSQL 9.4.4 which can be reproduced using the SQL below. The trigger "init_store_ldap_profiles_trigger" fails if the function "init_store_ldap_profiles()" is written as below. If I rewr

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-27 Thread Igor Sosa Mayor
Adrian Klaver writes: > Best guess, since this is a laptop, the network is not connected until > NetworkManager(or something similar) is active. On my laptop that > happens late in the startup sequence, after Postgres starts. This is > especially true if you are connecting to a wireless AP. I ca