Re: [GENERAL] constraint -- one or the other column not null

2006-09-06 Thread Wayne Conrad
On Wed, Sep 06, 2006 at 12:04:18AM -0700, George Pavlov wrote: I have two columns, both individually nullable, but a row needs to have a value in one or the other. What is the best way to implement the constraints? check (a is null != b is null); ---(end of

[GENERAL] Child program using parent program's transaction?

2006-09-06 Thread Wayne Conrad
I work with a system designed as lots of little cooperating worker programs, with boss programs that... well, boss the worker programs around. Boss and workers all use the same database. Sometimes it would be convenient to have a boss start a transaction and then have the workers do their work

Re: [GENERAL] Listening on more than one port?

2006-08-30 Thread Wayne Conrad
If you need to run two separate databases on the same box, each with its own port, then having two clusters would be one way to go. Each cluster has its own postgresql.conf and so each cluster can be (must be, if I'm not mistaken) configured to listen on a separate port.

Re: [GENERAL] PITR Questions

2006-08-04 Thread Wayne Conrad
of main, and then pg_stop_backup()? That's your full backup; the PITR files are something like incremental backups and need the copy of main to play against. Wayne Conrad ---(end of broadcast)--- TIP 5: don't forget to increase your free space map

Re: [GENERAL] PITR Questions

2006-08-04 Thread Wayne Conrad
On Fri, Aug 04, 2006 at 11:04:03AM -0400, Matthew T. O'Connor wrote: Wayne Conrad wrote: Are you also doing the dance with pg_start_backup(), doing a file copy Yes, of course. Is there another way? Not that I know of. I'm embarassed I ask, since you know what you're doing. Wayne

Re: [GENERAL] pg_xlog not cleaned up

2006-07-31 Thread Wayne Conrad
On Mon, Jul 31, 2006 at 10:18:31PM +0200, Christian Kastner wrote: After the online backup script runs, all subsequent attempts to run archive_command fail because the first thing it tries to archive away is the still-existing *.backup file. This fails because a copy already exists in the

Re: [GENERAL] pg_xlog not cleaned up

2006-07-31 Thread Wayne Conrad
On Mon, Jul 31, 2006 at 10:18:31PM +0200, Christian Kastner wrote: After the online backup script runs, all subsequent attempts to run archive_command fail because the first thing it tries to archive away is the still-existing *.backup file. This fails because a copy already exists in the

Re: [GENERAL] Null and Void() - Or, Abandon All Hope Ye Who allow

2006-07-05 Thread Wayne Conrad
if the database itself did not support NULL. There's plenty of nits to pick here, I think. But it's clear to me that practice has proven NULL to be too useful to ditch. Wayne Conrad ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] table has a many to many relationship with itself ... ?

2006-06-15 Thread Wayne Conrad
On Tue, Jun 13, 2006 at 05:01:01PM +0200, Daniel McBrearty wrote: create table translations ( id serial primary key ); insert into table translations ... insert what? insert into translations default values; The other way to do this that I see is to lose the link table

Re: [GENERAL] Best way to store and retrieve large objects in database for email program

2006-06-05 Thread Wayne Conrad
Daniel's answer reflects our experience with large objects. We recently switch our 50-or-so G of stored postscript documents from large objects to bytea, but only because we're going to use Slony for our more-availability setup and Slony doesn't replicate large objects.

Re: [GENERAL] Debugging SQL queries

2006-05-11 Thread Wayne Conrad
the character position? Wayne Conrad ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] A better AND query?

2006-05-09 Thread Wayne Conrad
tagged_type int -- points to the table this tag is tagging My head exploded right about here. Is the schema written in stone, or can it change? What is the use case for this schema? What's it for? What is a tag about? Best Regards, Wayne Conrad ---(end

Re: [GENERAL] Using the REPLACE command to replace all vowels

2006-05-03 Thread Wayne Conrad
On Wed, May 03, 2006 at 09:38:47AM +0200, Magnus Hagander wrote: SELECT regexp_replace(your_string,'[aeiou]','','g') ... I'll be darned. I've been looking for that function. I expected to find it in the docs under String Functions with the other replace functions. I'm surprised to find it

Re: [GENERAL] How does an application recognize the death of the postmaster

2006-05-03 Thread Wayne Conrad
that the libraries don't know about, but it's seldom more than a few lines of code. We don't have to think about it much. Best Regards, Wayne Conrad ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate

[GENERAL] ERROR: out of memory during pg_restore

2006-04-25 Thread Wayne Conrad
80. What other information can I supply? What experiments should I do? Thanks in advance for any help you can offer. Wayne Conrad ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] SQL Rule

2006-04-25 Thread Wayne Conrad
On Tue, Apr 25, 2006 at 02:27:23PM -0700, Bert wrote: I have a table construction like the one seen below, when i am updating or inserting i get a recurion, logical. But how to manage it that the rule is just doing it one time. Or is it possible to do the sum of a and b in an other way? ...

Re: [GENERAL] ERROR: out of memory during pg_restore

2006-04-25 Thread Wayne Conrad
Tom, You bet. I'll give it a go and report back. On Tue, Apr 25, 2006 at 08:39:46PM -0400, Tom Lane wrote: I've applied the attached patch to 8.1.*, but it could use more testing --- do you want to patch locally and confirm it's OK for you? ---(end of