Re: [GENERAL] Why overlaps is not working

2006-11-28 Thread Alban Hertroys
Jim Nasby wrote: I know that numeric supports +/- infinity; I don't remember off-hand if timestamps have that as well. timestamps do, but dates don't. -- Alban Hertroys [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Have you searched our

[GENERAL] sequence help

2006-11-28 Thread Matthew Peter
I'll jump right in with an example create sequence foo start with 1; create view foobar as select *, nextval('foo') from bar; The problem is I need a nextval()-like method that returns the iterations without updating the foo sequence. Therefore, maintaining the sequences original value by

[GENERAL] Problem with unique key

2006-11-28 Thread Greg Peters
*Hello all, * ** *I have a small problem I hope somebody can help with.* ** *I have a table with the following definition:* CSG=# \d admin_field_list Table public.admin_field_list Column|Type | Modifiers

Re: [GENERAL] Problem with unique key

2006-11-28 Thread Tomas Vondra
ERROR: duplicate key violates unique constraint admin_field_list_pkey CSG=# /I don't understand what is going on. It seems that it can't increment the primary key properly, or for some reason it's trying to assign an incorrect value to the key column. If i change the command to include a

Re: [GENERAL] Problem with unique key

2006-11-28 Thread Richard Huxton
Greg Peters wrote: CSG=# \d admin_field_list Table public.admin_field_list Column|Type | Modifiers -+-+ key |

Re: [GENERAL] Problem with unique key

2006-11-28 Thread Greg Peters
Thanks all, with your help I figured out what happened. You are all correct in that the sequence is out of sync with the key value. I dumped the db and then selectively restored it from the sql file some time ago by cutting and pasting directly to the command prompt. I must have left out the

Re: [GENERAL] sequence help

2006-11-28 Thread Alban Hertroys
Matthew Peter wrote: I'll jump right in with an example create sequence foo start with 1; create view foobar as select *, nextval('foo') from bar; The problem is I need a nextval()-like method that returns the iterations without updating the foo sequence. Therefore, maintaining the

Re: [GENERAL] sequence help

2006-11-28 Thread Ragnar
On þri, 2006-11-28 at 01:12 -0800, Matthew Peter wrote: I'll jump right in with an example create sequence foo start with 1; create view foobar as select *, nextval('foo') from bar; The problem is I need a nextval()-like method that returns the iterations without updating the foo

Re: [GENERAL] A generic trigger to log chanes on database tables

2006-11-28 Thread George Weaver
- Original Message - From: Charles Ambrose [EMAIL PROTECTED] Is there a way that I could create a trigger that logs the changes (updates, deletes) of a table? I mean, I want to put in a table the changes to any table in a database and also put in the table the column that was

Re: [GENERAL] Question about encoding

2006-11-28 Thread Albe Laurenz
Is it possible to configure PostgreSQL so that a LIKE 'a' query will match a 'á' value, ie, make it accent-insensitive ? Maybe something like this can help you: test= select to_ascii(convert('tête-à-tête français', 'LATIN9'),'LATIN9'); to_ascii --

Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-28 Thread Olexandr Melnyk
2006/11/27, Tony Caduto [EMAIL PROTECTED]: One could also use Mono 1.2 and any .net 1.1 IDE such as Borland Turbo C# or Delphi.net (with npgsql .net data provider) both of which you can get for free here: http://www.turboexplorer.com or SharpDevelop which you can get here:

Re: [GENERAL] FK pointing to a VIEW

2006-11-28 Thread Olexandr Melnyk
Looks like I've missed your mail, so a late reply. 2006/11/11, Lars Heidieker [EMAIL PROTECTED]: While I agree in principle that such a thing should be able to be done, it simply isn't possible. (in PostgreSQL, you can't even add an index to a view, which a unique constraint would

Re: [GENERAL] vacuum: out of memory error

2006-11-28 Thread Jakub Ouhrabka
Thanks for the responses! One thing I've forgotten: it's not reproducible. I can issue vacuum command manually without any problems few minutes/seconds after seeing the error message out of memory in the server log. I also can't find any corrupted rows manually. And for the listen/notify

Re: [GENERAL] How to increace nightly backup speed

2006-11-28 Thread Andrus
You might try using online backups. By following the steps in this document: http://www.postgresql.org/docs/8.1/static/backup-online.html you can back up the data at the speed of your filesystem. There's no way to make it faster than that. PITR config is complicated. A lot of manual steps

Re: [GENERAL] How to increace nightly backup speed

2006-11-28 Thread Andrus
If you've got excess CPU capacity at night, I wonder if -Z1 or -Z2 would speed the backup since it reduces the amount of data written to disk. Where to find study which pg_dump compares backup speed and backup size by using various -Z options ? I'm wondering by -Z9 increases backup speed.

Re: [GENERAL] IN clause

2006-11-28 Thread Martijn van Oosterhout
On Mon, Nov 27, 2006 at 05:24:31PM -0600, Jim Nasby wrote: In any case, like Oracle, PostgreSQL does not index NULL values (at least not in btree). Actually, PostgreSQL does store NULL values in an index, otherwise you could never use them for full index scans (think multicolumn indexes). You

Re: [GENERAL] NULLs ;-)

2006-11-28 Thread John D. Burger
Scott Ribe wrote: where a b or (a is null and b is not null) or (a is not null and b is null) In the absence of IS DISTINCT FROM, I think this has the same semantics: where coalesce(a, b) coalesce(b, a) although it's not as concise as one might wish. - John D. Burger MITRE

Re: [GENERAL] How to increace nightly backup speed

2006-11-28 Thread Michael Nolan
On 11/28/06, Andrus [EMAIL PROTECTED] wrote: My goal is to create ERP system which creates backups without any attendance. I don'nt know how to automate this 100% and havent found any such sample. Depending on what you plan to do with the backups (like create a fallover server), I don't know

Re: [GENERAL] vacuum: out of memory error

2006-11-28 Thread Vivek Khera
On Nov 28, 2006, at 8:40 AM, Jakub Ouhrabka wrote: There are 4G of RAM and 4G swap. and what is the per-process resource limit imposed by your OS? Just because your box has that much RAM doesn't mean your process is allowed to use it. smime.p7s Description: S/MIME cryptographic

Re: [GENERAL] NULLs ;-)

2006-11-28 Thread Ragnar
On þri, 2006-11-28 at 09:42 -0500, John D. Burger wrote: Scott Ribe wrote: where a b or (a is null and b is not null) or (a is not null and b is null) In the absence of IS DISTINCT FROM, I think this has the same semantics: where coalesce(a, b) coalesce(b, a) sorry, but no.

[GENERAL] Datafiles binary portable?

2006-11-28 Thread Stephen Harris
This is probably a silly question, but are the database files binary portable? eg could I take datafiles from a Sparc and copy them to an Intel machine, or would the endianness differences kill me? I expect the answer to be funny man! Of course not! for reasons of speed (native interger handling

Re: [GENERAL] How to implement backup protocol

2006-11-28 Thread Andrus
The weekly backup of the larger of the two databases produces a file that is about 20GB and takes about an hour and 15 minutes. I then compress it down to about 4 GB, which takes another hour. However, because that's a separate task, it doesn't impact the database server as much. (I

Re: [GENERAL] AIX and getaddrinfo

2006-11-28 Thread Chris Browne
[EMAIL PROTECTED] (Tom Lane) writes: Bill Kurland [EMAIL PROTECTED] writes: I did a google search on AIX + getaddrinfo and found http://lists.samba.org/archive/rsync/2002-April/002063.html In that context the author says that adding the port number in etc/services solved his problem with

Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-28 Thread Tony Caduto
Thomas Kellerer wrote: On 27.11.2006 17:36 Tony Caduto wrote: The closest to Delphi in a cross platform system is NetBeans and even with their form designer it's still tedious working with databases compared to Delphi. What about Lazarus? It claims to be cross-platform, but I don't know how

Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-28 Thread Tony Caduto
Olexandr Melnyk wrote: Mono/.NET is definately worth the consideration. However, I'd advice you not to go with Turbo C#, as it only supports .NET 1.*, so you won't be able to use such goodies as: generics and nullable types, which are quite handy, especially for the database-oriented

Re: [GENERAL] FK pointing to a VIEW

2006-11-28 Thread Lars Heidieker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28 Nov 2006, at 13:33, Olexandr Melnyk wrote: Looks like I've missed your mail, so a late reply. 2006/11/11, Lars Heidieker [EMAIL PROTECTED]: While I agree in principle that such a thing should be able to be done, it simply isn't

[GENERAL] Very minor configure issue?

2006-11-28 Thread Stephen Harris
I didn't see this mentioned in the INSTALL or doc/ directory, so... I have versions of SSL libraries in my own directories and so used a command line such as: ./configure --prefix=/local/apps/postgres/8.2.rc1.0 \ --exec-prefix=/local/apps/postgres/8.2.rc1.0/linux \

Re: [GENERAL] How to increace nightly backup speed

2006-11-28 Thread Andrus
$ ssh 81.50.12.18 pg_dump -Z0 -Fc -ibv -U myuser mydb | gzip -9 Alexander, 1. My database size seems to be appox 1 GB and download speed is approx 600 kb/s. Your solution requires 4.5 hours download time since 1 GB of data must be downloaded. 2. I have only 5432 port open to public internet

Re: [GENERAL] Datafiles binary portable?

2006-11-28 Thread Richard Huxton
Stephen Harris wrote: This is probably a silly question, but are the database files binary portable? No eg could I take datafiles from a Sparc and copy them to an Intel machine, or would the endianness differences kill me? Yes How about cross OS (eg from Linux Intel to Windows XP, or

Re: [GENERAL] How to implement backup protocol

2006-11-28 Thread Karsten Hilbert
On Tue, Nov 28, 2006 at 06:01:43PM +0200, Andrus wrote: 5. Server has *only* 5432 port open. pg_read_file() can read only text files and is restricted only to superusers. How to add a function pg_read_backup() to Postgres which creates and returns backup file with download speed ? You

Re: [GENERAL] How to implement backup protocol

2006-11-28 Thread Richard Huxton
Andrus wrote: So I think that 4.5 hours which requires to create backup is because pg_dump download the whole database (1 GB) in uncompressed format over slow internet connection. Compression level does not affect to this almost at all. Might well be latency issues too. I think I can

Re: [GENERAL] How to increace nightly backup speed

2006-11-28 Thread Martijn van Oosterhout
On Tue, Nov 28, 2006 at 03:29:44PM +0200, Andrus wrote: If you've got excess CPU capacity at night, I wonder if -Z1 or -Z2 would speed the backup since it reduces the amount of data written to disk. Where to find study which pg_dump compares backup speed and backup size by using various

Re: [GENERAL] Datafiles binary portable?

2006-11-28 Thread Tom Lane
Stephen Harris [EMAIL PROTECTED] writes: This is probably a silly question, but are the database files binary portable? No. regards, tom lane ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Very minor configure issue?

2006-11-28 Thread Martijn van Oosterhout
On Tue, Nov 28, 2006 at 11:11:26AM -0500, Stephen Harris wrote: The solution, obviously, is LDFLAGS=-Wl,-R/opt/mystuff/lib ./configure and now everything configures and builds cleanly, but it might be nice for that to be automatic. RPATH is evil. If you're going to install libraries in

Re: [GENERAL] FK pointing to a VIEW

2006-11-28 Thread Martijn van Oosterhout
On Tue, Nov 28, 2006 at 03:33:54PM +0200, Olexandr Melnyk wrote: This would mean something like an index spreading over more then one table in the end, or did I miss something ? Yes. But that is hardly implementable. Actually, an index over multiple tables is not really the hard part. It's

Re: [GENERAL] Datafiles binary portable?

2006-11-28 Thread Martijn van Oosterhout
On Tue, Nov 28, 2006 at 11:00:35AM -0500, Stephen Harris wrote: This is probably a silly question, but are the database files binary portable? eg could I take datafiles from a Sparc and copy them to an Intel machine, or would the endianness differences kill me? No. It may not even be

[GENERAL] where are wombats?

2006-11-28 Thread wombat
Can someone tell me whether Wombats live only in Australia, or also on other continents? Apart from zoos, of course. We all know that Wombats are to be found in Zoos. 274 -- Posted via a free Usenet account from http://www.teranews.com ---(end of

[GENERAL] are wombats good?

2006-11-28 Thread wombat
I'm not really sure whether Wombats are any good. The picture on Wikipedia looks like a horrid little Pig. Quite Obscene. Just not English. 274 -- Posted via a free Usenet account from http://www.teranews.com ---(end of broadcast)--- TIP 4:

Re: [GENERAL] [Windows] Pg_Restore on 8.1.5 and so on...

2006-11-28 Thread Terry Yapt
Terry Yapt wrote: I am trying to restore from a pg_dump. Pg_restore is doing some strange behaviour. If I open a CMD shell console and execute pg_restore, nothing is showed. If I try to do a with sense pg_restore, nothing is showed in spite of I have put --verbose option. This is my

[GENERAL] [Windows] Pg_Restore on 8.1.5 and so on...

2006-11-28 Thread Terry Yapt
I am trying to restore from a pg_dump. Pg_restore is doing some strange behaviour. If I open a CMD shell console and execute pg_restore, nothing is showed. If I try to do a with sense pg_restore, nothing is showed in spite of I have put --verbose option. This is my complete command:

Re: [GENERAL] IS it a good practice to use SERIAL as Primary Key?

2006-11-28 Thread Daniel Serodio
Joshua D. Drake wrote: snip/ That's it, in a nut shell. There is no argument there. That is why you don't use artificial keys. That said... pretty much every table I create will have an artificial key... because it makes managing data easy. An example (to reuse the simple example): users

Re: [GENERAL] AIX and getaddrinfo

2006-11-28 Thread Bill Kurland
Chris Browne wrote: [EMAIL PROTECTED] (Tom Lane) writes: Bill Kurland [EMAIL PROTECTED] writes: I did a google search on AIX + getaddrinfo and found http://lists.samba.org/archive/rsync/2002-April/002063.html In that context the author says that adding the port number in etc/services

Re: [GENERAL] Only MONO/WinForms is a way to go

2006-11-28 Thread Andrus
So my advice goes towards Mono/Gtk#. There is a bunch of programming languages for Mono/.NET to choose from, so choosing one of them mostly depends on your taste. Here is some information missing from this thread: 1. Gtk# does not support data binding required for database application. It

Re: [GENERAL] Only MONO/WinForms is a way to go

2006-11-28 Thread Tomi N/A
2006/11/28, Andrus [EMAIL PROTECTED]: Only MONO/WinForms is a way to go in any serious application. Mono needs to show a lot more than beagle and f-spot to be even considered interesting, let alone a platform to base industrial strength applications on. As long as that doesn't radically

Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-28 Thread Olexandr Melnyk
2006/11/28, Tony Caduto [EMAIL PROTECTED]: Mono 1.2 only fully supports .net 1.1 (for winforms) Yes. But it already supports most of the .NET 2.0 features (not talking of WinForms here) including the ones metioned above and has a C# 2.0 compiler. What kind of problems have you seen with the

Re: [GENERAL] Only MONO/WinForms is a way to go

2006-11-28 Thread Joshua D. Drake
On Tue, 2006-11-28 at 17:31 +, Tomi N/A wrote: 2006/11/28, Andrus [EMAIL PROTECTED]: Only MONO/WinForms is a way to go in any serious application. Mono needs to show a lot more than beagle and f-spot to be even considered interesting, let alone a platform to base industrial strength

Re: [GENERAL] Only MONO/WinForms is a way to go

2006-11-28 Thread Joshua D. Drake
Conclusion: Only MONO/WinForms is a way to go in any serious application. Py/QT? Py/GTK? Joshua D. Drake Andrus. ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an

Re: [GENERAL] How to implement backup protocol

2006-11-28 Thread Andrus
You could use an *un*trusted procedural language to create a function to binary-read the backup from disk and return it as a bytea field. Not sure how efficient that is, though. You could then simply do select get_backup(); If you allow for parameters you could make it return certain

Re: [GENERAL] How to implement backup protocol

2006-11-28 Thread Andrus
Richard, Use scp. Open port 22 and allow only connections from the backup machine with a specified user (e.g. pgbackup). Alternatively, you might try dumping in a text-format and using rsync to transfer changes. I really do'nt want to open separate port for backup only. Pelase, can you

Re: [GENERAL] Editing contrib modules which are loaded by default?

2006-11-28 Thread novnov
I imagine that there is a step in the windows install that allows one to select contrib modules. I don't recall. I didn't add these contrib modules, so they must be included by default, which frankly seems pretty dumb. I've tried to follow the instructions on the pgsql site for replacing

Re: [GENERAL] How to implement backup protocol

2006-11-28 Thread Michael Nolan
I don't see where doing the backup directly to another computer increases your safety margin, it may even lower it due to the increased potential for network issues messing up the backup cycle. Do it locally then SCP the completed (and compressed) file to another computer, which is what I do.

Re: [GENERAL] Editing contrib modules which are loaded by default?

2006-11-28 Thread Joshua D. Drake
On Tue, 2006-11-28 at 09:38 -0800, novnov wrote: I imagine that there is a step in the windows install that allows one to select contrib modules. I don't recall. I didn't add these contrib modules, so they must be included by default, which frankly seems pretty dumb. I've tried to follow the

Re: AIX and getaddrinfo (was Re: [GENERAL] Upgrade problem)

2006-11-28 Thread Albe Laurenz
Tom Lane wrote: Can anyone else confirm the behavior of getaddrinfo wanting port 5432 to be listed in /etc/services? If this is real, we ought to have something about it in FAQ_AIX. I can compile (64 bit) and run the following code without problem: #include sys/socket.h #include netdb.h

Re: [GENERAL] Editing contrib modules which are loaded by default?

2006-11-28 Thread novnov
I'm sure I didn't do something properly but the point is, as a newbie, none of it is obvious. However I'm going to have to try again, as the setup for pgsql 8.1 does not seem to have a way to turn off the cube contrib modules. They are not listed anywhere in the setup console. Or I will try to

[GENERAL] Including unique users in huge data warehouse in Postgresql...

2006-11-28 Thread Mark Jensen
So i've been given the task of designing a data warehouse in either Postgresql or Mysql for our clickstream data for our sites. I started with Mysql but the joins in Mysql are just way too slow compared to Postgresql when playing with star schemas. I can't say which sites i'm working on, but we

Re: [GENERAL] How to implement backup protocol

2006-11-28 Thread Jeff Davis
On Tue, 2006-11-28 at 19:34 +0200, Andrus wrote: You could use an *un*trusted procedural language to create a function to binary-read the backup from disk and return it as a bytea field. Not sure how efficient that is, though. You could then simply do select get_backup(); If you

Re: [GENERAL] How to implement backup protocol

2006-11-28 Thread Karsten Hilbert
On Tue, Nov 28, 2006 at 07:23:44PM +0200, Andrus wrote: Pelase, can you recomment a solution which uses port 5432 owned by Postgres If you think you know your usage pattern: Have cron stop PostgreSQL at, say, 2am. Have cron start ssh on port 5432 at 2:05am if PG is down. Have cron shutdown

Re: [GENERAL] How to implement backup protocol

2006-11-28 Thread Karsten Hilbert
On Tue, Nov 28, 2006 at 07:34:56PM +0200, Andrus wrote: This id good idea but it forces to use Postgres protocol for downloading. Why, of course. This protocol has some timeouts which are too small for large file download. For sane values of large I doubt this is true. A field in PG can store

Re: [GENERAL] Only MONO/WinForms is a way to go

2006-11-28 Thread John DeSoi
On Nov 28, 2006, at 12:17 PM, Andrus wrote: Only MONO/WinForms is a way to go in any serious application. Funny. Did you read the original post? The poster wanted a *cross- platform* GUI and his primary development environment was OS X. Mono might run on a Mac after you install

Re: [GENERAL] Editing contrib modules which are loaded by default?

2006-11-28 Thread Raymond O'Donnell
On 28 Nov 2006 at 10:01, novnov wrote: I'm sure I didn't do something properly but the point is, as a newbie, none of it is obvious. The documentation that comes with PostgreSQL head-and-shoulders above anything that comes with many commercial products. If you're going to work woth

Re: [GENERAL] Editing contrib modules which are loaded by default?

2006-11-28 Thread Richard Huxton
novnov wrote: I'm sure I didn't do something properly but the point is, as a newbie, none of it is obvious. However I'm going to have to try again, as the setup for pgsql 8.1 does not seem to have a way to turn off the cube contrib modules. They are not listed anywhere in the setup console.

Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-28 Thread Merlin Moncure
On 11/28/06, Olexandr Melnyk [EMAIL PROTECTED] wrote: 2006/11/28, Tony Caduto [EMAIL PROTECTED]: Mono 1.2 only fully supports .net 1.1 (for winforms) Yes. But it already supports most of the .NET 2.0 features (not talking of WinForms here) including the ones metioned above and has a C# 2.0

Re: [GENERAL] NULLs ;-)

2006-11-28 Thread John D. Burger
where a b or (a is null and b is not null) or (a is not null and b is null) In the absence of IS DISTINCT FROM, I think this has the same semantics: where coalesce(a, b) coalesce(b, a) sorry, but no. Argh, my expression is just nonsense - I was thinking of something like:

Re: [GENERAL] How to implement backup protocol

2006-11-28 Thread Richard Huxton
Andrus wrote: Richard, Use scp. Open port 22 and allow only connections from the backup machine with a specified user (e.g. pgbackup). Alternatively, you might try dumping in a text-format and using rsync to transfer changes. I really do'nt want to open separate port for backup only.

Re: [GENERAL] Only MONO/WinForms is a way to go

2006-11-28 Thread Joshua D. Drake
On Tue, 2006-11-28 at 13:52 -0500, John DeSoi wrote: On Nov 28, 2006, at 12:17 PM, Andrus wrote: Only MONO/WinForms is a way to go in any serious application. Funny. Did you read the original post? The poster wanted a *cross- platform* GUI and his primary development environment was

Re: [GENERAL] AIX and getaddrinfo

2006-11-28 Thread Chris Browne
[EMAIL PROTECTED] (Bill Kurland) writes: Chris Browne wrote: [EMAIL PROTECTED] (Tom Lane) writes: Bill Kurland [EMAIL PROTECTED] writes: I did a google search on AIX + getaddrinfo and found http://lists.samba.org/archive/rsync/2002-April/002063.html In that context the author says that

Re: [GENERAL] How to implement backup protocol

2006-11-28 Thread Tom Lane
Karsten Hilbert [EMAIL PROTECTED] writes: Not sure but using a binary cursor might improve things. Why not use COPY protocol? regards, tom lane ---(end of broadcast)--- TIP 5: don't forget to increase your free space map

Re: [GENERAL] Only MONO/WinForms is a way to go

2006-11-28 Thread Tony Caduto
John DeSoi wrote: As I mentioned previously, XUL is worth a look for cross platform applications. I would call FireFox, Mozilla, and Thunderbird serious applications. And check out Komodo, an excellent cross platform development environment built on this framework. They are serious

Re: [GENERAL] Editing contrib modules which are loaded by default?

2006-11-28 Thread Dave Page
--- Original Message --- From: Richard Huxton dev@archonet.com To: novnov [EMAIL PROTECTED] Sent: 28/11/06, 18:56:37 Subject: Re: [GENERAL] Editing contrib modules which are loaded by default? Because I just don't believe that the installer doesn't let you turn the cube contrib

Re: [GENERAL] How to increace nightly backup speed

2006-11-28 Thread Vivek Khera
On Nov 28, 2006, at 11:11 AM, Andrus wrote: 1. My database size seems to be appox 1 GB and download speed is approx 600 kb/s. Your solution requires 4.5 hours download time since 1 GB of data must be downloaded. If you're running pg_dump on a remote host, you're transferring the data

Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-28 Thread Rich Shepard
On Tue, 28 Nov 2006, Merlin Moncure wrote: For a general purpose language, lately I've been taking a really good look at 'D', which looks to be an amazing language. Has anybody tried to hook up postgresql to D? No, I haven't. But, if you want a cross-platform language and GUI toolkit,

Re: [GENERAL] NULLs ;-)

2006-11-28 Thread Scott Ribe
where a b or (a is null and b is not null) or (a is not null and b is null) In the absence of IS DISTINCT FROM, I think this has the same semantics: where coalesce(a, b) coalesce(b, a) sorry, but no. So it would have to be where coalesce(a, b, 0) coalesce(b, a, 0) for your

Re: [GENERAL] backend crash following load command

2006-11-28 Thread Merlin Moncure
On 11/28/06, Tom Lane [EMAIL PROTECTED] wrote: Merlin Moncure [EMAIL PROTECTED] writes: We are getting a backend crash after issueing a load command. No crash from your example here (on Fedora Core 5). What platform and gcc are you using exactly? Can you provide a stack trace from the crash?

Re: [GENERAL] Only MONO/WinForms is a way to go

2006-11-28 Thread Thomas Kellerer
Andrus wrote on 28.11.2006 18:17: 5. Java is not LGPL and does not support Generic at bytecode level I have heard this Java is not open source over and over again. What's the issue with wanting the language to be open source? Where is the problem with using Java from a license perspective? You

Re: [GENERAL] Only MONO/WinForms is a way to go

2006-11-28 Thread Tony Caduto
Rich Shepard wrote: On Tue, 28 Nov 2006, Tony Caduto wrote: The reason there is no highly productive IDE for Linux/Mac with a nice forms designer and robust data binding is because in the grand scheme of things there are not a lot of desktop users for anything other than win32. Sure there are

Re: [GENERAL] How to implement backup protocol

2006-11-28 Thread Ragnar
On þri, 2006-11-28 at 19:23 +0200, Andrus wrote: Richard, I really do'nt want to open separate port for backup only. Pelase, can you recomment a solution which uses port 5432 owned by Postgres I do not want to advice you to do things that might be counter your company's security policies,

[GENERAL] slow inet within cidr query

2006-11-28 Thread Edwin Grubbs
Under postgres 8.1, the = comparison yields very slow queries with large tables. I can rewrite the query without the = operator by generating all 33 possible netmasks (0 through 32) for a given IP. This ugly rewrite runs about 12 times faster (6 seconds versus 0.5 seconds). Be aware that EXPLAIN

Re: [GENERAL] Only MONO/WinForms is a way to go

2006-11-28 Thread Tony Caduto
Thomas Kellerer wrote: And who cares if my bytecode knows something about Generics as long as the application runs at a good speed? I totally agree about generics, nice to have but not really needed. In case not everyone is up to speed about generics, this article is really good:

Re: [GENERAL] backend crash following load command

2006-11-28 Thread Martijn van Oosterhout
On Tue, Nov 28, 2006 at 02:38:18PM -0500, Merlin Moncure wrote: On 11/28/06, Tom Lane [EMAIL PROTECTED] wrote: Merlin Moncure [EMAIL PROTECTED] writes: We are getting a backend crash after issueing a load command. No crash from your example here (on Fedora Core 5). What platform and gcc

[GENERAL] using a sequence as the functional equivalent to Oracle rownum

2006-11-28 Thread Wm.A.Stafford
I'm trying to use a temporary sequence to duplicate the functionality of the Oracle rownum pseudo-column as suggested by Scott Marlow in the archives: http://archives.postgresql.org/pgsql-sql/2005-05/msg00126.php. The Oracle based application I'm porting to PostgreSQL used rownum to select

Re: [GENERAL] backend crash following load command

2006-11-28 Thread Tom Lane
Merlin Moncure [EMAIL PROTECTED] writes: ok, an update on this. we actually covered up the bug in reducing the problem to our test case. our make system used cp -f to overwite the .so file in use by postgresql. With that I can reproduce it --- I think it is a glibc bug. The crash occurs

Re: [GENERAL] backend crash following load command

2006-11-28 Thread Martijn van Oosterhout
On Tue, Nov 28, 2006 at 03:23:36PM -0500, Tom Lane wrote: I'd suggest putting together a simple stand-alone test case and filing a bug report against glibc. You probably just need dlopen(...); system(cp -f over the .so file); dlsym(...); How can glibc do anything about

Re: [GENERAL] backend crash following load command

2006-11-28 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: On Tue, Nov 28, 2006 at 03:23:36PM -0500, Tom Lane wrote: I'd suggest putting together a simple stand-alone test case and filing a bug report against glibc. How can glibc do anything about this? dlopen() mmaps the .so into memory and the cp

Re: [GENERAL] backend crash following load command

2006-11-28 Thread Merlin Moncure
On 11/28/06, Tom Lane [EMAIL PROTECTED] wrote: Martijn van Oosterhout kleptog@svana.org writes: On Tue, Nov 28, 2006 at 03:23:36PM -0500, Tom Lane wrote: I'd suggest putting together a simple stand-alone test case and filing a bug report against glibc. How can glibc do anything about this?

Re: [GENERAL] backend crash following load command

2006-11-28 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: Err, that means copy is just rewriting the executable code in the backend of the server, while it's running, which understandably crashes. No, I don't think so. cp -f means unlink the old file and create a new one, as opposed to plain cp which

Re: [GENERAL] using a sequence as the functional equivalent to Oracle rownum

2006-11-28 Thread Tom Lane
Wm.A.Stafford [EMAIL PROTECTED] writes: ... is there a standard PostgreSQL way to select a 'block' of rows from a result set based on row number? LIMIT/OFFSET might be what you are looking for --- it's certainly far less klugy than a temporary sequence. regards, tom

Re: [GENERAL] Only MONO/WinForms is a way to go

2006-11-28 Thread Merlin Moncure
On 11/28/06, Tony Caduto [EMAIL PROTECTED] wrote: Thomas Kellerer wrote: And who cares if my bytecode knows something about Generics as long as the application runs at a good speed? I totally agree about generics, nice to have but not really needed. I dont like generics as much as c++

Re: [GENERAL] using a sequence as the functional equivalent to Oracle

2006-11-28 Thread Oisin Glynn
Wm.A.Stafford wrote: I'm trying to use a temporary sequence to duplicate the functionality of the Oracle rownum pseudo-column as suggested by Scott Marlow in the archives: http://archives.postgresql.org/pgsql-sql/2005-05/msg00126.php. The Oracle based application I'm porting to PostgreSQL

Re: [GENERAL] slow inet within cidr query

2006-11-28 Thread Tom Lane
Edwin Grubbs [EMAIL PROTECTED] writes: Under postgres 8.1, the = comparison yields very slow queries with large tables. = isn't optimizable within joins, and really isn't very suited to btree indexes at all. Sometime somebody should try to build a GiST opclass that supports network sub/sup

Re: [GENERAL] NULLs ;-)

2006-11-28 Thread Ragnar
On þri, 2006-11-28 at 12:28 -0700, Scott Ribe wrote: where a b or (a is null and b is not null) or (a is not null and b is null) In the absence of IS DISTINCT FROM, I think this has the same semantics: where coalesce(a, b) coalesce(b, a) sorry, but no. So it would have

Re: [GENERAL] Editing contrib modules which are loaded by default?

2006-11-28 Thread novnov
I was wrong from the get-go, I apparently selected the cube contrib, because on reinstall it's not automatically selected, at least in 8.1.5. Richard Huxton wrote: novnov wrote: I'm sure I didn't do something properly but the point is, as a newbie, none of it is obvious. However I'm

Re: [GENERAL] backend crash following load command

2006-11-28 Thread Martijn van Oosterhout
On Tue, Nov 28, 2006 at 04:09:11PM -0500, Tom Lane wrote: The mmap man page is pretty vague on the subject, but I wonder whether the shlib isn't effectively treated as copy-on-write --- that is, any attempted overwrite of the file happens only after the mmap region has been fully copied.

Re: [GENERAL] slow inet within cidr query

2006-11-28 Thread Steve Atkins
On Nov 28, 2006, at 12:07 PM, Edwin Grubbs wrote: Under postgres 8.1, the = comparison yields very slow queries with large tables. I can rewrite the query without the = operator by generating all 33 possible netmasks (0 through 32) for a given IP. This ugly rewrite runs about 12 times

Re: [GENERAL] NULLs ;-)

2006-11-28 Thread Scott Ribe
no cigar. Well, duh. Showing why IS DISTINCT FROM is useful. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [GENERAL] backend crash following load command

2006-11-28 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: Hmm? To upgrade libc.so you merely need to delete the old one and install the new one, there's no need to preserve the inode. The mmap() is private, but no, Linux does not keep a backup copy of the shared library if you overwrite it. The

[GENERAL] Windows default editor for psql \e

2006-11-28 Thread Richard Broersma Jr
Does anyone know how to change the default editor from NOTEPAD to something link gVim? It would be nice to use an editor with a little more smarts. Regards, Richard Broersma jr. ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner

Re: [GENERAL] Windows default editor for psql \e

2006-11-28 Thread Bruce Momjian
Richard Broersma Jr wrote: Does anyone know how to change the default editor from NOTEPAD to something link gVim? It would be nice to use an editor with a little more smarts. Sure, see the psql manual page, but setting EDITOR is the easiest way. This works on Win32 too. -- Bruce Momjian

Re: [GENERAL] Only MONO/WinForms is a way to go

2006-11-28 Thread John DeSoi
On Nov 28, 2006, at 2:05 PM, Tony Caduto wrote: They are serious applications, but they don't exactly have a lot of forms and look how long Mozilla was in development. I think the various interfaces in something like Thunderbird shows it can do all the standard GUI stuff pretty well.

Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-28 Thread Ritesh Nadhani
Hello All Sorry for the late reply. Been a little busy with my assignments. I will try to answer all the queries in this mail. The reason I don't want to develop the project in wxWindows or a C/C++ based toolkit is that in the end I would be able to compile a binary which will have least

Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-28 Thread Ritesh Nadhani
Hey Sorry for the critical mistake. Pressed the SEND button too early. In the first para I meant: The reason I *want* to develop the project in wxWindows or a C/C++ based toolkit is that in the end I would be able to compile a binary which will have least dependency and can be bundled for

  1   2   >