Re: [GENERAL] setting local time without restarting server

2004-05-13 Thread Anony Mous
Thanks, but I do want to set the system time. It's actually for testing purposes. Our software looks to the db server to obtain the local date and time, however, to test various cases we need to fiddle with this value. I'd like to do it without having to first change the system time, and then

Re: [GENERAL] dbmirror

2004-05-13 Thread Gregory Wood
Does dbmirror do that? No, it does not. It also doesn't support promoting a slave database to a master; that has to be done manually, so I wouldn't consider that too big a problem. Worse in my opinion is that sequences don't get updated... so a slave that tries to do an insert on a replicated t

Re: [GENERAL] setting local time without restarting server

2004-05-13 Thread Bruno Wolff III
On Thu, May 13, 2004 at 12:56:48 -0600, Anony Mous <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a function that would allow me to set the local time while the > server is running? I can't seem to find anything on this... You probably want to set the timezone, not the local time. You can do th

[GENERAL] setting local time without restarting server

2004-05-13 Thread Anony Mous
Hi, Is there a function that would allow me to set the local time while the server is running? I can't seem to find anything on this... Thanks, Peter ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://arch

[GENERAL] After update complete set

2004-05-13 Thread Josué Maldonado
Hello list, Is there a way in pg to fire a function when a complete (not row by row) set is updated/inserted/deleted, for instance. update order_detail set confirmed='S' where modifieddate=current_date; Then after all the affected rows are updated, I need some code to uptaded other tables from

[GENERAL] DBI remote connection problem

2004-05-13 Thread Sally Sally
When I try to connect to a remote server using DBI I get an error " expected authentication request from server, but received S" Has anyone encountered this? I am not quite sure what it is refering to? Sally _ Is your PC infected? Ge

Re: [GENERAL] pg_xlog becomes extremely large during CREATE INDEX

2004-05-13 Thread Tom Lane
"Jeffrey W. Baker" <[EMAIL PROTECTED]> writes: > Sorry, my last mail got cut off. The server aborted because it couldn't > write the xlog. Looks like I omitted this from my last mail: Selective quoting of the log output? Naughty naughty. However, that still doesn't explain how you got into the

Re: [GENERAL] pg_xlog becomes extremely large during CREATE INDEX

2004-05-13 Thread Jeffrey W. Baker
On Thu, 2004-05-13 at 09:28, Tom Lane wrote: > "Jeffrey W. Baker" <[EMAIL PROTECTED]> writes: > > Sorry, my last mail got cut off. The server aborted because it couldn't > > write the xlog. Looks like I omitted this from my last mail: > > Selective quoting of the log output? Naughty naughty. >

Re: [GENERAL] pg_xlog becomes extremely large during CREATE INDEX

2004-05-13 Thread Jeffrey W. Baker
On Thu, 2004-05-13 at 06:10, Tom Lane wrote: > "Jeffrey W. Baker" <[EMAIL PROTECTED]> writes: > > Oh sure, it's bleating. Apparently my computer is too fast: > > I don't think the checkpoint process is completing. > > > May 12 16:37:08 mistral postgres[506]: [174-1] LOG: server process (PID 164

Re: [GENERAL] referential integrity constraints not checked inside

2004-05-13 Thread James M Moe
Christian Rank wrote: create table a (n integer); create table b (n integer); alter table a add primary key (n); alter table b add foreign key (n) references a(n); Have you considered using "on delete cascade" in table b? -- jimoe at sohnen-moe dot com -

Re: [GENERAL] referential integrity constraints not checked inside

2004-05-13 Thread Christian Rank
Tom Lane wrote: > Christian Rank <[EMAIL PROTECTED]> writes: > >>... according to the docs, the validity of a constraint should be >>checked after each statement unless this behaviour is altered with a SET >>CONSTRAINTS statement. > > > "Statement" means "interactive command" in that context --

Re: [GENERAL] referential integrity constraints not checked inside

2004-05-13 Thread Tom Lane
Christian Rank <[EMAIL PROTECTED]> writes: > ... according to the docs, the validity of a constraint should be > checked after each statement unless this behaviour is altered with a SET > CONSTRAINTS statement. "Statement" means "interactive command" in that context --- in other words, the constra

Re: [GENERAL] referential integrity constraints not checked inside PL/pgSQL functions?

2004-05-13 Thread Christopher Browne
Supposing you drop the "delete from b;" from the function, you'll find that the function fails with much the same error message you had before. Evidently that foreign key check gets _deferred_ in the context of the stored procedure. It is indeed checked; just not at the point you expect it to be

Re: [GENERAL] pg_xlog becomes extremely large during CREATE INDEX

2004-05-13 Thread Tom Lane
"Jeffrey W. Baker" <[EMAIL PROTECTED]> writes: > Oh sure, it's bleating. Apparently my computer is too fast: I don't think the checkpoint process is completing. > May 12 16:37:08 mistral postgres[506]: [174-1] LOG: server process (PID 16403) was > terminated by signal 6 You need to find out w

Re: [GENERAL] referential integrity constraints not checked inside

2004-05-13 Thread Christian Rank
Patrick Welche wrote: > On Thu, May 13, 2004 at 11:41:24AM +0200, Christian Rank wrote: > >> create function f () returns void as ' >> begin >>delete from a; >>delete from b; >>return; >> end; >> ' language plpgsql; >> >>I would expect that >> >> s

Re: [GENERAL] dbmirror

2004-05-13 Thread Andrew Sullivan
On Wed, May 12, 2004 at 05:53:05PM -0700, Gregory S. Williamson wrote: > Fred -- > > Yes, the slave database(s) can be safely used in a R/O mode, Does it also block write transactions in those slaves? The ability for clients to write into the slave replicated tables is a problem, because it ma

Re: [GENERAL] referential integrity constraints not checked inside PL/pgSQL functions?

2004-05-13 Thread Patrick Welche
On Thu, May 13, 2004 at 11:41:24AM +0200, Christian Rank wrote: > create function f () returns void as ' > begin > delete from a; > delete from b; > return; > end; > ' language plpgsql; > > I would expect that > > select f(); > > yields an er

[GENERAL] referential integrity constraints not checked inside PL/pgSQL functions?

2004-05-13 Thread Christian Rank
Hello, I came across the following problem with integrity constraints and PL/pgSQL (PostgreSQL version used: 7.4.2): I defined the following tables, constraints and data: create table a (n integer); create table b (n integer); alter table a add primary key (n); al

Re: [GENERAL] Functionality in database or external langauge

2004-05-13 Thread Jan Poslusny
I have some experience with following scenario: 1. Pg or other RDBMS realizes data integrity and transaction isolation, only. Potentially, only _very_ well known and oldschool rules are implemented here, for instance user sessions, which are not strictly related with real bussiness rules. Additi

Re: [GENERAL] LISTEN/NOTIFY with JDBC

2004-05-13 Thread Kris Jurka
On Wed, 12 May 2004, Glenn Sullivan wrote: > Thanks for the response. I have been using Sun's JDBC. > Do I take it that I need to create and use the Postgres > JDBC to get the ability to do NOTIFY/LISTEN? > You have been using the JDBC API provided by Sun as a number of interfaces (java.sql.

Re: [GENERAL] Cancel query based on a timeout

2004-05-13 Thread Stijn Vanroye
Hi Carl, Thanks a lot for sending me that code example. I have forwarded it to my colleague (as I said, It's not my project I'm just the one who's getting his mailbox bombarded with postgres mail :) ). He was kind of busy lately with another project so he couldn't delve into it right away. As s