"Charles Clavadetscher" writes:
> Are you sure that you really use exactly the same code? The indication
> "survice unknown" seems to point to an error in the URL and not to an
> authorization problem. Maybe some encoding problem?
THnaks for your hints.
Yes, exactly the same code. Exactly the s
Hi
Weird. According to
http://geopy.readthedocs.org/en/latest/#geopy.exc.GeocoderServiceError this
is the most generic exception, only used when there is not a more specific
one (which include by the way problems caused by connectivity and
authorization). The message of the exception is supposed t
El 21/08/15 a las 20:45, Florin Andrei escribió:
>
> The single instance scheme is not very reliable. I need to build a new
> DB backend. I'll set up Postgres 9.4. Ideally, I'd like to setup 2
> instances, each instance placed in a different availability zone.
> Master/master replication. I'll put
On 08/23/2015 12:09 AM, Igor Sosa Mayor wrote:
"Charles Clavadetscher" writes:
Are you sure that you really use exactly the same code? The indication
"survice unknown" seems to point to an error in the URL and not to an
authorization problem. Maybe some encoding problem?
THnaks for your hint
It might be a dumb thought, but...
Did you run the script from ipython as postgres user?
External programs called by triggers run as postgres, and maybe your
postgres user doesn't have rights to reach the remote service.
Regards,
Sandor
On 23 August 2015 at 09:09, Igor Sosa Mayor
wrote:
> "Ch
I think we should add a step 6.5 (before step 7 Stop both servers) with
something like:
If you are upgrading both a primary and standby, then we need to make sure the
standby is caught up.
If you are wal shipping then on primary run: select pg_switch_xlog();
shut down primary
before you shut do
On 08/23/2015 12:09 AM, Igor Sosa Mayor wrote:
"Charles Clavadetscher" writes:
Are you sure that you really use exactly the same code? The indication
"survice unknown" seems to point to an error in the URL and not to an
authorization problem. Maybe some encoding problem?
THnaks for your hint
"Charles Clavadetscher" writes:
>> Yes, exactly the same code. Exactly the same query: two consoles, one with
>> postgres, other with ipython. Postgres gives the error; ipython works.
>
> Somehow I expected that answer. I am not a python expert, but it happens
> that different pieces of code at t
Adrian Klaver writes:
> What happens if you run the function below directly in psql and not
> through the trigger?
exactly the same error.
> Do you have both Python 2 and Python 3 on this machine?
I have both.
> Did you create both the 2u and 3u variants of plpythonu?
I tried both... in my
s d writes:
> It might be a dumb thought, but...
thanks. There are not dumb thoughts with such problems...
> Did you run the script from ipython as postgres user?
> External programs called by triggers run as postgres, and maybe your
> postgres user doesn't have rights to reach the remote servi
Adrian Klaver writes:
> I tried it here, using your functions, and could not get it to fail:
well... i'm happy my function is working... my 1. procedure in PG... Now
maybe I'm able to get it working in my laptop...
> So it is something to do with the setup on your laptop.
yes, or the network I
On 08/23/2015 09:53 AM, Igor Sosa Mayor wrote:
Adrian Klaver writes:
What happens if you run the function below directly in psql and not
through the trigger?
exactly the same error.
Do you have both Python 2 and Python 3 on this machine?
I have both.
Did you create both the 2u and 3u v
On 08/23/2015 09:53 AM, Igor Sosa Mayor wrote:
Adrian Klaver writes:
What happens if you run the function below directly in psql and not
through the trigger?
exactly the same error.
Do you have both Python 2 and Python 3 on this machine?
I have both.
Did you create both the 2u and 3u v
On 08/23/2015 10:02 AM, Igor Sosa Mayor wrote:
Adrian Klaver writes:
I tried it here, using your functions, and could not get it to fail:
well... i'm happy my function is working... my 1. procedure in PG... Now
maybe I'm able to get it working in my laptop...
So it is something to do with
On 23 August 2015 at 18:59, Igor Sosa Mayor
wrote:
> s d writes:
>
> > It might be a dumb thought, but...
>
> thanks. There are not dumb thoughts with such problems...
>
> > Did you run the script from ipython as postgres user?
> > External programs called by triggers run as postgres, and maybe
Adrian Klaver writes:
>> I tried both... in my system (archlinux) there is plpython2u and
>> plpythonu. I think the 2nd one is python3.
>
> How did they get there?
>
> Or more to the point how where they built?
just installed with postgresql which comes with archlinux. I did not
built anything.
Adrian Klaver writes:
> What is the default system Python?
python3. But see my other answer. I dont think this is the problem.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 08/23/2015 10:38 AM, Igor Sosa Mayor wrote:
Adrian Klaver writes:
I tried both... in my system (archlinux) there is plpython2u and
plpythonu. I think the 2nd one is python3.
How did they get there?
Or more to the point how where they built?
just installed with postgresql which comes wi
Igor Sosa Mayor writes:
> Adrian Klaver writes:
>> Or more to the point how where they built?
> just installed with postgresql which comes with archlinux. I did not
> built anything. But, really: I dont think the problem is plpython2u o 3:
> 1. I have in my system both and both have the same lib
On 8/23/2015 10:49 AM, Tom Lane wrote:
However, what this smells like to me is a permissions problem. I think
you were way too quick to dismiss the idea that SELinux (or something
just like it) is restricting outbound internet connections from Postgres.
It's standard for SELinux to be configured
In cases like this I normally restart the progresql under strace/truss
etc and then wade through the output, it will normally tell me which
process was invoked.
On 23/08/15 18:49, Tom Lane wrote:
> Igor Sosa Mayor writes:
>> Adrian Klaver writes:
>>> Or more to the point how where they built?
>>
Igor Sosa Mayor writes:
> My question is therefore:
> 1. is there a way to permit the pl/python to connect to the internet all
>the time and with a better configuration?
> 2. or should I forget the procedure and write a python script outside
>the database?
I want to update the situation
Hello:
I have a time series table,
using below sql, loop (psque code), I can get one row for each hour
for( H=1: H< 9; H++){
select * from table where t >= H and t < H+1 limit 1
}
t (time column) is indexed).
Is there a better way to use a issue a SINGLE SQL
with an array of time st
Well, I would say the following might work:
SELECT *
FROM table
WHERE t >=1
LIMIT 8;
On Sun, Aug 23, 2015 at 5:05 PM, Tom Smith wrote:
> Hello:
>
> I have a time series table,
> using below sql, loop (psque code), I can get one row for each hour
>
> for( H=1: H< 9; H++){
>selec
Correction:
SELECT DISTINCT ON EXTRACT(HOUR FROM you_time_column)
*
FROM table
WHERE t >=1
LIMIT 8;
On Sun, Aug 23, 2015 at 5:38 PM, Melvin Davidson
wrote:
> Well, I would say the following might work:
>
> SELECT *
> FROM table
> WHERE t >=1
> LIMIT 8;
>
> On S
On Sun, Aug 23, 2015 at 4:05 PM, Tom Smith wrote:
> Hello:
>
> I have a time series table,
> using below sql, loop (psque code), I can get one row for each hour
>
s/psque/pseudo/g;
>
> for( H=1: H< 9; H++){
>select * from table where t >= H and t < H+1 limit 1
> }
>
> t (time co
Melvin's use of DISTINCT ON (...) is superior to my use of DISTINCT(...)
because it doesn't return the value to your program. I keep forgetting this
way. I learned it the other way. Old dog + new trick == problem.
On Sun, Aug 23, 2015 at 5:04 PM, John McKown
wrote:
> On Sun, Aug 23, 2015 at 4:05
Yes, I agree. I was a bit confused by the term "time" column. Not mention,
the O/S and PG version were not given.
If column t is truly type time, then only 24 rows can be returned
regardless of limit, as in this Universe, there are only 24 hrs in time.
However, if t is a timestamp, that is a whole
On 08/23/2015 01:15 PM, Igor Sosa Mayor wrote:
Igor Sosa Mayor writes:
My question is therefore:
1. is there a way to permit the pl/python to connect to the internet all
the time and with a better configuration?
2. or should I forget the procedure and write a python script outside
the
Sorry for the confusion. I will later find a better way to present the
issue.
But thanks for everyone's help.
On Sun, Aug 23, 2015 at 6:20 PM, Melvin Davidson
wrote:
> Yes, I agree. I was a bit confused by the term "time" column. Not mention,
> the O/S and PG version were not given.
> If column
Melvin Davidson schrieb am 22.08.2015 um 21:40:
> Thank you for pointing out "run with standard_conforming_strings = ON"..
> However, that is NOT the problem.
> What is occurring is that the developers are sending strings like 'Mr.
> M\'vey',
> which, if we set standard_conforming_strings = ON, wo
Melvin Davidson schrieb am 22.08.2015 um 17:15:
> I've attached a file with a few starters that although are numbered,
> are in no special order.
> 2. End ALL queries with a semi-colon (;)
>EG: SELECT some_column FROM a_table;
>
>Although autocommit is on by default, it is always a go
32 matches
Mail list logo