[GENERAL] Getting actual number of rows updated

2005-08-08 Thread CSN
Is it possible to have PG report the actual number of rows that actually CHANGED in an update command? e.g. UPDATE items set name=replace(name,'abc','def'); UPDATE 9000 -- Actually only 3 were changed rather than update reporting all rows have been updated? Thanks, CSN

Re: [GENERAL] tsearch2: very slow queries

2005-08-08 Thread Oleg Bartunov
Hi there, tsearch2 is our next problem we plan to attack after we have done with GiST core. Actually, we did some experiments in background and we're sure we could very greatly improve tsearch2 performance and add a lot of nice features. Most probably, we'll call for fund raising for this

Re: [GENERAL] Getting actual number of rows updated

2005-08-08 Thread Patrick . FICHE
All the raws are updated if there is no WHERE clause. If you want the UPADATED rows, just specify the WHERE clause and it will really improve your performance... EX : UPDATE itemp SET name = replace( name, 'abc', 'def' ) WHERE name LIKE '%abc%'

Re: [GENERAL] Getting actual number of rows updated

2005-08-08 Thread Tino Wildenhain
Am Montag, den 08.08.2005, 00:32 -0700 schrieb CSN: Is it possible to have PG report the actual number of rows that actually CHANGED in an update command? e.g. UPDATE items set name=replace(name,'abc','def'); UPDATE 9000 -- Actually only 3 were changed rather than update reporting all

[GENERAL] remove

2005-08-08 Thread Lipy Reis
how do i get removed from list? tks __ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/ ---(end of broadcast)--- TIP 4: Have you searched our

Re: [GENERAL] Case sensitivity

2005-08-08 Thread Richard Huxton
Frank Millman wrote: Hi all Is there an LC_COLLATE setting, or any other method, which allows all data in a database to be treated in a case-insensitive manner? I have two scenarios in mind. There are workarounds for both of them, but it would be nice if they were not necessary. 1. In a

Re: [GENERAL] postgresql Secure Mode

2005-08-08 Thread Mario Soto Cordones - Venezuela
Hi , not in fact I don't have a password file, I wanted to use autentificacion PAM, I have attempted it but I have not gotten it, on the other hand I don't understand that of the passwords file. Greetings and thank you Mario Soto 2005/8/7, Christopher Browne [EMAIL PROTECTED]: Hi, i

Re: [GENERAL] postgresql Secure Mode

2005-08-08 Thread Alvaro Herrera
On Mon, Aug 08, 2005 at 08:44:44AM -0400, Mario Soto Cordones - Venezuela wrote: Hi , not in fact I don't have a password file, I wanted to use autentificacion PAM, I have attempted it but I have not gotten it, on the other hand I don't understand that of the passwords file. Can you post

Re: [GENERAL] postgresql Secure Mode

2005-08-08 Thread Mario Soto Cordones - Venezuela
Hello, what comments of PAM, was alone that, a comment, since try to make it and I don't work. now I detail them the carried out steps. 1.- make the digital certificate, and it places it in the directory it data of postgresql. openssl req -new -text -out server.req openssl rsa -in

Re: [GENERAL] postgresql Secure Mode

2005-08-08 Thread Alvaro Herrera
On Mon, Aug 08, 2005 at 10:24:54AM -0400, Mario Soto Cordones - Venezuela wrote: 3.- configure pg_hba.conf hostssl all all 192.168.0.0 255.255.255.0 MD5 I assume the connection is coming from within this network; is that right? (What's the IP address of the client machine?) 4.- service

Re: [GENERAL] postgresql Secure Mode

2005-08-08 Thread Michael Fuhr
On Mon, Aug 08, 2005 at 10:24:54AM -0400, Mario Soto Cordones - Venezuela wrote: 3.- configure pg_hba.conf hostssl all all 192.168.0.0 255.255.255.0 MD5 Do you have MD5 (uppercase) or md5 (lowercase)? Using uppercase on my 8.0.3 system generates an error in the postmaster logs: LOG:

Re: [GENERAL] postgresql Secure Mode

2005-08-08 Thread Mario Soto Cordones - Venezuela
2005/8/8, Alvaro Herrera [EMAIL PROTECTED]: On Mon, Aug 08, 2005 at 10:24:54AM -0400, Mario Soto Cordones - Venezuela wrote: 3.- configure pg_hba.conf hostssl all all 192.168.0.0 255.255.255.0 MD5 I assume the connection is coming from within this network; is that right? (What's

Re: [GENERAL] postgresql Secure Mode

2005-08-08 Thread Mario Soto Cordones - Venezuela
uppercase but not say error thank you 2005/8/8, Michael Fuhr [EMAIL PROTECTED]: On Mon, Aug 08, 2005 at 10:24:54AM -0400, Mario Soto Cordones - Venezuela wrote: 3.- configure pg_hba.conf hostssl all all 192.168.0.0 255.255.255.0 MD5 Do you have MD5 (uppercase) or md5 (lowercase)?

[GENERAL] PL/pgSQL in 8.0

2005-08-08 Thread Martín Marqués
I upgraded a couple of servers to 8.0.3 a few weeks ago, and just found out that some of the PL/pgSQL functions ar not working as they did, even more, they are giving errors. Did something change from 7.4? Particularly, the use of RECORD? It looks like RECORD doesn't like to get assigned a

Re: [GENERAL] postgresql Secure Mode

2005-08-08 Thread Alvaro Herrera
On Mon, Aug 08, 2005 at 11:06:22AM -0400, Mario Soto Cordones - Venezuela wrote: 2005/8/8, Alvaro Herrera [EMAIL PROTECTED]: On Mon, Aug 08, 2005 at 10:24:54AM -0400, Mario Soto Cordones - Venezuela wrote: but when I try to connect myself for example from an application EMS postgresql

Re: [GENERAL] connection string - DNS

2005-08-08 Thread Adam O'Toole
Any insight on this at all? I can't seem to find any info on it else-where.. Thanks ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] PL/pgSQL in 8.0

2005-08-08 Thread Tom Lane
=?iso-8859-1?q?Mart=EDn_Marqu=E9s?= martin@bugs.unl.edu.ar writes: I upgraded a couple of servers to 8.0.3 a few weeks ago, and just found out that some of the PL/pgSQL functions ar not working as they did, even more, they are giving errors. Did something change from 7.4? You really have

Re: [GENERAL] PL/pgSQL in 8.0

2005-08-08 Thread Martín Marqués
El Lun 08 Ago 2005 12:49, Tom Lane escribió: =?iso-8859-1?q?Mart=EDn_Marqu=E9s?= martin@bugs.unl.edu.ar writes: I upgraded a couple of servers to 8.0.3 a few weeks ago, and just found out that some of the PL/pgSQL functions ar not working as they did, even more, they are giving errors.

[GENERAL] Updating timestamps

2005-08-08 Thread Nigel Horne
Is it possible to update a timestamp with Postgresql? I've looked around with google and it looks as though this should work: exec sql begin declare section; char api[18]; charexpiration_time[80]; exec sql end declare section; memcpy(api, ap-api, sizeof(api));

Re: [GENERAL] PL/pgSQL in 8.0

2005-08-08 Thread Tom Lane
=?iso-8859-1?q?Mart=EDn_Marqu=E9s?= martin@bugs.unl.edu.ar writes: What really intriges me is that before the upgrade (I was using 7.4.7 and upgraded to 8.0.3, all Debian packages) this function worked OK, even though I see my mistake when programming it, but after switching to 8.0.3 I stated

[GENERAL] escape string type for upcoming 8.1

2005-08-08 Thread Jeff Davis
From what I've read, it looks like 8.1 will introduce the E'' escape string, and eventually postgresql will change the normal '' strings to be more SQL-compliant. If I wanted to start being forwards-compatible right now, and I have existing databases in 7.4 and 8.0, my idea was to create a type

[GENERAL] Simple PG Sql question (i hope)

2005-08-08 Thread Tony Caduto
I have a simple query: select true,78,'Here is a value' as stringfield, testname from tbltest; it returns: true as bool 78 as int4 and the string 'Here is a value' as Unknown Why is it that all the values besides the string come back with the correct type? what is a simple string being

[GENERAL] AMD 64 RPM?

2005-08-08 Thread Tony Caduto
I have a Red Hat EL 4 server and they only ship 7.x with it, but I want to run 8.x on it. The server is running in 64bit mode and was wondering if there is a RPM available? (I could only find 32bit ones on the Postgresql web page) Thanks, Tony ---(end of

Re: [GENERAL] Simple PG Sql question (i hope)

2005-08-08 Thread Joshua D. Drake
Tony Caduto wrote: I have a simple query: select true,78,'Here is a value' as stringfield, testname from tbltest; it returns: true as bool 78 as int4 and the string 'Here is a value' as Unknown Why is it that all the values besides the string come back with the correct type? what is a simple

[GENERAL] Testing of MVCC

2005-08-08 Thread Matt Miller
I want to write some regression tests that confirm the behavior of multiple connections simultaneously going at the same tables/rows. Is there something like this already, e.g. in src/test/regress? In particular I want confirm the robustness of some PL/pgSQL functions in a multi-user

Re: [GENERAL] AMD 64 RPM?

2005-08-08 Thread Joshua D. Drake
Tony Caduto wrote: I have a Red Hat EL 4 server and they only ship 7.x with it, but I want to run 8.x on it. The server is running in 64bit mode and was wondering if there is a RPM available? (I could only find 32bit ones on the Postgresql web page) Just download the source RPM and: rpmbuild

Re: [GENERAL] Simple PG Sql question (i hope)

2005-08-08 Thread Tony Caduto
Hi, I don't think I was clear enough. I know about using the AS keyword, that is not the problem. The query in issue is: select true,78,'Here is a value' as stringfield, testname from tbltest Is returning the string as TYPE Unknown, not the column name. The column name comes back as

Re: [GENERAL] AMD 64 RPM?

2005-08-08 Thread Tony Caduto
Hi Joshua, Forgive me but I am not normally a redhat user (normally Gentoo) So it will build a 64bit binary by default, there is no editing of the spec file or anything else required? Thanks, Tony Just download the source RPM and: rpmbuild -bb --target=i686 src.rpm Sincerely,

Re: [GENERAL] AMD 64 RPM?

2005-08-08 Thread Joshua D. Drake
Tony Caduto wrote: Hi Joshua, Forgive me but I am not normally a redhat user (normally Gentoo) So it will build a 64bit binary by default, there is no editing of the spec file or anything else required? Oh if you are using 64bit then just: rpmbuild -bb --target=x86_64 src.rpm You may need

Re: [GENERAL] Simple PG Sql question (i hope)

2005-08-08 Thread Martijn van Oosterhout
On Mon, Aug 08, 2005 at 03:05:13PM -0500, Tony Caduto wrote: Hi, I don't think I was clear enough. I know about using the AS keyword, that is not the problem. The query in issue is: select true,78,'Here is a value' as stringfield, testname from tbltest Is returning the string as TYPE

Re: [GENERAL] indexes are farked

2005-08-08 Thread Neil Conway
Scott Marlowe wrote: You might want to schedule analyzes to run every thirty minutes or every hour. I doubt that is necessary or wise. Rerunning ANALYZE should only be necessary when the distribution of your data changes significantly -- e.g. after a bulk load or deletion of a lot of

Re: [GENERAL] AMD 64 RPM?

2005-08-08 Thread Tony Caduto
Thanks for your help Joshua. I will give it a try. Tony o it will build a 64bit binary by default, there is no editing of the spec file or anything else required? Oh if you are using 64bit then just: rpmbuild -bb --target=x86_64 src.rpm You may need to add some rpms in advance such as:

Re: [GENERAL] Testing of MVCC

2005-08-08 Thread Tom Lane
Matt Miller [EMAIL PROTECTED] writes: I want to write some regression tests that confirm the behavior of multiple connections simultaneously going at the same tables/rows. Is there something like this already, e.g. in src/test/regress? No. You should consult the pghackers archives --- there

Re: [GENERAL] AMD 64 RPM?

2005-08-08 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Mon, 8 Aug 2005, Tony Caduto wrote: I have a Red Hat EL 4 server and they only ship 7.x with it, but I want to run 8.x on it. The server is running in 64bit mode and was wondering if there is a RPM available? (I could only find 32bit ones

Re: [GENERAL] pgmonitor

2005-08-08 Thread Bruce Momjian
Mart?n Marqu?s wrote: What happend with pgmonitor? Uh, it is at: http://gborg.postgresql.org/project/pgmonitor/projdisplay.php -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard

Re: [GENERAL] pgmonitor

2005-08-08 Thread Martín Marqués
El Lun 08 Ago 2005 18:29, Bruce Momjian escribió: Martín Marqués wrote: What happend with pgmonitor? Uh, it is at: http://gborg.postgresql.org/project/pgmonitor/projdisplay.php Yes, I know, but it looks like unsupported, and with the last Debian update from 7.4 to 8.0 it got

Re: [GENERAL] How to write jobs in postgresql

2005-08-08 Thread Chris Browne
[EMAIL PROTECTED] (chiranjeevi.i) writes:     Is it possible to write jobs in postgresql if possible how should I write .please help me.:p What do you mean by job? If you mean run some sort of scheduled script, then that represents something that you could do using your favorite operating

Re: [ADMIN] [GENERAL] postgresql Secure Mode

2005-08-08 Thread Alvaro Herrera
On Mon, Aug 08, 2005 at 12:40:24PM -0400, Alvaro Herrera wrote: On Mon, Aug 08, 2005 at 12:24:14PM -0400, Mario Soto Cordones - Venezuela wrote: 2005/8/8, Alvaro Herrera [EMAIL PROTECTED]: Yeah, the server thinks it's active, but the client doesn't know it. Did you try connecting with

Re: [GENERAL] Simple PG Sql question (i hope)

2005-08-08 Thread Tony Caduto
I always thought that single qoutes in a sql statement meant a string/varchar/text. Thanks for the info on this. Single quotes denote an untyped constant, not a string. Hope this helps, ---(end of broadcast)--- TIP 2: Don't 'kill -9' the

Re: [GENERAL] How to join function with a table?

2005-08-08 Thread Yudie Pg
On 8/5/05, Tom Lane [EMAIL PROTECTED] wrote: Certainly not --- per the SQL spec, different elements of a FROM listare independent, so the datelist relation can't refer to P. (I think SQL 2003 has a construct called LATERAL that would allowsuch things, but we don't implement that yet.)The only way

[GENERAL] plpythonu and return void

2005-08-08 Thread Adrian Klaver
I recently migrated a database from Postgres 7.4.1 to Postgres 8.03. The only problem I have run into is that a plpythonu function that returns void will not run under 8.03. The error message states that a plpython function cannot return void. I got around it by having it return text and not

Re: [GENERAL] plpythonu and return void

2005-08-08 Thread Tom Lane
Adrian Klaver [EMAIL PROTECTED] writes: I recently migrated a database from Postgres 7.4.1 to Postgres 8.03. The only problem I have run into is that a plpythonu function that returns void will not run under 8.03. The error message states that a plpython function cannot return void. I got