Re: [GENERAL] foreign key from array element

2012-09-24 Thread Gabriele Bartolini
Hi Rafal, Il 24/09/12 07:54, Rafal Pietrak ha scritto: I did what I could - the review is on the hackers list. Thanks! That's much appreciated. Should I do anything else to finilize this review, like linking it to the pending patch? somehow? -R You should update the

[GENERAL] Need to run a job in PgAdmin-III

2012-09-24 Thread pavithra
I have pgAdmin-III.It has version 1.12.3.I would like to run a job. I have schedule an SQL Job. But when i run there is no output.Can anybody let me know what needs to be done?.Also, Can any one tell, where i need to look for the errors, when i run a job?. -- View this message in context:

Re: [GENERAL] Need to run a job in PgAdmin-III

2012-09-24 Thread John R Pierce
On 09/23/12 11:24 PM, pavithra wrote: I have pgAdmin-III. It has version 1.12.3. I would like to run a job. I have schedule an SQL Job. But when i run there is no output. Can anybody let me know what needs to be done?. Also, Can any one tell, where i need to look for the errors, when i run a

Re: [GENERAL] Need to run a job in PgAdmin-III

2012-09-24 Thread Raghavendra
On Mon, Sep 24, 2012 at 12:27 PM, John R Pierce pie...@hogranch.com wrote: On 09/23/12 11:24 PM, pavithra wrote: I have pgAdmin-III. It has version 1.12.3. I would like to run a job. I have schedule an SQL Job. But when i run there is no output. Can anybody let me know what needs to be

[GENERAL] Memory issues

2012-09-24 Thread Shiran Kleiderman
Hi, I'm using and Amazon ec2 instance with the following spec and the application that I'm running uses a postgres DB 9.1. The app has 3 main cron jobs. *Ubuntu 12, High-Memory Extra Large Instance 17.1 GB of memory 6.5 EC2 Compute Units (2 virtual cores with 3.25 EC2 Compute Units each) 420 GB

[GENERAL] enter/leave session triggers

2012-09-24 Thread Rafal Pietrak
Hi, Have there been any discussion on the list on triggers fires when new session (libpg session to server?) is opened/closed? Somehow I cannot google anything with the keywords I use. And the question is: has postgresql any plans to have: 1. triggers that fire BEFORE/AFTER user opens a session

Re: [GENERAL] Need to run a job in PgAdmin-III

2012-09-24 Thread pavithra
I have a scheduled a sql query as select sysdate from dual and i have given as Data Export. Moreover i cant see the debugger option, or any error log where i can see it, Can you tell me any suggestions on this?. -- View this message in context:

Re: [GENERAL] Need to run a job in PgAdmin-III

2012-09-24 Thread Leif Biberg Kristensen
Mandag 24. september 2012 11.06.32 skrev pavithra : I have a scheduled a sql query as select sysdate from dual and i have given as Data Export. That's an Oraclism. Have you actually tested the query in psql? postgres= select sysdate from dual; ERROR: relation dual does not exist LINE 1:

Re: [GENERAL] Need to run a job in PgAdmin-III

2012-09-24 Thread pavithra
I dont get my psql console itself disabled in the plug-ins menu.Is there a way i can see the error log?. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Need-to-run-a-job-in-PgAdmin-III-tp5725093p5725110.html Sent from the PostgreSQL - general mailing list archive at

Re: [GENERAL] Question about upgrading extensions

2012-09-24 Thread Albe Laurenz
Chris Travers wrote: If one releases an extension with say a version number of 0.1 and then releases one with important changes at 0.2, how is the best way to manage these changes? I couldn't find anything in the docs to discuss this issue. Am I missing something? Specifically for

[GENERAL] Re: Upgrade from 8.4.13 to 9.2.0.1 successful but it still displays 8.4.13 if SELECT version();

2012-09-24 Thread Jasen Betts
On 2012-09-23, a...@hsk.hk a...@hsk.hk wrote: Hi, I have upgraded postgresql 8.4.13 to 9.2.0.1 O/S Ubuntu, restarted postgresql, it displayed my postgresql is 9.2 but when I log into postgresql, show version, it is still 8.4.13, see a) and b) below, read the man pages for

[GENERAL] Python mapping with new 9.2 data types

2012-09-24 Thread Daniele Varrazzo
Hello, I've worked at Python-Postgres mapping for the new PostgreSQL 9.2 data types. They should be released with the next psycopg2 version. The current design, susceptible to changes if needed, is documented here: - JSON adaptation: http://initd.org/psycopg/docs/extras.html#json-adaptation -

Re: [GENERAL] 9.1 vs 8.4 performance

2012-09-24 Thread salah jubeh
Hello Guys, Thanks for reply, and sorry for late response. Here is more details. 1. Both servers  are installed on parallel on the same machine, so there is no difference in Hardware. 2. Both servers have the same configuration setting except the ports (5432 and 5433). 3. I have run VACUUM

[GENERAL] Timeline switch problem with streaming replication with 3 nodes

2012-09-24 Thread Mads . Tandrup
Hi All I've set up a 3 postgresql nodes 1 master and 2 slaves. They have been configured for streaming replication with synchronous on. I've set up an virtual IP that points to the current master node. When I kill the master node. The slave that was synchronous gets promoted to master and gets

Re: [GENERAL] 9.1 vs 8.4 performance

2012-09-24 Thread Merlin Moncure
On Mon, Sep 24, 2012 at 5:47 AM, salah jubeh s_ju...@yahoo.com wrote: Hello Guys, Thanks for reply, and sorry for late response. Here is more details. 1. Both servers are installed on parallel on the same machine, so there is no difference in Hardware. 2. Both servers have the same

[GENERAL] Running CREATE only on certain Postgres versions

2012-09-24 Thread Robert James
I have some code which creates a function in Postgres, taken from http://wiki.postgresql.org/wiki/Array_agg . DROP AGGREGATE IF EXISTS array_agg(anyelement); CREATE AGGREGATE array_agg(anyelement) ( SFUNC=array_append, STYPE=anyarray, INITCOND='{}' ); The function was added in 8.4, and so the

[GENERAL] Prolem to acess PostgeSQL from other mechine

2012-09-24 Thread Arun R T
Hi I have some problem to connect PostgeSQL server from client mechine, error and code is given below. I am using Windows 7 OS Code public static void main(String[] args) {                 try {             System.out.println(Connecting..);            

Re: [GENERAL] Strange dump/restore effect

2012-09-24 Thread Paul Ramsey
Try just loading the 1.5 dump directly into the 2.0 database without the filtering step. It will be immensely noisy with lots of errors and warnings, but with luck you should find your data is there waiting for you when it's done. P On Sun, Sep 23, 2012 at 2:37 PM, Gražvydas Valeika

Re: [GENERAL] Prolem to acess PostgeSQL from other mechine

2012-09-24 Thread David Johnston
And the IP address of the machine you are trying to connect from is? From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Arun R T Sent: Sunday, September 23, 2012 11:51 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Prolem to acess

[GENERAL] In one of negative test row-level trigger results into loop

2012-09-24 Thread Amit Kapila
Below test results into Loop: 1.create test table CREATE TABLE TEST_TABLE (NAME VARCHAR2, AGE INT); 2.create trigger function CREATE OR REPLACE FUNCTION TRIG_FUNC () RETURNS TRIGGER AS $$ DECLARE PSQL VARCHAR2; BEGIN Raise info 'This is Test!!!'; psql:= 'INSERT INTO TEST_TABLE

Re: [GENERAL] In one of negative test row-level trigger results into loop

2012-09-24 Thread Tom Lane
Amit Kapila amit.kap...@huawei.com writes: Below test results into Loop: [ AFTER INSERT trigger does another insert into its target table ] Well, of course. The INSERT results in scheduling another AFTER event. I understand that user can change his code to make it proper. However

[GENERAL] How to do a full-text search words within some proximity of each other?

2012-09-24 Thread W. Matthew Wilson
I noticed in elastic search (ES), you can do queries like a b~4 I think this query will match stuff like a b and a x x b but not something like a x x x x x x x x b. I'm not sure if this kind of thing is possible with postgresql full text search. Is it possible? I understand that I can do

Re: [GENERAL] Prolem to acess PostgeSQL from other mechine

2012-09-24 Thread Bosco Rama
On 09/23/12 20:50, Arun R T wrote: I have some problem to connect PostgeSQL server from client mechine [snip] org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. Given this ^^^ follow the

[GENERAL] N-tile function in postgres

2012-09-24 Thread Rachel Owsley
Hi, Can anyone help me with an aggregate query I am having trouble with? I want to get the top 5 or top 10 most frequently shopped in merchant categories for each account holder at a bank and put each of the quintiles/deciles into separate columns. I would also like to put the average

Re: [GENERAL] Prolem to acess PostgeSQL from other mechine

2012-09-24 Thread Adrian Klaver
On 09/23/2012 08:50 PM, Arun R T wrote: Hi I have some problem to connect PostgeSQL server from client mechine, error and code is given below. I am using Windows 7 OS Code public static void main(String[] args) { try { System.out.println(Connecting..);

Re: [GENERAL] In one of negative test row-level trigger results into loop

2012-09-24 Thread Adrian Klaver
On 09/24/2012 07:03 AM, Amit Kapila wrote: Below test results into Loop: 1.create test table CREATE TABLE TEST_TABLE (NAME VARCHAR2, AGE INT); 2.create trigger function CREATE OR REPLACE FUNCTION TRIG_FUNC () RETURNS TRIGGER AS $$ DECLARE PSQL VARCHAR2; BEGIN Raise info

Re: [GENERAL] Running CREATE only on certain Postgres versions

2012-09-24 Thread Daniele Varrazzo
On Mon, Sep 24, 2012 at 2:32 PM, Robert James srobertja...@gmail.com wrote: I have some code which creates a function in Postgres, taken from http://wiki.postgresql.org/wiki/Array_agg . DROP AGGREGATE IF EXISTS array_agg(anyelement); CREATE AGGREGATE array_agg(anyelement) (

Re: [GENERAL] N-tile function in postgres

2012-09-24 Thread François Beausoleil
Le 2012-09-24 à 12:32, Rachel Owsley a écrit : Hi, Can anyone help me with an aggregate query I am having trouble with? I want to get the top 5 or top 10 most frequently shopped in merchant categories for each account holder at a bank and put each of the quintiles/deciles into

Re: [GENERAL] N-tile function in postgres

2012-09-24 Thread Rachel Owsley
Thank you, François! This is very helpful! I'll give this query a try. I don't know the cross-tab function, but that's exactly what I want to do for the column output. Regarding the sample query, I see the min (amount), but how is the upper bound defined for each decile? Thanks, Rachel From:

Re: [GENERAL] Running CREATE only on certain Postgres versions

2012-09-24 Thread Igor Neyman
-Original Message- From: Robert James [mailto:srobertja...@gmail.com] Sent: Monday, September 24, 2012 9:33 AM To: Postgres General Subject: Running CREATE only on certain Postgres versions I have some code which creates a function in Postgres, taken from

[GENERAL] Custom prompt

2012-09-24 Thread craig
Good afternoon, When accessing PostgreSQL via psql, is it possible to make use of a custom prompt? I would like something like postgres=# instead of just postgres=#. My search was fruitless (see next paragraph). And if I'm allowed two questions in one post, how does one search for a phrase

Re: [GENERAL] Custom prompt

2012-09-24 Thread Adrian Klaver
On 09/24/2012 11:20 AM, cr...@gtek.biz wrote: Good afternoon, When accessing PostgreSQL via psql, is it possible to make use of a custom prompt? I would like something like postgres=# instead of just postgres=#. My search was fruitless (see next paragraph). Should have added: To make it

Re: [GENERAL] Custom prompt

2012-09-24 Thread craig
When accessing PostgreSQL via psql, is it possible to make use of a custom prompt? I would like something like postgres=# instead of just postgres=#. My search was fruitless (see next paragraph). Should have added: To make it stick between sessions you can use a psqlrc file. They are handy

Re: [GENERAL] Custom prompt

2012-09-24 Thread Adrian Klaver
On 09/24/2012 11:20 AM, cr...@gtek.biz wrote: Good afternoon, When accessing PostgreSQL via psql, is it possible to make use of a custom prompt? I would like something like postgres=# instead of just postgres=#. My search was fruitless (see next paragraph).

Re: [GENERAL] Custom prompt

2012-09-24 Thread craig
Try along the lines of psql -h some.host.com -U postgres -v PROMPT1=*my_cool_prompt%/ -d my_db Works like a charm! Do I have a dot file that I can save this setting to, similar to the .exrc for vi, or will I need to enter it every time? If the latter, I'll alias it, but I'd rather

Re: [GENERAL] Custom prompt

2012-09-24 Thread David Salisbury
On 9/24/12 12:20 PM, cr...@gtek.biz wrote: Good afternoon, When accessing PostgreSQL via psql, is it possible to make use of a custom prompt? I would like something like postgres=# instead of just postgres=#. My search was fruitless (see next paragraph). And if I'm allowed two questions in

Re: [GENERAL] Custom prompt

2012-09-24 Thread craig
Apologies to all, I didn't realize this ISPs webmail client doesn't wrap lines. My reply, formatted in a more readable way: On Monday, September 24, 2012 14:07, cr...@gtek.biz said: When accessing PostgreSQL via psql, is it possible to make use of a custom prompt? I would like something like

Re: [GENERAL] How to do a full-text search words within some proximity of each other?

2012-09-24 Thread Oleg Bartunov
something like this ? http://www.sai.msu.su/~megera/wiki/2009-08-12 http://www.sai.msu.su/~megera/postgres/talks/algebra-fts.pdf Unfortunately, we get no support for this work, so we stop maintaining phrase-search patch. I even thinking about kikstarter.com to get money for this project :)

Re: [GENERAL] N-tile function in postgres

2012-09-24 Thread François Beausoleil
Le 2012-09-24 à 14:12, Rachel Owsley a écrit : Thank you, François! This is very helpful! I’ll give this query a try. I don’t know the cross-tab function, but that’s exactly what I want to do for the column output. Regarding the sample query, I see the min (amount), but how is the upper

Re: [GENERAL] N-tile function in postgres

2012-09-24 Thread Rachel Owsley
Thank you, François!! Got it. :) From: François Beausoleil [mailto:franc...@teksol.info] Sent: Monday, September 24, 2012 3:37 PM To: Rachel Owsley Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] N-tile function in postgres Le 2012-09-24 à 14:12, Rachel Owsley a écrit : Thank you,

[GENERAL] What am I doing wrong?

2012-09-24 Thread François Beausoleil
I'm in the single-slave scenario, with hot standby capabilities, meaning I want to run queries on the slave. I'm running some tests to evaluate pgbarman, on Ubuntu 11.10. I used only packaged PostgreSQL, and I'm running version PostgreSQL 9.1.5 on x86_64-pc-linux-gnu, compiled by gcc-4.6.real

Re: [GENERAL] Running CREATE only on certain Postgres versions

2012-09-24 Thread Robert James
Unfortunately, SELECT VERSION() gives a long text string - parsing out the version isn't reliable. So, we can reduce my question to a simpler question: What's the best way to determine if postgres is running version x? Or, what's the best way to determine the exact version number

Re: [GENERAL] Running CREATE only on certain Postgres versions

2012-09-24 Thread David Johnston
Server parameter: server_version_num http://www.postgresql.org/docs/9.2/interactive/runtime-config-preset.html David J. On Sep 24, 2012, at 21:23, Robert James srobertja...@gmail.com wrote: Unfortunately, SELECT VERSION() gives a long text string - parsing out the version isn't reliable.

[GENERAL] plpython2u not getting any output - on independent script I get the desired output

2012-09-24 Thread ichBinRene
Hello everybody and thanks for your attention. I have this function: ### CREATE OR REPLACE FUNCTION check_current_xlog() RETURNS text AS $$ import subprocess p = subprocess.Popen(ssh repuser@localhost -p

Re: [GENERAL] Timeline switch problem with streaming replication with 3 nodes

2012-09-24 Thread Stuart Bishop
On Mon, Sep 24, 2012 at 7:37 PM, mads.tand...@schneider-electric.com wrote: I've found a discussion (http://archives.postgresql.org/pgsql-general/2011-12/msg00553.php) on a similar issue a while back. They talk about sharing WAL files as the solution. But I thought that the idea with

Re: [GENERAL] In one of negative test row-level trigger results into loop

2012-09-24 Thread Amit Kapila
On Monday, September 24, 2012 7:44 PM Adrian Klaver On 09/24/2012 07:03 AM, Amit Kapila wrote: Below test results into Loop: 1.create test table CREATE TABLE TEST_TABLE (NAME VARCHAR2, AGE INT); 2.create trigger function CREATE OR REPLACE FUNCTION TRIG_FUNC () RETURNS TRIGGER