[GENERAL] dblink (INSERT ..... RETURNING)

2012-01-20 Thread P. Broennimann
Hi there I have a remote table that I access over dblink. The table has a primary field set to autoincrement. I need now to insert a record in that remote table and get back the new primary field (autoincrement sequence). Since bdlink_exec can not give back rows I tried to use dblink, but I can

Re: [GENERAL] On duplicate ignore

2012-01-20 Thread Florian Weimer
* Lincoln Yeoh: If you use serializable transactions in PostgreSQL 9.1, you can implement such constraints in the application without additional locking. However, with concurrent writes and without an index, the rate of detected serialization violations and resulting transactions aborts will be

Re: [GENERAL] dblink (INSERT ..... RETURNING)

2012-01-20 Thread John R Pierce
On 01/20/12 12:20 AM, P. Broennimann wrote: I need now to insert a record in that remote table and get back the new primary field (autoincrement sequence). Since bdlink_exec can not give back rows I tried to use dblink, but I can not figure out how to format that INSERT... RETURNING query?

[GENERAL] Timestamp with time zone 'negative' problem

2012-01-20 Thread Prodan, Andrei
Hello, I have a DB in which items which are 'always valid' have a from_date of 19000101 00+1 (Europe/Berlin) When i try to restore the same DB to (Europe/Bucharest), instead of 19000101 00+2, the timestamp becomes 1900-01-01 00:44:24+01:44:24 which is ... strange. My software then

[GENERAL] Numerous prepared transactions?

2012-01-20 Thread Lincoln Yeoh
Hi, Is it viable to have very many prepared transactions? As in tens of thousands or even more? The idea is so that a web application can do _persistent_ transactional stuff over multiple pages/accesses/sessions and have it rolled back easily, or committed if desired. I'm thinking that it

Re: [GENERAL] On duplicate ignore

2012-01-20 Thread Lincoln Yeoh
At 04:27 PM 1/20/2012, Florian Weimer wrote: * Lincoln Yeoh: If you use serializable transactions in PostgreSQL 9.1, you can implement such constraints in the application without additional locking. However, with concurrent writes and without an index, the rate of detected serialization

Re: [GENERAL] On duplicate ignore

2012-01-20 Thread Florian Weimer
* Lincoln Yeoh: Is there a simple way to get postgresql to retry a transaction, or does the application have to actually reissue all the necessary statements again? The application has to re-run the transaction, which might result in the execution of different statements. In the

[GENERAL] Immutable function with bind value

2012-01-20 Thread Brice Maron
Hi, i've discovered something kind of weird  while developing my app... I was trying to fetch some records in a table using a function immutable. In my interface it was really slow and while i was in a psql it was really fast ... After some research i've found out that it was caused by the bind

[GENERAL] Feature request: pgsql's CASE...WHEN optimization

2012-01-20 Thread pasman pasmański
Hi. I think that in specific statement with many constants: CASE x WHEN const1 THEN action1 WHEN const2 THEN action2 WHEN const3 THEN action3 WHEN const4 THEN action4 END CASE; constants may be sorted at compile time, and when executed , it will be possible internally to use fast

[GENERAL] ODBC and bytea

2012-01-20 Thread Andreas Lubensky
Hi, currently we are trying to integrate Postgres with ODBC and have problems with blobs. We tried to use bytea and were under the impression that bytea would act like a blob in other databases when used through ODBC. So far we could not make it work properly. It seems we still have to do the

[GENERAL] Immutable function with bind value

2012-01-20 Thread Brice Maron
Hi, i've discovered something kind of weird while developing my app... I was trying to fetch some records in a table using a function immutable. In my interface it was really slow and while i was in a psql it was really fast ... After some research i've found out that it was caused by the bind

[GENERAL] Does Stackbuilder need username/pwd for the proxy?

2012-01-20 Thread maripa...@tiscali.it
I am a new user, and, as some people already highlighted before me, after having installed Postgres 9.1, the stackbuider is not able to connect to the URL www.postgresql.org/applications-v2.xml. I can reach that page by the browser, however. My PC is running windows XP SP2 and it connects to

Re: [GENERAL] Immutable function with bind value

2012-01-20 Thread Matteo Beccati
On 20/01/2012 12:43, Brice Maron wrote: Hi, i've discovered something kind of weird while developing my app... I was trying to fetch some records in a table using a function immutable. In my interface it was really slow and while i was in a psql it was really fast ... After some

Re: [GENERAL] Immutable function with bind value

2012-01-20 Thread Brice Maron
Thanks Matteo for your answer... but.. this is only a usecase... i'm currently using thing like this in a php app, so i'm doing kind of a as select * from test where a = test_immutable(?); then execute('var'); unfortunately there, i can't to an execute(test_immutable('var')) for now i've

Re: [GENERAL] Immutable function with bind value

2012-01-20 Thread David Johnston
On Jan 20, 2012, at 6:15, Brice Maron bma...@gmail.com wrote: Hi, i've discovered something kind of weird while developing my app... I was trying to fetch some records in a table using a function immutable. In my interface it was really slow and while i was in a psql it was really fast

Re: [GENERAL] Timestamp with time zone 'negative' problem

2012-01-20 Thread Tom Lane
Prodan, Andrei andrei.pro...@awinta.com writes: I have a DB in which items which are 'always valid' have a from_date of 19000101 00+1 (Europe/Berlin) When i try to restore the same DB to (Europe/Bucharest), instead of 19000101 00+2, the timestamp becomes 1900-01-01 00:44:24+01:44:24

[GENERAL] PGbouncer for Windows 2008

2012-01-20 Thread Edison So
Hello, Can anyone please tell me where I can find the PGbouncer executable and tutorial for Windows 2008? I found one but need to recompile on Windows. I also need intuitive instructions to configure it too. Thanks in advance. -- Edison

[GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread Ralph Graulich
Hi, How can I store inline comments in the argument list of a plpgsql function to document complex overloaded functions with lots of arguments? It seems that PostgreSQL accepts the comments, but strips them as the function gets stored. I am using PostgreSQL 9.1.2. +++ CREATE FUNCTION

Re: [GENERAL] Immutable function with bind value

2012-01-20 Thread Brice Maron
On Fri, Jan 20, 2012 at 16:00, David Johnston pol...@yahoo.com wrote: On Jan 20, 2012, at 6:15, Brice Maron bma...@gmail.com wrote: Hi, i've discovered something kind of weird  while developing my app... I was trying to fetch some records in a table using a function immutable. In my

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread Raymond O'Donnell
On 20/01/2012 17:28, Ralph Graulich wrote: Hi, How can I store inline comments in the argument list of a plpgsql function to document complex overloaded functions with lots of arguments? It seems that PostgreSQL accepts the comments, but strips them as the function gets stored. You could

Re: [GENERAL] Immutable function with bind value

2012-01-20 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Brice Maron Sent: Friday, January 20, 2012 1:26 PM To: David Johnston Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Immutable function with bind value On Fri, Jan

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread Ralph Graulich
Hello Ray, You could use COMMENT ON instead: COMMENT ON function func_test(text, text) IS 'loads of documentation here'; Would this do the job? Thank you for your input. I know about the COMMENT ON function, as I use it for all other purposes, like documenting columns and

Re: [GENERAL] indexes no longer used after shutdown during reindexing

2012-01-20 Thread Matt Dew
On 01/13/2012 02:49 PM, Tomas Vondra wrote: On 13.1.2012 22:20, Tom Lane wrote: Matt Dewma...@consistentstate.com writes: An interesting sidenote we realized. the nice system shutdown script /etc/init.d/postgres doesn't actually wait for the db to be down, it just waits for pg_ctl to return.

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Ralph Graulich Sent: Friday, January 20, 2012 12:28 PM To: pgsql-general@postgresql.org Subject: [GENERAL] comments in argument list of plpgsql get stripped? Hi, How can I

Re: [GENERAL] Immutable function with bind value

2012-01-20 Thread Misa Simic
Hi Brice, I think You are right, problem is just in php prepare/bindvalue So it should be avoided... I guess the reason you like to use bindvalue is safety in SQL injection problem... what should be handled on some way what depends on concrete case... But far as I am aware string as input

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread Ralph Graulich
Hi David, The fact that you can write comments in the middle of the arguments in an artifact of the parser and likely there is not reasonable way to get them to persist. Artifact as in something not normally used? You either want to use COMMENT ON like Raymond said or you can simply move

[GENERAL] Is Synchronous Postgresql Replication Slower Than Asynchronous?

2012-01-20 Thread Jerry Richards
Is synchronous postgresql replication slower than asynchronous? If so, how much? I am looking into database replication for a phone system, so the response time is of concern. Thanks, Jerry

Re: [GENERAL] Cannot connect to 2nd cluster database remotely

2012-01-20 Thread Jasen Betts
On 2011-12-22, Jacques Lamothe jlamo...@allconnect.com wrote: [..] While everything is ok with local connections, I cannot connect remotely using any of my tools to the second database with port 5436, [...] I have attached the posgresql.conf file. It fell off. The line you want is

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-20 Thread Jasen Betts
On 2012-01-03, Frank Lanitz fr...@frank.uvena.de wrote: Am 02.01.2012 20:13, schrieb Hagen Finley: I am using psql (8.2.15) and I would like to input German characters (e.g. ä,ß,ö) into char fields I have in a database I see that you are using Outlook which leads me to assume you are running

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread David Johnston
[[[ My response embedded ]]] -Original Message- From: Ralph Graulich [mailto:maill...@shauny.de] Sent: Friday, January 20, 2012 3:24 PM To: David Johnston Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] comments in argument list of plpgsql get stripped? Hi David, The fact that

Re: [GENERAL] Is Synchronous Postgresql Replication Slower Than Asynchronous?

2012-01-20 Thread John R Pierce
On 01/20/12 12:31 PM, Jerry Richards wrote: Is synchronous postgresql replication slower than asynchronous? If so, how much? I am looking into database replication for a phone system, so the response time is of concern. when a client issues a COMMIT on the master, synchronous by definition

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread Adrian Klaver
On Friday, January 20, 2012 12:24:26 pm Ralph Graulich wrote: Hi David, II) Having PostgreSQL issuing a NOTICE that comments get stripped if you use comments somewhere where PostgreSQL accepts them, but discards them silently? I think that is covered by this:

Re: [GENERAL] Is Synchronous Postgresql Replication Slower Than Asynchronous?

2012-01-20 Thread Peter Geoghegan
On 20 January 2012 21:17, John R Pierce pie...@hogranch.com wrote: On 01/20/12 12:31 PM, Jerry Richards wrote: Is synchronous postgresql replication slower than asynchronous?  If so, how much?  I am looking into database replication for a phone system, so the response time is of concern.

Re: [GENERAL] Is Synchronous Postgresql Replication Slower Than Asynchronous?

2012-01-20 Thread Jerry Richards
Peter, I noticed there are several synchronous implementations (Postgre-XC, PGCluster, pgpool, rubyrep, built-in streaming, etc.). When you say, you can dynamically change that right down to the transaction level..., are you referring specifically to one of these implementations? By the

Re: [GENERAL] could not accept SSPI security context

2012-01-20 Thread G_Hosa_Phat
Ahmed wrote I tested the latest Npgsql driver (2.0.12.0), the issue has been fixed. I was able to connect Npgsql test application from my Windows XP client machine with the PostgreSQL server running on Windows 2003 Server. Thank you for applying the patch. I've been trying to develop a

Re: [GENERAL] Is Synchronous Postgresql Replication Slower Than Asynchronous?

2012-01-20 Thread Peter Geoghegan
On 20 January 2012 21:53, Jerry Richards jerry.richa...@teotech.com wrote: I noticed there are several synchronous implementations (Postgre-XC, PGCluster, pgpool, rubyrep, built-in streaming, etc.).  When you say, you can dynamically change that right down to the transaction level..., are

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-20 Thread Chris Travers
I wonder if the issue is in client encoding. How do these characters in various Windows codepages relate to UTF characters? Best Wishes, Chris Travers -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread Ralph Graulich
Hi Adrian, II) Having PostgreSQL issuing a NOTICE that comments get stripped if you use comments somewhere where PostgreSQL accepts them, but discards them silently? I think that is covered by this: http://www.postgresql.org/docs/9.0/interactive/sql-syntax-lexical.html#SQL-SYNTAX-COMMENTS

Re: [GENERAL] self referencing table.

2012-01-20 Thread Craig Ringer
On 19/01/2012 12:57 AM, David Salisbury wrote: Think I'll answer myself on this. I'll join in whatever rows I get from the self referential query above to the base table, and include the rank column, and then figure out some sort of post processing on the resultant view ( I hope ). Usually

Re: [GENERAL] could not accept SSPI security context

2012-01-20 Thread Brar Piening
G_Hosa_Phat wrote: I've been trying to develop a new application in VB.NET (VS2008) against a PostgreSQL 9.1.1 database server running on Windows Server 2008 using SSPI authentication, and I'm running into this same error. I've tried both specifying the username and not specifying it in my

Re: [GENERAL] could not accept SSPI security context

2012-01-20 Thread G_Hosa_Phat
Brar Piening wrote Just a guess: You don't have something like host all all 127.0.0.1/32 sspi in your pg_hba.conf do you? Regards, Brar I don't have that set. Here's a sample from my pg_hba (slightly redacted to obfuscate our internal network address scheme). # TYPE DATABASE

[GENERAL] ESET NOD32 Antivirus interference with PostgreSQL

2012-01-20 Thread Bruce Duncan
Just wanted to give a heads up to anyone who might be having a similar problem. We had an installation on a customer machine that had the AV product ESET NOD32 installed. We quickly started having problems when there were two or more concurrent queries against the same tables in PostgreSQL

Re: [GENERAL] ESET NOD32 Antivirus interference with PostgreSQL

2012-01-20 Thread Peter Geoghegan
On 21 January 2012 00:45, Bruce Duncan bdun...@visualmining.com wrote: Thought this might be of help to anyone else out there who comes across this AV software during deployment and starts encountering strange behavior. Thanks for the report, but shouldn't you really be complaining to the

Re: [GENERAL] ESET NOD32 Antivirus interference with PostgreSQL

2012-01-20 Thread Filip Rembiałkowski
On Sat, Jan 21, 2012 at 1:45 AM, Bruce Duncan bdun...@visualmining.comwrote: Just wanted to give a heads up to anyone who might be having a similar problem. We had an installation on a customer machine that had the AV product ESET NOD32 installed. We quickly started having problems when