[GENERAL] Bug? Prepared queries continue to use search_path from their preparation time

2012-07-11 Thread Toby Corkindale
Hi, I've encountered something that might be a bug in DBD::Pg, or might be a feature of PostgreSQL itself. The issue occurs when you have server-side prepared queries enabled, and then change the search_path parameter after creating a prepared query. Future executions of that query still

[GENERAL] foreign keys with constant part

2012-07-11 Thread Marc Mamin
Hello, I have to define a foreign relation to something like a unique partial index. I could do achieve this with triggers, but I already have too much of them, which make the model hard to understand. for now, I will just add a constant column which allows to define a standard foreign key.

[GENERAL] Fulltext Search Function

2012-07-11 Thread Jeremaine Johnson
Hi, I have a full text search query (below) which works fine but would like to write a function which will make use of this query passing in two parameters, any ideas please? SELECT name, description, ts_rank_cd(textsearchable_index_col, query, 32 /* rank/(rank+1) */) AS rank FROM

[GENERAL] Key not present in table, but it is.

2012-07-11 Thread Emanuel Calvo
Version: psql version 9.0, server version 9.1. PostgreSQL 9.1.3 on x86_64-apple-darwin11.3.0, compiled by i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00), 64-bit Executed the following statement: INSERT INTO dia4.veraz(dni,desde) ( SELECT

Re: [GENERAL] Error with plpython

2012-07-11 Thread Efraín Déctor
Hello. This is what returns the 2 servers: Production Server: ['/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-freebsd8', '/usr/local/lib/python2.7/lib-tk',

Re: [GENERAL] Transaction question

2012-07-11 Thread Jeff Ross
On 7/10/12 8:39 PM, Adrian Klaver wrote: On 07/10/2012 07:30 PM, Jeff Ross wrote: On 7/10/12 6:21 PM, Adrian Klaver wrote: On 07/10/2012 01:06 PM, Jeff Ross wrote: Hi all, Thanks for any and all ideas! For your initial attempt everything was done in one session? All the inserts were

Re: [GENERAL] Bug? Prepared queries continue to use search_path from their preparation time

2012-07-11 Thread Tom Lane
Toby Corkindale toby.corkind...@strategicdata.com.au writes: The issue occurs when you have server-side prepared queries enabled, and then change the search_path parameter after creating a prepared query. Future executions of that query still seem to be using the original search_path. This

Re: [GENERAL] Bug? Prepared queries continue to use search_path from their preparation time

2012-07-11 Thread Jerry Sievers
Toby Corkindale toby.corkind...@strategicdata.com.au writes: Hi, I've encountered something that might be a bug in DBD::Pg, or might be a feature of PostgreSQL itself. The issue occurs when you have server-side prepared queries enabled, and then change the search_path parameter after

[GENERAL] Fulltext Search Function

2012-07-11 Thread Jeremaine Johnson
Hi, I am new to Postgres and I've been able to get the full text search working, (at least running searches in PGAdmin) my problem is, I would like to pass in a search text from my online application as an input parameter into a function in Postgres that would do a search on my table and not

Re: [GENERAL] Python + listen/notify

2012-07-11 Thread Josh Kupershmidt
[Please keep the list CC'd] On Wed, Jul 11, 2012 at 3:58 AM, Filipe brandão fg.bran...@gmail.com wrote: Now, i only need to link these processes (trigger completion and running the script). How can i do it with Listen / Notify? Issue a notify in the end of the trigger and a listen on the

Re: [GENERAL] Key not present in table, but it is.

2012-07-11 Thread Tom Lane
Emanuel Calvo postgres@gmail.com writes: Executed the following statement: ... ERROR: insert or update on table veraz violates foreign key constraint veraz_dni_fkey DETAIL: Key (dni)=(21530976) is not present in table persona. But the record is present: coches=# select * from

Re: [GENERAL] Key not present in table, but it is.

2012-07-11 Thread Emanuel Calvo
2012/7/11 Tom Lane t...@sss.pgh.pa.us: Emanuel Calvo postgres@gmail.com writes: Executed the following statement: ... ERROR: insert or update on table veraz violates foreign key constraint veraz_dni_fkey DETAIL: Key (dni)=(21530976) is not present in table persona. But the record is

[GENERAL] Please Post

2012-07-11 Thread Gregorio, Albert
I am working with PostgreSQL 9.1.3 - I setup a master and standby - Initiated replication and verified that it was occurring - Failed over from master to standby and verified that the database could be updated on the new master - I then configured the former standby as a master, the former master

[GENERAL] installation problem with postgres password

2012-07-11 Thread KOTa
Hi all, i am trying to install postgres on a new machine with win 7. i tried two different versions (9.0.4 and 9.1.4) and the problem is the same when i run installation it asks me to provide a password for superuser and service account, i tried to enter numerous options, including leaving it

Re: [GENERAL] Bug? Prepared queries continue to use search_path from their preparation time

2012-07-11 Thread Jerry Sievers
Toby Corkindale toby.corkind...@strategicdata.com.au writes: Hi, I've encountered something that might be a bug in DBD::Pg, or might be a feature of PostgreSQL itself. The issue occurs when you have server-side prepared queries enabled, and then change the search_path parameter after

[GENERAL] question about installation

2012-07-11 Thread martin soethof
HelloI have the following situation.I used a postgres installer that can choose seperate paths for the normal postgres and the data folder.I used this because i wanted to share a database on an external hard drive between 2 computers.I installed it on PC #1, the normal postgres files are on

Re: [GENERAL] Sequence moves forward when failover is triggerred

2012-07-11 Thread Berend Tober
Craig Ringer wrote: On 07/11/2012 07:23 AM, Andy Chambers wrote: I think I made a poor decision by having our application generate checkbook numbers on demand using sequences. Sure did. Sequences are exempt from most transactional rules; that's why they're fast and lock-free. This may be

Re: [GENERAL] question about installation

2012-07-11 Thread Raymond O'Donnell
On 11/07/2012 13:58, martin soethof wrote: Hello I have the following situation. I used a postgres installer that can choose seperate paths for the normal postgres and the data folder. I used this because i wanted to share a database on an external hard drive between 2 computers. I

Re: [GENERAL] installation problem with postgres password

2012-07-11 Thread Raymond O'Donnell
On 11/07/2012 15:47, KOTa wrote: Hi all, i am trying to install postgres on a new machine with win 7. i tried two different versions (9.0.4 and 9.1.4) and the problem is the same when i run installation it asks me to provide a password for superuser and service account, i tried to

Re: [GENERAL] Error with plpython

2012-07-11 Thread Adrian Klaver
On 07/11/2012 06:32 AM, Efraín Déctor wrote: Hello. This is what returns the 2 servers: Production Server: ['/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-freebsd8',

Re: [GENERAL] Transaction question

2012-07-11 Thread Adrian Klaver
On 07/11/2012 07:01 AM, Jeff Ross wrote: On 7/10/12 8:39 PM, Adrian Klaver wrote: On 07/10/2012 07:30 PM, Jeff Ross wrote: On 7/10/12 6:21 PM, Adrian Klaver wrote: On 07/10/2012 01:06 PM, Jeff Ross wrote: Hi all, Thanks for any and all ideas! For your initial attempt everything was

Re: [GENERAL] Transaction question

2012-07-11 Thread Adrian Klaver
On 07/11/2012 07:01 AM, Jeff Ross wrote: On 7/10/12 8:39 PM, Adrian Klaver wrote: On 07/10/2012 07:30 PM, Jeff Ross wrote: On 7/10/12 6:21 PM, Adrian Klaver wrote: On 07/10/2012 01:06 PM, Jeff Ross wrote: Hi all, Thanks for any and all ideas! So would it be possible to see the

Re: [GENERAL] Sequence moves forward when failover is triggerred

2012-07-11 Thread Steve Crawford
On 07/10/2012 04:23 PM, Andy Chambers wrote: On Tue, Jul 10, 2012 at 6:48 PM, Tom Lane t...@sss.pgh.pa.us mailto:t...@sss.pgh.pa.us wrote: Andy Chambers achamb...@mcna.net mailto:achamb...@mcna.net writes: When testing the failover procedure, we noticed that when the new master

[GENERAL] PostgreSQL limitations question

2012-07-11 Thread Bartosz Dmytrak
Hi All I found PG limitations (http://www.postgresql.org/about/): - Maximum Rows per Table - Unlimited - Maximum Table Size - 32 TB My question is: how is it possible to *reach* unlimited rows in table? I did a test: 1. Create Table: CREATE TABLE test.limits(RowValue text) WITH

Re: [GENERAL] Transaction question

2012-07-11 Thread Jeff Ross
On 7/11/12 2:07 PM, Adrian Klaver wrote: On 07/11/2012 07:01 AM, Jeff Ross wrote: On 7/10/12 8:39 PM, Adrian Klaver wrote: On 07/10/2012 07:30 PM, Jeff Ross wrote: On 7/10/12 6:21 PM, Adrian Klaver wrote: On 07/10/2012 01:06 PM, Jeff Ross wrote: Hi all, Thanks for any and all ideas!

Re: [GENERAL] Transaction question

2012-07-11 Thread Adrian Klaver
On 07/11/2012 02:41 PM, Jeff Ross wrote: On 7/11/12 2:07 PM, Adrian Klaver wrote: On 07/11/2012 07:01 AM, Jeff Ross wrote: On 7/10/12 8:39 PM, Adrian Klaver wrote: On 07/10/2012 07:30 PM, Jeff Ross wrote: On 7/10/12 6:21 PM, Adrian Klaver wrote: On 07/10/2012 01:06 PM, Jeff Ross wrote: Hi

Re: [GENERAL] Transaction question

2012-07-11 Thread Marcin Mańk
On Tue, Jul 10, 2012 at 10:06 PM, Jeff Ross jr...@wykids.org wrote: 2012-06-19 15:37:36.283752500 www%wykids LOG: statement: update survey_response set srv_resp_submitted = now() where srv_resp_srv_id = 2 and srv_resp_pp_id = 25399 jross@wykids localhost# select * from survey_response

Re: [GENERAL] Transaction question

2012-07-11 Thread Jeff Ross
On 7/11/12 3:52 PM, Adrian Klaver wrote: On 07/11/2012 02:41 PM, Jeff Ross wrote: On 7/11/12 2:07 PM, Adrian Klaver wrote: On 07/11/2012 07:01 AM, Jeff Ross wrote: On 7/10/12 8:39 PM, Adrian Klaver wrote: On 07/10/2012 07:30 PM, Jeff Ross wrote: On 7/10/12 6:21 PM, Adrian Klaver wrote: On

Re: [GENERAL] Transaction question

2012-07-11 Thread Jeff Ross
On 7/11/12 4:24 PM, Marcin Mańk wrote: On Tue, Jul 10, 2012 at 10:06 PM, Jeff Ross jr...@wykids.org mailto:jr...@wykids.org wrote: 2012-06-19 15:37:36.283752500 www%wykids LOG: statement: update survey_response set srv_resp_submitted = now() where srv_resp_srv_id = 2 and

Re: [GENERAL] Transaction question

2012-07-11 Thread Adrian Klaver
On 07/11/2012 04:02 PM, Jeff Ross wrote: On 7/11/12 3:52 PM, Adrian Klaver wrote: Is there an index on this table? If so have you tried a REINDEX? Here's the table definition: jross@nirvana:/home/jross $ psql wykids psql (9.1.4, server 9.1.3) Type help for help. wykids=# \d

Re: [GENERAL] Error with plpython

2012-07-11 Thread Efraín Déctor
Hello. It is possible to upgrade without any downtime?. Thank you. -Mensaje original- From: Adrian Klaver Sent: Wednesday, July 11, 2012 3:01 PM To: Efraín Déctor Cc: Craig Ringer ; pgsql-general@postgresql.org Subject: Re: [GENERAL] Error with plpython On 07/11/2012 06:32 AM,

Re: [GENERAL] Transaction question

2012-07-11 Thread Jeff Ross
On 7/11/12 5:13 PM, Adrian Klaver wrote: On 07/11/2012 04:02 PM, Jeff Ross wrote: On 7/11/12 3:52 PM, Adrian Klaver wrote: Is there an index on this table? If so have you tried a REINDEX? Here's the table definition: jross@nirvana:/home/jross $ psql wykids psql (9.1.4, server 9.1.3)

Re: [GENERAL] Transaction question

2012-07-11 Thread Adrian Klaver
On 07/11/2012 04:18 PM, Jeff Ross wrote: On 7/11/12 5:13 PM, Adrian Klaver wrote: On 07/11/2012 04:02 PM, Jeff Ross wrote: On 7/11/12 3:52 PM, Adrian Klaver wrote: Is there an index on this table? If so have you tried a REINDEX? Here's the table definition: jross@nirvana:/home/jross $

Re: [GENERAL] Error with plpython

2012-07-11 Thread Adrian Klaver
On 07/11/2012 04:17 PM, Efraín Déctor wrote: Hello. It is possible to upgrade without any downtime?. It it is problem you may want to confirm the Postgres version is a problem by setting up an 9.1.2 instance on your development machine and seeing if the error shows up. Otherwise that can

Re: [GENERAL] question about installation

2012-07-11 Thread Craig Ringer
On 07/11/2012 08:58 PM, martin soethof wrote: Hello I have the following situation. I used a postgres installer that can choose seperate paths for the normal postgres and the data folder. I used this because i wanted to share a database on an external hard drive between 2 computers. It'll

Re: [GENERAL] Sequence moves forward when failover is triggerred

2012-07-11 Thread Craig Ringer
On 07/12/2012 04:17 AM, Steve Crawford wrote: The stickier issue is queuing. You have multiple users and need to ensure that you grab an unused check from the book but each concurrent user needs to get a different check. Select from checkbook where not check_used order by check_no limit 1 for

Re: [GENERAL] Bug? Prepared queries continue to use search_path from their preparation time

2012-07-11 Thread Toby Corkindale
On 12/07/12 00:07, Tom Lane wrote: Toby Corkindale toby.corkind...@strategicdata.com.au writes: The issue occurs when you have server-side prepared queries enabled, and then change the search_path parameter after creating a prepared query. Future executions of that query still seem to be using

Re: [GENERAL] PostgreSQL limitations question

2012-07-11 Thread Craig Ringer
On 07/12/2012 05:01 AM, Bartosz Dmytrak wrote: 1. Create Table: CREATE TABLE test.limits(RowValue text) WITH (OIDS=FALSE, FILLFACTOR=100); 2. Fill table (I used pgScript available in pgAdmin); I suspect that's a pretty slow way to try to fill your DB up. You're doing individual INSERTs and

Re: [GENERAL] Timeline error on streaming replica (WAS: Please post)

2012-07-11 Thread Craig Ringer
Re-titled thread. On 07/11/2012 11:13 PM, Gregorio, Albert wrote: I am working with PostgreSQL 9.1.3 -- I setup a master and standby -- Initiated replication and verified that it was occurring -- Failed over from master to standby and verified that the database could be updated on the new

Re: [GENERAL] Error with plpython

2012-07-11 Thread Craig Ringer
On 07/11/2012 09:32 PM, Efraín Déctor wrote: Hello. This is what returns the 2 servers: Production Server: ['/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-freebsd8',

[GENERAL] PostgreSQL index issue

2012-07-11 Thread mperformer
Hi Fellows I have a question regarding PostgreSQL 9.1 indexing. I am having a table and want to create a index for a column and I want to store the data with time zone for that column. The questions are: 1. Can I create a index for a column which store time stamp with time zone. If can is there

Re: [GENERAL] installation problem with postgres password

2012-07-11 Thread KOTa
that is what i though, but i tried many different combinations for password, and at least 1 of them should satisfy policy requirements. also my windows user password, which is accepted by OS and thus satisfies the requirements resulted in same message i did try to see what policy is active, but i

Re: [GENERAL] installation problem with postgres password

2012-07-11 Thread raghu ram
On Thu, Jul 12, 2012 at 8:35 AM, KOTa kota.a...@gmail.com wrote: that is what i though, but i tried many different combinations for password, and at least 1 of them should satisfy policy requirements. also my windows user password, which is accepted by OS and thus satisfies the requirements