Re: [GENERAL] What could keep a connection / query alive?

2011-03-29 Thread Jerry Sievers
Derrick Rice writes: > I'm investigating (using 8.2) an instance of a database client > connection remaining open in a single query well past statement > timeout settings.? I understand that severed TCP connections can cause > the backend to hang until the connection is closed, but our tcp > keep

Re: [GENERAL] Autocommit off - commits/rollbacks

2011-03-29 Thread Jerry Sievers
Craig Ringer writes: > On 03/14/2011 10:55 PM, Vogt, Michael wrote: > >> Hey all >> >> I have a question, using the autocommit off option in postgres. >> >> As starting position I use a table called xxx.configuration using a >> unique id constraint. >> >> Why does postgres rollback the whole tran

Re: [GENERAL] Autocommit off - commits/rollbacks

2011-03-29 Thread tushar nehete
Yes We can use exception for each statement to restrict the rollback. But how we can use SAVEPOINT and rollback to SAVEPOINT in the stored function or procedure in POSTGRES? We can only use the savepoints in transactions but not in stored functions. Regards, Tushar On Tue, Mar 29, 2011 at 12:54 P

[GENERAL] anonymous record as an in parameter

2011-03-29 Thread Maximilian Tyrtania
Hi there, i'd like to write a function (sql or plpgsql) that takes an anonymous record as an in parameter. You know, kind of like (simplified): create function f_tablename (p_anyrecord record) returns text as $body$ select $1.tableoid::regclass::text $body$ language sql; ...but PG 9.0.3 doesn't

Re: [GENERAL] Postgres 9 silent installation on Windows

2011-03-29 Thread Kalai R
Thank you vibhork. I am using one-click installer by EnterpriseDB. It is successfully installed silently from command prompt. But I need to install silently from my .Net application. I use shell command to call. When running my application, a dialog box opened, there is a list of currently openi

[GENERAL] postgresql-9.0 service starting problem

2011-03-29 Thread Kalai R
Hi, I am using Windows XP. When I have installed PostgreSQL 9.0.3, the service didn't start automatically. In the "Computer Management" I explicitly start "postgresql-9.0" service, the service didn't start and following message displayed "The postgresql-9.0 service on Local Computer started and t

Re: [GENERAL] Autocommit off - commits/rollbacks

2011-03-29 Thread Adrian Klaver
On Tuesday, March 29, 2011 4:35:04 am tushar nehete wrote: > Yes We can use exception for each statement to restrict the rollback. > But how we can use SAVEPOINT and rollback to SAVEPOINT > in the stored function or procedure in POSTGRES? > We can only use the savepoints in transactions but not in

Re: [GENERAL] anonymous record as an in parameter

2011-03-29 Thread Merlin Moncure
On Tue, Mar 29, 2011 at 8:07 AM, Maximilian Tyrtania wrote: > Hi there, > > i'd like to write a function (sql or plpgsql) that takes an anonymous record > as an in parameter. You know, kind of like (simplified): > > create function f_tablename (p_anyrecord record) returns text as > $body$ > selec

[GENERAL] Load Increase

2011-03-29 Thread Ogden
PostgreSQL 9.0.3 has been running very smooth for us and we have streaming replication running on it as well as WAL archiving. Things have run consistently and we are extremely happy with the performance. During the early morning hours, we have processes that run and import certain data from c

[GENERAL] not like perl..

2011-03-29 Thread hook
I have a simple table with a varchar(32) field that I am trying to extract data using regular expressions. select * from spam where inetaddr like '100.%' row | inetaddr | tdate --+--+--- 3245 | 100.81.98.51 | 03/08/2011 07:21:19.2

Re: [GENERAL] postgresql-9.0 service starting problem

2011-03-29 Thread Raymond O'Donnell
On 29/03/2011 14:59, Kalai R wrote: Hi, I am using Windows XP. When I have installed PostgreSQL 9.0.3, the service didn't start automatically. In the "Computer Management" I explicitly start "postgresql-9.0" service, the service didn't start and following message displayed "The postgresql-9.0 ser

Re: [GENERAL] not like perl..

2011-03-29 Thread Vick Khera
On Tue, Mar 29, 2011 at 10:18 AM, hook wrote: > What am I doing wrong??? > You are confusing regular expressions with SQL "LIKE". Ie, you are using "LIKE" and expecting it to match some odd notion of regexp. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

[GENERAL] Is pglesslog stable for use in 9.0?

2011-03-29 Thread Michael Leinartas
I'm interested in using the pglesslog tools, pg_compresslog and pg_decompresslog, to reduce the size of WAL logs for a 9.0 setup I'm working with. I see that 1.4.2beta was released with 9.0 support, but that was posted over 9 months ago with no word on a non-beta version (per http://pgfoundry.org/

[GENERAL] Date conversion using day of week

2011-03-29 Thread Marc Munro
I'm trying to validate a day of the week, and thought that to_date would do the job for me. But I found a case where it cannot tell the difference between sunday and monday. Is this a bug or intended behaviour? dev=# select to_date('2011-13-Mon', '-IW-DY'); to_date 2011-03

Re: [GENERAL] not like perl..

2011-03-29 Thread A.M.
On Mar 29, 2011, at 10:18 AM, hook wrote: > I have a simple table with a varchar(32) field that I am trying to extract > data using regular expressions. > > select * from spam where inetaddr like '100.%' > row | inetaddr | tdate > --+--+-

Re: [GENERAL] Date conversion using day of week

2011-03-29 Thread Adrian Klaver
On Tuesday, March 29, 2011 8:07:48 am Marc Munro wrote: > I'm trying to validate a day of the week, and thought that to_date would > do the job for me. But I found a case where it cannot tell the > difference between sunday and monday. Is this a bug or intended > behaviour? > > dev=# select to_d

Re: [GENERAL] Date conversion using day of week

2011-03-29 Thread Steve Crawford
On 03/29/2011 08:07 AM, Marc Munro wrote: I'm trying to validate a day of the week, and thought that to_date would do the job for me. But I found a case where it cannot tell the difference between sunday and monday. Is this a bug or intended behaviour? dev=# select to_date('2011-13-Mon', '

[GENERAL] Script perl para eliminar constraints duplicados

2011-03-29 Thread Hans C. Poo
Hi, Sometimes i end up with some duplicated constraints definitions in my database, i've noticed this when i reverse engineer databases, and see many links between two tables. I prepared a perl script that read an schema on standard input, and prints on standard output some drop constraints f

Re: [GENERAL] Date conversion using day of week

2011-03-29 Thread Adrian Klaver
On Tuesday, March 29, 2011 8:33:59 am Steve Crawford wrote: > On 03/29/2011 08:07 AM, Marc Munro wrote: > > I'm trying to validate a day of the week, and thought that to_date would > > do the job for me. But I found a case where it cannot tell the > > difference between sunday and monday. Is this

Re: [GENERAL] Date conversion using day of week

2011-03-29 Thread Steve Crawford
On 03/29/2011 08:50 AM, Adrian Klaver wrote: On Tuesday, March 29, 2011 8:33:59 am Steve Crawford wrote: On 03/29/2011 08:07 AM, Marc Munro wrote: I'm trying to validate a day of the week, and thought that to_date would do the job for me. But I found a case where it cannot tell the difference

Re: [GENERAL] postgresql-9.0 service starting problem

2011-03-29 Thread Harald Armin Massa
Kalai, > > "The postgresql-9.0 service on Local Computer started and then stopped. > Some services stop automatically if they have no work to do, for example, > the Performance Logs and Alerts Service" > > most likely problem are unavailable ressources, as in: - PostgreSQL cannot access its data

[GENERAL] OSX Postgres PL/Perl Problem with Finance::Quote/Options

2011-03-29 Thread Peter Pan
Hi@all, I have a weird problem on dev server (using a Mac Mini 2010 Edt., 10.6.7 OSX). I use two Perl modules Finance::Quote and Finance::QuoteOptions in a stored PL/Perl procedure which run without problems on a standard LINUX environment (currently in production on CentOS5). Unfortunately o

[GENERAL] Perl script to drop duplicated constraints definitions

2011-03-29 Thread Hans C. Poo
Hi, Sorry for the recent post, mistakenly i wrote the subject in spanish... glup. Hi, Sometimes i end up with some duplicated constraints definitions in my database, i've noticed this when i reverse engineer databases, and see many links between two tables. I prepared a perl script that read

[GENERAL] UTF8 conversion revisited

2011-03-29 Thread Geoffrey Myers
So, we are still having an issue with this and I thought I'd throw this out to the list to see if I'm missing something. Basically, we have identified the tables/fields we need to convert. I'm running the following perl code against the fields and re-inserting the 'fixed' code into the field:

[GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Thom Brown
Hi all, I've just set up a test user, revoked all access from them to a database, then tried to connect to that database and it let me in. When I try it all from scratch, it works correctly. Here's the set running correctly: postgres=# CREATE DATABASE testdb; CREATE DATABASE postgres=# CREATE RO

Re: [GENERAL] What could keep a connection / query alive?

2011-03-29 Thread Derrick Rice
On Tue, Mar 29, 2011 at 3:17 AM, Jerry Sievers wrote: > > > What can cause this?? Why would these tcp and statement timeout settings > not terminate the backend? > > Try trussing the backend process. You may find it in a network IO wait > trying to send data to a client that is hung or over a soc

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Raymond O'Donnell
On 29/03/2011 19:44, Thom Brown wrote: Hi all, I've just set up a test user, revoked all access from them to a database, then tried to connect to that database and it let me in. When I try it all from scratch, it works correctly. Here's the set running correctly: postgres=# CREATE DATABASE tes

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Steve Crawford
On 03/29/2011 11:44 AM, Thom Brown wrote: Hi all, I've just set up a test user, revoked all access from them to a database, then tried to connect to that database and it let me in. When I try it all from scratch, it works correctly. Here's the set running correctly: postgres=# CREATE DATABASE

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Thom Brown
On 29 March 2011 21:06, Raymond O'Donnell wrote: > On 29/03/2011 19:44, Thom Brown wrote: >> >> Hi all, >> >> I've just set up a test user, revoked all access from them to a >> database, then tried to connect to that database and it let me in. >> When I try it all from scratch, it works correctly.

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread hubert depesz lubaczewski
On Tue, Mar 29, 2011 at 07:44:51PM +0100, Thom Brown wrote: > So, I'm overlooking something. Could someone tell me what it is? I > bet it's something obvious. I'm using 9.1dev if it's relevant. perhaps meow is superuser? Best regards, depesz -- The best thing about modern society is how eas

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Thom Brown
On 29 March 2011 21:28, hubert depesz lubaczewski wrote: > On Tue, Mar 29, 2011 at 07:44:51PM +0100, Thom Brown wrote: >> So, I'm overlooking something.  Could someone tell me what it is?  I >> bet it's something obvious.  I'm using 9.1dev if it's relevant. > > perhaps meow is superuser? stuff=>

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Adrian Klaver
On 03/29/2011 01:32 PM, Thom Brown wrote: On 29 March 2011 21:28, hubert depesz lubaczewski wrote: On Tue, Mar 29, 2011 at 07:44:51PM +0100, Thom Brown wrote: So, I'm overlooking something. Could someone tell me what it is? I bet it's something obvious. I'm using 9.1dev if it's relevant.

[GENERAL] RPM for ODBC driver

2011-03-29 Thread Worgan, Craig (Craig)
Hi, I am looking for an RPM to install the ODBC driver for PostgreSQL 9.0.2. The repository contains quite a few RPMs but only the source code for the ODBC driver. Is there another place I can look for an RPM for this? Thanks, Craig

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Thom Brown
On 29 March 2011 21:51, Adrian Klaver wrote: > On 03/29/2011 01:32 PM, Thom Brown wrote: >> >> On 29 March 2011 21:28, hubert depesz lubaczewski >>  wrote: >>> >>> On Tue, Mar 29, 2011 at 07:44:51PM +0100, Thom Brown wrote: So, I'm overlooking something.  Could someone tell me what it is

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Guillaume Lelarge
Le 29/03/2011 20:44, Thom Brown a écrit : > Hi all, > > I've just set up a test user, revoked all access from them to a > database, then tried to connect to that database and it let me in. > When I try it all from scratch, it works correctly. > > Here's the set running correctly: > > postgres=#

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Thom Brown
On 29 March 2011 21:59, Guillaume Lelarge wrote: > Le 29/03/2011 20:44, Thom Brown a écrit : >> Hi all, >> >> I've just set up a test user, revoked all access from them to a >> database, then tried to connect to that database and it let me in. >> When I try it all from scratch, it works correctly.

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Guillaume Lelarge
Le 29/03/2011 23:12, Thom Brown a écrit : > On 29 March 2011 21:59, Guillaume Lelarge wrote: >> Le 29/03/2011 20:44, Thom Brown a écrit : >>> Hi all, >>> >>> I've just set up a test user, revoked all access from them to a >>> database, then tried to connect to that database and it let me in. >>> W

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Vibhor Kumar
On Mar 30, 2011, at 12:14 AM, Thom Brown wrote: > postgres=# CREATE ROLE testrole; > CREATE ROLE > postgres=# REVOKE ALL ON DATABASE testdb FROM testrole CASCADE; > REVOKE > postgres=# \c testdb testrole > FATAL: role "testrole" is not permitted to log in > Previous connection kept You have cr

Re: [GENERAL] OSX Postgres PL/Perl Problem with Finance::Quote/Options

2011-03-29 Thread Vibhor Kumar
On Mar 29, 2011, at 9:11 PM, Peter Pan wrote: > I use two Perl modules Finance::Quote and Finance::QuoteOptions in a stored > PL/Perl procedure which run without problems on a standard LINUX environment > (currently in production on CentOS5). Unfortunately on OSX it seems not to be > able to p

Re: [GENERAL] RPM for ODBC driver

2011-03-29 Thread Vibhor Kumar
On Mar 30, 2011, at 12:43 AM, Worgan, Craig (Craig) wrote: > I am looking for an RPM to install the ODBC driver for PostgreSQL 9.0.2. The > repository contains quite a few RPMs but only the source code for the ODBC > driver. Is there another place I can look for an RPM for this? Try Follow

Re: [GENERAL] RPM for ODBC driver

2011-03-29 Thread John R Pierce
On 03/29/11 12:13 PM, Worgan, Craig (Craig) wrote: Hi, I am looking for an RPM to install the ODBC driver for PostgreSQL 9.0.2. The repository contains quite a few RPMs but only the source code for the ODBC driver. Is there another place I can look for an RPM for this? you are aware,

Re: [GENERAL] What could keep a connection / query alive?

2011-03-29 Thread Derrick Rice
On Tue, Mar 29, 2011 at 2:54 PM, Derrick Rice wrote: > >> Try trussing the backend process. You may find it in a network IO wait >> trying to send data to a client that is hung or over a socket that was >> timed out by a firewall or network equipment. >> >> Such a condition will cause the backend

[GENERAL] Totally new, two main problems.

2011-03-29 Thread wepwep
Im learning pg sql and psql in general. Im using console psql in windows. For now, i installed it correctly and execute it, ok. My first problem is that i dont know how to execute a pgsql script when im in the psql program. CREATE FUNCTION sales_tax(subtotal real) RETURNS real AS $$ BEGIN R

Re: [GENERAL] Date conversion using day of week

2011-03-29 Thread Adrian Klaver
On Tuesday, March 29, 2011 9:02:52 am Steve Crawford wrote: > > But you changed it to specify an ISO year avoiding the mixed > conventions. According to the 9.0 docs > (http://www.postgresql.org/docs/9.0/static/functions-formatting.html): > > "An ISO week date (as distinct from a Gregorian dat

Re: [GENERAL] Totally new, two main problems.

2011-03-29 Thread Adrian Klaver
On Tuesday, March 29, 2011 2:20:33 pm wepwep wrote: > Im learning pg sql and psql in general. Im using console psql in windows. > For now, i installed it correctly and execute it, ok. > > My first problem is that i dont know how to execute a pgsql script when im > in the psql program. > CREATE FUN

Re: [GENERAL] RPM for ODBC driver

2011-03-29 Thread Devrim GÜNDÜZ
On Tue, 2011-03-29 at 15:13 -0400, Worgan, Craig (Craig) wrote: > > I am looking for an RPM to install the ODBC driver for PostgreSQL > 9.0.2. did you take a look at http://yum.pgrpms.org/9.0/ ? Regards, -- Devrim GÜNDÜZ Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com

Re: [GENERAL] Problem calling setweight function from JDBC

2011-03-29 Thread Viliam Ďurina
Thank you, this helped. Viliam On 24.3.2011 16:08, Tom Lane wrote: =?UTF-8?B?VmlsaWFtIMSOdXJpbmE=?= writes: I have a call to setweight function in a PreparedStatement with the following sql: update my_table set a_text_data=setweight(to_tsvector(? :: regconfig, ?), ? :: char) Make that :

Re: [GENERAL] RPM for ODBC driver

2011-03-29 Thread Worgan, Craig (Craig)
No I didn't. That looks like what I'm looking for. Thanks! Craig -Original Message- From: Devrim GÜNDÜZ [mailto:dev...@gunduz.org] Sent: Tuesday, March 29, 2011 9:32 PM To: Worgan, Craig (Craig) Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] RPM for ODBC driver On Tue, 2011-0