[GENERAL] foreign key restrictions

2008-08-10 Thread rafal
Hi All, on numerous times I had fell onto postgress complaining, that I try to create foreign key, pointing to a set not embraced within a unique key constraint. Here is the case: CREATE TABLE one (id int not null unique, info text); CREATE TABLE two (id int not null unique, ofone int

Re: [GENERAL] [Pgpool-general] Trying to switch from PgPool1 to PgPool2

2008-08-10 Thread Henry
I scratched around some more, found doc/pgpool-en.html and my ignorance has been somewhat lessened. My previous config was almost right except for: pgpool2_hostname = '' #backend_data_directory0 #backend_data_directory1 and my Linux distro had assigned hostname 'slave1' to localhost, on which

Re: [GENERAL] [Pgpool-general] Trying to switch from PgPool1 to PgPool2

2008-08-10 Thread Henry
On Sun, August 10, 2008 3:03 pm, Henry wrote: I scratched around some more, found doc/pgpool-en.html and my ignorance has been somewhat lessened. oi, wrong list /blushes I really should *not* use multi-users under one login in squirrelmail... -- Sent via pgsql-general mailing list

Re: [GENERAL] foreign key restrictions

2008-08-10 Thread Richard Broersma
On Sun, Aug 10, 2008 at 1:15 AM, [EMAIL PROTECTED] wrote: CREATE TABLE two (id int not null unique, ofone int references one(id), CREATE TABLE three(one int not null, two int, info text, foreign key (one, two) references two (one, id)); I get the following error: ERROR: there is no unique

Re: [GENERAL] foreign key restrictions

2008-08-10 Thread Gregory Stark
Richard Broersma [EMAIL PROTECTED] writes: On Sun, Aug 10, 2008 at 1:15 AM, [EMAIL PROTECTED] wrote: Since table TWO has a unique constraint on column ID, the (ID, OFONE) pair will also be unique, obviously. This statement is not completely true. The only part of the pair that is true is

Re: [GENERAL] foreign key restrictions

2008-08-10 Thread Martijn van Oosterhout
On Sun, Aug 10, 2008 at 07:10:10AM -0700, Richard Broersma wrote: On Sun, Aug 10, 2008 at 1:15 AM, [EMAIL PROTECTED] wrote: CREATE TABLE two (id int not null unique, ofone int references one(id), CREATE TABLE three(one int not null, two int, info text, foreign key (one, two) references

Re: [GENERAL] foreign key restrictions

2008-08-10 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: I'm not sure if there's a fundamental reason why there has to be an index that exactly matches the foreign key or not -- offhand I can't think of one. The reason why is that the SQL spec says so: a) If the referenced table and columns

Re: [GENERAL] foreign key restrictions

2008-08-10 Thread rafal
Gregory Stark [EMAIL PROTECTED] writes: I'm not sure if there's a fundamental reason why there has to be an index that exactly matches the foreign key or not -- offhand I can't think of one. The reason why is that the SQL spec says so: a) If the referenced table and columns

Re: [GENERAL] foreign key restrictions

2008-08-10 Thread Tom Lane
[EMAIL PROTECTED] writes: The reason why is that the SQL spec says so: a) If the referenced table and columns specifies a reference column list, then the set of column names contained in that reference column list shall be equal to the set of column names contained in the unique column

Re: [GENERAL] foreign key restrictions

2008-08-10 Thread rafal
[EMAIL PROTECTED] writes: The reason why is that the SQL spec says so: a) If the referenced table and columns specifies a reference column list, then the set of column names contained in that reference column list shall be equal to the set of column names contained in the unique column

Re: [GENERAL] Memory use in 8.3 plpgsql with heavy use of xpath()

2008-08-10 Thread Matt Magoffin
Gregory Stark [EMAIL PROTECTED] writes: That's just a special case of what would be expected to happen with memory allocation anyways though. Few allocators return memory to the OS anyways. Well, that does happen on Linux for instance. Since Matt knew in his original report that the

[GENERAL] PostgreSQL: Database schema for messaging service (similar to facebook)

2008-08-10 Thread [EMAIL PROTECTED]
Hello, I'm trying to create a messageing service, like in facebook. Basically a member can write messages to another member. It will have three main functions. One, basic messaging to another member. Two, notification from system to a group of members (a list of members), Three, an update report

Re: [GENERAL] Memory use in 8.3 plpgsql with heavy use of xpath()

2008-08-10 Thread Tom Lane
Matt Magoffin [EMAIL PROTECTED] writes: I'm following up on this thread from a month ago on PG 8.3 memory use. I'm afraid even after updating to 8.3.3 + this patch, I still see the same overall memory trend. You can see what I'm looking at here with a couple of memory graphs. These numbers

Re: [GENERAL] Response time between shared buffer cache and operating system

2008-08-10 Thread Greg Smith
On Thu, 7 Aug 2008, RASHA OSMAN wrote: How long it takes the operating system to fulfil a page demand, ie, reading the page from disk or from the OS cache to the Postgres shared buffer. Also how long it takes the bgwriter to flush a page from the shared buffer into the OS cache or disk.

Re: [GENERAL] 100% CPU pg processes that don't die.

2008-08-10 Thread Scott Marlowe
On Sat, Aug 9, 2008 at 2:54 PM, Scott Marlowe [EMAIL PROTECTED] wrote: On Sat, Aug 9, 2008 at 2:51 PM, Tom Lane [EMAIL PROTECTED] wrote: Scott Marlowe [EMAIL PROTECTED] writes: I'm load testing a machine, and i'm seeing idle in transaction processes that are no longer hooked to any outside

Re: [GENERAL] mailing list/newsgroup disconnect

2008-08-10 Thread Robert Treat
On Tuesday 05 August 2008 03:12:26 Sim Zacks wrote: There seems to be a disconnect between the mailing list and the newsgroup right now. I received a bunch of replies via email that did not show up in the newsgroup. (I did not receive any messages that were sent to the mailing list and not to