[GENERAL] 8.3.4 rpms for Opensuse10.3 64bit

2008-09-23 Thread Gerd König
Hello, a few months ago we started using Postgres on Opensuse10.3-64bit. We installed Postgres 8.3.1 with the (at that time) latest available rpm's. But now Postgres' current version is 8.3.4 and I'm wondering why there are no new rpm's for Opensuse ?!?! The suse build service still offers me

Re: [GENERAL] match an IP address

2008-09-23 Thread Phoenix Kiula
My post at the bottom. On 9/23/08, Craig Ringer [EMAIL PROTECTED] wrote: Dodgy forum software. Lots of it uses an IP address as a fake username for unregistered users, rather than doing the sensible thing and tracking both IP address and (if defined) username. How I'd want to do

Re: [GENERAL] match an IP address

2008-09-23 Thread Tino Wildenhain
Phoenix Kiula wrote: My post at the bottom. ... No. You have no idea what the design is for. Not forum crap. What happens when you need to store in a table the activity log? ACTIVITY_ID USER_STAMP (currently user_id or ip for registered and unregistered resp.) And here it gets

Re: [GENERAL] match an IP address

2008-09-23 Thread hubert depesz lubaczewski
On Mon, Sep 22, 2008 at 05:59:25PM +0100, Joao Ferreira gmail wrote: I'm unable to build a LIKE or SIMILAR TO expression for matching and ip address 192.168.90.3 10.3.2.1 any help please... use this regular expression: '^[0-9]{1,3}(.[0-9]{1,3}){3}$' warning: do not use like or similar to.

Re: [GENERAL] [ADMIN] 8.3.4 rpms for Opensuse10.3 64bit

2008-09-23 Thread Peter Eisentraut
Gerd König wrote: a few months ago we started using Postgres on Opensuse10.3-64bit. We installed Postgres 8.3.1 with the (at that time) latest available rpm's. But now Postgres' current version is 8.3.4 and I'm wondering why there are no new rpm's for Opensuse ?!?! The answer is quite simply

Re: [GENERAL] [ADMIN] 8.3.4 rpms for Opensuse10.3 64bit

2008-09-23 Thread Dave Page
2008/9/23 Peter Eisentraut [EMAIL PROTECTED]: Gerd König wrote: a few months ago we started using Postgres on Opensuse10.3-64bit. We installed Postgres 8.3.1 with the (at that time) latest available rpm's. But now Postgres' current version is 8.3.4 and I'm wondering why there are no new

Re: [GENERAL] match an IP address

2008-09-23 Thread Craig Ringer
Phoenix Kiula wrote: Ever tried this crap on a table of 10 million records on a live website, where this query is happening at 3000 times per second? No such function schtick will match the raw speed of a simpler indexed query. Or did you mean my index should contain the COALESCE already?

Re: [GENERAL] [ADMIN] 8.3.4 rpms for Opensuse10.3 64bit

2008-09-23 Thread Simon Riggs
On Tue, 2008-09-23 at 09:06 +0100, Dave Page wrote: 2008/9/23 Peter Eisentraut [EMAIL PROTECTED]: Gerd König wrote: a few months ago we started using Postgres on Opensuse10.3-64bit. We installed Postgres 8.3.1 with the (at that time) latest available rpm's. But now Postgres' current

Re: [GENERAL] [ADMIN] 8.3.4 rpms for Opensuse10.3 64bit

2008-09-23 Thread Dave Page
On Tue, Sep 23, 2008 at 9:49 AM, Simon Riggs [EMAIL PROTECTED] wrote: Oh, I thought you were looking after that build. If it's not being maintained, we'll need to remove it from the download pages unless someone else can volunteer? I'll look at doing that. We need the SUSE builds also.

Re: [GENERAL] [ADMIN] 8.3.4 rpms for Opensuse10.3 64bit

2008-09-23 Thread Simon Riggs
On Tue, 2008-09-23 at 10:05 +0100, Dave Page wrote: On Tue, Sep 23, 2008 at 9:49 AM, Simon Riggs [EMAIL PROTECTED] wrote: Oh, I thought you were looking after that build. If it's not being maintained, we'll need to remove it from the download pages unless someone else can volunteer?

Re: [GENERAL] match an IP address

2008-09-23 Thread Joao Ferreira gmail
thank you depesz it seems a pretty good fix for my problem. Actually yestreday I came up with something similar but your's is better. cheers joao On Tue, 2008-09-23 at 09:26 +0200, hubert depesz lubaczewski wrote: On Mon, Sep 22, 2008 at 05:59:25PM +0100, Joao Ferreira gmail wrote: I'm

Re: [GENERAL] match an IP address

2008-09-23 Thread Phoenix Kiula
Please forgive my attempt to help you based on a woefully insufficient description of your problem and situation. I will not make any attempt to do so again. Actually it was not my problem, this is a thread started by some one else. I use Gmail so I see the entire thread as a conversation

Re: [GENERAL] match an IP address

2008-09-23 Thread Craig Ringer
Phoenix Kiula wrote: Ever tried this crap on a table of 10 million records on a live website, where this query is happening at 3000 times per second? No such function schtick will match the raw speed of a simpler indexed query. Or did you mean my index should contain the COALESCE already?

Re: [GENERAL] match an IP address

2008-09-23 Thread Phoenix Kiula
If you don't want to store IPs for registered users, I'd use: user_id INTEGER, ip cidr, CONSTRAINT must_have_userstamp CHECK ( user_id IS NOT NULL OR ip IS NOT NULL) ... and yes, I'd use a functional index to look it up, or even a trigger-maintained cache of the text representation

Re: [GENERAL] match an IP address

2008-09-23 Thread Tino Wildenhain
Hi, Phoenix Kiula wrote: Please forgive my attempt to help you based on a woefully insufficient description of your problem and situation. I will not make any attempt to do so again. To others: thanks for your suggestions, but this issue is not one of session IDs, nor is it solved by storing

Re: [GENERAL] match an IP address

2008-09-23 Thread Marcus Engene
Phoenix Kiula wrote: If you don't want to store IPs for registered users, I'd use: user_id INTEGER, ip cidr, CONSTRAINT must_have_userstamp CHECK ( user_id IS NOT NULL OR ip IS NOT NULL) ... and yes, I'd use a functional index to look it up, or even a trigger-maintained cache of the

Re: [GENERAL] match an IP address

2008-09-23 Thread Craig Ringer
Phoenix Kiula wrote: 1. What extra tax will this constraint levy on an INSERT or UPDATE on this table? There are about 100,000 inserts a day, and over three times as many UPDATES. The concurrency is pretty high -- I mean sometimes 1,000 users at the same time but no more than that. If the

Re: [GENERAL] match an IP address

2008-09-23 Thread Tino Wildenhain
Craig Ringer wrote: Phoenix Kiula wrote: 1. What extra tax will this constraint levy on an INSERT or UPDATE on this table? There are about 100,000 inserts a day, and over three times as many UPDATES. The concurrency is pretty high -- I mean sometimes 1,000 users at the same time but no more

Re: [GENERAL] match an IP address

2008-09-23 Thread Steve Atkins
On Sep 23, 2008, at 12:26 AM, hubert depesz lubaczewski wrote: On Mon, Sep 22, 2008 at 05:59:25PM +0100, Joao Ferreira gmail wrote: I'm unable to build a LIKE or SIMILAR TO expression for matching and ip address 192.168.90.3 10.3.2.1 any help please... use this regular expression:

Re: [GENERAL] match an IP address

2008-09-23 Thread Phoenix Kiula
...snip... I'd try a functional index first. If that didn't do the job, I'd use a trigger-maintained column _purely_ as an optimisation (ie I could drop it and lose no data) that stored text representations of the data. Honestly, though, I expect the functional index would be more than

[GENERAL] Error in ALTER DATABASE command

2008-09-23 Thread William Garrison
In Postgresql 8.2.9 on Windows, you cannot rename a database if the name contains mixed case. To replicate: 1) Open the pgadmin tool. 2) Create a database named MixedCase (using the UI, not using a query window or using PSQL) 3) Open a query window, or use PSQL to issue the following command

Re: [GENERAL] Error in ALTER DATABASE command

2008-09-23 Thread Douglas McNaught
On Tue, Sep 23, 2008 at 11:49 AM, William Garrison [EMAIL PROTECTED] wrote: In Postgresql 8.2.9 on Windows, you cannot rename a database if the name contains mixed case. 3) Open a query window, or use PSQL to issue the following command ALTER DATABASE MixedCase RENAME TO anything_else;

Re: [GENERAL] Error in ALTER DATABASE command

2008-09-23 Thread Steve Crawford
William Garrison wrote: In Postgresql 8.2.9 on Windows, you cannot rename a database if the name contains mixed case. To replicate: 1) Open the pgadmin tool. 2) Create a database named MixedCase (using the UI, not using a query window or using PSQL) 3) Open a query window, or use PSQL to

Re: [GENERAL] Error in ALTER DATABASE command

2008-09-23 Thread Raymond O'Donnell
On 23/09/2008 16:49, William Garrison wrote: In Postgresql 8.2.9 on Windows, you cannot rename a database if the name contains mixed case. Yes you can, in 8.3 anyway: postgres=# create database TeSt; CREATE DATABASE postgres=# \l List of databases Name | Owner |

[GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-23 Thread William Garrison
I have several .SQL files created from pg_dump, and I find that when I feed them into psql that I get tons of foreign key errors because the INSERT statements in the dump are not in the correct order. After reading the docs, mailing lists, and googling, I see posts saying this problem was

Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-23 Thread Alan Hodgson
On Tuesday 23 September 2008, William Garrison [EMAIL PROTECTED] wrote: 1) other workarounds 2) someone else who can confirm that this bug is either fixed, or not fixed. If it is supposedly fixed, then I guess I need to make a smaller version of my database to demonstrate the problem.

Re: [GENERAL] [ADMIN] 8.3.4 rpms for Opensuse10.3 64bit

2008-09-23 Thread Devrim GÜNDÜZ
Hi, On Tue, 2008-09-23 at 09:49 +0100, Simon Riggs wrote: I'll look at doing that. We need the SUSE builds also. I actually built 8.3.4 on SLES 10.2 on..err..Friday, while building Fedora/RH RPMs. 8.3.1 spec of SLES is broken IMHO, and it requires special attention from someone who is

Re: [GENERAL] [ADMIN] 8.3.4 rpms for Opensuse10.3 64bit

2008-09-23 Thread Simon Riggs
On Tue, 2008-09-23 at 21:05 +0300, Devrim GÜNDÜZ wrote: Hi, On Tue, 2008-09-23 at 09:49 +0100, Simon Riggs wrote: I'll look at doing that. We need the SUSE builds also. I actually built 8.3.4 on SLES 10.2 on..err..Friday, while building Fedora/RH RPMs. 8.3.1 spec of SLES is broken IMHO,

Re: [GENERAL] [ADMIN] 8.3.4 rpms for Opensuse10.3 64bit

2008-09-23 Thread Peter Eisentraut
Dave Page wrote: 2008/9/23 Peter Eisentraut [EMAIL PROTECTED]: Gerd König wrote: a few months ago we started using Postgres on Opensuse10.3-64bit. We installed Postgres 8.3.1 with the (at that time) latest available rpm's. But now Postgres' current version is 8.3.4 and I'm wondering why there

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-23 Thread Bruce Momjian
Added to TODO under features not wanted: Incomplete itemObfuscated function source code (not wanted) Obfuscating function source code has minimal protective benefits because anyone with super-user access can find a way to view the code. To prevent

Re: [GENERAL] [ADMIN] 8.3.4 rpms for Opensuse10.3 64bit

2008-09-23 Thread Peter Eisentraut
Devrim GÜNDÜZ wrote: On Tue, 2008-09-23 at 09:49 +0100, Simon Riggs wrote: I'll look at doing that. We need the SUSE builds also. I actually built 8.3.4 on SLES 10.2 on..err..Friday, while building Fedora/RH RPMs. 8.3.1 spec of SLES is broken IMHO, and it requires special attention from

[GENERAL] Debian packages for Postgres 8.2

2008-09-23 Thread Markus Wanner
Hi, I'm running several productive servers on Debian etch (stable) with Postgres 8.2 which has been in lenny (testing) and made available for etch through the backports project [1]. Unfortunately, they discontinued maintaining 8.2 and switched to 8.3 in testing and thus also for the

[GENERAL] Slony vs Longiste

2008-09-23 Thread Jason Long
I need to set up master vs slave replication. My use case is quite simple. I need to back up a small but fairly complex(30 MB data, 175 tables) DB remotely over T1 and be able to switch to that if the main server fails. The switch can even be a script run manually. Can someone either

Re: [GENERAL] Error in ALTER DATABASE command

2008-09-23 Thread William Garrison
I found out about the quoting thing about 30 seconds after I made the post. :) Thanks everyone who replied. Douglas McNaught wrote: On Tue, Sep 23, 2008 at 11:49 AM, William Garrison [EMAIL PROTECTED] wrote: In Postgresql 8.2.9 on Windows, you cannot rename a database if the name contains

Re: [GENERAL] Slony vs Longiste

2008-09-23 Thread Andrew Sullivan
On Tue, Sep 23, 2008 at 03:36:51PM -0500, Jason Long wrote: From what I read Longiste is easy to set up while I got a quote for Slony setup for 5-10k. I can set up Slony for way less than that, FWIW. But Londiste is intended to be easier to set up than Slony. A -- Andrew Sullivan [EMAIL

Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-23 Thread Craig Ringer
Alan Hodgson wrote: On Tuesday 23 September 2008, William Garrison [EMAIL PROTECTED] wrote: 1) other workarounds 2) someone else who can confirm that this bug is either fixed, or not fixed. If it is supposedly fixed, then I guess I need to make a smaller version of my database to

[GENERAL] Using a User-Def function in a query

2008-09-23 Thread Ralph Smith
I've written several user-defined functions (UDFs) for converting dates to unix time, every which way. They work find, ala # select dtu_dmony('22 Sep 2008'); dtu_dmony 1222066800 (1 row) Returns an integer. --- Here's a typical query I often run (why I wrote

Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-23 Thread Tom Lane
Craig Ringer [EMAIL PROTECTED] writes: IIRC a patch was circulating (maybe applied to 8.4?) that tries to map foreign-key relationships and where possible dump data in dependency order so that data-only dumps without circular foreign key references will restore correctly with no special user

Re: [GENERAL] Using a User-Def function in a query

2008-09-23 Thread Tom Lane
Ralph Smith [EMAIL PROTECTED] writes: I've written several user-defined functions (UDFs) for converting dates to unix time, every which way. ... but when I try to use the function in a query # select count(distinct username) from stats where eventtime dtu_dmony('22 Sep 2008') ; it

Re: [GENERAL] Slony vs Longiste

2008-09-23 Thread Volkan YAZICI
Jason Long [EMAIL PROTECTED] writes: I need to set up master vs slave replication. My use case is quite simple. I need to back up a small but fairly complex(30 MB data, 175 tables) DB remotely over T1 and be able to switch to that if the main server fails. The switch can even be a script