Re: [GENERAL] replication from multiple "master" servers to a single read-only slave

2010-01-12 Thread Omar Mehmood
d it seems to address all my needs-- I also fired off an email to Selena D on it and she's also affirmed that it looks to solve my problem. I'm going to setup an environment for testing and then post my questions directly to the bucardo-users mailing list. Omar --- On Tue, 1/12/10, Jo

[GENERAL] transaction logging in the form of SQL statements

2010-01-11 Thread Omar Mehmood
, Omar -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] replication from multiple "master" servers to a single read-only slave

2010-01-11 Thread Omar Mehmood
n the situation where the slave will start to increasingly lag behind over time (depends on the number of master servers and amount of data). I will check out Bucardo. Omar --- On Mon, 1/11/10, Ben Chobot wrote: > From: Ben Chobot > Subject: Re: [GENERAL] replication from multiple "m

[GENERAL] replication from multiple "master" servers to a single read-only slave

2010-01-11 Thread Omar Mehmood
oning as well as any DB triggers (in case anyone was going to go down that path as part of the solution). Omar -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] SPI_ERROR_CONNECT within pl/pgsql PG 8.4

2009-08-19 Thread Omar Bettin
Hello, Somebody has solved the problem that was not present in 8.3.x ? Thankyou Omar

Re: [GENERAL] Problem with oids for table names getting out of sync?

2007-04-05 Thread Omar Eljumaily
. Thanks, Omar Alvaro Herrera wrote: omar wrote: SELECT relfilenode, relname FROM pg_class WHERE relname !~ '^(pg_|sql_)' AND relkind = 'r' Oid o = PQftable(_res, i); Um ... are you laboring under some delusion about relfilenode being the

Re: [GENERAL] Problem with oids for table names getting out of sync?

2007-04-05 Thread omar
SELECT relfilenode, relname FROM pg_class WHERE relname !~ '^(pg_|sql_)' AND relkind = 'r' Oid o = PQftable(_res, i); Um ... are you laboring under some delusion about relfilenode being the same as relation OID? Apparently I am. libpq docs claim that "You can query th

Re: [GENERAL] Problem with oids for table names getting out of sync?

2007-04-04 Thread Omar Eljumaily
in a query. It seems like they're always returned this way. For instance: select * from projects join employees on projects.manager = employees.id; projects.id would always appear in the return list before employees.id? Omar Eljumaily wrote: This is with 8.1.8, but I don't see

[GENERAL] Problem with oids for table names getting out of sync?

2007-04-04 Thread Omar Eljumaily
This is with 8.1.8, but I don't see any mention of any bug fixes that cover this. I've run into this sort of obscure problem. I'm using libpq with a front end database api where I need to track column names and how they're returned in libpq queries. What's happening is that I start out with

Re: [GENERAL] OT: Canadian Tax Database

2007-03-09 Thread omar
Tom, I promise this isn't a political statement, even though it's on the same thread. I'm curious what people think about the following statement considering the database typing talk being brought up here. My experience is that more times than not I have to put data validation in my client co

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Omar Eljumaily
But you're always returning Monday, right? Your grouping will be correct, but to get the actual truncation date, you have to subtract back. select (date_trunc('week', '2007-03-07'::date + 5)::date-5); select (date_trunc('week', '2007-03-06'::date + 5)::date-5); select (date_trunc('week', '2007-

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Omar Eljumaily
Ted, my reason for asking the question that I believe precipitated this thread was that I wanted a single sql statement that aggregated time data by week. Yes, I could do the aggregation subsequently in my own client side code, but it's easier and less error prone to have it done by the server

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Omar Eljumaily
I think you can coax the date_trunc function to give you a proper start day. I think it's more than adding an integer to your date, though. You also have to do some mod work after the function returns, I think. I agree that the point isn't that you can't do it with some effort, however. It'

Re: [GENERAL] Weird behaviour on a join with multiple keys

2007-03-08 Thread Omar Eljumaily
What happens if you do an outer join instead of an inner join? Charlie Clark wrote: Hi, I'm getting unexpected results on a query which involves joining two tables on two common variables (firstname and lastname). This is the basic query: SELECT table1.lastname, table1.firstname FROM table

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Omar Eljumaily
Thank God the DOI is inefficient. If they were good at what they do, which is generally malicious, we'd all be in trouble. Your story reminded me of a dear friend who works for the department of the interior here in the US who routinely was dressed down for writing functional, reliable softwar

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Omar Eljumaily
Since this thread has already degraded, I'll offer my two cents. The biggest screw ups in US history have been instigated by groups of privileged White men. I know my name may sound otherwise, but I'm a White American male, so I'm not pointing the finger at another group. Let's see, Enron, A

Re: [GENERAL] group by and aggregate functions on regular expressions

2007-03-08 Thread Omar Eljumaily
select count(*), address where address ~* 'magil' or address ~* 'whitewater' etc group by address would that work? Rhys Stewart wrote: Hi all, i have a table with an address column. I wanted to count the number of rows with a given regex match. so i ended up with the following very verbose

Re: [GENERAL] Tabulate data incrementally

2007-03-08 Thread Omar Eljumaily
Thanks Alvaro. That's good to know. Actually I was spacing on the need for this. The date_trunc function with group by actually works for me. select sum(amount), date_trunc('week', period_end) as dt from time_data group by dt; Alvaro Herrera wrote: Omar Eljumaily wrote

Re: [GENERAL] Tabulate data incrementally

2007-03-08 Thread Omar Eljumaily
Mary1/1 0 Edward 1/2 100 etc I'd also like to return zero or null values when the data doesn't exist. Wouldn't I need an iterator to do that? Thanks, Omar Tom Lane wrote: Omar Eljumaily <[EMAIL PROTECTED]> writes: I want to tabulate time

[GENERAL] Tabulate data incrementally

2007-03-08 Thread Omar Eljumaily
I want to tabulate time data on a weekly basis, but my data is entered on a daily basis. create table time_data { employee varchar(10), _date date, job varchar(10), amount } So I want to tabulate with a single sql command. Is that possible? If I had a separate week end table creat

Re: [GENERAL] M:M table conditional delete for parents

2007-03-05 Thread Omar Eljumaily
I think a foreign key restraint is basically a trigger that throws an exception (RAISE statement) when the restraint is violated. Something trigger function like: If table1 if not in table1 raise else if table2 if not in table2 raise

Re: [GENERAL] real multi-master replication?

2007-03-05 Thread Omar Eljumaily
I don't believe there is, or can be, any asynchronous multi-master replication system for any database that will work with all possible general purpose constructs. I believe it's possible in theory if you have system wide transaction locking, i.e. synchronous. However, if you have to have

Re: [GENERAL] Why does "group by" need to match select fields?

2007-02-28 Thread Omar Eljumaily
OK, I see what's going on. I can have more than one max(amount) with the same amount and payee. Thanks so much. Like I said, it's sort of dogged me off and on many times. Thanks. Bill Moran wrote: Omar Eljumaily <[EMAIL PROTECTED]> wrote: Sorry if this isn'

[GENERAL] Why does "group by" need to match select fields?

2007-02-28 Thread Omar Eljumaily
Sorry if this isn't exactly postgresql specific. I periodically run into this problem, and I'm running into it now. I'm wondering if there's something about "group by" that I don't understand. As an example what I'd want to do is return the "id" value for the check to each payee that has the

[GENERAL] 7.1 Release Date

2000-08-28 Thread Miguel Omar Carvajal
Hi there, When will Postgresql 7.1 be released? Miguel