threads listlengths 1 2.99k |
|---|
[
{
"msg_contents": "It seems we need a smart plan for handling the decimal point vs. comma\nissue. Observe: (lc_numeric = de_DE)\n\ncreate table test_f (x double precision);\nCREATE TABLE\ninsert into test_f values ('1.5');\nERROR: Bad float8 input format '1.5'\ninsert into test_f values ('1,5');\nINSERT 16909 1\n\ncreate table test_n (x numeric);\nCREATE TABLE\ninsert into test_n values ('1.5');\nINSERT 16915 1\ninsert into test_n values ('1,5');\nERROR: Bad numeric input format '1,5'\n\ncreate table test_p (x point);\nCREATE TABLE\ninsert into test_p values ('(1.5, 2.4)');\nERROR: Bad point external representation '(1.5, 2.4)'\ninsert into test_p values ('(1,5, 2,4)');\nINSERT 16918 1\ninsert into test_p values ('(9,5)');\nERROR: Bad point external representation '(9,5)'\npeter=# insert into test_p values ('(9,5,1)');\nINSERT 16919 1\n\nselect * from test_p;\n x\n-----------\n (1,5,2,4)\n (9,5,1)\t-- (What point is that?)\n\n(Yes, we really need structured types, not the parse-your-own-string\nextension interface.)\n\nSQL99 effectively says that a decimal *point* should be used for casts\nfrom numerical to character types and vice versa. (You can read about\nthis in 6.22 GR 6b, 7b, 8a, 8b -- there are pretty specific rules for\nconverting numbers to strings which we probably don't follow very\nstrictly.)\n\nI propose that we do this (probably by writing our own strtod and\nfriends). If you want to format your numbers to local convention,\nto_char() can be used.\n\nComments?\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Thu, 8 Aug 2002 23:19:04 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": true,
"msg_subject": "Locale number format confusion"
},
{
"msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> I propose that we do this (probably by writing our own strtod and\n> friends). If you want to format your numbers to local convention,\n> to_char() can be used.\n\nWhy are we allowing LC_NUMERIC to become active at all? IMHO this is a\nbug that you have recently introduced ... just take that code out again.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 08 Aug 2002 19:20:17 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Locale number format confusion "
},
{
"msg_contents": "On Thu, Aug 08, 2002 at 11:19:04PM +0200, Peter Eisentraut wrote:\n> It seems we need a smart plan for handling the decimal point vs. comma\n> issue. Observe: (lc_numeric = de_DE)\n ^^^^^^^^^^\n It seems like hellish toy... :-)\n\n Karel\n\n-- \n Karel Zak <zakkr@zf.jcu.cz>\n http://home.zf.jcu.cz/~zakkr/\n \n C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz\n",
"msg_date": "Fri, 9 Aug 2002 10:21:20 +0200",
"msg_from": "Karel Zak <zakkr@zf.jcu.cz>",
"msg_from_op": false,
"msg_subject": "Re: Locale number format confusion"
}
] |
[
{
"msg_contents": "\nAgain, I'm not sure this doesn't belong on -general but have left the -hackers\nin the distribution list so it can be seen there.\n\n\nOn Fri, 9 Aug 2002, Oleg Bartunov wrote:\n\n> I see files truncated at 1Gb on my Linux server:\n> \n> -rw------- 1 postgres users 855490560 Aug 6 20:53 795261707.2\n> -rw------- 1 postgres users 943259648 Aug 8 23:34 823049708\n> -rw------- 1 postgres users 1073741824 Aug 6 20:53 795261707.1\n> -rw------- 1 postgres users 1073741824 Aug 6 20:53 795261707\n> \n> I'm wondering if postgresql doesn't have LARGE_FILES support ?\n\nThose look like PostgreSQL's data files (from the context of the email) is that\nso? And if so, have you got a requirement for having large data files? It seems\nan odd requirement especially as I'd say you have approaching 3GB in one table\nso you're not too far off getting to 4GB and can the host system handle such\nfiles?\n\n\n-- \nNigel J. Andrews\nDirector\n\n---\nLogictree Systems Limited\nComputer Consultants\n\n",
"msg_date": "Thu, 8 Aug 2002 22:42:34 +0100 (BST)",
"msg_from": "\"Nigel J. Andrews\" <nandrews@investsystems.co.uk>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] postgresql performance tuning document ?"
},
{
"msg_contents": "I see files truncated at 1Gb on my Linux server:\n\n-rw------- 1 postgres users 855490560 Aug 6 20:53 795261707.2\n-rw------- 1 postgres users 943259648 Aug 8 23:34 823049708\n-rw------- 1 postgres users 1073741824 Aug 6 20:53 795261707.1\n-rw------- 1 postgres users 1073741824 Aug 6 20:53 795261707\n\nI'm wondering if postgresql doesn't have LARGE_FILES support ?\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n",
"msg_date": "Fri, 9 Aug 2002 01:11:06 +0300 (GMT)",
"msg_from": "Oleg Bartunov <oleg@sai.msu.su>",
"msg_from_op": false,
"msg_subject": "postgresql performance tuning document ?"
},
{
"msg_contents": "On Thu, 8 Aug 2002, Nigel J. Andrews wrote:\n\n> > I see files truncated at 1Gb on my Linux server:\n> > \n> > -rw------- 1 postgres users 855490560 Aug 6 20:53 795261707.2\n> > -rw------- 1 postgres users 943259648 Aug 8 23:34 823049708\n> > -rw------- 1 postgres users 1073741824 Aug 6 20:53 795261707.1\n> > -rw------- 1 postgres users 1073741824 Aug 6 20:53 795261707\n> > \n> > I'm wondering if postgresql doesn't have LARGE_FILES support ?\n\nI'm a user not a hacker but I seem to remember a discussion on this \nbefore. Part of the design was to break the files at approx. 1GByte \npartly or wholly to avoid any OS file size limitation.\n\n\nRod\n-- \n \"Open Source Software - Sometimes you get more than you paid for...\"\n\n",
"msg_date": "Thu, 8 Aug 2002 15:32:58 -0700 (PDT)",
"msg_from": "\"Roderick A. Anderson\" <raanders@acm.org>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] postgresql performance tuning document ?"
}
] |
[
{
"msg_contents": "http://developer.postgresql.org/docs/postgres/buildlog.html\n\nIt would appear that the files point to the old urls, not the new ones\nas per the cvs segregation.\n\n\n",
"msg_date": "08 Aug 2002 21:10:23 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "Documentation BuildLog"
}
] |
[
{
"msg_contents": "Hi guys,\n\nIf you apply the pg_stat_reset() function patch you get this regression\nfailure. Is this because it's returning a bool I guess? Shall I just fix\nthe regression test to exclude this function?\n\nChris\n\n*** ./expected/opr_sanity.out Fri Jul 19 07:11:32 2002\n--- ./results/opr_sanity.out Fri Aug 9 13:26:00 2002\n***************\n*** 27,34 ****\n AND p1.proname !~ 'costestimate$'\n AND p1.proname != 'update_pg_pwd_and_pg_group';\n oid | proname\n! -----+---------\n! (0 rows)\n\n -- Look for conflicting proc definitions (same names and input datatypes).\n -- (This test should be dead code now that we have the unique index\n--- 27,35 ----\n AND p1.proname !~ 'costestimate$'\n AND p1.proname != 'update_pg_pwd_and_pg_group';\n oid | proname\n! ------+---------------\n! 2249 | pg_stat_reset\n! (1 row)\n\n -- Look for conflicting proc definitions (same names and input datatypes).\n -- (This test should be dead code now that we have the unique index\n\n======================================================================\n\n",
"msg_date": "Fri, 9 Aug 2002 13:49:18 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "pg_stat_reset() weirdness"
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> If you apply the pg_stat_reset() function patch you get this regression\n> failure. Is this because it's returning a bool I guess? Shall I just fix\n> the regression test to exclude this function?\n\nNo, you should fix the function definition. The sanity checks are there\nfor a reason.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 09 Aug 2002 09:50:13 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: pg_stat_reset() weirdness "
},
{
"msg_contents": "Christopher Kings-Lynne wrote:\n> Hi guys,\n> \n> If you apply the pg_stat_reset() function patch you get this regression\n> failure. Is this because it's returning a bool I guess? Shall I just fix\n> the regression test to exclude this function?\n\n\n > AND p1.proname != 'update_pg_pwd_and_pg_group';\n > oid | proname\n > ! ------+---------------\n > ! 2249 | pg_stat_reset\n > ! (1 row)\n\nLikely because this is now in CVS:\n\nDATA(insert OID = 2249 ( record PGNSP PGUID 4 t p t \\054 0 0 \noidin oidout i p f 0 -1 0 _null_ _null_ ));\n#define RECORDOID 2249\n\nThe Oids conflict.\n\nJoe\n\n",
"msg_date": "Fri, 09 Aug 2002 08:26:08 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: pg_stat_reset() weirdness"
},
{
"msg_contents": "Hang on - I _can't_ fix the function defiition - it returns a bool and\nthat's why it's failing. I can't have it returning a void because it's not\npossible. Check list of all other excluded functions as well...\n\nChris\n\n----- Original Message -----\nFrom: \"Tom Lane\" <tgl@sss.pgh.pa.us>\nTo: \"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>\nCc: \"Hackers\" <pgsql-hackers@postgresql.org>\nSent: Friday, August 09, 2002 9:50 PM\nSubject: Re: [HACKERS] pg_stat_reset() weirdness\n\n\n> \"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> > If you apply the pg_stat_reset() function patch you get this regression\n> > failure. Is this because it's returning a bool I guess? Shall I just\nfix\n> > the regression test to exclude this function?\n>\n> No, you should fix the function definition. The sanity checks are there\n> for a reason.\n>\n> regards, tom lane\n>\n\n",
"msg_date": "Sat, 10 Aug 2002 17:50:39 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "Re: pg_stat_reset() weirdness "
},
{
"msg_contents": "Ah doh - I thought it was catching it returning a boolean. I'll fix and\nresubmit.\n\nChris\n\n----- Original Message -----\nFrom: \"Joe Conway\" <mail@joeconway.com>\nTo: \"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>\nCc: \"Hackers\" <pgsql-hackers@postgresql.org>\nSent: Friday, August 09, 2002 11:26 PM\nSubject: Re: [HACKERS] pg_stat_reset() weirdness\n\n\n> Christopher Kings-Lynne wrote:\n> > Hi guys,\n> >\n> > If you apply the pg_stat_reset() function patch you get this regression\n> > failure. Is this because it's returning a bool I guess? Shall I just\nfix\n> > the regression test to exclude this function?\n>\n>\n> > AND p1.proname != 'update_pg_pwd_and_pg_group';\n> > oid | proname\n> > ! ------+---------------\n> > ! 2249 | pg_stat_reset\n> > ! (1 row)\n>\n> Likely because this is now in CVS:\n>\n> DATA(insert OID = 2249 ( record PGNSP PGUID 4 t p t \\054 0 0\n> oidin oidout i p f 0 -1 0 _null_ _null_ ));\n> #define RECORDOID 2249\n>\n> The Oids conflict.\n>\n> Joe\n>\n\n",
"msg_date": "Sat, 10 Aug 2002 17:52:47 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "Re: pg_stat_reset() weirdness"
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> Ah doh - I thought it was catching it returning a boolean. I'll fix and\n> resubmit.\n\nUnfortunately I don't believe Joe's theory --- an OID conflict between\npg_proc and pg_type shouldn't matter, and in any case the particular\nsanity check that's failing is not looking at pg_type:\n\n-- Look for illegal values in pg_proc fields.\n-- NOTE: currently there are a few pg_proc entries that have prorettype = 0.\n-- Someday that ought to be cleaned up.\nSELECT p1.oid, p1.proname\nFROM pg_proc as p1\nWHERE (p1.prolang = 0 OR p1.prorettype = 0 OR\n p1.pronargs < 0 OR p1.pronargs > 16)\n\tAND p1.proname !~ '^pl[^_]+_call_handler$'\n\tAND p1.proname !~ '^RI_FKey_'\n\tAND p1.proname !~ 'costestimate$'\n\tAND p1.proname != 'update_pg_pwd_and_pg_group';\n\nThe pg_stat_reset definition I see in Chris' \"round 3\" patch does not\nlook like it should trigger this test. (I had misremembered the\nprevious discussion to think that he'd set prorettype = 0, but he\ndidn't.) So what's going wrong exactly? It needs investigation.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 10 Aug 2002 09:43:25 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: pg_stat_reset() weirdness "
},
{
"msg_contents": "Tom Lane wrote:\n> Unfortunately I don't believe Joe's theory --- an OID conflict between\n> pg_proc and pg_type shouldn't matter, and in any case the particular\n> sanity check that's failing is not looking at pg_type:\n\nI guess I should know better than to jump to a conclusion. But I *was* \nunder the impression we were supposed to use the unused_oids script to \nget a unique oid for a new function.\n\n\n> -- Look for illegal values in pg_proc fields.\n> -- NOTE: currently there are a few pg_proc entries that have prorettype = 0.\n> -- Someday that ought to be cleaned up.\n> SELECT p1.oid, p1.proname\n> FROM pg_proc as p1\n> WHERE (p1.prolang = 0 OR p1.prorettype = 0 OR\n> p1.pronargs < 0 OR p1.pronargs > 16)\n> \tAND p1.proname !~ '^pl[^_]+_call_handler$'\n> \tAND p1.proname !~ '^RI_FKey_'\n> \tAND p1.proname !~ 'costestimate$'\n> \tAND p1.proname != 'update_pg_pwd_and_pg_group';\n> \n> The pg_stat_reset definition I see in Chris' \"round 3\" patch does not\n> look like it should trigger this test. (I had misremembered the\n> previous discussion to think that he'd set prorettype = 0, but he\n> didn't.) So what's going wrong exactly? It needs investigation.\n> \n\nActually, I don't see the regression failure here at all, now that I try \nthe patch.\n\nJoe\n\n\n\n",
"msg_date": "Sat, 10 Aug 2002 07:46:52 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: pg_stat_reset() weirdness"
},
{
"msg_contents": "Joe Conway <mail@joeconway.com> writes:\n> I guess I should know better than to jump to a conclusion. But I *was* \n> under the impression we were supposed to use the unused_oids script to \n> get a unique oid for a new function.\n\nRight, we do still insist that all hand-assigned OIDs be distinct, but\nthat is a matter of bookkeeping simplicity and possible debugging\nadvantage. The system should only care that the OIDs in any one catalog\nare unique. (If it were to assume more, we'd have trouble after OID\nwraparound, because we can't guarantee database-wide uniqueness then.\nWe *can* guarantee per-table uniqueness, by means of unique indexes\nplaced on OIDs --- you'll notice all the catalogs that use OIDs have\nsuch indexes.)\n\n> Actually, I don't see the regression failure here at all, now that I try \n> the patch.\n\nHmm. Maybe Chris just needs a make clean/rebuild/etc?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 10 Aug 2002 11:21:54 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: pg_stat_reset() weirdness "
},
{
"msg_contents": "> Joe Conway <mail@joeconway.com> writes:\n> > I guess I should know better than to jump to a conclusion. But I *was*\n> > under the impression we were supposed to use the unused_oids script to\n> > get a unique oid for a new function.\n\nunique_oids script????\n\nChris\n\n\n",
"msg_date": "Sun, 11 Aug 2002 17:31:03 +0800 (WST)",
"msg_from": "Christopher Kings-Lynne <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: pg_stat_reset() weirdness "
},
{
"msg_contents": "Christopher Kings-Lynne wrote:\n> unique_oids script????\n\nLook in src/include/catalog. You'll find duplicate_oids & unused_oids \nshell scripts.\n\nJoe\n\n",
"msg_date": "Sun, 11 Aug 2002 07:18:10 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: pg_stat_reset() weirdness"
},
{
"msg_contents": "\nCan I have the updated version of this?\n\n---------------------------------------------------------------------------\n\nChristopher Kings-Lynne wrote:\n> Ah doh - I thought it was catching it returning a boolean. I'll fix and\n> resubmit.\n> \n> Chris\n> \n> ----- Original Message -----\n> From: \"Joe Conway\" <mail@joeconway.com>\n> To: \"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>\n> Cc: \"Hackers\" <pgsql-hackers@postgresql.org>\n> Sent: Friday, August 09, 2002 11:26 PM\n> Subject: Re: [HACKERS] pg_stat_reset() weirdness\n> \n> \n> > Christopher Kings-Lynne wrote:\n> > > Hi guys,\n> > >\n> > > If you apply the pg_stat_reset() function patch you get this regression\n> > > failure. Is this because it's returning a bool I guess? Shall I just\n> fix\n> > > the regression test to exclude this function?\n> >\n> >\n> > > AND p1.proname != 'update_pg_pwd_and_pg_group';\n> > > oid | proname\n> > > ! ------+---------------\n> > > ! 2249 | pg_stat_reset\n> > > ! (1 row)\n> >\n> > Likely because this is now in CVS:\n> >\n> > DATA(insert OID = 2249 ( record PGNSP PGUID 4 t p t \\054 0 0\n> > oidin oidout i p f 0 -1 0 _null_ _null_ ));\n> > #define RECORDOID 2249\n> >\n> > The Oids conflict.\n> >\n> > Joe\n> >\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n> \n> http://archives.postgresql.org\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 01:17:54 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: pg_stat_reset() weirdness"
}
] |
[
{
"msg_contents": "\n\n> -----Original Message-----\n> From: Christopher Kings-Lynne [mailto:chriskl@familyhealth.com.au] \n> Sent: 09 August 2002 03:57\n> To: Alvaro Herrera\n> Cc: pgsql-hackers@postgresql.org\n> Subject: Re: [HACKERS] CLUSTER and indisclustered\n> \n> \n> If you're looking for something very useful to work on, see if Gavin\n> Sherry(?) can post his old CREATE OR REPLACE VIEW code. I'm \n> pretty sure he (or someone) said that he had an old patch, \n> that needed to be synced with HEAD... This functionality is \n> pretty essential for 7.3...\n> \n\nI'll second that...\n\nDave.\n",
"msg_date": "Fri, 9 Aug 2002 08:12:47 +0100",
"msg_from": "\"Dave Page\" <dpage@vale-housing.co.uk>",
"msg_from_op": true,
"msg_subject": "Re: CLUSTER and indisclustered"
}
] |
[
{
"msg_contents": "Attached is a revised version of my previous\n\nON COMMIT DROP\n\npatch. This patch implements:\n\nON COMMIT { DROP | PRESERVE ROWS | DELETE ROWS }\n\nThe latter two are SQL99.\n\nSample usage:\n---\ntemplate1=# begin;\nBEGIN\ntemplate1=# create temp table a (a int) on commit drop;\nCREATE\ntemplate1=# create temp table b (a int) on commit preserve rows;\nCREATE\ntemplate1=# create temp table c (a int) on commit delete rows;\nCREATE\ntemplate1=# insert into a values(1);\nINSERT 24793 1\ntemplate1=# insert into b values(1);\nINSERT 24794 1\ntemplate1=# insert into c values(1);\nINSERT 24795 1\ntemplate1=# commit;\nCOMMIT\ntemplate1=# select * from a;\nERROR: Relation \"a\" does not exist\ntemplate1=# select * from b;\n a\n---\n 1\n(1 row)\n\ntemplate1=# select * from c;\n a\n---\n(0 rows)\n\ntemplate1=# create temp table a (a int) on commit drop;\nERROR: You must be inside a transaction to use ON COMMIT\n\n---\n\nGavin",
"msg_date": "Fri, 9 Aug 2002 19:22:52 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": true,
"msg_subject": "CREATE TEMP TABLE .... ON COMMIT"
},
{
"msg_contents": "Gavin Sherry <swm@linuxworld.com.au> writes:\n> template1=# create temp table a (a int) on commit drop;\n> ERROR: You must be inside a transaction to use ON COMMIT\n\nSurely that's only for ON COMMIT DROP, if you intend to offer the\nothers?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 09 Aug 2002 10:33:22 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: CREATE TEMP TABLE .... ON COMMIT "
},
{
"msg_contents": "On Fri, 9 Aug 2002, Tom Lane wrote:\n\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > template1=# create temp table a (a int) on commit drop;\n> > ERROR: You must be inside a transaction to use ON COMMIT\n> \n> Surely that's only for ON COMMIT DROP, if you intend to offer the\n> others?\n\nI should have provided details of this in the email. SQL99 details the\nbaviour as follows:\n\nIf TEMPORARY is specified and ON COMMIT is omitted, then ON COMMIT\nDELETE ROWS is implicit\n\nThis might give users a bit of a surprise so the effective behaviour is ON\nCOMMIT PRESERVE ROWS.\n\nAs for your question (and, perhaps, SQL99) I don't seen how it makes any\nsense to specify ON COMMIT outside of a transaction block.\n\n> \n> \t\t\tregards, tom lane\n> \n\nGavin\n\n",
"msg_date": "Sat, 10 Aug 2002 09:17:36 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": true,
"msg_subject": "Re: CREATE TEMP TABLE .... ON COMMIT "
},
{
"msg_contents": "Gavin Sherry <swm@linuxworld.com.au> writes:\n> As for your question (and, perhaps, SQL99) I don't seen how it makes any\n> sense to specify ON COMMIT outside of a transaction block.\n\nSurely it does.\n\n\tCREATE TEMP TABLE foo(...) ON COMMIT DELETE ROWS;\n\n\tBEGIN;\n\tinsert some rows in foo;\n\tprocess rows in foo;\n\tCOMMIT; -- foo is now empty again\n\n\tBEGIN;\n\tinsert some rows in foo;\n\tprocess rows in foo;\n\tCOMMIT; -- foo is now empty again\n\n\trepeat until application quit...\n\nWhat am I missing?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 10 Aug 2002 01:16:20 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT "
},
{
"msg_contents": "\nGavin, was this addressed?\n\n---------------------------------------------------------------------------\n\nTom Lane wrote:\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > As for your question (and, perhaps, SQL99) I don't seen how it makes any\n> > sense to specify ON COMMIT outside of a transaction block.\n> \n> Surely it does.\n> \n> \tCREATE TEMP TABLE foo(...) ON COMMIT DELETE ROWS;\n> \n> \tBEGIN;\n> \tinsert some rows in foo;\n> \tprocess rows in foo;\n> \tCOMMIT; -- foo is now empty again\n> \n> \tBEGIN;\n> \tinsert some rows in foo;\n> \tprocess rows in foo;\n> \tCOMMIT; -- foo is now empty again\n> \n> \trepeat until application quit...\n> \n> What am I missing?\n> \n> \t\t\tregards, tom lane\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 01:23:30 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT"
},
{
"msg_contents": "Gavin Sherry wrote:\n> Bruce,\n> \n> I intend on addressing this by completely rewriting the patch. When I\n> spoke to Tom and yourself about merging it with 7.3 at OSCON I argued that\n> storing the ON COMMIT data in a global linked list was better (strictly\n> for performance reasons). Given that I've incorrectly implemented DELETE\n> ROWS, I think I'll bite the bullet and store the ON COMMIT data in the\n> system catalogues per SQL99. Thoughts?\n> \n> As for when the patch will arrive: as I said in a previous email, I am\n> quite busy at the moment. I would like to get this into 7.3, along with\n> all the other patches or features I've put my hand up for. What will be\n> the effective cut off for patches of this nature given 7.3 beta at the end\n> of the month.\n\nThe cutoff will be the start of beta, which should be September 1. I am\nworkikng through my email backlog, and my next step tomorrow is to focus\non the open issues to decide how or if they will be done for 7.3 so we\ncan focus our energy.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 01:35:19 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT"
},
{
"msg_contents": "Bruce,\n\nI intend on addressing this by completely rewriting the patch. When I\nspoke to Tom and yourself about merging it with 7.3 at OSCON I argued that\nstoring the ON COMMIT data in a global linked list was better (strictly\nfor performance reasons). Given that I've incorrectly implemented DELETE\nROWS, I think I'll bite the bullet and store the ON COMMIT data in the\nsystem catalogues per SQL99. Thoughts?\n\nAs for when the patch will arrive: as I said in a previous email, I am\nquite busy at the moment. I would like to get this into 7.3, along with\nall the other patches or features I've put my hand up for. What will be\nthe effective cut off for patches of this nature given 7.3 beta at the end\nof the month.\n\nGavin\n\nOn Wed, 14 Aug 2002, Bruce Momjian wrote:\n\n> \n> Gavin, was this addressed?\n> \n> ---------------------------------------------------------------------------\n> \n> Tom Lane wrote:\n> > Gavin Sherry <swm@linuxworld.com.au> writes:\n> > > As for your question (and, perhaps, SQL99) I don't seen how it makes any\n> > > sense to specify ON COMMIT outside of a transaction block.\n> > \n> > Surely it does.\n> > \n> > \tCREATE TEMP TABLE foo(...) ON COMMIT DELETE ROWS;\n> > \n> > \tBEGIN;\n> > \tinsert some rows in foo;\n> > \tprocess rows in foo;\n> > \tCOMMIT; -- foo is now empty again\n> > \n> > \tBEGIN;\n> > \tinsert some rows in foo;\n> > \tprocess rows in foo;\n> > \tCOMMIT; -- foo is now empty again\n> > \n> > \trepeat until application quit...\n> > \n> > What am I missing?\n> > \n> > \t\t\tregards, tom lane\n> > \n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 5: Have you checked our extensive FAQ?\n> > \n> > http://www.postgresql.org/users-lounge/docs/faq.html\n> > \n> \n> \n\n",
"msg_date": "Wed, 14 Aug 2002 15:35:47 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT"
},
{
"msg_contents": "Gavin Sherry <swm@linuxworld.com.au> writes:\n> ... I think I'll bite the bullet and store the ON COMMIT data in the\n> system catalogues per SQL99. Thoughts?\n\nSeems like the very hard way, considering that there's no reason at all\nfor the ON COMMIT status to survive a given backend run. I'd certainly\nvote against adding pg_class columns for it, if that's what you had\nin mind.\n\nI don't much like reintroducing the backend-local list of temp tables\nthat existed in earlier releases, but maybe that's the best way to\nhandle this feature. Anyone see a better way?\n\n> ... I would like to get this into 7.3, along with all the other\n> patches or features I've put my hand up for. What will be the\n> effective cut off for patches of this nature given 7.3 beta at the end\n> of the month.\n\nEnd of the month of course ... but I will say that the standards are\ngoing to rise as we get closer to the end. Patches submitted in the\nlast week or so had better be right the first time.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 01:52:30 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT "
},
{
"msg_contents": "Tom Lane wrote:\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > ... I think I'll bite the bullet and store the ON COMMIT data in the\n> > system catalogues per SQL99. Thoughts?\n> \n> Seems like the very hard way, considering that there's no reason at all\n> for the ON COMMIT status to survive a given backend run. I'd certainly\n> vote against adding pg_class columns for it, if that's what you had\n> in mind.\n> \n> I don't much like reintroducing the backend-local list of temp tables\n> that existed in earlier releases, but maybe that's the best way to\n> handle this feature. Anyone see a better way?\n\nI never did like that backend-local list of temp rels. It was too hard\nto make it obey the table semantics. I guess if you listed them by oid\nyou could get it to work.\n\nSeems we should be able to put this info somewhere in the system tables.\nCould we throw it into pg_description? We have paired down those system\ntables so far there isn't a place to stash random stuff.\n\n> \n> > ... I would like to get this into 7.3, along with all the other\n> > patches or features I've put my hand up for. What will be the\n> > effective cut off for patches of this nature given 7.3 beta at the end\n> > of the month.\n> \n> End of the month of course ... but I will say that the standards are\n> going to rise as we get closer to the end. Patches submitted in the\n> last week or so had better be right the first time.\n\nYep, we are not going to reject the stuff, but we are going to look at\nit _really_ well. :-)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 02:05:08 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT"
},
{
"msg_contents": "\nGavin, how are you doing with this. As I remember, the only remaining\nissue was where to store the 'drop on commit' information in the\nbackend. If that is all there is, we can come up with a solution.\n\n---------------------------------------------------------------------------\n\nGavin Sherry wrote:\n> On Fri, 9 Aug 2002, Tom Lane wrote:\n> \n> > Gavin Sherry <swm@linuxworld.com.au> writes:\n> > > template1=# create temp table a (a int) on commit drop;\n> > > ERROR: You must be inside a transaction to use ON COMMIT\n> > \n> > Surely that's only for ON COMMIT DROP, if you intend to offer the\n> > others?\n> \n> I should have provided details of this in the email. SQL99 details the\n> baviour as follows:\n> \n> If TEMPORARY is specified and ON COMMIT is omitted, then ON COMMIT\n> DELETE ROWS is implicit\n> \n> This might give users a bit of a surprise so the effective behaviour is ON\n> COMMIT PRESERVE ROWS.\n> \n> As for your question (and, perhaps, SQL99) I don't seen how it makes any\n> sense to specify ON COMMIT outside of a transaction block.\n> \n> > \n> > \t\t\tregards, tom lane\n> > \n> \n> Gavin\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 27 Aug 2002 00:29:35 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT"
},
{
"msg_contents": "Bruce,\n\nI have a working patch for this I just need to test it further. It occured\nto me that there was a bug with the previous implementation in as much as\nit didn't handle situations where the user dropped the temp table in a\ntransaction block. As such, I have added a flag to the structure marking\nit dead. This also needs to be undone at ABORT :-). (I knew there was a\nreason for storing the ON COMMIT flag in the system catalogs).\n\nOnce I have tested further I will send off. If I come across a problem or\ncannot get to this by Wednesday (tomorrow) I will send them off to Neil\nConway so that they can make it in. (Unfortunately, I am v. busy atm).\n\nGavin\n\nOn Tue, 27 Aug 2002, Bruce Momjian wrote:\n\n> \n> Gavin, how are you doing with this. As I remember, the only remaining\n> issue was where to store the 'drop on commit' information in the\n> backend. If that is all there is, we can come up with a solution.\n> \n> ---------------------------------------------------------------------------\n> \n> Gavin Sherry wrote:\n> > On Fri, 9 Aug 2002, Tom Lane wrote:\n> > \n> > > Gavin Sherry <swm@linuxworld.com.au> writes:\n> > > > template1=# create temp table a (a int) on commit drop;\n> > > > ERROR: You must be inside a transaction to use ON COMMIT\n> > > \n> > > Surely that's only for ON COMMIT DROP, if you intend to offer the\n> > > others?\n> > \n> > I should have provided details of this in the email. SQL99 details the\n> > baviour as follows:\n> > \n> > If TEMPORARY is specified and ON COMMIT is omitted, then ON COMMIT\n> > DELETE ROWS is implicit\n> > \n> > This might give users a bit of a surprise so the effective behaviour is ON\n> > COMMIT PRESERVE ROWS.\n> > \n> > As for your question (and, perhaps, SQL99) I don't seen how it makes any\n> > sense to specify ON COMMIT outside of a transaction block.\n> > \n> > > \n> > > \t\t\tregards, tom lane\n> > > \n> > \n> > Gavin\n> > \n> > \n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 5: Have you checked our extensive FAQ?\n> > \n> > http://www.postgresql.org/users-lounge/docs/faq.html\n> > \n> \n> \n\n",
"msg_date": "Tue, 27 Aug 2002 15:20:30 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT"
},
{
"msg_contents": "What about Gavin's CREATE OR REPLACE stuff?\n\nChris\n\n> -----Original Message-----\n> From: pgsql-hackers-owner@postgresql.org\n> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Gavin Sherry\n> Sent: Tuesday, 27 August 2002 1:21 PM\n> To: Bruce Momjian\n> Cc: Tom Lane; pgsql-hackers@postgresql.org; pgsql-patches@postgresql.org\n> Subject: Re: [HACKERS] [PATCHES] CREATE TEMP TABLE .... ON COMMIT\n>\n>\n> Bruce,\n>\n> I have a working patch for this I just need to test it further. It occured\n> to me that there was a bug with the previous implementation in as much as\n> it didn't handle situations where the user dropped the temp table in a\n> transaction block. As such, I have added a flag to the structure marking\n> it dead. This also needs to be undone at ABORT :-). (I knew there was a\n> reason for storing the ON COMMIT flag in the system catalogs).\n>\n> Once I have tested further I will send off. If I come across a problem or\n> cannot get to this by Wednesday (tomorrow) I will send them off to Neil\n> Conway so that they can make it in. (Unfortunately, I am v. busy atm).\n>\n> Gavin\n>\n> On Tue, 27 Aug 2002, Bruce Momjian wrote:\n>\n> >\n> > Gavin, how are you doing with this. As I remember, the only remaining\n> > issue was where to store the 'drop on commit' information in the\n> > backend. If that is all there is, we can come up with a solution.\n> >\n> >\n> ------------------------------------------------------------------\n> ---------\n> >\n> > Gavin Sherry wrote:\n> > > On Fri, 9 Aug 2002, Tom Lane wrote:\n> > >\n> > > > Gavin Sherry <swm@linuxworld.com.au> writes:\n> > > > > template1=# create temp table a (a int) on commit drop;\n> > > > > ERROR: You must be inside a transaction to use ON COMMIT\n> > > >\n> > > > Surely that's only for ON COMMIT DROP, if you intend to offer the\n> > > > others?\n> > >\n> > > I should have provided details of this in the email. SQL99 details the\n> > > baviour as follows:\n> > >\n> > > If TEMPORARY is specified and ON COMMIT is omitted, then ON COMMIT\n> > > DELETE ROWS is implicit\n> > >\n> > > This might give users a bit of a surprise so the effective\n> behaviour is ON\n> > > COMMIT PRESERVE ROWS.\n> > >\n> > > As for your question (and, perhaps, SQL99) I don't seen how\n> it makes any\n> > > sense to specify ON COMMIT outside of a transaction block.\n> > >\n> > > >\n> > > > \t\t\tregards, tom lane\n> > > >\n> > >\n> > > Gavin\n> > >\n> > >\n> > > ---------------------------(end of\n> broadcast)---------------------------\n> > > TIP 5: Have you checked our extensive FAQ?\n> > >\n> > > http://www.postgresql.org/users-lounge/docs/faq.html\n> > >\n> >\n> >\n>\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n>\n> http://archives.postgresql.org\n>\n\n",
"msg_date": "Tue, 27 Aug 2002 13:21:42 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT"
},
{
"msg_contents": "Revised patch is attached.\n\nPasses all regression tests relating to temp tables. (I am getting\nregression test issues with privileges.sql, rules.sql, conversion.sql).\n\nGavin\n\nOn Tue, 27 Aug 2002, Bruce Momjian wrote:\n\n> \n> Gavin, how are you doing with this. As I remember, the only remaining\n> issue was where to store the 'drop on commit' information in the\n> backend. If that is all there is, we can come up with a solution.\n> \n> ---------------------------------------------------------------------------\n> \n> Gavin Sherry wrote:\n> > On Fri, 9 Aug 2002, Tom Lane wrote:\n> > \n> > > Gavin Sherry <swm@linuxworld.com.au> writes:\n> > > > template1=# create temp table a (a int) on commit drop;\n> > > > ERROR: You must be inside a transaction to use ON COMMIT\n> > > \n> > > Surely that's only for ON COMMIT DROP, if you intend to offer the\n> > > others?\n> > \n> > I should have provided details of this in the email. SQL99 details the\n> > baviour as follows:\n> > \n> > If TEMPORARY is specified and ON COMMIT is omitted, then ON COMMIT\n> > DELETE ROWS is implicit\n> > \n> > This might give users a bit of a surprise so the effective behaviour is ON\n> > COMMIT PRESERVE ROWS.\n> > \n> > As for your question (and, perhaps, SQL99) I don't seen how it makes any\n> > sense to specify ON COMMIT outside of a transaction block.\n> > \n> > > \n> > > \t\t\tregards, tom lane\n> > > \n> > \n> > Gavin\n> > \n> > \n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 5: Have you checked our extensive FAQ?\n> > \n> > http://www.postgresql.org/users-lounge/docs/faq.html\n> > \n> \n>",
"msg_date": "Wed, 28 Aug 2002 00:08:53 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT"
},
{
"msg_contents": "\nYour patch has been added to the PostgreSQL unapplied patches list at:\n\n\thttp://candle.pha.pa.us/cgi-bin/pgpatches\n\nI will try to apply it within the next 48 hours.\n\n---------------------------------------------------------------------------\n\n\nGavin Sherry wrote:\n> Revised patch is attached.\n> \n> Passes all regression tests relating to temp tables. (I am getting\n> regression test issues with privileges.sql, rules.sql, conversion.sql).\n> \n> Gavin\n> \n> On Tue, 27 Aug 2002, Bruce Momjian wrote:\n> \n> > \n> > Gavin, how are you doing with this. As I remember, the only remaining\n> > issue was where to store the 'drop on commit' information in the\n> > backend. If that is all there is, we can come up with a solution.\n> > \n> > ---------------------------------------------------------------------------\n> > \n> > Gavin Sherry wrote:\n> > > On Fri, 9 Aug 2002, Tom Lane wrote:\n> > > \n> > > > Gavin Sherry <swm@linuxworld.com.au> writes:\n> > > > > template1=# create temp table a (a int) on commit drop;\n> > > > > ERROR: You must be inside a transaction to use ON COMMIT\n> > > > \n> > > > Surely that's only for ON COMMIT DROP, if you intend to offer the\n> > > > others?\n> > > \n> > > I should have provided details of this in the email. SQL99 details the\n> > > baviour as follows:\n> > > \n> > > If TEMPORARY is specified and ON COMMIT is omitted, then ON COMMIT\n> > > DELETE ROWS is implicit\n> > > \n> > > This might give users a bit of a surprise so the effective behaviour is ON\n> > > COMMIT PRESERVE ROWS.\n> > > \n> > > As for your question (and, perhaps, SQL99) I don't seen how it makes any\n> > > sense to specify ON COMMIT outside of a transaction block.\n> > > \n> > > > \n> > > > \t\t\tregards, tom lane\n> > > > \n> > > \n> > > Gavin\n> > > \n> > > \n> > > ---------------------------(end of broadcast)---------------------------\n> > > TIP 5: Have you checked our extensive FAQ?\n> > > \n> > > http://www.postgresql.org/users-lounge/docs/faq.html\n> > > \n> > \n> > \n\nContent-Description: \n\n[ Attachment, skipping... ]\n\nContent-Description: \n\n[ Attachment, skipping... ]\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 27 Aug 2002 17:24:01 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT"
}
] |
[
{
"msg_contents": "I'm a little out of my league on this list, but I thought I might discuss a\nproblem I'm having since it seems to have come up here recently. I have read\nthe archives w/ respect to the inheritance mechanism, the problems with it,\netc. But I still think it would be a useful thing to have in PostgreSQL, even\nif the current implementation... leaves something to be desired. I\nparticularly think it could be useful for a problem I'm working on now.\n\nI'm working on a largish Python-based voting system for my college. The\nbackend is to be PostgreSQL because of referential integrity, stored\nprocedures, etc.--the thousand good reasons you guys already know.\n\nDuring the analysis phase we've noticed that there are really two kinds of\n\"questions\" if you will, \"position questions\" and \"binary questions.\" Things\nlike \"Secretary\" are position questions, and have a list of candidates\nassociated with them, and things like \"Should the SA do such-and-such\" are\nbinary questions.\n\nUp at the top of the tree (kind of) is the election, which is an entity that\namong other things contains a few sets of questions. Each set is for a\ndifferent population (graduates don't get to pick undergrad senators, for\nexample). Each question set refers to one or more questions, which can be one\nof the two types I was just talking about.\n\nThe problem is that position questions are going to be referred to by the\ncandidate position table (a table that links candidates and positions in a\nmany-to-many way). The candidate position table therefore will be referencing\na primary key which the position question table inherits from the question\ntable.\n\nSo my initial thinking is that this is a profound problem. But after a little\nmore thought, I can make the question_id field of the question table be a\nSERIAL type and the primary key. That way, when I insert rows into either\nthe position question or the binary question table, it will be picking the\nvalues out of the same sequence. I won't have actual primary key integrity\nchecking, but I'm fairly safe in assuming that it won't be a problem.\n\nThen my second thought was, perhaps I could write some sort of CHECK procedure\nwhich would verify integrity by hand between the two tables. Or perhaps I\ncould manually state that the primary key was the question_id field when\ncreating both the child tables. I'm really not sure if any of these\napproaches will work, or which one is best to do.\n\nSo now that I hear there is a way to get from an object-relational solution to\na solution using views, I'd like to know how to do it in general or perhaps\nwith my particular problem. I'm a big fan of OOP, as are the other people\nworking with me on this project, so I would (personally) rather work around\nthe existing inheritance mechanism than implement a solution I probably won't\nunderstand later using views, though I'd like to know it also... what is your\nadvice?\n\n-- \nDaniel\n\n(* Obscenity is a crutch for inarticulate motherfuckers. *)\n",
"msg_date": "Fri, 9 Aug 2002 04:57:16 -0600",
"msg_from": "Daniel Lyons <fusion@nmt.edu>",
"msg_from_op": true,
"msg_subject": "OOP real life example (was Re: Why is MySQL more chosen over\n\tPostgreSQL?"
},
{
"msg_contents": "> So my initial thinking is that this is a profound problem. But after a little\n> more thought, I can make the question_id field of the question table be a\n> SERIAL type and the primary key. That way, when I insert rows into either\n> the position question or the binary question table, it will be picking the\n> values out of the same sequence. I won't have actual primary key integrity\n> checking, but I'm fairly safe in assuming that it won't be a problem.\n>\n> Then my second thought was, perhaps I could write some sort of CHECK procedure\n> which would verify integrity by hand between the two tables. Or perhaps I\n> could manually state that the primary key was the question_id field when\n> creating both the child tables. I'm really not sure if any of these\n> approaches will work, or which one is best to do.\n>\n> So now that I hear there is a way to get from an object-relational solution to\n> a solution using views, I'd like to know how to do it in general or perhaps\n> with my particular problem.\n\nThe problem is, table inheritance is just syntatic sugar for creating\nseparate tables, and a view that does a UNION SELECT on them all\ntogether, projecting only the common columns.\n\nYou want to go the other way around, with a setup like this.\n\n table question contains:\n\tquestion id - a unique identifier for each question\n\tquestion_type - binary or position\n\tcommon attributes of binary and position questions\n\n table binary_question_data contains:\n\tquestion id - references question table\n\tattributes belonging only to binary questions\n\n table position_question_data contains:\n\tquestion id - references question table\n\tattributes belonging only to position questions\n\nIf you need frequently to select just binary or just position\nquestions, you can create a pair of views to deal with them, along\nthe lines of\n\n CREATE VIEW binary_question AS\n\tSELECT question.question_id, ...\n\tFROM question, binary_question_data\n\tWHERE question.question_id = binary_question.question_id\n\t AND question.question_type = 'B'\n\nNow you have two data integrity guarantees that you didn't have\nwith table inheritance: two different questions cannot have the\nsame question_id, and a question can never be both a position\nquestion and a binary question.\n\n> I'm a big fan of OOP, as are the other people working with me on this\n> project,\n\nAs am I. That's why I use, for example, Java and Ruby rather than\nC and perl.\n\n> so I would (personally) rather work around the existing inheritance\n> mechanism\n\nWell, an inheritance mechanism alone does not OO make. Please don't\nthink that table inheritance is OO; it's not.\n\n> than implement a solution I probably won't understand later\n> using views, though I'd like to know it also... what is your advice?\n\nThe implementation with views is standard, very basic relational\nstuff. Primary keys, foreign keys, and joins. If you do not\nunderstand it, I would strongly encouarge you to study it until\nyou do, because you are going to be using this stuff all the time\nif you use databases.\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Mon, 12 Aug 2002 11:46:06 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more chosen"
},
{
"msg_contents": "On Mon, 2002-08-12 at 11:38, Mario Weilguni wrote:\n> Am Montag, 12. August 2002 08:02 schrieb Don Baccus:\n> > Curt Sampson wrote:\n> > > On Sun, 11 Aug 2002, Don Baccus wrote:\n> > >>I've been wanting to point out that SQL views are really, when\n> > >>scrutinized, \"just syntactic sugar\" ...\n> > >\n> > > Oh? Ok, please translate the following into equivalant SQL that\n> > > does not use a view:\n> > >\n> > > CREATE TABLE t1 (key serial, value1 text, value2 text);\n> > > CREATE VIEW v1 AS SELECT key, value1 FROM t1;\n> > > GRANT SELECT ON v1 TO sorin;\n> >\n> > Granulize GRANT to the table column level. Then GRANT \"SELECT\" perms\n> > for the user on every column from the two tables that happen to be\n> > included in the view.\n> >\n> > Yes, it's awkward. So are the VIEW-based replacements for PG's type\n> > extensibility features.\n> \n> But this is not a replacement for a view, isn't it? With a view I can do this:\n> create view v1 as select name, salary from workers where type <> 'MANAGEMENT';\n> \n> with column permissions I must give access to all workers salary including the management, but not with a view.\n\nI guess that bare-bones replacement of CREATE VIEW with CREATE TABLE and\nCREATE RULE ... ON SELECT DO INSTEAD ... would have exaclty the same\nsemantics as CREATE VIEW, including the ability to GRANT .\n\nso the no-view-syntactic-sugar equivalent would be\n\nCREATE TABLE v1 AS SELECT * FROM t1 WHERE false;\nCREATE RULE v1ins AS\n ON SELECT TO tv1\n DO INSTEAD\n SELECT t1.\"key\",\n t1.value2\n FROM t1\n WHERE (t1.\"type\" <> 'MANAGEMENT'::text);\nGRANT SELECT ON v1 TO sorin;\n\nActually it seems that GRANT is also syntactic sugar for rules and the\nabove could be replaced with \n\nCREATE RULE v1ins AS\n ON SELECT TO tv1\n DO INSTEAD\n SELECT t1.\"key\",\n t1.value2\n FROM t1\n WHERE (t1.\"type\" <> 'MANAGEMENT'::text)\n AND CURRENT_USER IN ( SELECT username\n FROM grantees\n WHERE tablename = 'v1'\n AND command = 'select' )\nINSERT INTO GRANTEES(tablename,command,username)\n VALUES('v1','select','sorin');\n\n----------------\nHannu\n\n",
"msg_date": "12 Aug 2002 10:08:03 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Mon, 2002-08-12 at 11:52, Curt Sampson wrote:\n> On Sun, 11 Aug 2002, Don Baccus wrote:\n> \n> > Obviously it would require extending SQL, but since you in part argue\n> > that SQL sucks in regard to the relational model this shouldn't matter,\n> > right?\n> \n> Well, if we're going to go so far as to get rid of SQL, we can go all\n> the way with the D&D thing, and VIEWs will no longer be syntatic sugar\n> because views and tables will be the same thing. (I'll leave you how\n> specify physical storage as an exercise for the reader. :-))\n> \n> But anyway, I have no particularly huge objection to syntatic sugar\n> alone. I do have objections to it when it's not saving much typing. (It\n> is in this case, but that could be fixed with better automatic support\n> of view updates.)\n> \n> But my real objection is when it makes things more confusing, rather\n> than less, which I think is definitely happening here.\n\nWhat makes things more confusing is poor understanding of a feature, not\nthe feature itself. \n\n> I've never\n> seen a rigourous explanation of our model of table inheritance,\n> nor any model that was more obviously correct than another. And\n> the parallel drawn with inheritance in OO languages is a false\n> parallel that adds to the confusion.\n\nAre you saying that inheritance in SQL is something fundamentally\ndifferent than inheritance in OO languages ?\n\n> (For example, the distinction\n> between types and instances of types is critical in OO theory. What are\n> the TI equivalants of this?)\n\nIf by TI you mean type instance then the equivalent of of an instance is\na relation (i.e. one row in an (inherited) table).\n\n> All this is borne out by the regular questions one sees about\n> inheritance in the mailing lists. I'll admit a good part of it is\n> due to the broken implementation of inheritance, but all of the\n> problems I've ever seen are easily solved with very simple relational\n> solutions.\n\nAll _simple_ inheritance problems are easily solved by simple relational\nsolutions. The general problem of much more typing and debugging, less\nclues for optimiser etc. are not solved by _simple_ relational\nsolutions.\n\n> Maybe the inheritance thing is causing people to turn off the relational\n> parts of their brain or something.\n \nOf maybe people are diversifying, using inheritance for is-a\nrelationships and relational model for has-a relationships.\n\n---------------\nHannu\n\n",
"msg_date": "12 Aug 2002 10:29:21 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "Curt Sampson wrote:\n\n> The problem is, table inheritance is just syntatic sugar for creating\n> separate tables, and a view that does a UNION SELECT on them all\n> together, projecting only the common columns.\n\nI've been wanting to point out that SQL views are really, when \nscrutinized, \"just syntactic sugar\" ...\n\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n",
"msg_date": "Sun, 11 Aug 2002 22:31:40 -0700",
"msg_from": "Don Baccus <dhogaza@pacifier.com>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more chosen"
},
{
"msg_contents": "On Sun, 11 Aug 2002, Don Baccus wrote:\n\n> I've been wanting to point out that SQL views are really, when\n> scrutinized, \"just syntactic sugar\" ...\n\nOh? Ok, please translate the following into equivalant SQL that\ndoes not use a view:\n\n CREATE TABLE t1 (key serial, value1 text, value2 text);\n CREATE VIEW v1 AS SELECT key, value1 FROM t1;\n GRANT SELECT ON v1 TO sorin;\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Mon, 12 Aug 2002 14:51:34 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more chosen"
},
{
"msg_contents": "Curt Sampson wrote:\n> On Sun, 11 Aug 2002, Don Baccus wrote:\n> \n> \n>>I've been wanting to point out that SQL views are really, when\n>>scrutinized, \"just syntactic sugar\" ...\n> \n> \n> Oh? Ok, please translate the following into equivalant SQL that\n> does not use a view:\n> \n> CREATE TABLE t1 (key serial, value1 text, value2 text);\n> CREATE VIEW v1 AS SELECT key, value1 FROM t1;\n> GRANT SELECT ON v1 TO sorin;\n\nGranulize GRANT to the table column level. Then GRANT \"SELECT\" perms \nfor the user on every column from the two tables that happen to be \nincluded in the view.\n\nYes, it's awkward. So are the VIEW-based replacements for PG's type \nextensibility features.\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n",
"msg_date": "Sun, 11 Aug 2002 23:02:48 -0700",
"msg_from": "Don Baccus <dhogaza@pacifier.com>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more chosen"
},
{
"msg_contents": "On Sun, 11 Aug 2002, Don Baccus wrote:\n\n> > Oh? Ok, please translate the following into equivalant SQL that\n> > does not use a view:\n> > ...\n> Granulize GRANT to the table column level.\n\nCan you please show me the code for that? After all, I showed you\nall of my code when doing equivalants.\n\nOr are you saying that it's syntactic sugar only in some imaginary\nversion of postgres that does not exist?\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Mon, 12 Aug 2002 15:08:26 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more chosen"
},
{
"msg_contents": "Curt Sampson <cjs@cynic.net> writes:\n> On Sun, 11 Aug 2002, Don Baccus wrote:\n>> Granulize GRANT to the table column level.\n\n> Can you please show me the code for that?\n\nIt's required by the SQL spec. PG hasn't got it, but the spec is\nperfectly clear about how it should be done.\n\nI think this is really a bit irrelevant to the thread topic, though.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 12 Aug 2002 02:13:08 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more chosen "
},
{
"msg_contents": "> > > Oh? Ok, please translate the following into equivalant SQL that\n> > > does not use a view:\n> > > ...\n> > Granulize GRANT to the table column level.\n>\n> Can you please show me the code for that? After all, I showed you\n> all of my code when doing equivalants.\n>\n> Or are you saying that it's syntactic sugar only in some imaginary\n> version of postgres that does not exist?\n\nMySQL has column permissions and I _think_ the sql standard has them as\nwell.\n\nChris\n\n",
"msg_date": "Mon, 12 Aug 2002 14:14:52 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more chosen"
},
{
"msg_contents": "Curt Sampson wrote:\n> On Sun, 11 Aug 2002, Don Baccus wrote:\n> \n> \n>>>Oh? Ok, please translate the following into equivalant SQL that\n>>>does not use a view:\n>>>...\n>>\n>>Granulize GRANT to the table column level.\n> \n> \n> Can you please show me the code for that? After all, I showed you\n> all of my code when doing equivalants.\n\nObviously it would require extending SQL, but since you in part argue \nthat SQL sucks in regard to the relational model this shouldn't matter, \nright? You're arguing the superiority of the relational model as \ndescribed by D&D over other models, non-relational SQL (which all agree \nhas weaknesses) and most likely God.\n\nSo don't flip-flop between the \"oh, SQL sucks think about the relational \nmodel\" and \"SQL doesn't support that\". Pick one or the other. Argue \nSQL or D&D/relational model.\n\nIt's not hard to propose *extensions* to SQL that would allow granting \nof perms on a column rather than table level.\n\n> Or are you saying that it's syntactic sugar only in some imaginary\n> version of postgres that does not exist?\n\nSort of like the idealized relational model that isn't implemented by \nSQL nor PG, but yet you reference again and again when it suits you to \nignore the shortcomings of SQL92?\n\nSure.\n\nSorry, for a moment I thought you were interested in a meaningful \ndiscussion rather than a dick-waving contest but I was wrong.\n\nI give up. Your right hand waves your dick more frequently and with \nmuch more vigor than mine. This has nothing to do with with anything I \ncare about, though.\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n",
"msg_date": "Sun, 11 Aug 2002 23:26:26 -0700",
"msg_from": "Don Baccus <dhogaza@pacifier.com>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more chosen"
},
{
"msg_contents": "Tom Lane wrote:\n> Curt Sampson <cjs@cynic.net> writes:\n> \n>>On Sun, 11 Aug 2002, Don Baccus wrote:\n>>\n>>>Granulize GRANT to the table column level.\n>>\n> \n>>Can you please show me the code for that?\n> \n> \n> It's required by the SQL spec. PG hasn't got it, but the spec is\n> perfectly clear about how it should be done.\n> \n> I think this is really a bit irrelevant to the thread topic, though.\n\nAs far as the last goes, not really. Curtis argues from false premises, \nand this is one. If it were the only false premise he argues from, \nsure, I'd agree it's irrelevant but sadly Curtis argues from false \npremises by default.\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n",
"msg_date": "Sun, 11 Aug 2002 23:30:20 -0700",
"msg_from": "Don Baccus <dhogaza@pacifier.com>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more chosen"
},
{
"msg_contents": "Am Montag, 12. August 2002 08:02 schrieb Don Baccus:\n> Curt Sampson wrote:\n> > On Sun, 11 Aug 2002, Don Baccus wrote:\n> >>I've been wanting to point out that SQL views are really, when\n> >>scrutinized, \"just syntactic sugar\" ...\n> >\n> > Oh? Ok, please translate the following into equivalant SQL that\n> > does not use a view:\n> >\n> > CREATE TABLE t1 (key serial, value1 text, value2 text);\n> > CREATE VIEW v1 AS SELECT key, value1 FROM t1;\n> > GRANT SELECT ON v1 TO sorin;\n>\n> Granulize GRANT to the table column level. Then GRANT \"SELECT\" perms\n> for the user on every column from the two tables that happen to be\n> included in the view.\n>\n> Yes, it's awkward. So are the VIEW-based replacements for PG's type\n> extensibility features.\n\nBut this is not a replacement for a view, isn't it? With a view I can do this:\ncreate view v1 as select name, salary from workers where type <> 'MANAGEMENT';\n\nwith column permissions I must give access to all workers salary including the management, but not with a view.\n\nbest regards,\n mario weilguni\n",
"msg_date": "Mon, 12 Aug 2002 08:38:21 +0200",
"msg_from": "Mario Weilguni <mweilguni@sime.com>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more chosen"
},
{
"msg_contents": "On Sun, 11 Aug 2002, Don Baccus wrote:\n\n> Obviously it would require extending SQL, but since you in part argue\n> that SQL sucks in regard to the relational model this shouldn't matter,\n> right?\n\nWell, if we're going to go so far as to get rid of SQL, we can go all\nthe way with the D&D thing, and VIEWs will no longer be syntatic sugar\nbecause views and tables will be the same thing. (I'll leave you how\nspecify physical storage as an exercise for the reader. :-))\n\nBut anyway, I have no particularly huge objection to syntatic sugar\nalone. I do have objections to it when it's not saving much typing. (It\nis in this case, but that could be fixed with better automatic support\nof view updates.)\n\nBut my real objection is when it makes things more confusing, rather\nthan less, which I think is definitely happening here. I've never\nseen a rigourous explanation of our model of table inheritance,\nnor any model that was more obviously correct than another. And\nthe parallel drawn with inheritance in OO languages is a false\nparallel that adds to the confusion. (For example, the distinction\nbetween types and instances of types is critical in OO theory. What are\nthe TI equivalants of this?)\n\nAll this is borne out by the regular questions one sees about\ninheritance in the mailing lists. I'll admit a good part of it is\ndue to the broken implementation of inheritance, but all of the\nproblems I've ever seen are easily solved with very simple relational\nsolutions. Maybe the inheritance thing is causing people to turn\noff the relational parts of their brain or something.\n\n> I give up. Your right hand waves your dick more frequently and with\n> much more vigor than mine.\n\nFirst you ask for more meaningful discussion. Then you make comments\nlike this. Hello?\n\nIf you really don't intend to stop completely with the insulting comments,\nlet me know and I can killfile you and we'll be done with this.\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Mon, 12 Aug 2002 15:52:09 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more chosen"
},
{
"msg_contents": "On Mon, 2002-08-12 at 13:14, Curt Sampson wrote:\n> On 12 Aug 2002, Hannu Krosing wrote:\n> \n> > Are you saying that inheritance in SQL is something fundamentally\n> > different than inheritance in OO languages ?\n> \n> Yes.\n> \n\n...\n\n> So is an instance a relation (a set of tuples) or a tuple?\n\nAn instance is a tuple. The relation is the Class. The relation header\nis the class definition.\n\n> If the former, consider the following argument.\n> \n> In an object oriented program I can have a class C, and a subclass C'\n> that inherits from C. Now, in any situation that calls for an instance\n> of C, I can instead use an instance of C'. This is polymorphism.\n> \n> Now, if an instance is equivalant to tuple, and a relation inherits from\n> another relation, I'd guess that a relation is equivalant to a class.\n\nYes.\n\n> But given relation R' inheriting from relation R, does that mean that I\n> can use a tuple from R' anywhere I could use a tuple from R? No, obviously\n> not, as the two tuples have a different number of attributes, to start with.\n\nThe classes C and C' also have different number of 'attributes', but\nwhat matters, is that C' has all the attributes that C has, so you can\nuse an instance of C' everywhere an instance of C is needed. The same is\ntrue of table inheritance - tuple from R' has all the attributes that a\ntuple from R has.\n\n...\n\n> > All _simple_ inheritance problems are easily solved by simple relational\n> > solutions. The general problem of much more typing and debugging, less\n> > clues for optimiser etc. are not solved by _simple_ relational\n> > solutions.\n> \n> Can you please give me two or three examples of problems that are\n> not solved by simple relational solutions, and how table inheritance\n> solves them?\n\n From implementors POW:\n\nUpdatable VIEWs \n\nThe subset of 'views' that inheritance creates are updatable by default\nwith no additional effort from the programmer. It is ready for\ninheritance because it is inherently more difficult to solve the view\nupdatability problem for a general case than for the limited set of\nviews used by inheritance.\n\n\n> > Of maybe people are diversifying, using inheritance for is-a\n> > relationships and relational model for has-a relationships.\n> \n> Well, it seems to me that the relational model better supports the is-a\n> relationship. With the relational model, I can specify a column in a\n> table that specifies what that particular entity is, and that can be set\n> to one and only one value.\n\nWhen using inheritance both of these (defining and setting) are done\nautomatically.\n\n> With the table inheritance model, how are we\n> ensuring that, if tables R' and R'' both inherit from R, when a tuple\n> is in R' relating to another tuple in R (or is that the same tuple),\n> there's not also such a relation between a tuple in R'' and R?\n\nIn OOR _model_ we define a constraint. \n\nIn postgreSQL we first fix the constraints spanning inheritance trees\nproblem and then define a constraint ;)\n\n-------------\nHannu\n\n",
"msg_date": "12 Aug 2002 12:11:53 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On 12 Aug 2002, Hannu Krosing wrote:\n\n> Are you saying that inheritance in SQL is something fundamentally\n> different than inheritance in OO languages ?\n\nYes.\n\n> > (For example, the distinction\n> > between types and instances of types is critical in OO theory. What are\n> > the TI equivalants of this?)\n>\n> If by TI you mean type instance....\n\nSorry, I shouldn't have abbreviated this. By \"TI\" I meant \"table\ninheritance.\"\n\n> then the equivalent of of an instance is\n> a relation (i.e. one row in an (inherited) table).\n\nAs I understand it, one row in a table, inherited or not, is a\ntuple, not a relation. The definitions I'm familar with are Date's:\na relation is a header, describing the types of attributes within\nthe tuple, and a set of tuples conforming to that header, and a\nrelvar is a variable that holds such a relation. (His definitions\nseem to be the ones in common use--Korth/Silberschatz agree with\nhim, though they don't use the relvar concept AFIK.)\n\nSo is an instance a relation (a set of tuples) or a tuple?\n\nIf the former, consider the following argument.\n\nIn an object oriented program I can have a class C, and a subclass C'\nthat inherits from C. Now, in any situation that calls for an instance\nof C, I can instead use an instance of C'. This is polymorphism.\n\nNow, if an instance is equivalant to tuple, and a relation inherits from\nanother relation, I'd guess that a relation is equivalant to a class.\nBut given relation R' inheriting from relation R, does that mean that I\ncan use a tuple from R' anywhere I could use a tuple from R? No, obviously\nnot, as the two tuples have a different number of attributes, to start with.\nSo this analogy is now breaking down.\n\nI suppose I could try to work out here if you really mean that\n(using the strict Date sense of the terms here) the relvars are\nclasses, and the relations that they hold are instances. But that\nseems to get a bit sticky too. I think it's better if I wait at\nthis point for you to provide some further clarification. Would\nyou mind doing so? Specifically, what is the equivalant of a class,\nand what is the equivalant of an instance? What are the consequences\nof this, if you know them?\n\n> All _simple_ inheritance problems are easily solved by simple relational\n> solutions. The general problem of much more typing and debugging, less\n> clues for optimiser etc. are not solved by _simple_ relational\n> solutions.\n\nCan you please give me two or three examples of problems that are\nnot solved by simple relational solutions, and how table inheritance\nsolves them?\n\n> Of maybe people are diversifying, using inheritance for is-a\n> relationships and relational model for has-a relationships.\n\nWell, it seems to me that the relational model better supports the is-a\nrelationship. With the relational model, I can specify a column in a\ntable that specifies what that particular entity is, and that can be set\nto one and only one value. With the table inheritance model, how are we\nensuring that, if tables R' and R'' both inherit from R, when a tuple\nis in R' relating to another tuple in R (or is that the same tuple),\nthere's not also such a relation between a tuple in R'' and R?\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Mon, 12 Aug 2002 17:14:02 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more chosen"
},
{
"msg_contents": "On Mon, 2002-08-12 at 00:29, Hannu Krosing wrote:\n> On Mon, 2002-08-12 at 11:52, Curt Sampson wrote:\n> > On Sun, 11 Aug 2002, Don Baccus wrote:\n[snip]\n> > But anyway, I have no particularly huge objection to syntatic sugar\n> > alone. I do have objections to it when it's not saving much typing. (It\n> > is in this case, but that could be fixed with better automatic support\n> > of view updates.)\n> > \n> > But my real objection is when it makes things more confusing, rather\n> > than less, which I think is definitely happening here.\n> \n> What makes things more confusing is poor understanding of a feature, not\n> the feature itself. \n\nAgreed. Just because a feature may not be well understood by the masses\ndoesn't mean the feature is worthless.\n\n> \n> > I've never\n> > seen a rigourous explanation of our model of table inheritance,\n> > nor any model that was more obviously correct than another. And\n> > the parallel drawn with inheritance in OO languages is a false\n> > parallel that adds to the confusion.\n> \n> Are you saying that inheritance in SQL is something fundamentally\n> different than inheritance in OO languages ?\n> \n\nHmmm...there might be. Curt raises in interesting point below. Do keep\nin mind that I believe he's specifically referring to table inheritance\nand not the broad scope of \"language wide\" inheritance.\n\n\n> > (For example, the distinction\n> > between types and instances of types is critical in OO theory. What are\n> > the TI equivalants of this?)\n> \n> If by TI you mean type instance then the equivalent of of an instance is\n> a relation (i.e. one row in an (inherited) table).\n> \n\nLook a little deeper here. In other OO implementations, I can define a\nclass (say class a) which has no instances (abstract base class). \nFurthermore, I can take this case and use it for building blocks\n(assuming multiple inheritance is allowed in this world) by combining\nwith other classes (z inherits from a, b, c; whereby classes a, b, c\nstill do not have an actual instance). I can create an instance of my\nnewly inherited class (z).\n\nSeems to me that there is some distinction between types (classes) and\nand type instances (instance of a specific class) as it pertains to it's\nusability.\n\nHow exactly would you create an abstract base class for table type?\n\nI'm still trying to put my brain around exactly what the implications\nare here, but I *think* this is what curt was trying to stress. Curt,\nfeel free to correct me as needed.\n\n\n> > All this is borne out by the regular questions one sees about\n> > inheritance in the mailing lists. I'll admit a good part of it is\n> > due to the broken implementation of inheritance, but all of the\n> > problems I've ever seen are easily solved with very simple relational\n> > solutions.\n> \n> All _simple_ inheritance problems are easily solved by simple relational\n> solutions. The general problem of much more typing and debugging, less\n> clues for optimiser etc. are not solved by _simple_ relational\n> solutions.\n\nI agree with Hannu here. Curt's comment seems like lip service. Worth\nnoting too, even if it were not for the issues pointed out by Hannu\nhere, Curt's statement certainly does nothing to invalidate the concept\nof table inheritance. After all, most camps are happy when there are\nmultiple means to an end. Just because it can be done via method-x,\ndoesn't invalid method-y. The inverse is probably true too. ;)\n\n> \n> > Maybe the inheritance thing is causing people to turn off the relational\n> > parts of their brain or something.\n> \n> Of maybe people are diversifying, using inheritance for is-a\n> relationships and relational model for has-a relationships.\n\nThat's an interesting point.\n\nGreg",
"msg_date": "12 Aug 2002 09:00:17 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Mon, 2002-08-12 at 15:00, Greg Copeland wrote:\n...\n> Look a little deeper here. In other OO implementations, I can define a\n> class (say class a) which has no instances (abstract base class). \n> Furthermore, I can take this case and use it for building blocks\n> (assuming multiple inheritance is allowed in this world) by combining\n> with other classes (z inherits from a, b, c; whereby classes a, b, c\n> still do not have an actual instance). I can create an instance of my\n> newly inherited class (z).\n> \n> Seems to me that there is some distinction between types (classes) and\n> and type instances (instance of a specific class) as it pertains to it's\n> usability.\n> \n> How exactly would you create an abstract base class for table type?\n\nCREATE TABLE abstract_base (\n cols ...,\n CONSTRAINT \"No data allowed in table abstract_base!\" CHECK (1 = 0)\n)\n\nThis assumes that the constraint is not inherited or can be removed in\nchild tables.\n\n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight, UK \nhttp://www.lfix.co.uk/oliver\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"And he spake a parable unto them to this end, that men\n ought always to pray, and not to faint.\" \n Luke 18:1 \n\n",
"msg_date": "12 Aug 2002 16:39:42 +0100",
"msg_from": "Oliver Elphick <olly@lfix.co.uk>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Mon, 2002-08-12 at 10:39, Oliver Elphick wrote:\n> On Mon, 2002-08-12 at 15:00, Greg Copeland wrote:\n> > How exactly would you create an abstract base class for table type?\n> \n> CREATE TABLE abstract_base (\n> cols ...,\n> CONSTRAINT \"No data allowed in table abstract_base!\" CHECK (1 = 0)\n> )\n> \n> This assumes that the constraint is not inherited or can be removed in\n> child tables.\n> \n\nWhy would I assume that constraints would not be inherited? Seems as a\ngeneral rule of thumb, you'd want the constraints to be inherited. Am I\nmissing something?\n\nAlso, if I remove the constraint on the child table, doesn't that really\nmean I'm removing the constraint on the parent table? That would seem\nto violate the whole reason of having constraints. If a constraint is\nplaced in an ABC and we find that we later need to remove it for EVERY\nderived class, doesn't that imply it shouldn't of been in there to begin\nwith? After all, in this case, we're saying that each and every derived\nclass needs to overload or drop a specific constraint. That strikes me\nas being rather obtuse.\n\nThat, in it self, I find rather interesting. Is there any papers or\nbooks which offers explanation of how constraints should handled for\ntable inheritance?\n\nGreg",
"msg_date": "12 Aug 2002 11:30:12 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Mon, 2002-08-12 at 17:30, Greg Copeland wrote:\n> On Mon, 2002-08-12 at 10:39, Oliver Elphick wrote:\n> > On Mon, 2002-08-12 at 15:00, Greg Copeland wrote:\n> > > How exactly would you create an abstract base class for table type?\n> > \n> > CREATE TABLE abstract_base (\n> > cols ...,\n> > CONSTRAINT \"No data allowed in table abstract_base!\" CHECK (1 = 0)\n> > )\n> > \n> > This assumes that the constraint is not inherited or can be removed in\n> > child tables.\n> > \n> \n> Why would I assume that constraints would not be inherited? Seems as a\n> general rule of thumb, you'd want the constraints to be inherited. Am I\n> missing something?\n\nYou are right, but I was stuck trying to think of a constraint that\nwould restrict the abstract base but not its descendants. Instead of\nCHECK (1 = 0), I think we can use a function that checks whether the\ncurrent table is the abstract base and returns false if it is. That\nwould be validly heritable. (CHECK (tableoid != 12345678))\n \n> Also, if I remove the constraint on the child table, doesn't that really\n> mean I'm removing the constraint on the parent table? That would seem\n> to violate the whole reason of having constraints. If a constraint is\n> placed in an ABC and we find that we later need to remove it for EVERY\n> derived class, doesn't that imply it shouldn't of been in there to begin\n> with? After all, in this case, we're saying that each and every derived\n> class needs to overload or drop a specific constraint. That strikes me\n> as being rather obtuse.\n\nYes, it would be clumsy, and I think you are correct that constraints\nshould not be removable.\n\nThe inheritance model I am familiar with is that of Eiffel, where\nconstraints are additive down the hierarchy. That is, an invariant on\nthe base class applies in its descendants along with any invariants\nadded by the descendant or intermediate classes. That language has the\nconcept of a deferred class, which is the parallel of the abstract base\ntable we are discussing. A deferred class cannot be directly\ninstantiated. To do the same in the table hierarchy would require a\nkeyword to designate a table as an abstract table (CREATE ABSTRACT TABLE\nxxx ...?). In the absence of that, a constraint based on the table\nidentity will have to do.\n\n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight, UK \nhttp://www.lfix.co.uk/oliver\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"And he spake a parable unto them to this end, that men\n ought always to pray, and not to faint.\" \n Luke 18:1 \n\n",
"msg_date": "12 Aug 2002 18:46:14 +0100",
"msg_from": "Oliver Elphick <olly@lfix.co.uk>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "Ok, big bundled up reply here to various people.\n\n> From: Greg Copeland <greg@CopelandConsulting.Net>\n>\n> > What makes things more confusing is poor understanding of a feature, not\n> > the feature itself.\n>\n> Agreed. Just because a feature may not be well understood by the masses\n> doesn't mean the feature is worthless.\n\nYeah, but if it's not understood by fairly smart people familiar\nwith both relational theory and OO programming? If the feature is\nconfusing because it appears to be something it's not, that's a\nfeature problem, not a problem with the people trying to understand\nit. Maybe all that's necessary to fix it is a terminology change,\nbut even so....\n\n> Hmmm...there might be. Curt raises in interesting point below. Do keep\n> in mind that I believe he's specifically referring to table inheritance\n> and not the broad scope of \"language wide\" inheritance.\n\nYes.\n\n> > All _simple_ inheritance problems are easily solved by simple relational\n> > solutions. The general problem of much more typing and debugging, less\n> > clues for optimiser etc. are not solved by _simple_ relational\n> > solutions.\n>\n> I agree with Hannu here. Curt's comment seems like lip service.\n\nWell, as I said: examples please. Quite frankly, between the lack\nof a clear model of table inheritance (Hannu seems to have one,\nbut this needs to be written up in unambiguous form and put into\nthe postgres manual) and the bugs in the postgres implementation\nof table inheritance, I've found the relational model much easier\nto use for solving problems.\n\n> From: Oliver Elphick <olly@lfix.co.uk>\n>\n> On Mon, 2002-08-12 at 15:00, Greg Copeland wrote:\n> > How exactly would you create an abstract base class for table type?\n>\n> CREATE TABLE abstract_base (\n> cols ...,\n> CONSTRAINT \"No data allowed in table abstract_base!\" CHECK (1 = 0)\n> )\n>\n> This assumes that the constraint is not inherited or can be removed in\n> child tables.\n\nAre we then assuming that tuples in the child tables do not appear\nin the base table? That's more or less what I'd assumed when I\noriginally heard about table inheritance (after all, instantiating\na child object does not automatically instantiate a separate copy\nof the parent object), but the SQL standard, postgres, and I believe other\nsystems make the exact opposite assumption.\n\nIf the child table tuples do appear in the parent, you've now got\na situation analogous to the current postgres situation where a\nconstraint on the parent table is an outright lie. (I'm thinking\nof the UNIQUE constraint which guarantees that all values in a\ncolumn will be unique--and then they aren't.) I consider breaking\nthe relational model this badly a completely unacceptable cost no\nmatter what additional functionality you're wanting to add, and I\nexpect that most other people do, too.\n\n> From: Greg Copeland <greg@CopelandConsulting.Net>\n>\n> That, in it self, I find rather interesting. Is there any papers or\n> books which offers explanation of how constraints should handled for\n> table inheritance?\n\nHere again, I'd love to hear about some references, too. I see a\nlot of people saying they like table inheritance; I don't see anyone\n(except maybe Hannu) who seems to have a clear idea of how it should\nwork.\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Tue, 13 Aug 2002 10:34:48 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "Curt Sampson wrote:\n\n> ... the bugs in the postgres implementation\n> of table inheritance, I've found the relational model much easier\n> to use for solving problems.\n\nNo one has argued that the shortcomings (not bugs, really, just things \nleft out) makes the current implementation of very limited utility. As \nI mention this is exactly why we choose not to use it at OpenACS.\n\nOn the other hand at least we took the time to understand how it \nactually does work before criticizing it.\n\nIt's a pity, as I pointed out the reduction in joins alone would really \nbe great.\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n",
"msg_date": "Mon, 12 Aug 2002 18:48:20 -0700",
"msg_from": "Don Baccus <dhogaza@pacifier.com>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Mon, 2002-08-12 at 20:34, Curt Sampson wrote:\n> Ok, big bundled up reply here to various people.\n> \n> > From: Greg Copeland <greg@CopelandConsulting.Net>\n> >\n> > > What makes things more confusing is poor understanding of a feature, not\n> > > the feature itself.\n> >\n> > Agreed. Just because a feature may not be well understood by the masses\n> > doesn't mean the feature is worthless.\n> \n> Yeah, but if it's not understood by fairly smart people familiar\n> with both relational theory and OO programming? If the feature is\n> confusing because it appears to be something it's not, that's a\n> feature problem, not a problem with the people trying to understand\n> it. Maybe all that's necessary to fix it is a terminology change,\n> but even so....\n\nYou're constantly confusing Postgres' implementation with a \"desired\"\nimplementation. Below, I think, is the effort to figure out exactly\nwhat a \"desired implementation\" really is.\n\nIf a feature is partially implemented, of course it's going to be\nconfusing to use.\n\nLet's please stop beating this horse Curt. At this point, I think the\nhorse is floating upside down in a pond somewhere...yep...and the\nbuzzards are coming.\n\nPlease. Beating people with a stick isn't suddenly going to make\neveryone share your view point.\n\n> > > All _simple_ inheritance problems are easily solved by simple relational\n> > > solutions. The general problem of much more typing and debugging, less\n> > > clues for optimiser etc. are not solved by _simple_ relational\n> > > solutions.\n> >\n> > I agree with Hannu here. Curt's comment seems like lip service.\n> \n> Well, as I said: examples please. Quite frankly, between the lack\n> of a clear model of table inheritance (Hannu seems to have one,\n> but this needs to be written up in unambiguous form and put into\n> the postgres manual) and the bugs in the postgres implementation\n> of table inheritance, I've found the relational model much easier\n> to use for solving problems.\n\nIf you're so keen on examples, please provide one that justifies such a\nboastful statement. Hannu has done a pretty fair job of beating ya back\nevery time. Personally, in this case, I don't really need examples are\nit's pretty obvious a braggart statement full of bias. So second\nthought, perhaps we can let this one alone.\n\nI do agree that it looks like Hannu is doing a fairly good job of\nproviding some constructive direction here. Hannu, please keep up the\ngood work. ;)\n\n> \n> > From: Oliver Elphick <olly@lfix.co.uk>\n> >\n> > On Mon, 2002-08-12 at 15:00, Greg Copeland wrote:\n> > > How exactly would you create an abstract base class for table type?\n> >\n> > CREATE TABLE abstract_base (\n> > cols ...,\n> > CONSTRAINT \"No data allowed in table abstract_base!\" CHECK (1 = 0)\n> > )\n> >\n> > This assumes that the constraint is not inherited or can be removed in\n> > child tables.\n> \n> Are we then assuming that tuples in the child tables do not appear\n> in the base table? That's more or less what I'd assumed when I\n> originally heard about table inheritance (after all, instantiating\n> a child object does not automatically instantiate a separate copy\n> of the parent object), but the SQL standard, postgres, and I believe other\n> systems make the exact opposite assumption.\n\nThat's actually my exact assumption...that is, that tuples in the parent\ndid not exist in the child. Is that not true? Can you point me to any\nreferences?\n\n> \n> If the child table tuples do appear in the parent, you've now got\n> a situation analogous to the current postgres situation where a\n> constraint on the parent table is an outright lie. (I'm thinking\n> of the UNIQUE constraint which guarantees that all values in a\n[snip]\n\nI knew that there are *implementation* issues with postgres that causes\nproblems with constraints, etc...I didn't realize that was the reason.\n\n> \n> > From: Greg Copeland <greg@CopelandConsulting.Net>\n> >\n> > That, in it self, I find rather interesting. Is there any papers or\n> > books which offers explanation of how constraints should handled for\n> > table inheritance?\n> \n> Here again, I'd love to hear about some references, too. I see a\n> lot of people saying they like table inheritance; I don't see anyone\n> (except maybe Hannu) who seems to have a clear idea of how it should\n> work.\n\nWell, you seem to be making references to \"...SQL standard, postgres,\nand I believe other systems...\". I was counting on you or someone else\nto point us to existing references. I'm fairly sure we can manage to\nwade through it to walk a sane and fruitful path...it would just be a\nless bumpier road if we all spoke the same OO'ish dialect and shared a\ncommon knowledge base that we can all agree on for starters. So, you\ngot anything to share here??? ;)\n\n\nGreg",
"msg_date": "12 Aug 2002 21:33:19 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Mon, 12 Aug 2002, Don Baccus wrote:\n\n> It's a pity, as I pointed out the reduction in joins alone would really\n> be great.\n\nSo implement the same thing relationally, and get your reduction\nin joins. There are tricks, discussed on this very list in the\nlast few days, that would let you do what you need.\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Tue, 13 Aug 2002 12:57:07 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Tue, 2002-08-13 at 10:16, Curt Sampson wrote:\n> On 12 Aug 2002, Greg Copeland wrote:\n...\n\n> > Are we then assuming that tuples in the child tables do not appear\n> > > in the base table? That's more or less what I'd assumed when I\n> > > originally heard about table inheritance (after all, instantiating\n> > > a child object does not automatically instantiate a separate copy\n> > > of the parent object),\n\nTuples in the child table \"appear\" in parent table when you do a plain\nSELECT, as thei IMHO should, because you _do_ want to get all kinds of\nanimals when doing select from animals.\n\nThey do not appear in parent table when you do \n\nSELECT .. FROM ONLY parent_table\n\nIt used to be the opposite (one needed to do \"SELECT .. FROM \nparent_table* \" to get tuples from inherited tables as well ) but it\nwas changed because SQL99 mandated that inherited tables should be\nincluded by default. That's for SQL99's \"CREATE TABLE (...) UNDER\nanother_table\" kind of single inheritance.\n\n> > > but the SQL standard, postgres, and I believe other\n> > > systems make the exact opposite assumption.\n> >\n> > That's actually my exact assumption...that is, that tuples in the parent\n> > did not exist in the child.\n> \n> Sorry, by \"opposite assumption,\" I meant these two opposites:\n\nThere are two main orthogonal ways of mapping inheritance to relational\nmodel.\n\n> 1. Tuples in child tables appear in the parent table.\n\nThat's the way you implemented the samples in the beginning of this\nthread, i.e. keep the common part in one table and extend by stitching\ncolumns fron child tables to the \"side\" using foreign keys. \n\nThis makes it easy to enforce primary keys and uniqueness, but grows\nugly quite fast if you have deep inhweritance hierarchies - if you have\ninheritance 5 levels deep, you need 4 joins to get a tuple from the\nlast-descendant table.\n\nIt also makes automatic updating ov views a pain to do.\n\n> 2. Tuples in child tables do not appear in the parent table.\n\nThis is how postgres implements it - make a new table for each inherited\ntable and do UNION join when doing a SELECT .\n\nThis makes it hard to implement uniqueness and primary keys, but easy to\ndo updates and inserts.\n\n> Take your pick, keeping in mind that the sources I know of (Appendix E of _The\n> Third Manifesto_, _Database Systems Concepts_ (ISTR), the SQL standard and\n> postgres currently all assume #1.\n\nI would like yet another implementation, more in line with SQL99's\nsingle inheritance, where all inherited tables would be stored in the\nsame pagefile (so that you can put a unique index on them and it would\n\"just work\" because TIDs all point into the same file). Fast access to\nsome single table ONLY could be done using partial indexes on tableoid.\n\nThis can't be mapped directly on SQL92 kind of relational model, but can\nmore or less be mimicked by setting the new fields to NULL for tuples\nbelonging to parent relation.\n\n> If we find the one we pick is unworkable, we can always go back\n> and try the other.\n> \n> > > If the child table tuples do appear in the parent, you've now got\n> > > a situation analogous to the current postgres situation where a\n> > > constraint on the parent table is an outright lie. (I'm thinking\n> > > of the UNIQUE constraint which guarantees that all values in a\n> > [snip]\n> >\n> > I knew that there are *implementation* issues with postgres that causes\n> > problems with constraints, etc...I didn't realize that was the reason.\n> \n> Well, assuming we are mapping inheritance back into relational stuff\n> behind the scenes (which it appears to me we are doing now), we can just\n> map back to the relation method I demonstrated earlier of doing what\n> someone wanted to do with table inheritance (child tables contain only\n> foreign key and child-specific data; parent table contains primary key\n> and all parent data) and that will fix the implementation problem.\n\nThe main problems I pointed out above: \n\n1. hard-to-implement UPDATE rules, theoretically possible is not good\nenough for real use ;)\n\n2. too much joining for deep inheritance hierarchies .\n\n> Or people have proposed other things, such as cross-table constraints,\n> to try to do this.\n> \n> > Well, you seem to be making references to \"...SQL standard, postgres,\n> > and I believe other systems...\". I was counting on you or someone else\n> > to point us to existing references.\n> \n> Well, counting on me is not good, since the whole reason I started this\n> was because I found the issue confusing in part due to the lack of any\n> obvious standards here that I could find. :-) But here's what I do have:\n> \n> Date, Darwen, _Foundation for Future Database Systems, The\n> Third Manefesto (Second Edition)_. Appendex E.\n> \n> Silberschatz, Korth, Sudarshan, _Database Systems Concepts\n> (Fourth Edition)_. I think it's around chapter 9. (My copy is\n> at home right now.)\n> \n> SQL Standard. I don't have it handy. Anyone? Anyone? Bueller?\n\nI got mine from\n\nhttp://www.sqlstandards.org/SC32/WG3/Progression_Documents/FCD/fcd2found.pdf\n\nQuite hard to read, as standard in general tend to be ;)\n\nI also have PDF's with a large [FINAL] stamp on them, which I cant\nremember where I got (but I posted the link here a few months ago)\n\n> Postgres. Known broken implementation, but we can at least poke\n> stuff into it and see what it does.\n> \n> In addition, OO programming gets mentioned ocassionally. I don't\n> think that table inheritance is anything related\n\nIMHO table inheritance is a natural relational extension to type\ninheritance - if you create a subtype that is-a parent type (bird is an\nanimal), you also want to be able to treat it as such in queries - i.e.\nbe able select all animals, and not have to manually make the connection\nbetween OO (type inheritance) and Relational\n(INSERT/UPDATE/SELECT/DELETE) worlds.\n\n> (and I've spent\n> a lot of time in the last couple of years developing methods to\n> make my OO programs and relational databases play nice with each\n> other),\n\nSo have the database guys, adding OO stuff to databases and all ;)\n\n> but it might help to have some idea of what people to do\n> connect the two, in case some people think that they are or should\n> be connected. You can start by checking out this page for a few\n> ways of creating objects from database information:\n> \n> http://www.martinfowler.com/isa/inheritanceMappers.html\n\nI'll try to check it out .\n",
"msg_date": "13 Aug 2002 09:19:56 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On 12 Aug 2002, Greg Copeland wrote:\n\n> You're constantly confusing Postgres' implementation with a \"desired\"\n> implementation.\n\nNo. I'm still trying to figure out what the desired implementation\nactually is. This is documented nowhere.\n\n> If you're so keen on examples, please provide one that justifies such a\n> boastful statement.\n\nYou appear to be saying I should provide an example that proves there\nexists no table inheritance configuration that cannot easily be done\nwith a relational implementation. That's not possible to do, sorry.\n\nI will revise my opinion the instant someone shows me something that I\ncan't do relationally, or is easy to implement with inheritance, and\ndifficult with relational methods. Now you know what you need to do, and\nif you have no example, we can drop the whole thing. But I am honestly\ninterested to see just what it is that makes table inheritance so great.\n\n> > Are we then assuming that tuples in the child tables do not appear\n> > in the base table? That's more or less what I'd assumed when I\n> > originally heard about table inheritance (after all, instantiating\n> > a child object does not automatically instantiate a separate copy\n> > of the parent object), but the SQL standard, postgres, and I believe other\n> > systems make the exact opposite assumption.\n>\n> That's actually my exact assumption...that is, that tuples in the parent\n> did not exist in the child.\n\nSorry, by \"opposite assumption,\" I meant these two opposites:\n\n 1. Tuples in child tables appear in the parent table.\n\n 2. Tuples in child tables do not appear in the parent table.\n\nTake your pick, keeping in mind that the sources I know of (Appendix E of _The\nThird Manifesto_, _Database Systems Concepts_ (ISTR), the SQL standard and\npostgres currently all assume #1.\n\nIf we find the one we pick is unworkable, we can always go back\nand try the other.\n\n> > If the child table tuples do appear in the parent, you've now got\n> > a situation analogous to the current postgres situation where a\n> > constraint on the parent table is an outright lie. (I'm thinking\n> > of the UNIQUE constraint which guarantees that all values in a\n> [snip]\n>\n> I knew that there are *implementation* issues with postgres that causes\n> problems with constraints, etc...I didn't realize that was the reason.\n\nWell, assuming we are mapping inheritance back into relational stuff\nbehind the scenes (which it appears to me we are doing now), we can just\nmap back to the relation method I demonstrated earlier of doing what\nsomeone wanted to do with table inheritance (child tables contain only\nforeign key and child-specific data; parent table contains primary key\nand all parent data) and that will fix the implementation problem.\n\nOr people have proposed other things, such as cross-table constraints,\nto try to do this.\n\n> Well, you seem to be making references to \"...SQL standard, postgres,\n> and I believe other systems...\". I was counting on you or someone else\n> to point us to existing references.\n\nWell, counting on me is not good, since the whole reason I started this\nwas because I found the issue confusing in part due to the lack of any\nobvious standards here that I could find. :-) But here's what I do have:\n\n Date, Darwen, _Foundation for Future Database Systems, The\n Third Manefesto (Second Edition)_. Appendex E.\n\n Silberschatz, Korth, Sudarshan, _Database Systems Concepts\n (Fourth Edition)_. I think it's around chapter 9. (My copy is\n at home right now.)\n\n SQL Standard. I don't have it handy. Anyone? Anyone? Bueller?\n\n Postgres. Known broken implementation, but we can at least poke\n stuff into it and see what it does.\n\nIn addition, OO programming gets mentioned ocassionally. I don't\nthink that table inheritance is anything related (and I've spent\na lot of time in the last couple of years developing methods to\nmake my OO programs and relational databases play nice with each\nother), but it might help to have some idea of what people to do\nconnect the two, in case some people think that they are or should\nbe connected. You can start by checking out this page for a few\nways of creating objects from database information:\n\n http://www.martinfowler.com/isa/inheritanceMappers.html\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Tue, 13 Aug 2002 14:16:24 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Tue, 2002-08-13 at 00:16, Curt Sampson wrote:\n> I will revise my opinion the instant someone shows me something that I\n> can't do relationally, or is easy to implement with inheritance, and\n> difficult with relational methods. Now you know what you need to do, and\n> if you have no example, we can drop the whole thing. But I am honestly\n> interested to see just what it is that makes table inheritance so great.\n\nI think here-in is the first problem. You seem to insist that the world\ncan only allow for one or the other and that the two approaches are\nmutually exclusive. I tends to think that there is room for both. One\nwould also seem to allow that they can actually be complimentary\n(referring to Hannu's recent is-a & has-a inheritance comments).\n\nCan we let go of x is better than y and just concentrate on how y can be\nmade better without regard for x?\n\nAfter it's all said and done, who knows, everyone might agree that table\ninheritance is just a plain, bad idea.\n\n> >\n> > I knew that there are *implementation* issues with postgres that causes\n> > problems with constraints, etc...I didn't realize that was the reason.\n> \n> Well, assuming we are mapping inheritance back into relational stuff\n> behind the scenes (which it appears to me we are doing now), we can just\n> map back to the relation method I demonstrated earlier of doing what\n> someone wanted to do with table inheritance (child tables contain only\n> foreign key and child-specific data; parent table contains primary key\n> and all parent data) and that will fix the implementation problem.\n\nThis is what I imagined the preferred solution would be, however, I'm\nalso assuming it would be the more complex to implement *properly*. \n\n> \n> Or people have proposed other things, such as cross-table constraints,\n> to try to do this.\n\nYa, I was kicking this idea around in my head tonight. Didn't get far\non it. So I should look for postings in the archive about this specific\nimplementation?\n\n> \n> > Well, you seem to be making references to \"...SQL standard, postgres,\n> > and I believe other systems...\". I was counting on you or someone else\n> > to point us to existing references.\n> \n> Well, counting on me is not good, since the whole reason I started this\n> was because I found the issue confusing in part due to the lack of any\n> obvious standards here that I could find. :-) But here's what I do have:\n> \n> Date, Darwen, _Foundation for Future Database Systems, The\n> Third Manefesto (Second Edition)_. Appendex E.\n\nIs this a book or a paper. I have a paper that I've been reading\n(ack...very, very dry) by these guys of the same name.\n\n> \n> Silberschatz, Korth, Sudarshan, _Database Systems Concepts\n> (Fourth Edition)_. I think it's around chapter 9. (My copy is\n> at home right now.)\n> \n> SQL Standard. I don't have it handy. Anyone? Anyone? Bueller?\n\nSo the SQL standard does address table inheritance? Not that this means\nI feel that they've done the right thing...but what did the\nspecification have to say on the subject? Any online references?\n\n> \n> Postgres. Known broken implementation, but we can at least poke\n> stuff into it and see what it does.\n> \n> In addition, OO programming gets mentioned ocassionally. I don't\n> think that table inheritance is anything related (and I've spent\n\nYes. I think I'm starting to buy into that too, however, I'm not sure\nthat it has to mean that no value is within. In other words, I'm still\non the fence on a) table inheritance really makes much \"OO\" sense and b)\neven if it does or does not, is there value in any form of it's\nimplementation (whatever the end result looks like) .\n\n> a lot of time in the last couple of years developing methods to\n> make my OO programs and relational databases play nice with each\n> other), but it might help to have some idea of what people to do\n> connect the two, in case some people think that they are or should\n> be connected. You can start by checking out this page for a few\n> ways of creating objects from database information:\n> \n> http://www.martinfowler.com/isa/inheritanceMappers.html\n> \n\nThanks. Funny, I was reading that just the other day. ;)\n\nGreg",
"msg_date": "13 Aug 2002 01:05:14 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On 13 Aug 2002, Greg Copeland wrote:\n\n> On Tue, 2002-08-13 at 00:16, Curt Sampson wrote:\n> > I will revise my opinion the instant someone shows me something that I\n> > can't do relationally, or is easy to implement with inheritance, and\n> > difficult with relational methods. Now you know what you need to do, and\n> > if you have no example, we can drop the whole thing. But I am honestly\n> > interested to see just what it is that makes table inheritance so great.\n>\n> I think here-in is the first problem. You seem to insist that the world\n> can only allow for one or the other and that the two approaches are\n> mutually exclusive.\n\nNo, I don't.\n\n 1. If it changes the rules, as it were, that is breaks other\n parts of the system, it should go. This is the current state\n of the postgres implementation. I'm guessing it's not the state\n of the desired implementation, once we figure out what that is.\n\n 2. If it's just syntactic sugar, that's livable, so long as\n it's quite obvious what it's syntatic sugar for. (In the current\n case, it's not.) It's even good if it saves a lot of effort.\n\n 3. If it actually allows you to do something you cannot otherwise\n do, or allows you to do something very difficult with much\n greater ease, it's a good thing and it should stay.\n\n> > Well, assuming we are mapping inheritance back into relational stuff\n> > behind the scenes (which it appears to me we are doing now), we can just\n> > map back to the relation method I demonstrated earlier of doing what\n> > someone wanted to do with table inheritance (child tables contain only\n> > foreign key and child-specific data; parent table contains primary key\n> > and all parent data) and that will fix the implementation problem.\n>\n> This is what I imagined the preferred solution would be, however, I'm\n> also assuming it would be the more complex to implement *properly*.\n\nI don't think so. Both systems are currently, AFICT, pretty simple\nmappings onto the relational system. Once we get the exact details of\ntable inheritance behaviour hammered out, I will gladly provide the\nmapping it's possible to create it.\n\n> > Date, Darwen, _Foundation for Future Database Systems, The\n> > Third Manefesto (Second Edition)_. Appendex E.\n>\n> Is this a book or a paper. I have a paper that I've been reading\n> (ack...very, very dry) by these guys of the same name.\n\nIt's a book. Apparently the paper is, in comparison, much more lively.\n:-) But I find the book good in that, at the very least, it shows the\nlevel to which you have to go to come up with a theoretically solid\nbasis for something you want to implement.\n\n> So the SQL standard does address table inheritance?\n\nYes.\n\n> Not that this means I feel that they've done the right thing...but\n> what did the specification have to say on the subject? Any online\n> references?\n\nI don't have a copy of the spec handy, and have not had time to go and\ndig one up. All I got from it was out of the two book references I gave.\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Tue, 13 Aug 2002 15:14:46 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "Greg Copeland wrote:\n> On Tue, 2002-08-13 at 00:16, Curt Sampson wrote:\n> \n>>I will revise my opinion the instant someone shows me something that I\n>>can't do relationally, or is easy to implement with inheritance, and\n>>difficult with relational methods.\n\nThe traditional view approach requires unnecessary joins, and there's no \ngetting around it.\n\nAnd yes I know he's not reading my mail and no, don't bother repeating \nthis to him, he'll just continue to ignore the point.\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n",
"msg_date": "Tue, 13 Aug 2002 06:48:28 -0700",
"msg_from": "Don Baccus <dhogaza@pacifier.com>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Tue, 2002-08-13 at 18:48, Don Baccus wrote:\n> Greg Copeland wrote:\n> > On Tue, 2002-08-13 at 00:16, Curt Sampson wrote:\n> > \n...\n> \n> And yes I know he's not reading my mail and no, don't bother repeating \n> this to him, he'll just continue to ignore the point.\n\nI suspect that he will still read your (partial) comments in replies to\nyour mails and has to look the originals up in archives in case he gets\ninterested in what the other guys respond to ;)\n\n-----------------\nHannu \n",
"msg_date": "13 Aug 2002 22:28:18 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
}
] |
[
{
"msg_contents": "Fixed very stupid but important bug: mixing calls of some founctions from \ncontrib/tsearch and contrib/ltree :)\n\n-- \nTeodor Sigaev\nteodor@stack.net",
"msg_date": "Fri, 09 Aug 2002 22:45:27 +0400",
"msg_from": "Teodor Sigaev <teodor@stack.net>",
"msg_from_op": true,
"msg_subject": "Please, apply another patch to contrib/ltree"
},
{
"msg_contents": "\nYour patch has been added to the PostgreSQL unapplied patches list at:\n\n\thttp://candle.pha.pa.us/cgi-bin/pgpatches\n\nI will try to apply it within the next 48 hours.\n\n---------------------------------------------------------------------------\n\n\nTeodor Sigaev wrote:\n> Fixed very stupid but important bug: mixing calls of some founctions from \n> contrib/tsearch and contrib/ltree :)\n> \n> -- \n> Teodor Sigaev\n> teodor@stack.net\n> \n\n[ application/gzip is not supported, skipping... ]\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n> \n> http://archives.postgresql.org\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 9 Aug 2002 21:52:57 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Please, apply another patch to contrib/ltree"
},
{
"msg_contents": "\nPatch applied. Thanks.\n\n---------------------------------------------------------------------------\n\n\nTeodor Sigaev wrote:\n> Fixed very stupid but important bug: mixing calls of some founctions from \n> contrib/tsearch and contrib/ltree :)\n> \n> -- \n> Teodor Sigaev\n> teodor@stack.net\n> \n\n[ application/gzip is not supported, skipping... ]\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n> \n> http://archives.postgresql.org\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Sat, 10 Aug 2002 16:46:32 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Please, apply another patch to contrib/ltree"
}
] |
[
{
"msg_contents": "\n-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\n\n(Moved from \nRe: [PATCHES] small psql patch - show Schema name for \\dt \\dv \\dS)\n\n>> I need something other than RelationIsVisible for psql for the case \n>> when someone says \"\\d foo\" - I need to be able to decide which \n>> \"foo\" table I should display: pg_temp_1.foo, public.foo, greg.foo, \n> \n> Au contraire, RelationIsVisible is *exactly* what you need. I'm\n> envisioning that where we currently have, say,\n> \n> select ... from pg_class p, ... \n> where relname like 'foo%' and ...\n> \n> we'd write something like\n> \n> select ... from pg_class p, ... \n> where relname like 'foo%' and pg_relation_is_visible(p.oid) and ...\n> \n\nI see what you are saying, and this is fine for those cases in which the user \nhas supplied the schema, but I don't see how it solves the ordering problem. \nIf I have a table public.foo and greg.foo, and both are \"visible\", how will \npsql know which one to show? It should be showing the first in the schema \nsearch path, in other words, the one that will get effected by a SQL \nstatement such as \"SELECT * FROM foo;\" This is of course the original \ntemp table problem with psql.\n\nAt any rate, I will play with the RelationIsVisible stuff when somebody \nwrites a SQL interface to it (or I write it myself, but that will take \nquite a long time :)\n\nGreg Sabino Mullane greg@turnstep.com\nPGP Key: 0x14964AC8 200208091839\n\n-----BEGIN PGP SIGNATURE-----\nComment: http://www.turnstep.com/pgp.html\n\niD8DBQE9VESovJuQZxSWSsgRAlHXAJkBqylRDegbwhNxsYr/CPIFYvnRQQCgxC0G\nVUDWfnprg1+pcKNZvE1gEzY=\n=w7hd\n-----END PGP SIGNATURE-----\n\n\n",
"msg_date": "Fri, 9 Aug 2002 22:40:34 -0000",
"msg_from": "\"Greg Sabino Mullane\" <greg@turnstep.com>",
"msg_from_op": true,
"msg_subject": "Wanted: RelationIsVisible interface"
},
{
"msg_contents": "Greg Sabino Mullane wrote:\n> At any rate, I will play with the RelationIsVisible stuff when somebody \n> writes a SQL interface to it (or I write it myself, but that will take \n> quite a long time :)\n> \n\nLooks like Tom just committed this; see:\n\nhttp://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/catalog/namespace.c.diff?r1=1.29&r2=1.30\n\nDatum pg_table_is_visible(PG_FUNCTION_ARGS);\nDatum pg_type_is_visible(PG_FUNCTION_ARGS);\nDatum pg_function_is_visible(PG_FUNCTION_ARGS);\nDatum pg_operator_is_visible(PG_FUNCTION_ARGS);\nDatum pg_opclass_is_visible(PG_FUNCTION_ARGS);\n\nThey all accept an oid and return bool.\n\nJoe\n\n",
"msg_date": "Fri, 09 Aug 2002 15:41:33 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: Wanted: RelationIsVisible interface"
},
{
"msg_contents": "\nOK, let's get started updating all our db access routines. We only have\n22 days left until beta.\n\n---------------------------------------------------------------------------\n\nJoe Conway wrote:\n> Greg Sabino Mullane wrote:\n> > At any rate, I will play with the RelationIsVisible stuff when somebody \n> > writes a SQL interface to it (or I write it myself, but that will take \n> > quite a long time :)\n> > \n> \n> Looks like Tom just committed this; see:\n> \n> http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/catalog/namespace.c.diff?r1=1.29&r2=1.30\n> \n> Datum pg_table_is_visible(PG_FUNCTION_ARGS);\n> Datum pg_type_is_visible(PG_FUNCTION_ARGS);\n> Datum pg_function_is_visible(PG_FUNCTION_ARGS);\n> Datum pg_operator_is_visible(PG_FUNCTION_ARGS);\n> Datum pg_opclass_is_visible(PG_FUNCTION_ARGS);\n> \n> They all accept an oid and return bool.\n> \n> Joe\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 9 Aug 2002 21:56:45 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Wanted: RelationIsVisible interface"
},
{
"msg_contents": "\"Greg Sabino Mullane\" <greg@turnstep.com> writes:\n>> we'd write something like\n>> select ... from pg_class p, ... \n>> where relname like 'foo%' and pg_relation_is_visible(p.oid) and ...\n\n> I see what you are saying, and this is fine for those cases in which the user\n> has supplied the schema, but I don't see how it solves the ordering problem. \n> If I have a table public.foo and greg.foo, and both are \"visible\", how will \n> psql know which one to show?\n\nBy definition, only one can be visible: a table named \"foo\" hides any\nother \"foo\" that's later in the search path. This is exactly the point\nthat the is_visible tests cover, while there isn't any easy way to\nhandle it in SQL by comparison of a relnamespace value to a\ncurrent_schemas list --- that comparison doesn't tell you anything\nabout possible conflicting names elsewhere in the search path.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 10 Aug 2002 00:35:17 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Wanted: RelationIsVisible interface "
}
] |
[
{
"msg_contents": "Hi, We have a problem with lower() function working differently for two\ndifferent data types\n\ntable: yuva_test\ncolumn_name\tdata_type\nyt_name1\tvarchar(255)\nyt_name2\tchar(1)\n\nThe data is\nyt_name1\tyt_name2\nyuva\t\tF\nbharat\t\tF\n1234556\tF\n234\t\tF\n\netc.\n\nWhen we run the query \"select * from yuva_test\nlower(yt_name1)=lower('1234556') and lower(yt_name2)=lower('F')\" it takes\nforever to return, but if try \"select * from yuva_test yt_name1='1234556'\nand lower(yt_name2)=lower('F')\" it returns immediately.\n\nWhat is happenning here? Why lower behaving differently for varchar(255) and\nchar(1), and how to make first query to work without changing schema.\n\nThanks\nYuva\n",
"msg_date": "Fri, 9 Aug 2002 15:40:52 -0700 ",
"msg_from": "Yuva Chandolu <ychandolu@ebates.com>",
"msg_from_op": true,
"msg_subject": "Problem with lower() function"
}
] |
[
{
"msg_contents": "\n-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\n\nHere's my thoughts on the matter:\n\nMore than one period throws an error (something pleasant, mentioning \nthat we do not quite support cross-database queries yet).\n\nI'll assume we are switching to the \"explicit wildcard\" system for this. \n(I think the proposed *? wildcards are a great idea). Basically, for \nthose functions (esp. \\d) that can return a list or a single item, \nthe wildcard indicates that we want a list, and a lack of wildcard \nindicates we want a single item.\n\n\\d foo.baz Shows details about the table bar in the schema foo\n\n\\d baz Attempts to find a visible baz in the schemas, shows first \n one that matches.\n\n\\d baz* Shows all tables starting with \"baz\", in all available schemas\n\n\\d *.baz* Same as above\n\n\\d baz.* Shows all tables in the baz schema\n\n\\d foo.baz* Shows all tables starting with \"baz\" in the \"foo\" schema\n\n\\d *.baz Similar to \\d baz, but the wildcard forces all matches \n to be shown.\n\n\\d foo*.baz Shows all tables named \"baz\" in schemas staring with \"foo\"\n\n\\d *.* Same as plain old \\d (which is actually a special case now)\n\n\\d *oo. Matches all tables in schemas ending in \"oo\"\n\n\\d *oo.* Same as above - a plain * on either side of the dot is\n usually superfluous, except that it forces a list of matches.\n\n\nThe only one I have a problem with is the '\\d baz' which some may argue should \ncontinue the current behavior and return details about the first \"baz\" \ntable it encounters. On the other hand, people really need to start thinking \nabout schemas and the consequences of having more than one table named \n\"baz\". Still, typing in the schema could get tedious very quickly. Perhaps it \nshould only return a list if more than one table was found, otherwise it \nwill return information about that table.\n\nThe good thing about the above is that \\d and \\dt will actually have the \nsame functionality. The current behavior can be a bit confusing, in that \nsome functions have implicit wildcards (\\dt and friends) and some do \nnot (\\d).\n\nGreg Sabino Mullane greg@turnstep.com\nPGP Key: 0x14964AC8 200208091849\n\n-----BEGIN PGP SIGNATURE-----\nComment: http://www.turnstep.com/pgp.html\n\niD8DBQE9VEb6vJuQZxSWSsgRAsHNAKDCXz4vUY1A79EaVmfPIfcNS7VyxgCaA5Tx\nHrNmY0vITbb2G1fZFBCPgBM=\n=qhYp\n-----END PGP SIGNATURE-----\n\n\n",
"msg_date": "Fri, 9 Aug 2002 22:50:10 -0000",
"msg_from": "\"Greg Sabino Mullane\" <greg@turnstep.com>",
"msg_from_op": true,
"msg_subject": "Re: Proposal for psql wildcarding behavior w/schemas"
},
{
"msg_contents": "\"Greg Sabino Mullane\" <greg@turnstep.com> writes:\n> Here's my thoughts on the matter:\n> More than one period throws an error (something pleasant, mentioning \n> that we do not quite support cross-database queries yet).\n\nThe just-committed implementation doesn't throw an error, but silently\ndiscards name fragments to the left of the last two --- for example,\nfoo.bar.baz is silently treated as bar.baz. This could probably be\nimproved, but I haven't quite figured out how psql deals with error\nrecovery...\n\nOtherwise I agree with your comments, except for\n\n> \\d baz* Shows all tables starting with \"baz\", in all available schemas\n\nMake that \"shows visible tables whose names begin with baz\". There is\na subtle difference.\n\n> \\d *.baz* Same as above\n\nThis shows tables whose names begin with baz, in any schema in the\ndatabase --- without regard to visibility.\n\n> \\d *.* Same as plain old \\d (which is actually a special case now)\n\n\\d without an argument is still a special case: it transforms to \\dtvs\nwith no argument. Other than that little usability kluge, the general\nrule is that for any object-type x, \\dx is the same as \\dx *, which is\n*not* the same as \\dx *.* ... the former shows all visible objects, the\nlatter all objects in the database.\n\n> The current behavior can be a bit confusing, in that some functions\n> have implicit wildcards (\\dt and friends) and some do not (\\d).\n\nAs of cvs tip, all the \\d family take wildcards.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 10 Aug 2002 00:49:17 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Proposal for psql wildcarding behavior w/schemas "
}
] |
[
{
"msg_contents": "> -----Original Message-----\n> From: Joe Conway [mailto:mail@joeconway.com] \n> Sent: Friday, August 09, 2002 4:04 PM\n> To: Peter Eisentraut\n> Cc: pgsql-hackers\n> Subject: Re: [HACKERS] Proposal: stand-alone composite types\n> \n> \n> Peter Eisentraut wrote:\n> > Joe Conway writes:\n> >>3. Modify CREATE FUNCTION to allow the implicit creation of \n> a dependent\n> >> composite type, e.g.:\n> > \n> > Forgive this blunt question, but: Why?\n> \n> Now's a *great* time for a blunt question because I haven't started \n> actively working on this yet. Much better than after I'm done. ;-)\n> \n> \n> > Of course I can see the answer, it's convenient, but wouldn't the \n> > system be more consistent overall if all functions and types are \n> > declared explicitly?\n> > \n> \n> And of couse you are correct. It is almost purely convenience. My \n> reasoning was this: if I am creating a function which returns a \n> composite type, then the fact that a named composite type exists is \n> superfluous to me. It would be more natural for me to do:\n> \n> CREATE FUNCTION foo() RETURNS SETOF (f1 int, f2 text);\n> \n> than to do:\n> \n> CREATE TYPE some_arbitrary_name AS (f1 int, f2 text);\n> CREATE FUNCTION foo() RETURNS SETOF some_arbitrary_name;\n\nActually, the second looks a lot more natural to me. As in most\nprogramming languages, you define the type/class first, and then you can\nuse the type/class as an object.\n\nFurther, I don't want to have to remember the implementation details,\nunless I need to dig into them.\nSo:\n\nCREATE TYPE locator AS (First_Name varchar, Last_Name varchar, City\nvarchar, State_Province char(2), Country varchar);\n\nCREATE FUNCTION CustomerList(varchar specification) RETURNS SETOF\nlocator;\n\nSeems far more natural and convenient to me.\n",
"msg_date": "Fri, 9 Aug 2002 16:18:14 -0700",
"msg_from": "\"Dann Corbit\" <DCorbit@connx.com>",
"msg_from_op": true,
"msg_subject": "Re: Proposal: stand-alone composite types"
}
] |
[
{
"msg_contents": "Thank you, we figured out that, the query with lower() is taking too long\nand we thought it is having some problem. The actual table in our database\nhas more than 10 million rows and query is taking too long.\n\nThanks\nYuva\n\n\n-----Original Message-----\nFrom: Yuva Chandolu \nSent: Friday, August 09, 2002 3:41 PM\nTo: 'pgsql-hackers@postgresql.org'\nSubject: [HACKERS] Problem with lower() function\n\n\nHi, We have a problem with lower() function working differently for two\ndifferent data types\n\ntable: yuva_test\ncolumn_name\tdata_type\nyt_name1\tvarchar(255)\nyt_name2\tchar(1)\n\nThe data is\nyt_name1\tyt_name2\nyuva\t\tF\nbharat\t\tF\n1234556\tF\n234\t\tF\n\netc.\n\nWhen we run the query \"select * from yuva_test\nlower(yt_name1)=lower('1234556') and lower(yt_name2)=lower('F')\" it takes\nforever to return, but if try \"select * from yuva_test yt_name1='1234556'\nand lower(yt_name2)=lower('F')\" it returns immediately.\n\nWhat is happenning here? Why lower behaving differently for varchar(255) and\nchar(1), and how to make first query to work without changing schema.\n\nThanks\nYuva\n\n---------------------------(end of broadcast)---------------------------\nTIP 3: if posting/reading through Usenet, please send an appropriate\nsubscribe-nomail command to majordomo@postgresql.org so that your\nmessage can get through to the mailing list cleanly\n",
"msg_date": "Fri, 9 Aug 2002 16:49:50 -0700 ",
"msg_from": "Yuva Chandolu <ychandolu@ebates.com>",
"msg_from_op": true,
"msg_subject": "Re: Problem with lower() function"
}
] |
[
{
"msg_contents": "Hi,\n\nWe recently put up a new 7.2.1 installation on Solaris 8 that serves a\n24x7 e-commerce site. The system seems to run pretty well most of the\ntime but we see a consistent form of performance anomaly.\n\nWatching pg_stat_activity the system spends most of it's time running\nsmoothly with queries clearing through sub-second. We have a production\njob we run which immediately sent the site into a tailspin though.\nStarting that job caused hundreds of select statements to queue up in\nthe pg_stat_activity view. This seems odd since MVCC would lead us to\nbelieve that shouldn't happen. Readers shouldn't block wholesale like\nthat unless we're using DDL on the table or doing a vacuum per the\nonline docs at\nhttp://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/locking-tables.html\n\nNevertheless, turning off foreign key constraint checking via:\n\nupdate \"pg_class\" set \"reltriggers\" = 0 where \"relname\" = tablename\n\ncleared up the problem, load fell off to normal in seconds. So how is it\nthat fk contraints apparently cause what look like table-level locks?\nOr, at the very least, cause a heck of a lot of select statements to go\ninto a holding pattern for some reason?\n\n(On a side note, it seems the current locking behavior might also\nviolate the I in ACID by causing an independent delete transaction to\nactually \"see\" or be affected by the content of the transaction using FK\nconstraint locking before it's clear that the transaction will commit).\n\nAt any rate, being somewhat new to tuning at this load level for PG I'm\nnot sure if I'm supposed to be tinkering with max_lock_per_transaction\nhere. Could this be evidence of a lock starvation issue or something?\nGuessing here and any input would be appreciated. Thanks in advance!\n\n\nss\n\n\n\n",
"msg_date": "09 Aug 2002 17:59:31 -0600",
"msg_from": "Scott Shattuck <ss@technicalpursuit.com>",
"msg_from_op": true,
"msg_subject": "strange performance anomalies"
},
{
"msg_contents": "On 9 Aug 2002, Scott Shattuck wrote:\n\n> Hi,\n> \n> We recently put up a new 7.2.1 installation on Solaris 8 that serves a\n> 24x7 e-commerce site. The system seems to run pretty well most of the\n> time but we see a consistent form of performance anomaly.\n> \n> Watching pg_stat_activity the system spends most of it's time running\n> smoothly with queries clearing through sub-second. We have a production\n> job we run which immediately sent the site into a tailspin though.\n> Starting that job caused hundreds of select statements to queue up in\n> the pg_stat_activity view. This seems odd since MVCC would lead us to\n> believe that shouldn't happen. Readers shouldn't block wholesale like\n> that unless we're using DDL on the table or doing a vacuum per the\n> online docs at\n> http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/locking-tables.html\n> \n> Nevertheless, turning off foreign key constraint checking via:\n> \n> update \"pg_class\" set \"reltriggers\" = 0 where \"relname\" = tablename\n> \n> cleared up the problem, load fell off to normal in seconds. So how is it\n> that fk contraints apparently cause what look like table-level locks?\n> Or, at the very least, cause a heck of a lot of select statements to go\n> into a holding pattern for some reason?\n\nIf you insert/update a row which contains foreign keys then PostgreSQL\nwill do a SELECT ... FOR UPDATE on the appropriate row in the primary key\ntable. This will block any SELECT ... FOR UPDATE, UPDATE or DELETE\nstatements affecting that row - including other foreign key checks. A\ncommonly referenced primary key value can become the subject of quite a\nlot of lock contention; not to mention deadlocks.\n\nPostgreSQL will do this for EVERY field in the row which is being modified\nwhich has a foreign key constraint (unless that field is NULL). It will\nperform this check even if that field is not being changed.\n\n> At any rate, being somewhat new to tuning at this load level for PG I'm\n> not sure if I'm supposed to be tinkering with max_lock_per_transaction\n> here. Could this be evidence of a lock starvation issue or something?\n> Guessing here and any input would be appreciated. Thanks in advance!\n\nYou might be best off just turning off the foreign key checks on your\nproduction server (or, at least, some of them) until someone gets round to\ncoming up with some sort of fix for PostgreSQL.\n\n",
"msg_date": "Sat, 10 Aug 2002 21:39:40 +0100 (BST)",
"msg_from": "Alex Hayward <xelah@xelah.com>",
"msg_from_op": false,
"msg_subject": "Re: strange performance anomalies"
}
] |
[
{
"msg_contents": "I intend to make 'serial' and 'serial8' domains of the int4 and int8\ndatatypes. Now they're regular types and columns in \\d will be marked\nas such. This leaves analyze.c to create the defaults but no longer\nwill it be doing any datatype conversions.\n\npg_dump and psql will be taught to ignore the default of 'serial' and\n'serial8' datatypes. Perhaps a 'system_generated' flag on pg_attrdef\nwould be more appropriate?\n\nWe'd also be going with the assumption in pg_dump that a sequence name\nwill be generated the same way in future versions (see prior discussion\nin hackers).\n\n",
"msg_date": "10 Aug 2002 16:51:24 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "Dump serials as serial"
}
] |
[
{
"msg_contents": "P src/interfaces/libpqxx/configure.ac\ncvs server: Updating src/interfaces/libpqxx/config\nU src/interfaces/libpqxx/config/.cvsignore\ncvs server: Updating src/interfaces/libpqxx/debian\ncvs server: failed to create lock directory for\n`/projects/cvsroot/interfaces/libpqxx/debian'\n(/projects/cvsroot/interfaces/libpqxx/debian/#cvs.lock): Permission\ndenied\ncvs server: failed to obtain dir lock in repository\n`/projects/cvsroot/interfaces/libpqxx/debian'\ncvs [server aborted]: read lock failed - giving up\n\n\n\n\n",
"msg_date": "10 Aug 2002 18:05:27 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "AnonCVS woes"
},
{
"msg_contents": "On Sat, Aug 10, 2002 at 06:05:27PM -0400, Rod Taylor wrote:\n> P src/interfaces/libpqxx/configure.ac\n> cvs server: Updating src/interfaces/libpqxx/config\n> U src/interfaces/libpqxx/config/.cvsignore\n> cvs server: Updating src/interfaces/libpqxx/debian\n> cvs server: failed to create lock directory for\n> `/projects/cvsroot/interfaces/libpqxx/debian'\n> (/projects/cvsroot/interfaces/libpqxx/debian/#cvs.lock): Permission\n> denied\n> cvs server: failed to obtain dir lock in repository\n> `/projects/cvsroot/interfaces/libpqxx/debian'\n> cvs [server aborted]: read lock failed - giving up\n\nI only just added that directory, so chances are you were trying to\ncheck it out while I was committing it.\n\nCould you try again?\n\n\nJeroen\n\n",
"msg_date": "Sun, 11 Aug 2002 00:18:14 +0200",
"msg_from": "\"Jeroen T. Vermeulen\" <jtv@xs4all.nl>",
"msg_from_op": false,
"msg_subject": "Re: AnonCVS woes"
},
{
"msg_contents": "> > (/projects/cvsroot/interfaces/libpqxx/debian/#cvs.lock): Permission\n> > denied\n> > cvs server: failed to obtain dir lock in repository\n> > `/projects/cvsroot/interfaces/libpqxx/debian'\n> > cvs [server aborted]: read lock failed - giving up\n> \n> I only just added that directory, so chances are you were trying to\n> check it out while I was committing it.\n> \n> Could you try again?\n\nFigured as much. But it would appear that this file isn't being blown\naway from the anoncvs server. Marc is probably using rsync without\n--delete.\n\n\n",
"msg_date": "10 Aug 2002 18:33:42 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "Re: AnonCVS woes"
}
] |
[
{
"msg_contents": "Attached is a basic patch implementing create or replace trigger. It\npasses all regression tests.\n\nGavin",
"msg_date": "Sun, 11 Aug 2002 19:06:50 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": true,
"msg_subject": "CREATE OR REPLACE TRIGGER"
},
{
"msg_contents": "Gavin Sherry <swm@linuxworld.com.au> writes:\n> Attached is a basic patch implementing create or replace trigger.\n\nWhy would we need that, given that we now have CREATE OR REPLACE\nFUNCTION? It's not like anything could depend on a trigger\n(other than FK constraints, and I don't think I want people replacing\ntrigger definitions that are part of an FK constraint...)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 11 Aug 2002 11:01:16 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: CREATE OR REPLACE TRIGGER "
},
{
"msg_contents": "On Sun, 11 Aug 2002, Tom Lane wrote:\n\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > Attached is a basic patch implementing create or replace trigger.\n> \n> Why would we need that, given that we now have CREATE OR REPLACE\n> FUNCTION? It's not like anything could depend on a trigger\n> (other than FK constraints, and I don't think I want people replacing\n> trigger definitions that are part of an FK constraint...)\n\nI thought it conceivable that one may want to point the trigger at a\ndifferent function, change BEFORE or AFTER, or change the event(s) upon\nwhich the trigger fires.\n\nGavin\n\n",
"msg_date": "Mon, 12 Aug 2002 01:09:58 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": true,
"msg_subject": "Re: CREATE OR REPLACE TRIGGER "
},
{
"msg_contents": "Gavin Sherry <swm@linuxworld.com.au> writes:\n> On Sun, 11 Aug 2002, Tom Lane wrote:\n>> Why would we need that, given that we now have CREATE OR REPLACE\n>> FUNCTION? It's not like anything could depend on a trigger\n>> (other than FK constraints, and I don't think I want people replacing\n>> trigger definitions that are part of an FK constraint...)\n\n> I thought it conceivable that one may want to point the trigger at a\n> different function, change BEFORE or AFTER, or change the event(s) upon\n> which the trigger fires.\n\nBut there is no reason you can't just drop and recreate the trigger\nto do those things.\n\nGiven the lack of popular demand (I don't think I've yet heard anyone\nask for this feature), I can't get excited about expending code bulk\nand complexity on it --- the patch seems to make CreateTrigger\nsignificantly messier, and that will cost us in maintenance effort\ndown the road.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 11 Aug 2002 11:27:39 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: CREATE OR REPLACE TRIGGER "
},
{
"msg_contents": "On Sun, 11 Aug 2002, Tom Lane wrote:\n\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > On Sun, 11 Aug 2002, Tom Lane wrote:\n> >> Why would we need that, given that we now have CREATE OR REPLACE\n> >> FUNCTION? It's not like anything could depend on a trigger\n> >> (other than FK constraints, and I don't think I want people replacing\n> >> trigger definitions that are part of an FK constraint...)\n> \n> > I thought it conceivable that one may want to point the trigger at a\n> > different function, change BEFORE or AFTER, or change the event(s) upon\n> > which the trigger fires.\n> \n\n\n> Given the lack of popular demand (I don't think I've yet heard anyone\n> ask for this feature), I can't get excited about expending code bulk\n> and complexity on it --- the patch seems to make CreateTrigger\n> significantly messier, and that will cost us in maintenance effort\n> down the road.\n\n From memory, I think some of the pgadmin guys jumped up and down about it\nfor a while: http://fts.postgresql.org/db/mw/msg.html?mid=1353289.\n\nGavin\n\n\n",
"msg_date": "Mon, 12 Aug 2002 01:39:14 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": true,
"msg_subject": "Re: CREATE OR REPLACE TRIGGER "
},
{
"msg_contents": "Gavin Sherry <swm@linuxworld.com.au> writes:\n> From memory, I think some of the pgadmin guys jumped up and down about it\n> for a while: http://fts.postgresql.org/db/mw/msg.html?mid=1353289.\n\nHmm. I remember Poure asking repeatedly for CREATE OR REPLACE VIEW,\nand that makes a lot of sense to me, because other things *can* depend\non a view. (Unfortunately, by the same token it's a lot harder to do.)\nThe use-case for replacing a trigger is not visible to the naked eye.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 11 Aug 2002 11:53:47 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: CREATE OR REPLACE TRIGGER "
},
{
"msg_contents": "On Sun, 11 Aug 2002, Tom Lane wrote:\n\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > From memory, I think some of the pgadmin guys jumped up and down about it\n> > for a while: http://fts.postgresql.org/db/mw/msg.html?mid=1353289.\n> \n> Hmm. I remember Poure asking repeatedly for CREATE OR REPLACE VIEW,\n> and that makes a lot of sense to me, because other things *can* depend\n> on a view. (Unfortunately, by the same token it's a lot harder to do.)\n\nI know. I am finishing off the patch now.\n\n> The use-case for replacing a trigger is not visible to the naked eye.\n\nThat's okay then. I should have thought about it harder.\n\nGavin\n\n",
"msg_date": "Mon, 12 Aug 2002 02:00:55 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": true,
"msg_subject": "Re: CREATE OR REPLACE TRIGGER "
},
{
"msg_contents": "Le Dimanche 11 Août 2002 17:53, Tom Lane a écrit :\n> Hmm. I remember Poure asking repeatedly for CREATE OR REPLACE VIEW,\n> and that makes a lot of sense to me, because other things *can* depend\n> on a view. (Unfortunately, by the same token it's a lot harder to do.)\n> The use-case for replacing a trigger is not visible to the naked eye.\n\nDear Tom,\n\nReplacing a trigger is interesting, for several reasons:\n- you may need to temporary disable a trigger. In pgAdmin2, you may move the \nview to a temporary table. This can be done by other means, but none is \nstandard. By the way, a DISSABLE TRIGGER would be usefull.\n- you may need to choose another function or change events.\n- systems with server-side code need to be UPGRADED. Look at Compiere for \nexample. When the database schema evolves, a scripts shall be able to run \nserver-side and upgrade the database safely.\n- newbees like to play around just as if they were in Access, Excel or MySQL. \nIn pgAdmin2, the graphical presentation enables them to create, move, alter \nand delete objects. This is very important for someone who learns databases. \nLearning becomes a game.\n\nInside PostgreSQL backend, I see no reason why this should not be done by a \nDROP/CREATE.\n\nLast of all, if all objects could be REPLACED or ALTERED inside PostgreSQL, it \nwould become interesting to create automatic Diff between revisions of a \nschema. Then, PostgreSQL itself sould be able to write the upgrade script. \nWhat do you think of this advanced feature?\n\nDo you think it is possible to store schema dumps inside postgreSQL and \ngenerate upgrade scripts between revisions?\n\nCheers,\nJean-Michel\n",
"msg_date": "Tue, 13 Aug 2002 12:10:12 +0200",
"msg_from": "Jean-Michel POURE <jm.poure@freesurf.fr>",
"msg_from_op": false,
"msg_subject": "Re: CREATE OR REPLACE TRIGGER"
}
] |
[
{
"msg_contents": "We still haven't really decided what to do about libpqxx. The only\nargument I've heard so far against distributing it separately is that it\nwould induce users to use libpq++ instead. I think having both libraries\nin the distribution is going to be even more confusing, especially since\none is \"old and well-tested\" and one is brand new.\n\nThe problem I see now is that libpqxx has a completely different build\nsystem and documentation system. This is also not going to help users\nfind and use it and it's also going to be a maintenance headache. I don't\nnecessarily want libpqxx to change it, but I feel it would be better off\nmaintained separately. I wouldn't mind if we package libpq++ separately\nas well and tell users that we have these two libraries and they can pick\none. And before someone suggests an --enable-libpqxx option: That's not\nthe solution to these problems, it's only a way to hide them.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Sun, 11 Aug 2002 19:58:56 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": true,
"msg_subject": "libpqxx"
},
{
"msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> The problem I see now is that libpqxx has a completely different build\n> system and documentation system.\n\nUnless someone's going to do the work to integrate libpqxx into our\nbuild/documentation system, I have to agree with Peter: it should not\nbe part of our core distribution.\n\nSince Marc's been moaning about bloat, I'm sure he'll vote for pulling\nboth libpq++ and libpqxx from the core distro and making them separate\npackages. This would be okay with me.\n\nHowever: making libpq++ buildable standalone would take some work too.\nAny way you slice it, we need some work here... any volunteers?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 11 Aug 2002 15:21:04 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: libpqxx "
},
{
"msg_contents": "On Sun, 11 Aug 2002, Tom Lane wrote:\n\n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > The problem I see now is that libpqxx has a completely different build\n> > system and documentation system.\n>\n> Unless someone's going to do the work to integrate libpqxx into our\n> build/documentation system, I have to agree with Peter: it should not\n> be part of our core distribution.\n\nFor this, all I've been waiting for is for J to get the standalone to\nbuild and then going to dive into that ...\n\n> Since Marc's been moaning about bloat, I'm sure he'll vote for pulling\n> both libpq++ and libpqxx from the core distro and making them separate\n> packages. This would be okay with me.\n\nOkay, but if we are going to pull libpqxx, what about the other lib's too?\n\n> However: making libpq++ buildable standalone would take some work too.\n> Any way you slice it, we need some work here... any volunteers?\n\n\n",
"msg_date": "Mon, 12 Aug 2002 16:44:12 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: libpqxx "
},
{
"msg_contents": "On Mon, Aug 12, 2002 at 04:44:12PM -0300, Marc G. Fournier wrote:\n\n> For this, all I've been waiting for is for J to get the standalone to\n> build and then going to dive into that ...\n \nI added Ray's changes a few days back, which may help. My handicap is\nthat I appear to be on a newer version of libtoolize than you are, which\nis where Marc's build appears to fail, so obviously it just builds on my \nsystem like it did all along.\n\nSo, any luck with the version currently in CVS?\n\n\nJeroen\n\n",
"msg_date": "Mon, 12 Aug 2002 21:59:37 +0200",
"msg_from": "\"Jeroen T. Vermeulen\" <jtv@xs4all.nl>",
"msg_from_op": false,
"msg_subject": "Re: libpqxx"
},
{
"msg_contents": "Marc G. Fournier writes:\n\n> Okay, but if we are going to pull libpqxx, what about the other lib's too?\n\nCertain things apply to libpqxx that don't all apply to the others libs:\nIt is maintained and developed independently anyway. It's new and not\nintegrated yet. It's a different programming language. It's a\nnon-standard interface. It's big.\n\nIf there is ever going to be any motion toward separating parts of the\nsource tree, libpqxx has to be the start.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Tue, 13 Aug 2002 19:18:32 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": true,
"msg_subject": "Re: libpqxx "
},
{
"msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Marc G. Fournier writes:\n>> Okay, but if we are going to pull libpqxx, what about the other lib's too?\n\n> Certain things apply to libpqxx that don't all apply to the others libs:\n> It is maintained and developed independently anyway. It's new and not\n> integrated yet. It's a different programming language. It's a\n> non-standard interface. It's big.\n\n> If there is ever going to be any motion toward separating parts of the\n> source tree, libpqxx has to be the start.\n\nI agree with Peter's points here --- but separating libpqxx alone isn't\nthe right answer. We need to pull both libpqxx and libpq++ at the same\ntime, else we'll be creating the wrong impression about what we think of\nlibpqxx.\n\nAnother thing that would be reasonable to separate out in the near term\nis interfaces/perl5, which is not favored over the DBI driver.\n\nJDBC and ODBC are almost separate projects already, and perhaps should\nbe cut loose so they can have their own release cycles. I'd defer to\nthe maintainers of those interfaces about what they want to do, though.\n\nI'm not particularly concerned about removing the other interfaces such\nas libpgtcl and python. They're not large and they're (AFAIK) the only\nalternatives for their languages.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 13:23:53 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: libpqxx "
},
{
"msg_contents": "On Tue, 13 Aug 2002, Tom Lane wrote:\n\n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > Marc G. Fournier writes:\n> >> Okay, but if we are going to pull libpqxx, what about the other lib's too?\n>\n> > Certain things apply to libpqxx that don't all apply to the others libs:\n> > It is maintained and developed independently anyway. It's new and not\n> > integrated yet. It's a different programming language. It's a\n> > non-standard interface. It's big.\n>\n> > If there is ever going to be any motion toward separating parts of the\n> > source tree, libpqxx has to be the start.\n>\n> I agree with Peter's points here --- but separating libpqxx alone isn't\n> the right answer. We need to pull both libpqxx and libpq++ at the same\n> time, else we'll be creating the wrong impression about what we think of\n> libpqxx.\n>\n> Another thing that would be reasonable to separate out in the near term\n> is interfaces/perl5, which is not favored over the DBI driver.\n>\n> JDBC and ODBC are almost separate projects already, and perhaps should\n> be cut loose so they can have their own release cycles. I'd defer to\n> the maintainers of those interfaces about what they want to do, though.\n>\n> I'm not particularly concerned about removing the other interfaces such\n> as libpgtcl and python. They're not large and they're (AFAIK) the only\n> alternatives for their languages.\n\ngod, ppl finally catch up *roll eyes*\n\nas for libpgtcl and python ... python is seperately maintained by D'Arcy\nCain, so that one isn't a problem ... but who is maintaining libpgtcl?\nlibpq++ was \"the only alternatives for their language\" until libpqxx came\nalong, and from talking to J, libpqxx started off as an attempt to \"fix\nthe bugs\" in libpq++ that turned out to be so numerous that starting from\nscratch was easier ...\n\nBasically, if somethign doesn't have a maintainer, we're promoting\nsomething we shouldn't be in the first place ...\n\n",
"msg_date": "Tue, 13 Aug 2002 21:55:39 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: libpqxx "
}
] |
[
{
"msg_contents": "Appears there is a problem finding the opclass when indexing a domain.\n\nCREATE DOMAIN newint as int4;\nCREATE TABLE tab (col newint unique);\nERROR: data type newint has no default operator class for access method\n\"btree\"\n\tYou must specify an operator class for the index or define a\n\tdefault operator class for the data type\n\n\nSpecifically, GetDefaultOpClass() finds 0 exact matches and 3 binary\ncompatible matches. Fetching getBaseType() of the attribute fixes the\nproblem for domains (see attachment).\n\nHowever, I have to wonder why GetDefaultOpClass doesn't simply use the\nfirst Binary Compatible opclass. When there is more than one usable it\ndoesn't do anything useful.",
"msg_date": "11 Aug 2002 17:15:47 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "Domains and Indexes"
},
{
"msg_contents": "Rod Taylor <rbt@zort.ca> writes:\n> However, I have to wonder why GetDefaultOpClass doesn't simply use the\n> first Binary Compatible opclass.\n\nBecause that would completely destroy the point of having multiple\nopclasses for a datatype: you'd only do so if they *act different*.\nTherefore, having the system choose one at random is a Bad Idea(tm).\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 11 Aug 2002 17:32:15 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Domains and Indexes "
},
{
"msg_contents": "\nYour patch has been added to the PostgreSQL unapplied patches list at:\n\n\thttp://candle.pha.pa.us/cgi-bin/pgpatches\n\nI will try to apply it within the next 48 hours.\n\n---------------------------------------------------------------------------\n\n\nRod Taylor wrote:\n> Appears there is a problem finding the opclass when indexing a domain.\n> \n> CREATE DOMAIN newint as int4;\n> CREATE TABLE tab (col newint unique);\n> ERROR: data type newint has no default operator class for access method\n> \"btree\"\n> \tYou must specify an operator class for the index or define a\n> \tdefault operator class for the data type\n> \n> \n> Specifically, GetDefaultOpClass() finds 0 exact matches and 3 binary\n> compatible matches. Fetching getBaseType() of the attribute fixes the\n> problem for domains (see attachment).\n> \n> However, I have to wonder why GetDefaultOpClass doesn't simply use the\n> first Binary Compatible opclass. When there is more than one usable it\n> doesn't do anything useful.\n> \n> \n\n[ Attachment, skipping... ]\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 01:29:35 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Domains and Indexes"
},
{
"msg_contents": "Sorry Bruce, this was included as a part of the patch of the below\nsubject:\n\nRe: [PATCHES] Dump serials as serial -- not a sequence\n\n\nPatch may be smart enough to say 'already applied'.\n\n\nOn Wed, 2002-08-14 at 01:29, Bruce Momjian wrote:\n> \n> Your patch has been added to the PostgreSQL unapplied patches list at:\n> \n> \thttp://candle.pha.pa.us/cgi-bin/pgpatches\n> \n> I will try to apply it within the next 48 hours.\n> \n> ---------------------------------------------------------------------------\n> \n> \n> Rod Taylor wrote:\n> > Appears there is a problem finding the opclass when indexing a domain.\n> > \n> > CREATE DOMAIN newint as int4;\n> > CREATE TABLE tab (col newint unique);\n> > ERROR: data type newint has no default operator class for access method\n> > \"btree\"\n> > \tYou must specify an operator class for the index or define a\n> > \tdefault operator class for the data type\n> > \n> > \n> > Specifically, GetDefaultOpClass() finds 0 exact matches and 3 binary\n> > compatible matches. Fetching getBaseType() of the attribute fixes the\n> > problem for domains (see attachment).\n> > \n> > However, I have to wonder why GetDefaultOpClass doesn't simply use the\n> > first Binary Compatible opclass. When there is more than one usable it\n> > doesn't do anything useful.\n> > \n> > \n> \n> [ Attachment, skipping... ]\n> \n> > \n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 4: Don't 'kill -9' the postmaster\n> \n> -- \n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (610) 359-1001\n> + If your life is a hard drive, | 13 Roberts Road\n> + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n> \n> http://archives.postgresql.org\n> \n\n\n",
"msg_date": "14 Aug 2002 07:55:52 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "Re: Domains and Indexes"
},
{
"msg_contents": "\nThanks. I will keep it in the queue for CVS commit message sake.\n\n---------------------------------------------------------------------------\n\nRod Taylor wrote:\n> Sorry Bruce, this was included as a part of the patch of the below\n> subject:\n> \n> Re: [PATCHES] Dump serials as serial -- not a sequence\n> \n> \n> Patch may be smart enough to say 'already applied'.\n> \n> \n> On Wed, 2002-08-14 at 01:29, Bruce Momjian wrote:\n> > \n> > Your patch has been added to the PostgreSQL unapplied patches list at:\n> > \n> > \thttp://candle.pha.pa.us/cgi-bin/pgpatches\n> > \n> > I will try to apply it within the next 48 hours.\n> > \n> > ---------------------------------------------------------------------------\n> > \n> > \n> > Rod Taylor wrote:\n> > > Appears there is a problem finding the opclass when indexing a domain.\n> > > \n> > > CREATE DOMAIN newint as int4;\n> > > CREATE TABLE tab (col newint unique);\n> > > ERROR: data type newint has no default operator class for access method\n> > > \"btree\"\n> > > \tYou must specify an operator class for the index or define a\n> > > \tdefault operator class for the data type\n> > > \n> > > \n> > > Specifically, GetDefaultOpClass() finds 0 exact matches and 3 binary\n> > > compatible matches. Fetching getBaseType() of the attribute fixes the\n> > > problem for domains (see attachment).\n> > > \n> > > However, I have to wonder why GetDefaultOpClass doesn't simply use the\n> > > first Binary Compatible opclass. When there is more than one usable it\n> > > doesn't do anything useful.\n> > > \n> > > \n> > \n> > [ Attachment, skipping... ]\n> > \n> > > \n> > > ---------------------------(end of broadcast)---------------------------\n> > > TIP 4: Don't 'kill -9' the postmaster\n> > \n> > -- \n> > Bruce Momjian | http://candle.pha.pa.us\n> > pgman@candle.pha.pa.us | (610) 359-1001\n> > + If your life is a hard drive, | 13 Roberts Road\n> > + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n> > \n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 6: Have you searched our list archives?\n> > \n> > http://archives.postgresql.org\n> > \n> \n> \n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 13:38:59 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Domains and Indexes"
},
{
"msg_contents": "\nYour patch has been added to the PostgreSQL unapplied patches list at:\n\n\thttp://candle.pha.pa.us/cgi-bin/pgpatches\n\nI will try to apply it within the next 48 hours.\n\n---------------------------------------------------------------------------\n\n\nRod Taylor wrote:\n> Appears there is a problem finding the opclass when indexing a domain.\n> \n> CREATE DOMAIN newint as int4;\n> CREATE TABLE tab (col newint unique);\n> ERROR: data type newint has no default operator class for access method\n> \"btree\"\n> \tYou must specify an operator class for the index or define a\n> \tdefault operator class for the data type\n> \n> \n> Specifically, GetDefaultOpClass() finds 0 exact matches and 3 binary\n> compatible matches. Fetching getBaseType() of the attribute fixes the\n> problem for domains (see attachment).\n> \n> However, I have to wonder why GetDefaultOpClass doesn't simply use the\n> first Binary Compatible opclass. When there is more than one usable it\n> doesn't do anything useful.\n> \n> \n\n[ Attachment, skipping... ]\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 22:53:46 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Domains and Indexes"
},
{
"msg_contents": "\n[ Sorry for previous message saying it was added to queue.]\n\nPatch applied. Thanks.\n\n---------------------------------------------------------------------------\n\n\nRod Taylor wrote:\n> Appears there is a problem finding the opclass when indexing a domain.\n> \n> CREATE DOMAIN newint as int4;\n> CREATE TABLE tab (col newint unique);\n> ERROR: data type newint has no default operator class for access method\n> \"btree\"\n> \tYou must specify an operator class for the index or define a\n> \tdefault operator class for the data type\n> \n> \n> Specifically, GetDefaultOpClass() finds 0 exact matches and 3 binary\n> compatible matches. Fetching getBaseType() of the attribute fixes the\n> problem for domains (see attachment).\n> \n> However, I have to wonder why GetDefaultOpClass doesn't simply use the\n> first Binary Compatible opclass. When there is more than one usable it\n> doesn't do anything useful.\n> \n> \n\n[ Attachment, skipping... ]\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 22:54:05 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Domains and Indexes"
},
{
"msg_contents": "\nI backed this out. It is part of a later patch still in the queue.\n\n---------------------------------------------------------------------------\n\nBruce Momjian wrote:\n> \n> [ Sorry for previous message saying it was added to queue.]\n> \n> Patch applied. Thanks.\n> \n> ---------------------------------------------------------------------------\n> \n> \n> Rod Taylor wrote:\n> > Appears there is a problem finding the opclass when indexing a domain.\n> > \n> > CREATE DOMAIN newint as int4;\n> > CREATE TABLE tab (col newint unique);\n> > ERROR: data type newint has no default operator class for access method\n> > \"btree\"\n> > \tYou must specify an operator class for the index or define a\n> > \tdefault operator class for the data type\n> > \n> > \n> > Specifically, GetDefaultOpClass() finds 0 exact matches and 3 binary\n> > compatible matches. Fetching getBaseType() of the attribute fixes the\n> > problem for domains (see attachment).\n> > \n> > However, I have to wonder why GetDefaultOpClass doesn't simply use the\n> > first Binary Compatible opclass. When there is more than one usable it\n> > doesn't do anything useful.\n> > \n> > \n> \n> [ Attachment, skipping... ]\n> \n> > \n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 4: Don't 'kill -9' the postmaster\n> \n> -- \n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (610) 359-1001\n> + If your life is a hard drive, | 13 Roberts Road\n> + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 23:04:09 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Domains and Indexes"
}
] |
[
{
"msg_contents": "CVSROOT:\t/cvsroot\nModule name:\tpgsql-server\nChanges by:\ttgl@postgresql.org\t02/08/11 17:17:35\n\nModified files:\n\tdoc/src/sgml : release.sgml \n\tsrc/backend/catalog: heap.c index.c pg_depend.c \n\tsrc/backend/commands: cluster.c \n\tsrc/backend/storage/buffer: bufmgr.c \n\tsrc/backend/utils/cache: relcache.c \n\tsrc/include/catalog: dependency.h \n\tsrc/include/storage: bufmgr.h \n\tsrc/include/utils: rel.h \n\tsrc/test/regress/sql: cluster.sql \n\tsrc/test/regress/expected: cluster.out \n\nLog message:\n\tCode review of CLUSTER patch. Clean up problems with relcache getting\n\tconfused, toasted data getting lost, etc.\n\n",
"msg_date": "Sun, 11 Aug 2002 17:17:35 -0400 (EDT)",
"msg_from": "tgl@postgresql.org (Tom Lane)",
"msg_from_op": true,
"msg_subject": "pgsql-server/ oc/src/sgml/release.sgml rc/back ..."
},
{
"msg_contents": "Tom Lane dijo: \n\n> CVSROOT:\t/cvsroot\n> Module name:\tpgsql-server\n> Changes by:\ttgl@postgresql.org\t02/08/11 17:17:35\n> \n> Log message:\n> \tCode review of CLUSTER patch. Clean up problems with relcache getting\n> \tconfused, toasted data getting lost, etc.\n\nWhoa. That's a whole lot of code review. Thank you again. I couldn't\nhave done all that. As Christopher said some time ago, it's humbling to\nsee how much work was still needed.\n\n-- \nAlvaro Herrera (<alvherre[a]atentus.com>)\n\"La primera ley de las demostraciones en vivo es: no trate de usar el sistema.\nEscriba un gui�n que no toque nada para no causar da�os.\" (Jakob Nielsen)\n\n",
"msg_date": "Sun, 11 Aug 2002 19:05:07 -0400 (CLT)",
"msg_from": "Alvaro Herrera <alvherre@atentus.com>",
"msg_from_op": false,
"msg_subject": "Re: [COMMITTERS] pgsql-server/ oc/src/sgml/release.sgml rc/back ..."
}
] |
[
{
"msg_contents": "Hi everyone,\n\nWhilst looking around for some more PostgreSQL related stuff, this\nmessage turned up:\n\nhttp://mail.wirex.com/pipermail/sardonix/2002-February/000051.html\n\nThe interesting bit is in an email messages included about halfway\ndown. It speaks of Bad Things in the PostgreSQL source code and of\nPostgreSQL needing an audit.\n\nAny idea if the things mentioned in this are true?\n\n:-)\n\nRegards and best wishes,\n\nJustin Clift\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n",
"msg_date": "Mon, 12 Aug 2002 13:36:55 +1000",
"msg_from": "Justin Clift <justin@postgresql.org>",
"msg_from_op": true,
"msg_subject": "Interesting message about printf()'s in PostgreSQL"
},
{
"msg_contents": "Justin Clift <justin@postgresql.org> writes:\n> Whilst looking around for some more PostgreSQL related stuff, this\n> message turned up:\n> http://mail.wirex.com/pipermail/sardonix/2002-February/000051.html\n\nI see one unsubstantiated allegation about PG intermixed with a ton\nof content-free navel-gazing. Don't waste my time.\n\nThere was some considerable effort awhile back towards eliminating\nunsafe printfs in favor of snprintfs and similar constructs; I doubt\nthat the comments in that message postdate that effort.\n\nI have no doubt that some problems remain (cf recent agonizing over\nwhether there is a buffer overrun problem in the date parser) ...\nbut unspecific rumors don't help anyone. As always, the best form of\ncriticism is a diff -c patch.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 12 Aug 2002 00:05:36 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Interesting message about printf()'s in PostgreSQL "
},
{
"msg_contents": "On Mon, 12 Aug 2002, Justin Clift wrote:\n\n> Hi everyone,\n> \n> Whilst looking around for some more PostgreSQL related stuff, this\n> message turned up:\n> \n> http://mail.wirex.com/pipermail/sardonix/2002-February/000051.html\n> \n> The interesting bit is in an email messages included about halfway\n> down. It speaks of Bad Things in the PostgreSQL source code and of\n> PostgreSQL needing an audit.\n\nChristoper's point about University access to postgres and possible\nsecurity/DoS problems is a good one. A thorough security audit of\nPostgreSQL would be a very good idea. Naturally, the biggest problems are\nthat it is very time consuming to do an audit, just about all parts of the\ncode need to be reviewed and it yields few exciting results.\n\nPerhaps Red Hat or another commercial entity would be interested in\nhelping out given that the commercial space is beginning to be dominated\nby security rhetoric?\n\nGavin\n\n",
"msg_date": "Mon, 12 Aug 2002 14:10:05 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": false,
"msg_subject": "Re: Interesting message about printf()'s in PostgreSQL"
},
{
"msg_contents": "> I see one unsubstantiated allegation about PG intermixed with a ton\n> of content-free navel-gazing. Don't waste my time.\n\nFor instance, when I submitted patches for fulltextindex 7.2 it freely used\nunchecked sprintf's everywhere. Even now I'm not sure what'll happen if a\nmalicious user really tried to crash it. Anyway, who cares about printfs\nwhen stuff like select cash_out(2) is documented?\n\n> I have no doubt that some problems remain (cf recent agonizing over\n> whether there is a buffer overrun problem in the date parser) ...\n> but unspecific rumors don't help anyone. As always, the best form of\n> criticism is a diff -c patch.\n\nMaybe we could form a bunch of people on this list interested in checking\nfor security issues and fixing them. I'd be in, time be willing...\n\nChris\n\n",
"msg_date": "Mon, 12 Aug 2002 12:16:55 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: Interesting message about printf()'s in PostgreSQL "
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> ... Anyway, who cares about printfs\n> when stuff like select cash_out(2) is documented?\n\nWell, they're two different issues. The cash_out problem is\nintrinsically difficult to fix, and *will* break user-defined datatypes\nwhen we fix it --- so I'm not eager to rush in a half-baked fix.\nOTOH, sprintf overruns are usually localized fixes, and there's no\nexcuse for letting one go once we've identified it.\n\nI've just finished a quick grep through the backend sources for\n\"sprintf\", and identified the following files as containing possible\nproblems:\nsrc/backend/port/dynloader/freebsd.c\nsrc/backend/port/dynloader/netbsd.c\nsrc/backend/port/dynloader/nextstep.c\nsrc/backend/port/dynloader/openbsd.c\nsrc/include/libpq/pqcomm.h\nsrc/pl/plpgsql/src/pl_comp.c\n\nWill work on these. There are a lot of sprintf's in contrib/ as well;\nanyone care to eyeball those? Anyone want to look for other trouble spots?\n\nBTW, one should distinguish \"an already-authorized user is able to force\na database restart\" from more dire conditions such as \"any random\ncracker can get root on your box\". I'm getting fairly tired of\nchicken-little warnings from people who should know better.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 12 Aug 2002 00:54:09 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Interesting message about printf()'s in PostgreSQL "
},
{
"msg_contents": "> I've just finished a quick grep through the backend sources for\n> \"sprintf\", and identified the following files as containing possible\n> problems:\n> src/backend/port/dynloader/freebsd.c\n\nThis one is perhaps dodgy. You ahve this:\n\nstatic char error_message[BUFSIZ];\n\nThen you have this:\n\n sprintf(error_message, \"dlopen (%s) not supported\", file);\n\nWhere file isn't restricted in length I think...\n\nSo does that mean if you go:\n\nCREATE FUNCTION blah AS '/home/chriskl/[90000 characters here].so' LANGUAGE\n'C';\n\nSort of thing you could crash it?\n\nChris\n\n",
"msg_date": "Mon, 12 Aug 2002 14:31:34 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: Interesting message about printf()'s in PostgreSQL "
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n>> src/backend/port/dynloader/freebsd.c\n> This one is perhaps dodgy. You ahve this:\n> static char error_message[BUFSIZ];\n> Then you have this:\n> sprintf(error_message, \"dlopen (%s) not supported\", file);\n> Where file isn't restricted in length I think...\n\nYeah. In practice I'm not sure there's a problem --- the callers may\nall limit the filename string to MAXPGPATH, which is well below BUFSIZ.\nBut changing the sprintf to snprintf is a cheap, localized way to be\nsure.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 12 Aug 2002 02:35:17 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Interesting message about printf()'s in PostgreSQL "
}
] |
[
{
"msg_contents": "Hello:\n\nI was investigating the bug about \"select cash_out(2)\" crashing the\nbackend. I thought fixing was a simple matter of checking whether some\nargument to the function was NULL or not.\n\nI added a NULL checking, but it obviously is not triggered, because the\ndata received is not NULL, but a non-pointer integer that cannot be\ndereferenced (doing so cause a segmentation fault).\n\nIt turns out to be a far more serious bug than that, and is not limited\nto cash_out. All these functions have the same problem:\n\nselect proname from pg_proc where proargtypes=(select proargtypes from\npg_proc where proname='cash_in') and pronargs=1 and proisstrict='t'\norder by proname;\n\nWith a few exceptions (the test(*) is long, as it requires one to wait for\nthe database to start after testing each function, but there are 16 out\nof 107 functions(**) that cause backend crash).\n\nThe problem is related to PG_GETARG_POINTER in some way or another; the\ndereferencing of a non-pointer integer makes the backend crash.\n\nI, however, do not know how to fix this. I'm just pointing out this\nproblem so someone more knowledgeable than me with this pointer mess can\nfigure a way out.\n\n(*) The test is\nSELECT=\"select proname from pg_proc where proargtypes=''\nand pronargs=1 and proisstrict='t' order by proname;\"\n\nfor i in `psql regression -c \"$SELECT\"`; do\n\techo $i >> func_test\n\tpsql regression -c \"select $i(1);\" >> func_test 2>&1\n\tsleep 9\ndone\n\n(**) Those are:\nboolout\ncharout\ncidout\ndate_out\nint2out\nint4out\nnabstimeout\noidout\nregclassout\nregoperatorout\nregoperout\nregprocedureout\nregprocout\nregtypeout\nreltimeout\nsmgrout\nxidout\n\n-- \nAlvaro Herrera (<alvherre[a]atentus.com>)\n\"The Gord often wonders why people threaten never to come back after they've\nbeen told never to return\" (www.actsofgord.com)\n\n\n",
"msg_date": "Mon, 12 Aug 2002 00:33:27 -0400 (CLT)",
"msg_from": "Alvaro Herrera <alvherre@atentus.com>",
"msg_from_op": true,
"msg_subject": "cash_out bug"
},
{
"msg_contents": "I said:\n\n> It turns out to be a far more serious bug than that, and is not limited\n> to cash_out. All these functions have the same problem:\n> \n> With a few exceptions (the test(*) is long, as it requires one to wait for\n> the database to start after testing each function, but there are 16 out\n> of 107 functions(**) that cause backend crash).\n\nThis should read \"16 out of 107 that do _not_ cause backend crash\".\n\n-- \nAlvaro Herrera (<alvherre[a]atentus.com>)\n\"Cada quien es cada cual y baja las escaleras como quiere\" (JMSerrat)\n\n",
"msg_date": "Mon, 12 Aug 2002 00:38:16 -0400 (CLT)",
"msg_from": "Alvaro Herrera <alvherre@atentus.com>",
"msg_from_op": true,
"msg_subject": "Re: cash_out bug"
},
{
"msg_contents": "> It turns out to be a far more serious bug than that, and is not limited\n> to cash_out. All these functions have the same problem:\n>\n> select proname from pg_proc where proargtypes=(select proargtypes from\n> pg_proc where proname='cash_in') and pronargs=1 and proisstrict='t'\n> order by proname;\n\nIs this a problem in that the functions are definined to return opaque (eg.\nPG_RETURN_VOID) but are then still usable in SELECT statements?\n\nChris\n\n",
"msg_date": "Mon, 12 Aug 2002 12:47:38 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: cash_out bug"
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> Is this a problem in that the functions are definined to return opaque (eg.\n> PG_RETURN_VOID) but are then still usable in SELECT statements?\n\nThe issue here is (once again) that we're overloading type oid 0\n(\"opaque\") to mean too many different, incompatible things. I've\nranted about this before and will not repeat my previous remarks.\nThe bottom line is that we need to eliminate \"opaque\" in favor of\na set of pseudo-datatypes with different, crisply-defined semantics.\nWe've had some discussions about it but no complete proposal has been\nmade. Since eliminating \"opaque\" is going to break just about every\nextant user-defined datatype, I'm not in a hurry to do it until we\ncan get it right the first time...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 12 Aug 2002 01:30:38 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: cash_out bug "
},
{
"msg_contents": "> The issue here is (once again) that we're overloading type oid 0\n> (\"opaque\") to mean too many different, incompatible things. I've\n> ranted about this before and will not repeat my previous remarks.\n> The bottom line is that we need to eliminate \"opaque\" in favor of\n> a set of pseudo-datatypes with different, crisply-defined semantics.\n> We've had some discussions about it but no complete proposal has been\n> made. Since eliminating \"opaque\" is going to break just about every\n> extant user-defined datatype, I'm not in a hurry to do it until we\n> can get it right the first time...\n\nI guess if anyone were to make a complete proposal, it would have to be you\nthen methinks... Is it worth starting a thread about it at this stage? It\nis a pretty serious problem.\n\nChris\n\n",
"msg_date": "Mon, 12 Aug 2002 13:43:41 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: cash_out bug "
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> Is it worth starting a thread about it at this stage? It\n> is a pretty serious problem.\n\nI agree, but given the lack of movement over the last couple years,\nI'm not expecting a solution to suddenly emerge for 7.3 ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 12 Aug 2002 01:52:49 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: cash_out bug "
}
] |
[
{
"msg_contents": "I just got the following example:\n\nDROP TABLE foo;\nCREATE TABLE foo (login varchar(100));\nINSERT INTO foo values ('abc');\n\nDROP FUNCTION footest1(varchar(100));\nCREATE FUNCTION footest1(varchar(100)) RETURNS varchar(100) AS '\n DECLARE\n login varchar(100);\n BEGIN\n SELECT INTO login login FROM foo LIMIT 1;\n RETURN login;\n END;\n' LANGUAGE 'plpgsql';\n\nDROP FUNCTION footest2(varchar(100));\nCREATE FUNCTION footest2(varchar(100)) RETURNS varchar(100) AS '\n DECLARE\n fieldname varchar(100);\n BEGIN\n SELECT INTO fieldname login FROM foo LIMIT 1;\n RETURN fieldname;\n END;\n' LANGUAGE 'plpgsql';\n\nSELECT footest1('foobar');\nSELECT footest2('foobar');\n\nThe first select returns NULL while the second correctly returns 'abc'.\nI just wonder why it is that way. The only difference seems to be the\nname of the variable which in footest1 equals the attribute name. \n\nNow I can guess what happens but I wonder if this is the desired\nbehaviour.\n\nMichael\n-- \nMichael Meskes\nMichael@Fam-Meskes.De\nGo SF 49ers! Go Rhein Fire!\nUse Debian GNU/Linux! Use PostgreSQL!\n",
"msg_date": "Mon, 12 Aug 2002 15:26:03 +0200",
"msg_from": "Michael Meskes <meskes@postgresql.org>",
"msg_from_op": true,
"msg_subject": "Strange bahaviour"
},
{
"msg_contents": "Michael Meskes <meskes@postgresql.org> writes:\n> CREATE FUNCTION footest1(varchar(100)) RETURNS varchar(100) AS '\n> DECLARE\n> login varchar(100);\n> BEGIN\n> SELECT INTO login login FROM foo LIMIT 1;\n> RETURN login;\n> END;\n> ' LANGUAGE 'plpgsql';\n\n> The first select returns NULL while the second correctly returns 'abc'.\n\nThe NULL is perfectly correct: that's the initial value of the plpgsql\nvariable. The above is essentially the same as saying\n\tlogin := login;\nIt is not \"incorrect\".\n\n> Now I can guess what happens but I wonder if this is the desired\n> behaviour.\n\nCertainly, unless you'd like to disable all use of plpgsql variables in\nSQL queries. plpgsql has no way of guessing that \"login\" in the above\nquery wasn't intended to reference its variable. Either choose a\ndifferent variable name, or qualify the query-variable reference\n(eg, foo.login).\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 12 Aug 2002 09:40:12 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Strange bahaviour "
},
{
"msg_contents": "On Mon, Aug 12, 2002 at 09:40:12AM -0400, Tom Lane wrote:\n> The NULL is perfectly correct: that's the initial value of the plpgsql\n> variable. The above is essentially the same as saying\n> \tlogin := login;\n> It is not \"incorrect\".\n\nThat's exactly what I thought is the reason. I just wonder if there's a\nway to make this kind of stuff more obvious for instance by using :login\nfor the variable as with embedded SQL. IMO the actual behaviour, while\nof course correct, is a little bit confusing.\n\nMichael\n-- \nMichael Meskes\nMichael@Fam-Meskes.De\nGo SF 49ers! Go Rhein Fire!\nUse Debian GNU/Linux! Use PostgreSQL!\n",
"msg_date": "Mon, 12 Aug 2002 16:00:30 +0200",
"msg_from": "Michael Meskes <meskes@postgresql.org>",
"msg_from_op": true,
"msg_subject": "Re: Strange bahaviour"
},
{
"msg_contents": "Just go with tradition and label all of your variables with a\nv_<varname>. Never use columns or tablenames prefixed with a v_.\n\nIt's a quick way for determining what is what. Forcing use of a prefix \nin some places and not others would not be a nice thing -- especially as\nthe core takes on more and more abilities of plpgsql.\n\n\nOn Mon, 2002-08-12 at 10:00, Michael Meskes wrote:\n> On Mon, Aug 12, 2002 at 09:40:12AM -0400, Tom Lane wrote:\n> > The NULL is perfectly correct: that's the initial value of the plpgsql\n> > variable. The above is essentially the same as saying\n> > \tlogin := login;\n> > It is not \"incorrect\".\n> \n> That's exactly what I thought is the reason. I just wonder if there's a\n> way to make this kind of stuff more obvious for instance by using :login\n> for the variable as with embedded SQL. IMO the actual behaviour, while\n> of course correct, is a little bit confusing.\n\n\n\n",
"msg_date": "12 Aug 2002 10:24:24 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: Strange bahaviour"
}
] |
[
{
"msg_contents": "\n\n> -----Original Message-----\n> From: Gavin Sherry [mailto:swm@linuxworld.com.au] \n> Sent: 12 August 2002 15:15\n> To: Florian Weimer\n> Cc: pgsql-hackers@postgresql.org\n> Subject: Re: [HACKERS] [SECURITY] DoS attack on backend \n> possible (was: Re:\n> \n> \n> On Mon, 12 Aug 2002, Florian Weimer wrote:\n> \n> > Gavin Sherry <swm@linuxworld.com.au> writes:\n> > \n> > >> Yes, but if you just check that the date given by the \n> user matches \n> > >> the regular expression \"[0-9]+-[0-9]+-[0-9]+\", it's \n> still possible \n> > >> to crash the backend.\n> > \n> > > Anyone who is using that regular expression in an attempt to \n> > > validate a user supplied date is already in trouble.\n> > \n> > I don't understand why extremely strict syntax checks are \n> necessary. \n> > The database has to parse it again anyway, and if you can't rely on \n> > the database to get this simple parsing right, will it store your \n> > data? Such a reasoning doesn't seem to be too far-fetched to me\n> \n> Why attempt to validate the user data at all if you're going \n> to do a bad job of it? Moreover, 'rely on the database to get \n> this ... right': what kind of security principle is that? For \n> someone interested in security, you've just broken the most \n> important principle.\n\nIf I write code in a Microsoft product such as VB it will happily accept\ntimestamps such as '2001-12-23 22.15.01' which is a perfectly valid date\nin some parts of the world. PostgreSQL will barf on the .'s - is it\nexpected then that I write my own validation/parsing code to replace\nMicrosoft's in this and every other area that may need checking just\nbecause PostgreSQL doesn't understand a particular format? I would\nrather let PostgreSQL alone know about it's oddities and just throw me\nan error I can deal with in such cases.\n\nRegards, Dave.\n\nPS (Gavin). Thanks for the CREATE OR REPLACE's you recently submitted!\n",
"msg_date": "Mon, 12 Aug 2002 15:23:53 +0100",
"msg_from": "\"Dave Page\" <dpage@vale-housing.co.uk>",
"msg_from_op": true,
"msg_subject": "Re: [SECURITY] DoS attack on backend possible (was: Re:"
}
] |
[
{
"msg_contents": "In 7.2.1, the psql argument to import a file from a connected database\nis \\i. From the command line its -f.\n\nAny chance we could make these consistent with eachother.\n\n\n\n",
"msg_date": "12 Aug 2002 11:18:17 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "psql arguments"
},
{
"msg_contents": "\nUh, from the command line, you are running _only_ a (f)ile, while from\ninside psql, you are (i)ncluding it in your session; the existing\nvalues seem OK to me.\n\n---------------------------------------------------------------------------\n\nRod Taylor wrote:\n> In 7.2.1, the psql argument to import a file from a connected database\n> is \\i. From the command line its -f.\n> \n> Any chance we could make these consistent with eachother.\n> \n> \n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Mon, 12 Aug 2002 12:08:00 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: psql arguments"
}
] |
[
{
"msg_contents": "Hello\n\nIn TODO there is an item that says \"cluster all tables at once\". Might\nI ask, how is the system supposed to know on which indexes does it have\nto cluster each table?\n\nMaybe if some index had the indisclustered bit set one could select\nthat; but is it possible for some table to have more than one index with\nit? Intuition (but no code observation) says no. And what happens with\nthose tables that do not have any such index?\n\n-- \nAlvaro Herrera (<alvherre[a]atentus.com>)\n\"Oh, great altar of passive entertainment, bestow upon me thy discordant images\nat such speed as to render linear thought impossible\" (Calvin a la TV)\n\n",
"msg_date": "Mon, 12 Aug 2002 16:50:56 -0400 (CLT)",
"msg_from": "Alvaro Herrera <alvherre@atentus.com>",
"msg_from_op": true,
"msg_subject": "CLUSTER all tables at once?"
},
{
"msg_contents": "> Maybe if some index had the indisclustered bit set one could select\n> that; but is it possible for some table to have more than one index with\n> it? Intuition (but no code observation) says no. And what happens with\n> those tables that do not have any such index?\n\nThe bool marker sounds useful. Falling back on the primary key is\nprobably the most appropriate.\n\n",
"msg_date": "12 Aug 2002 16:58:57 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: CLUSTER all tables at once?"
},
{
"msg_contents": "Alvaro Herrera <alvherre@atentus.com> writes:\n> Maybe if some index had the indisclustered bit set one could select\n> that; but is it possible for some table to have more than one index with\n> it? Intuition (but no code observation) says no.\n\nAt the moment that bit will never be set at all, unless you were to\nreach in and set it with a manual \"UPDATE pg_index\" command.\n\nIt would probably be feasible for the CLUSTER code to update the system\ncatalogs to set the bit on the index used for the clustering (and clear\nit from any others it might be set on). Then indisclustered would have\nthe semantics of \"the index most recently used in CLUSTERing its table\",\nwhich seems pretty reasonable. And it'd fit in nicely as the control\nbit for an auto-CLUSTER command.\n\n> And what happens with those tables that do not have any such index?\n\nNothing, would be my vote. You'd just re-CLUSTER all tables that have\nbeen clustered before, the same way they were last clustered.\n\n(I'm not actually convinced that this behavior is worth the code space\nit'd take to implement, btw.)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 12 Aug 2002 18:14:41 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: CLUSTER all tables at once? "
},
{
"msg_contents": "Tom Lane wrote:\n> Alvaro Herrera <alvherre@atentus.com> writes:\n> > Maybe if some index had the indisclustered bit set one could select\n> > that; but is it possible for some table to have more than one index with\n> > it? Intuition (but no code observation) says no.\n> \n> At the moment that bit will never be set at all, unless you were to\n> reach in and set it with a manual \"UPDATE pg_index\" command.\n> \n> It would probably be feasible for the CLUSTER code to update the system\n> catalogs to set the bit on the index used for the clustering (and clear\n> it from any others it might be set on). Then indisclustered would have\n> the semantics of \"the index most recently used in CLUSTERing its table\",\n> which seems pretty reasonable. And it'd fit in nicely as the control\n> bit for an auto-CLUSTER command.\n\nAdded to TODO:\n\n\to Cluster all tables at once using pg_index.indisclustered or primary \n key\n\n> > And what happens with those tables that do not have any such index?\n> \n> Nothing, would be my vote. You'd just re-CLUSTER all tables that have\n> been clustered before, the same way they were last clustered.\n> \n> (I'm not actually convinced that this behavior is worth the code space\n> it'd take to implement, btw.)\n\nI was thinking of a shell script for this, not something in the backend.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 01:45:45 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: CLUSTER all tables at once?"
}
] |
[
{
"msg_contents": "I thought this might be of interest to the list:\n\nLINUXWORLD: ORACLE RELEASING CLUSTERED FILE SYSTEM CODE\nhttp://www.idg.net/go.cgi?id=726336\n\n\"The company on Wednesday plans to post online the source code for its \nnew clustered file system designed for its Oracle9i Real Application \nClusters (RAC), said Robert Shimp, vice president of database marketing \nat Oracle. The release will be an early test version of the software, \nwith a production version due in October, Shimp said.\"\n\n\"The company is making available the source code for the Oracle Cluster \nFile System under the GNU/General Public License...\"\n\n\nJoe\n\n",
"msg_date": "Mon, 12 Aug 2002 13:51:41 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": true,
"msg_subject": "Oracle releasing clustered file system code"
}
] |
[
{
"msg_contents": "I've been studying the \"No one parent tuple was found\" problem some\nmore, and I've realized there are actually two distinct problems that\nmanifest at the same place.\n\nHere are test procedures for duplicating the problems on-demand (these\nwork in either 7.2 or CVS tip):\n\nCASE 1 (transient failure):\n\n1. Start a transaction (\"begin;\") in one psql window; leave it sitting open.\n\n2. In another psql window, do:\n\ndrop table foo;\ncreate table foo (f1 int);\n\nbegin;\n-- insert at least a few hundred rows of junk data into foo.\n-- in the regression database you can do\ninsert into foo select unique1 from tenk1;\nabort;\n\nbegin;\ninsert into foo values(0);\nupdate foo set f1 = f1 + 1;\nend;\n\nvacuum full foo;\nERROR: No one parent tuple was found\n\nRepeated vacuum-full attempts will fail as long as the background\ntransaction remains open; after you close that transaction, it works.\n\n\nCASE 2 (non-transient failure):\n\nHere, you don't even need a background transaction. Do:\n\ndrop table foo;\ncreate table foo (f1 int);\n\nbegin;\n-- insert at least a few hundred rows of junk data into foo.\n-- in the regression database you can do\ninsert into foo select unique1 from tenk1;\nabort;\n\nbegin;\ninsert into foo values(0);\nupdate foo set f1 = f1 + 1;\nend;\n\n-- this part is added compared to the transient case:\nbegin;\nupdate foo set f1 = f1 + 1;\nabort;\nbegin;\nselect * from foo for update;\ninsert into foo values(1);\nend;\n\nvacuum full foo;\nERROR: No one parent tuple was found\n\nThis error is reproducible indefinitely. However, you can clear it by\ndoing \"select * from foo for update\" outside any transaction block.\n(There are other ways, but that's the easiest non-destructive way.)\n\n\nThe non-transient-failure test procedure is designed to produce a tuple\nthat has HEAP_XMAX_COMMITTED, HEAP_MARKED_FOR_UPDATE, and t_self\ndifferent from t_ctid. This fools the \"this tuple is in the chain of\ntuples created in updates\" test (vacuum.c line 1583 in 7.2 sources).\nThe second part of the test shouldn't trigger, but does.\n\nThe transient-failure test procedure sets up a situation where we have\nan updated tuple produced by a transaction younger than the oldest open\ntransaction (ie, younger than OldestXmin) --- but the immediate parent\ntuple of that tuple is dead and gone. I did it by making that\nimmediate parent be created and deleted in the same transaction. There\nmay be other ways to get the same effect, but this is certainly one way.\n\nIn the given test cases, VACUUM finds *no* tuples that are \"recently\ndead\" per the HeapTupleSatisfiesVacuum test: they're all either\ndefinitely alive or definitely dead and deletable. So no vtlinks\nrecords have been created and you get the \"No one parent tuple was\nfound\" error. It's simple to modify the test conditions so that there\nare additional tuples that are considered recently dead, and then\nyou'll get \"Parent tuple was not found\" instead. (That behavior is\ntransient, since if there are no other open transactions then no tuples\ncan be considered recently dead.)\n\nNow, what to do about it? I had previously proposed making sure that\nt_ctid is set to t_self whenever we delete or mark4update a tuple.\nI still think that's a good idea, but the VACUUM tests (there are two)\nshould also be changed to ignore tuples that are MARKED_FOR_UPDATE:\ninstead of\n\n (!(tuple.t_data->t_infomask & HEAP_XMAX_INVALID) &&\n !(ItemPointerEquals(&(tuple.t_self),\n &(tuple.t_data->t_ctid)))))\n\nthe code should be\n\n (!(tuple.t_data->t_infomask & (HEAP_XMAX_INVALID |\n HEAP_MARKED_FOR_UPDATE)) &&\n !(ItemPointerEquals(&(tuple.t_self),\n &(tuple.t_data->t_ctid)))))\n\nA quick look through the sources shows that these two VACUUM tests are\nthe only places where HEAP_XMAX_INVALID is checked without also checking\nfor MARKED_FOR_UPDATE. So this bug is a simple oversight that was\ncreated when the mark-for-update feature was added.\n\nIt's less clear what to do about the transient error. Clearly, VACUUM\nshould *not* be assuming that \n\n (tuple.t_data->t_infomask & HEAP_UPDATED &&\n !TransactionIdPrecedes(tuple.t_data->t_xmin, OldestXmin))\n\nis sufficient to guarantee that there must be a surviving parent tuple\n--- the parent may not have survived scan_heap, if it was created and\ndeleted in the same transaction.\n\nThe conservative approach would be to do what is done now in some other\ncases: if we can't find a parent tuple, emit a NOTICE and stop the\nrepair_frag process, but don't raise a hard error. This would apply\nboth when vtlinks is null and when we fail to find a match in it.\n\nA more aggressive approach would be to assume that if we didn't find the\nparent in vtlinks, it's dead and gone, and we can just bull ahead with\nthe chain move anyway. While this would be correct and safe in the\ntest-case scenario, I'm a little nervous about whether any problem could\nbe created that way.\n\nComments?\n\nAlso, for Mario and Barry: does this test case look anything like what\nyour real applications do? In particular, do you ever do a SELECT FOR\nUPDATE in a transaction that commits some changes, but does not update\nor delete the locked-for-update row? If not, it's possible there are\nyet more bugs lurking in this area.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 12 Aug 2002 17:57:03 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": true,
"msg_subject": "VACUUM's \"No one parent tuple was found\", redux"
},
{
"msg_contents": "\n> Also, for Mario and Barry: does this test case look anything like what\n> your real applications do? In particular, do you ever do a SELECT FOR\n> UPDATE in a transaction that commits some changes, but does not update\n> or delete the locked-for-update row? If not, it's possible there are\n> yet more bugs lurking in this area.\n>\n> \t\t\tregards, tom lane\n\nI've checked the application, when I select for update I will update those tuples, though it might be an\nupdate where no real modification is done (e.g. update table set col1=col1).\nI'm pretty sure I've identified the source of the problem in my application, but in this specific place there\nis no \"select for update\", but a rollback while another update is in progress. I guess this is triggering\nthe problem now and then.\n\nBut for the scenario you mention above, I cannot imagine how this might happen in my application, it's not\neasy to say for sure, it's a quite complex web based content management system and not easy to debug such\nerrors, because I've no clue how to trigger it reproduceable.\n\nBest regards,\n\tMario Weilguni\n\n\n",
"msg_date": "Tue, 13 Aug 2002 08:42:52 +0200",
"msg_from": "Mario Weilguni <mweilguni@sime.com>",
"msg_from_op": false,
"msg_subject": "Re: VACUUM's \"No one parent tuple was found\", redux"
},
{
"msg_contents": "\n\nTom Lane wrote:\n\n>\n>Also, for Mario and Barry: does this test case look anything like what\n>your real applications do? In particular, do you ever do a SELECT FOR\n>UPDATE in a transaction that commits some changes, but does not update\n>or delete the locked-for-update row? If not, it's possible there are\n>yet more bugs lurking in this.\n>\nThis certainly seems plausible for my application.\n\n--Barry\n\n\n",
"msg_date": "Tue, 13 Aug 2002 09:09:16 -0700",
"msg_from": "Barry Lind <barry@xythos.com>",
"msg_from_op": false,
"msg_subject": "Re: VACUUM's \"No one parent tuple was found\", redux"
}
] |
[
{
"msg_contents": "anoncvs is still broken:\n\ncvs server: Updating src/interfaces/libpqxx/config\ncvs server: Updating src/interfaces/libpqxx/debian\ncvs server: failed to create lock directory for\n`/projects/cvsroot/interfaces/libpqxx/debian'\n(/projects/cvsroot/interfaces/libpqxx/debian/#cvs.lock): Permission\ndenied\ncvs server: failed to obtain dir lock in repository\n`/projects/cvsroot/interfaces/libpqxx/debian'\ncvs [server aborted]: read lock failed - giving up\n\n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight, UK \nhttp://www.lfix.co.uk/oliver\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Watch ye therefore, and pray always, that ye may be \n accounted worthy to escape all these things that shall\n come to pass, and to stand before the Son of man.\" \n Luke 21:36 \n\n",
"msg_date": "13 Aug 2002 00:39:44 +0100",
"msg_from": "Oliver Elphick <olly@lfix.co.uk>",
"msg_from_op": true,
"msg_subject": "anoncvs currently broken"
},
{
"msg_contents": "\nshould be fixed ... looks like just an ownership issue on a new directory\n...\n\n\nOn 13 Aug 2002, Oliver Elphick wrote:\n\n> anoncvs is still broken:\n>\n> cvs server: Updating src/interfaces/libpqxx/config\n> cvs server: Updating src/interfaces/libpqxx/debian\n> cvs server: failed to create lock directory for\n> `/projects/cvsroot/interfaces/libpqxx/debian'\n> (/projects/cvsroot/interfaces/libpqxx/debian/#cvs.lock): Permission\n> denied\n> cvs server: failed to obtain dir lock in repository\n> `/projects/cvsroot/interfaces/libpqxx/debian'\n> cvs [server aborted]: read lock failed - giving up\n>\n> --\n> Oliver Elphick Oliver.Elphick@lfix.co.uk\n> Isle of Wight, UK\n> http://www.lfix.co.uk/oliver\n> GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n> ========================================\n> \"Watch ye therefore, and pray always, that ye may be\n> accounted worthy to escape all these things that shall\n> come to pass, and to stand before the Son of man.\"\n> Luke 21:36\n>\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n>\n> http://archives.postgresql.org\n>\n\n",
"msg_date": "Mon, 12 Aug 2002 21:38:00 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: anoncvs currently broken"
},
{
"msg_contents": "On Mon, Aug 12, 2002 at 09:38:00PM -0300, Marc G. Fournier wrote:\n> \n> should be fixed ... looks like just an ownership issue on a new directory\n\n\nMore like I uploaded that directory just as you were rsync'ing to\nanonymous CVS and a lock file got copied along, but was never deleted\non a subsequent rsync. Or so it's been suggested to me.\n\n\nJeroen\n\n",
"msg_date": "Tue, 13 Aug 2002 08:47:47 +0200",
"msg_from": "\"Jeroen T. Vermeulen\" <jtv@xs4all.nl>",
"msg_from_op": false,
"msg_subject": "Re: anoncvs currently broken"
},
{
"msg_contents": "On Tue, 2002-08-13 at 02:47, Jeroen T. Vermeulen wrote:\n> On Mon, Aug 12, 2002 at 09:38:00PM -0300, Marc G. Fournier wrote:\n> > \n> > should be fixed ... looks like just an ownership issue on a new directory\n> \n> \n> More like I uploaded that directory just as you were rsync'ing to\n> anonymous CVS and a lock file got copied along, but was never deleted\n> on a subsequent rsync. Or so it's been suggested to me.\n\nThat was based on a number of assumptions.\n\nOf course Marc knows exactly what was wrong because he had to fix it :)\n\n\n",
"msg_date": "13 Aug 2002 07:38:40 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: anoncvs currently broken"
},
{
"msg_contents": "On Tue, 13 Aug 2002, Jeroen T. Vermeulen wrote:\n\n> On Mon, Aug 12, 2002 at 09:38:00PM -0300, Marc G. Fournier wrote:\n> >\n> > should be fixed ... looks like just an ownership issue on a new directory\n>\n>\n> More like I uploaded that directory just as you were rsync'ing to\n> anonymous CVS and a lock file got copied along, but was never deleted\n> on a subsequent rsync. Or so it's been suggested to me.\n\nNope, there was no lock file over there when I checked manually, just had\nto re-set the perms and all appears to be okay ...\n\n\n",
"msg_date": "Wed, 14 Aug 2002 00:17:34 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: anoncvs currently broken"
}
] |
[
{
"msg_contents": "[Cced to hackers list]\n\n> I'm seeing a regression test failure with the latest CVS code, in the\n> 'conversion' test. I've attached the 'regression.diff' file -- the\n> failure occurs consistently on my machine.\n> \n> I'm mailing you because I believe the test in question is for code you\n> wrote). Let me know if you need any more information.\n\nDo you still have the failure after doing \"make install\"? If so, it's\nnews to me.\n\nIf not, it's a known problem I want to fix before the beta freeze. The\nbasic problem here is I'm using following statement while doing\ninitdb:\n\nCREATE OR REPLACE FUNCTION utf8_to_iso8859_1 (INTEGER, INTEGER,\nOPAQUE, OPAQUE, INTEGER) RETURNS INTEGER AS\n'$libdir/utf8_and_iso8859_1', 'utf8_to_iso8859_1' LANGUAGE 'c';\n\nThe $libdir variable is defined at the compile time and it points to\n$prefix/lib. Apparently it points to different place while doing\nregression tests. One idea is replacing $lindir with the absolute path\nto $prefix/lib. However I wonder this would break some installations,\nfor example RPM.\n\nAny idea?\n--\nTatsuo Ishii\n",
"msg_date": "Tue, 13 Aug 2002 10:11:05 +0900 (JST)",
"msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>",
"msg_from_op": true,
"msg_subject": "Re: regression test failure"
},
{
"msg_contents": "Tatsuo Ishii writes:\n\n> The $libdir variable is defined at the compile time and it points to\n> $prefix/lib. Apparently it points to different place while doing\n> regression tests. One idea is replacing $lindir with the absolute path\n> to $prefix/lib. However I wonder this would break some installations,\n> for example RPM.\n\nYou can replace the string '$libdir' in the conversions_create.sql file\nwith an absolute directory name during the standalone regression test run.\nThis could be done in the regression test driver, where the correct path\nis available as $pkglibdir. Other, less messy solutions don't occur to me\noffhand.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Tue, 13 Aug 2002 21:52:07 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: regression test failure"
},
{
"msg_contents": "On Tuesday 13 August 2002 03:52 pm, Peter Eisentraut wrote:\n> Tatsuo Ishii writes:\n> > The $libdir variable is defined at the compile time and it points to\n> > $prefix/lib. Apparently it points to different place while doing\n> > regression tests. One idea is replacing $lindir with the absolute path\n> > to $prefix/lib. However I wonder this would break some installations,\n> > for example RPM.\n\n> You can replace the string '$libdir' in the conversions_create.sql file\n> with an absolute directory name during the standalone regression test run.\n> This could be done in the regression test driver, where the correct path\n> is available as $pkglibdir. Other, less messy solutions don't occur to me\n> offhand.\n\nThe RPM's patch the regression tests to work -- in a somewhat broken way, but \nenough to get useful results. IIRC, I'm already subbing $libdir out in them.\n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Wed, 14 Aug 2002 12:06:52 -0400",
"msg_from": "Lamar Owen <lamar.owen@wgcr.org>",
"msg_from_op": false,
"msg_subject": "Re: regression test failure"
}
] |
[
{
"msg_contents": "On Mon, 12 Aug 2002, Don Baccus wrote:\n\n> Give it up. You're acting like a turkey. If you aren't, skin yourself\n> a new non-turkey skin.\n\nSince he appears not to be able to avoid abusive ad hominem attacks,\nI'm now sending mail with \"dhogaza@pacifier.com\" in the From: header\nto /dev/null. If there's a technical point in one of his messages that\nrelates to the discussion that I need to answer, someone should please\nmention it on the list or forward it to me.\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n\n",
"msg_date": "Tue, 13 Aug 2002 14:33:46 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": true,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Tue, 2002-08-13 at 00:33, Curt Sampson wrote:\n> On Mon, 12 Aug 2002, Don Baccus wrote:\n> \n> > Give it up. You're acting like a turkey. If you aren't, skin yourself\n> > a new non-turkey skin.\n> \n> Since he appears not to be able to avoid abusive ad hominem attacks,\n> I'm now sending mail with \"dhogaza@pacifier.com\" in the From: header\n> to /dev/null. If there's a technical point in one of his messages that\n> relates to the discussion that I need to answer, someone should please\n> mention it on the list or forward it to me.\n> \n\nCurt, I think his reply stems from his frustration of chosen content in\nmany emails that originate from you. We all pretty well understand\npostgres has a broken feature. We all understand you see zero value in\nit. We're all actively attempting to determine ways to make it less\nbroken, if not altogether better. The fact that it's broken and you\nhardly go an email reminding everyone of this fact is certainly not\nmaking friends. In fact, one should hardly be surprised you're not\nseeing more retorts as such.\n\nFor the sake of the project, I'd hope you could give the \"broken\" topic\na rest, move on, and allow a little time for the list to settle again. \nIf such abuse continues, then IMHO, it would make sense to /dev/null\nhim.\n\nGreg",
"msg_date": "13 Aug 2002 00:40:14 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Tuesday 13 August 2002 01:40 am, Greg Copeland wrote:\n> On Tue, 2002-08-13 at 00:33, Curt Sampson wrote:\n> > On Mon, 12 Aug 2002, Don Baccus wrote:\n> > > Give it up. You're acting like a turkey. If you aren't, skin yourself\n> > > a new non-turkey skin.\n\n> > Since he appears not to be able to avoid abusive ad hominem attacks,\n> > I'm now sending mail with \"dhogaza@pacifier.com\" in the From: header\n> > to /dev/null. If there's a technical point in one of his messages that\n> > relates to the discussion that I need to answer, someone should please\n> > mention it on the list or forward it to me.\n\n> Curt, I think his reply stems from his frustration of chosen content in\n> many emails that originate from you. We all pretty well understand\n> postgres has a broken feature. We all understand you see zero value in\n\nKnowing Don to some extent, I can say with some assurance that his 'attacks' \nare never unprovoked. \n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Tue, 13 Aug 2002 10:00:13 -0400",
"msg_from": "Lamar Owen <lamar.owen@wgcr.org>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Tue, 13 Aug 2002, Lamar Owen wrote:\n\n> > Curt, I think his reply stems from his frustration of chosen content in\n> > many emails that originate from you. We all pretty well understand\n> > postgres has a broken feature. We all understand you see zero value in\n>\n> Knowing Don to some extent, I can say with some assurance that his 'attacks'\n> are never unprovoked.\n\nSorry; I'm not aware of the circumstances under which one is supposed\nto call someone a \"dick-waver\" and other such things on a technical\nmailing list. Perhaps you can explain to me when one should be\ndoing this, so I too can do it at the appropriate times.\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Wed, 14 Aug 2002 09:07:56 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": true,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "\nIt is hard to argue with this logic.\n\n---------------------------------------------------------------------------\n\nCurt Sampson wrote:\n> On Tue, 13 Aug 2002, Lamar Owen wrote:\n> \n> > > Curt, I think his reply stems from his frustration of chosen content in\n> > > many emails that originate from you. We all pretty well understand\n> > > postgres has a broken feature. We all understand you see zero value in\n> >\n> > Knowing Don to some extent, I can say with some assurance that his 'attacks'\n> > are never unprovoked.\n> \n> Sorry; I'm not aware of the circumstances under which one is supposed\n> to call someone a \"dick-waver\" and other such things on a technical\n> mailing list. Perhaps you can explain to me when one should be\n> doing this, so I too can do it at the appropriate times.\n> \n> cjs\n> -- \n> Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n> Don't you know, in this new Dark Age, we're all light. --XTC\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 2: you can get off all lists at once with the unregister command\n> (send \"unregister YourEmailAddressHere\" to majordomo@postgresql.org)\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 20:47:35 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "Bruce Momjian wrote:\n> It is hard to argue with this logic.\n\nIf he were actually making a technical argument I might actually agree \nwith you myself.\n\nThus far all he's done is argue from authority, and in tight circles to \nboot.\n\nWhich means the term is an accurate description of his behavior ...\n\nHere's a lengthier and polite description - he's trying to impress us \nwith his brilliance which several of us are just too dense to recognize \non our own.\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n",
"msg_date": "Tue, 13 Aug 2002 18:36:41 -0700",
"msg_from": "Don Baccus <dhogaza@pacifier.com>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "\nYea, you have to question what value the discussion has, really. We\nhave users of inheritance that like it. If we can get a TODO item out\nof the disucssion, great, but there doesn't seem to be any direction of\nwhere the discussion is heading.\n\n---------------------------------------------------------------------------\n\nDon Baccus wrote:\n> Bruce Momjian wrote:\n> > It is hard to argue with this logic.\n> \n> If he were actually making a technical argument I might actually agree \n> with you myself.\n> \n> Thus far all he's done is argue from authority, and in tight circles to \n> boot.\n> \n> Which means the term is an accurate description of his behavior ...\n> \n> Here's a lengthier and polite description - he's trying to impress us \n> with his brilliance which several of us are just too dense to recognize \n> on our own.\n> \n> -- \n> Don Baccus\n> Portland, OR\n> http://donb.photo.net, http://birdnotes.net, http://openacs.org\n> \n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 21:38:15 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Wed, 2002-08-14 at 09:38, Christopher Kings-Lynne wrote:\n> > 1. The current implementation is broken.\n> >\n> > 2. We have no proper description of how a \"fixed\" implementation\n> > should work.\n> \n> Surely 99% of the implementation problems\tcould be solved with an index type\n> that can span tables?\n\nOr constraints that can contain a subqueries.\n\n-------------\nHannu\n\n",
"msg_date": "14 Aug 2002 07:47:06 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance"
},
{
"msg_contents": "On Wed, 2002-08-14 at 05:07, Curt Sampson wrote:\n> On Tue, 13 Aug 2002, Lamar Owen wrote:\n> \n> > > Curt, I think his reply stems from his frustration of chosen content in\n> > > many emails that originate from you. We all pretty well understand\n> > > postgres has a broken feature. We all understand you see zero value in\n> >\n> > Knowing Don to some extent, I can say with some assurance that his 'attacks'\n> > are never unprovoked.\n> \n> Sorry; I'm not aware of the circumstances under which one is supposed\n> to call someone a \"dick-waver\" and other such things on a technical\n> mailing list.\n\nIt was quite clear what he meant but perhaps there is a better technical\nterm for use in a technical list, some 5-7 letter all-capital acronym\nperhaps ;)\n\nBut as anyone should give the benefit of doubt, I've been assuming that\nyou are just playing devil's advocate .\n\n> Perhaps you can explain to me when one should be\n> doing this, so I too can do it at the appropriate times.\n\nI guess what he meant was that you were arguing for arguments sake (mine\nis better than yours! Yes it is! Yes it is! ...) and not to get to some\nsolution, dismissing perfectly good arguments with a simple\"not true\"\nstatements and suggesting people to read heavy books with the claim that\nthe truth is somewhere in there ;) \n\nSo it seems that the \"technical\" content of his claim was quite similar\nto some of yours ;)\n\nThis has been quite bizarre thread, with about half of traffic being\nquite reasonable constructive discussion while the other half seems\ndefinitely describable by the the word that would get me in your\nkillfile ;)\n\nI'll be off to my vacation for two weeks now, and I'll try to come up\nwith consistent writeup of what our OO features should be (both\ninheritance and others).\n\n----------------\nHannu\n\n",
"msg_date": "14 Aug 2002 08:15:34 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Wed, 2002-08-14 at 09:49, Curt Sampson wrote:\n> On Wed, 14 Aug 2002, Bruce Momjian wrote:\n> \n> > OK, great summary. Isn't the bottom-line issue the limitation of not\n> > being able to create an index that spans tables?\n> \n> That would be one way to fix one particular problem. I can think of\n> another way to fix it right off-hand. (Put the parent's part of the data\n> in the parent table, the child's part in the child table and join.) But\n> we haven't completely worked out what effect this has on other parts of\n> the system, or what effect we're even looking for.\n\nIt would be cleaner in some parts while making things messier in others.\n\nThis would make INSERTs and UPDATEs much more complicated, and also\nthere would be a lot of joins for deeper inheritance hierarchies.\n\n> An an example, at this point some people (including me) feel that\n> constraints (*all* constraints) placed on a supertable should always\n> work. This means that one should not be able to insert into a subtable\n> anything that would break a supertable constraint, and one should not be\n> able to add a constraint to a supertable that's violated by a subtable.\n\nAgreed. Most of this would be easy to implement for curent\nimplementation (but perhaps no more efficient than when done by manually\nadded rules/triggers) if constraints could contain subqueries.\n\n------------\nHannu\n\n\n \n\n",
"msg_date": "14 Aug 2002 08:26:19 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Tue, 13 Aug 2002, Bruce Momjian wrote:\n\n> Yea, you have to question what value the discussion has, really. We\n> have users of inheritance that like it. If we can get a TODO item out\n> of the disucssion, great, but there doesn't seem to be any direction of\n> where the discussion is heading.\n\nSummary:\n\n 1. The current implementation is broken.\n\n 2. We have no proper description of how a \"fixed\" implementation\n should work.\n\n 3. It's hard to fix the current implementation without such a\n description.\n\n 4. Thus, we are in other messages here trying to work out the\n model and come up with such a description.\n\n 5. The people working this out at the moment appear to be me,\n Greg Copeland and Hannu Krosing.\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n\n\n",
"msg_date": "Wed, 14 Aug 2002 13:29:03 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": true,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "> 1. The current implementation is broken.\n>\n> 2. We have no proper description of how a \"fixed\" implementation\n> should work.\n\nSurely 99% of the implementation problems\tcould be solved with an index type\nthat can span tables?\n\nChris\n\n",
"msg_date": "Wed, 14 Aug 2002 12:38:55 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Inheritance"
},
{
"msg_contents": "Curt Sampson wrote:\n> On Tue, 13 Aug 2002, Bruce Momjian wrote:\n> \n> > Yea, you have to question what value the discussion has, really. We\n> > have users of inheritance that like it. If we can get a TODO item out\n> > of the disucssion, great, but there doesn't seem to be any direction of\n> > where the discussion is heading.\n> \n> Summary:\n> \n> 1. The current implementation is broken.\n> \n> 2. We have no proper description of how a \"fixed\" implementation\n> should work.\n> \n> 3. It's hard to fix the current implementation without such a\n> description.\n> \n> 4. Thus, we are in other messages here trying to work out the\n> model and come up with such a description.\n> \n> 5. The people working this out at the moment appear to be me,\n> Greg Copeland and Hannu Krosing.\n\nOK, great summary. Isn't the bottom-line issue the limitation of not\nbeing able to create an index that spans tables? Is there any way to\nimplement that? We have sequences that can span tables. Can that help\nus?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 00:42:09 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Wed, 14 Aug 2002, Christopher Kings-Lynne wrote:\n\n> Surely 99% of the implementation problems could be solved with an\n> index type that can span tables?\n\nMaybe.\n\nBut my problem is not so much that it's broken, as nobody can\nexplain exactly what \"fixed\" would be. I mean, completely fixed,\nnot just one obvious problem fixed.\n\nJust my opinion of course, but I think it would be best to have a\ndetailed description of how everything in inheritance is supposed to\nwork, write a set of tests from that, and then fix the implementation to\nconform to the tests.\n\nAnd I think a detailed description comes most easily when you have\na logical model to work from.\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Wed, 14 Aug 2002 13:43:43 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": true,
"msg_subject": "Re: Inheritance"
},
{
"msg_contents": "Christopher Kings-Lynne wrote:\n> > 1. The current implementation is broken.\n> >\n> > 2. We have no proper description of how a \"fixed\" implementation\n> > should work.\n> \n> Surely 99% of the implementation problems\tcould be solved with an index type\n> that can span tables?\n\nRight. Instead of talking in circles, let's figure out how to do it.\nIf the issue is only sequence numbers, can we force a column to _only_\nget values from the sequence counter, thereby makeing the index span\nunnecessary? Can't we look up stuff in parent/child index to check for\ncollisions before we add a row? Doesn't seem too hard to me.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 00:44:39 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance"
},
{
"msg_contents": "> Right. Instead of talking in circles, let's figure out how to do it.\n> If the issue is only sequence numbers, can we force a column to _only_\n> get values from the sequence counter, thereby makeing the index span\n> unnecessary? Can't we look up stuff in parent/child index to check for\n> collisions before we add a row? Doesn't seem too hard to me.\n\nIs it theoretically possible to add support to btree for storing table along\nwith the indexed value? This would obviously add overhead, so it would only\nbe done for spanning indexes. The index would also take up more space on\ndisk I guess.\n\nWhen a new inherited table is created, all parent indices would be dropped\nand recreated as spanning indices and vice versa.\n\nChris\n\n",
"msg_date": "Wed, 14 Aug 2002 12:47:17 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance"
},
{
"msg_contents": "On Wed, 14 Aug 2002, Bruce Momjian wrote:\n\n> OK, great summary. Isn't the bottom-line issue the limitation of not\n> being able to create an index that spans tables?\n\nThat would be one way to fix one particular problem. I can think of\nanother way to fix it right off-hand. (Put the parent's part of the data\nin the parent table, the child's part in the child table and join.) But\nwe haven't completely worked out what effect this has on other parts of\nthe system, or what effect we're even looking for.\n\nAn an example, at this point some people (including me) feel that\nconstraints (*all* constraints) placed on a supertable should always\nwork. This means that one should not be able to insert into a subtable\nanything that would break a supertable constraint, and one should not be\nable to add a constraint to a supertable that's violated by a subtable.\nIf after more work on this everybody agrees that this is really the way\nto go, then that will have implications on the solution we pick.\n\nThere's also the matter of digging up the SQL standards for table\ninheritance and deciding how closely we want to follow that. (Though\nI think that that's best left to after a fairly formal logical\nanalysis of what table inheritance should be.)\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Wed, 14 Aug 2002 13:49:32 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": true,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "Hannu Krosing wrote:\n\n> I guess what he meant was that you were arguing for arguments sake (mine\n> is better than yours! Yes it is! Yes it is! ...)\n\nThat's the dictionary definition of the phrase.\n\n> and not to get to some\n> solution,\n\nand that's the source of the frustration. I only re-subscribed to the \nlist because we at OpenACS had examined PG's OO extensions quite \nthoroughly before rejecting the current implementation as being not \nuseful for our work, and I thought our reasoning might be of interest.\n\n> dismissing perfectly good arguments with a simple\"not true\"\n> statements and suggesting people to read heavy books with the claim that\n> the truth is somewhere in there ;) \n\nand that's what's I mean when I say he's been arguing from authority.\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n",
"msg_date": "Wed, 14 Aug 2002 05:56:30 -0700",
"msg_from": "Don Baccus <dhogaza@pacifier.com>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "Bruce Momjian wrote:\n> Christopher Kings-Lynne wrote:\n> \n>>> 1. The current implementation is broken.\n>>>\n>>> 2. We have no proper description of how a \"fixed\" implementation\n>>> should work.\n>>\n>>Surely 99% of the implementation problems\tcould be solved with an index type\n>>that can span tables?\n> \n> \n> Right. Instead of talking in circles, let's figure out how to do it.\n> If the issue is only sequence numbers, can we force a column to _only_\n> get values from the sequence counter,\n\nEven if primary keys were forced to be generated from a sequence (a very \nartificial restriction), unique constraints are also implemented by \nindex. And people also join on columns other than their primary key so \nwill want indexes on these columns to span tables, also.\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n",
"msg_date": "Wed, 14 Aug 2002 06:02:17 -0700",
"msg_from": "Don Baccus <dhogaza@pacifier.com>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance"
},
{
"msg_contents": "\n> Summary:\n> \n> 1. The current implementation is broken.\n> \n> 2. We have no proper description of how a \"fixed\" implementation\n> should work.\n> \n> 3. It's hard to fix the current implementation without such a\n> description.\n> \n> 4. Thus, we are in other messages here trying to work out the\n> model and come up with such a description.\n> \n> 5. The people working this out at the moment appear to be me,\n> Greg Copeland and Hannu Krosing.\n> \n> cjs\n\nI've been following the thread on and off, but maybe we should come up with \na list of specifically what is broken... I have used the oo feature in the \npast and the only thing I dont care for about it is the lack of \ndocumentation/examples/etc of how it really works and the fact that \nconstraints/indicies/etc are not inherited by child tables.\n",
"msg_date": "Wed, 14 Aug 2002 13:36:42 +0000 (UTC)",
"msg_from": "ngpg@grymmjack.com",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> Is it theoretically possible to add support to btree for storing table along\n> with the indexed value?\n\nThat's what we need, all right.\n\n> This would obviously add overhead, so it would only\n> be done for spanning indexes. The index would also take up more space on\n> disk I guess.\n> When a new inherited table is created, all parent indices would be dropped\n> and recreated as spanning indices and vice versa.\n\nSeems like the hard way. Instead use a t_infomask bit in indextuples to\nindicate that the index entry points to a table other than the one its\nindex is nominally associated with; if and only if this bit is set, the\ntable OID follows the indextuple header. This way, you don't have to\nreindex just to create a child table, and you also don't pay any extra\nspace cost for index entries that in fact point at the parent.\n\nThere are a veritable ton of other issues to be resolved --- like how do\nwe (efficiently) find all the indexes relevant to a given child table\n--- but the physical storage doesn't seem too complicated.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 09:59:15 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance "
},
{
"msg_contents": "On Tue, 2002-08-13 at 23:42, Bruce Momjian wrote:\n> Curt Sampson wrote:\n> > On Tue, 13 Aug 2002, Bruce Momjian wrote:\n> > \n> > > Yea, you have to question what value the discussion has, really. We\n> > > have users of inheritance that like it. If we can get a TODO item out\n> > > of the disucssion, great, but there doesn't seem to be any direction of\n> > > where the discussion is heading.\n> > \n> > Summary:\n> > \n> > 1. The current implementation is broken.\n> > \n> > 2. We have no proper description of how a \"fixed\" implementation\n> > should work.\n> > \n> > 3. It's hard to fix the current implementation without such a\n> > description.\n> > \n> > 4. Thus, we are in other messages here trying to work out the\n> > model and come up with such a description.\n> > \n> > 5. The people working this out at the moment appear to be me,\n> > Greg Copeland and Hannu Krosing.\n> \n> OK, great summary. Isn't the bottom-line issue the limitation of not\n> being able to create an index that spans tables? Is there any way to\n> implement that? We have sequences that can span tables. Can that help\n> us?\n> \n\nActually, I'm not sure that is the bottom line. One of the reasons I\nask so many questions is because I'm trying to understand what the \"is\"\ncase is. For me, that is important before I can understand, not only\nwhat the \"to-be\" picture should be, but what needs to be done to get\nthere.\n\nBecause of that, I tend to agree with Curt. We need to fill in 1, 2,\nand 3. As for item number 4, I was hoping that other references would\nat least help us understand a \"defacto\" implementation.\n\nLong story short, for me, it's easy to superficially agree that we need\nindexes that span tables but I still have no idea if that really\nconstitutes \"the bottom-line\".\n\nRegards,\n\tGreg Copeland",
"msg_date": "14 Aug 2002 09:25:02 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "On Wed, 2002-08-14 at 08:59, Tom Lane wrote:\n> There are a veritable ton of other issues to be resolved --- like how do\n> we (efficiently) find all the indexes relevant to a given child table\n> --- but the physical storage doesn't seem too complicated.\n\n\nTom, seems we have yet another false start. Thanks for offering your\ncomments on the topic at hand. Since you seem to have a good grasp on\nthe the \"is\" case is, would you be willing to offer up some additional\ndetails on what you feel the (\"veritable ton of\") outstanding issues\nare?\n\nSeems everyone clearly wants a cure and is itching to get there, yet I\ndon't fully understand the disease. I suspect that there are others in\nthe same boat. I feel that this is important for us all of understand. \nI think we need to understand what our \"to-be\" picture is as well as\nwhat points need to be addressed before we can say we've arrived.\n\nWilling to help spell this out?\n\nRegards,\n\tGreg Copeland",
"msg_date": "14 Aug 2002 09:35:10 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance"
},
{
"msg_contents": "On Tue, 2002-08-13 at 23:43, Curt Sampson wrote:\n> Just my opinion of course, but I think it would be best to have a\n> detailed description of how everything in inheritance is supposed to\n> work, write a set of tests from that, and then fix the implementation to\n> conform to the tests.\n> \n> And I think a detailed description comes most easily when you have\n> a logical model to work from.\n\nI completely agree. This is why I want/wanted to pursue the theory and\nexisting implementations angle.\n\nSeems like everyone trying to jump on \"index spanning\" is premature.\n\nDoesn't Oracle have table inheritance? Hmmm...I might have to go do\nsome reading to find out one way or anther... ;)\n\nSign,\n\tGreg Copeland",
"msg_date": "14 Aug 2002 09:39:06 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance"
},
{
"msg_contents": "Hannu Krosing <hannu@tm.ee> writes:\n> Agreed. Most of this would be easy to implement for curent\n> implementation (but perhaps no more efficient than when done by manually\n> added rules/triggers) if constraints could contain subqueries.\n\nI don't understand what a constraint containing a subquery means.\nDoes it constrain the table(s) referenced by the subquery too? If not,\nwhat's the point --- adding, dropping or altering rows in the referenced\ntable might make the constraint condition false. If it does constrain\nthe referenced tables, how the heck are you going to implement that in a\nreasonable fashion?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 10:42:21 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more "
},
{
"msg_contents": "On Wed, Aug 14, 2002 at 09:39:06AM -0500, Greg Copeland wrote:\n> On Tue, 2002-08-13 at 23:43, Curt Sampson wrote:\n> > Just my opinion of course, but I think it would be best to have a\n> > detailed description of how everything in inheritance is supposed to\n> > work, write a set of tests from that, and then fix the implementation to\n> > conform to the tests.\n> > \n> > And I think a detailed description comes most easily when you have\n> > a logical model to work from.\n> \n> I completely agree. This is why I want/wanted to pursue the theory and\n> existing implementations angle.\n\nIn theory, it sounds like a good idea. In practice ... ;-)\n\n> Seems like everyone trying to jump on \"index spanning\" is premature.\n\nSeems like some people haven't looked at the history of the OO\nimplementation in PostgreSQL.\n\nActually, I think you'll find that once a PostgreSQL DBA gets to\nthe point of designing a sufficently complex schema that inheritance\nmight be useful, they quickly bump up against the lack of index and\nconstraint spanning (most notably, referential integrity), and stop\nright there. This means that there is little community experience with\nthe existing implementation, beyond the OO die hards. ;-)\n\nI'm not sure, but Bruce's suggestion of getting index spanning working\nfirst might move the existing implementation over the hump from\n'interesting toy' to 'less than perfect implementation'. Then, the\ncommunity can get some real world experience.\n\nBruce has archived some of the emails - check your local pgsql source tree,\nunder <$PGSQLHOME>/doc/TODO.detail/inheritance\n\nThere was also some theoretical OO discussion, back when the change for\ndefault SELECT behavior on an inhertiance tree was made. (You used to\nhave to say: SELECT foo from parent* to get foo from the parent and all\nchildren) Take a look at the archives and see if there's anything in that\ndiscussion that interests you: providing summary posts of old discussions\nis often a good way to restart and move an unresolved topic along.\n\nRoss\n",
"msg_date": "Wed, 14 Aug 2002 10:17:58 -0500",
"msg_from": "\"Ross J. Reedstrom\" <reedstrm@rice.edu>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance"
},
{
"msg_contents": "Ross J. Reedstrom wrote:\n> Actually, I think you'll find that once a PostgreSQL DBA gets to\n> the point of designing a sufficently complex schema that inheritance\n> might be useful, they quickly bump up against the lack of index and\n> constraint spanning (most notably, referential integrity), and stop\n> right there. This means that there is little community experience with\n> the existing implementation, beyond the OO die hards. ;-)\n\nI'd have to agree wholeheartedly with this, because this was exactly my \nexperience the one time I wanted to use inherited tables.\n\nFWIW, one thought I've had before related to inheritance (but pretty \nmuch orthognal to this discussion) is this: if inheritance included \nshared indexes and constraints, we would be not too far from having \nOracle style table partitioning.\n\nJoe\n\n",
"msg_date": "Wed, 14 Aug 2002 08:32:11 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance"
},
{
"msg_contents": "On Wed, 2002-08-14 at 10:17, Ross J. Reedstrom wrote:\n> On Wed, Aug 14, 2002 at 09:39:06AM -0500, Greg Copeland wrote:\n> > I completely agree. This is why I want/wanted to pursue the theory and\n> > existing implementations angle.\n> \n> In theory, it sounds like a good idea. In practice ... ;-)\n> \n\nLOL. :)\n\n> > Seems like everyone trying to jump on \"index spanning\" is premature.\n> \n> Seems like some people haven't looked at the history of the OO\n> implementation in PostgreSQL.\n\n[waving hand...]\n\n> \n> Bruce has archived some of the emails - check your local pgsql source tree,\n> under <$PGSQLHOME>/doc/TODO.detail/inheritance\n> \n> There was also some theoretical OO discussion, back when the change for\n> default SELECT behavior on an inhertiance tree was made. (You used to\n> have to say: SELECT foo from parent* to get foo from the parent and all\n> children) Take a look at the archives and see if there's anything in that\n> discussion that interests you: providing summary posts of old discussions\n> is often a good way to restart and move an unresolved topic along.\n\nThanks! I briefly read something about that in the archives. Excellent\npointers. I'll check that out. If I have time, I'll try to summarize\nand post.\n\n\nGreg Copeland",
"msg_date": "14 Aug 2002 10:48:01 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance"
},
{
"msg_contents": "On Tuesday 13 August 2002 08:07 pm, Curt Sampson wrote:\n> On Tue, 13 Aug 2002, Lamar Owen wrote:\n> > > Curt, I think his reply stems from his frustration of chosen content in\n> > > many emails that originate from you. We all pretty well understand\n> > > postgres has a broken feature. We all understand you see zero value in\n\n> > Knowing Don to some extent, I can say with some assurance that his\n> > 'attacks' are never unprovoked.\n\n> Sorry; I'm not aware of the circumstances under which one is supposed\n> to call someone a \"dick-waver\" and other such things on a technical\n> mailing list. Perhaps you can explain to me when one should be\n> doing this, so I too can do it at the appropriate times.\n\nI never said I agreed with his wording; in fact I don't agree with his \nwording. But that's not the point. The point is that the discussion was \ngoing absolutely nowhere, quickly. Don's colorful metaphors (for lack of a \nbetter term) aren't ones I would use, by any means -- but they had the \ndesired effect, didn't they?\n\nThe discussion has since progressed from 'the feature is broken because I say \nit is' to 'how can we fix the broken feature' -- which is where Don, Hannu, \nand Greg, unless I am mistaken, were all going towards. If you, Curt, were \njust trying to play devil's advocate you went just a little too far, too \nvehemently, and were flamed in the old alt.flame tradition. Had the words \n'Hitler' or 'Nazi' shown up we would have known it had gone the next step -- \nand I'm just relating Usenet tradition here -- I'm not a party to that \ntradition, but I certainly have seen enough flamewars to know what they \ndisintegrate into. I for one am glad you toned down the 'devil's advocate' \npoint of view so that a useful discussion arises (which has indeed happened).\n\nAnd I just stated my experience with Don -- no agreement (or judgment) was \nimplied or stated. I've just developed code beside him before. I wish I had \nmore time to develop code on OpenACS, in fact -- but that's even further \noff-topic. Don Baccus is well-mannered and even tempered until provoked. \nWhen provoked; well, you see what happens.\n\nNow, let's see the constructive discussion continue, without authoritarian \nposturing (for lack of a more technical term for Don's colorful metaphor).\n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Wed, 14 Aug 2002 11:55:55 -0400",
"msg_from": "Lamar Owen <lamar.owen@wgcr.org>",
"msg_from_op": false,
"msg_subject": "Re: OOP real life example (was Re: Why is MySQL more"
},
{
"msg_contents": "Greg Copeland <greg@CopelandConsulting.Net> writes:\n> On Tue, 2002-08-13 at 23:43, Curt Sampson wrote:\n>> And I think a detailed description comes most easily when you have\n>> a logical model to work from.\n\n> I completely agree. This is why I want/wanted to pursue the theory and\n> existing implementations angle.\n\n> Seems like everyone trying to jump on \"index spanning\" is premature.\n\nI agree. Table-spanning indexes would be a large, complex,\ndifficult-to-get-right feature. Before diving into that we should get\nsome idea of just how we'd actually use them, and whether that's the\nonly big chunk of work standing between us and a more useful inheritance\nfeature. I'm afraid we might do all that effort and then discover there\nare other showstoppers.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 12:05:37 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance "
},
{
"msg_contents": "On Wed, 2002-08-14 at 11:17, Ross J. Reedstrom wrote:\n> On Wed, Aug 14, 2002 at 09:39:06AM -0500, Greg Copeland wrote:\n> > On Tue, 2002-08-13 at 23:43, Curt Sampson wrote:\n> > > Just my opinion of course, but I think it would be best to have a\n> > > detailed description of how everything in inheritance is supposed to\n> > > work, write a set of tests from that, and then fix the implementation to\n> > > conform to the tests.\n> > > \n> > > And I think a detailed description comes most easily when you have\n> > > a logical model to work from.\n> > \n> > I completely agree. This is why I want/wanted to pursue the theory and\n> > existing implementations angle.\n> \n> In theory, it sounds like a good idea. In practice ... ;-)\n> \n> > Seems like everyone trying to jump on \"index spanning\" is premature.\n> \n> Seems like some people haven't looked at the history of the OO\n> implementation in PostgreSQL.\n> \n> Actually, I think you'll find that once a PostgreSQL DBA gets to\n> the point of designing a sufficently complex schema that inheritance\n> might be useful, they quickly bump up against the lack of index and\n> constraint spanning (most notably, referential integrity), and stop\n\nOnly took a few minutes to write a couple of triggers to manage most of\nmy needs. Not very generic, but gives me cross table uniqueness ;)\n\n",
"msg_date": "14 Aug 2002 12:49:08 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance"
},
{
"msg_contents": "On Wed, 14 Aug 2002, Tom Lane wrote:\n\n> I agree. Table-spanning indexes would be a large, complex,\n> difficult-to-get-right feature. Before diving into that we should get\n> some idea of just how we'd actually use them, and whether that's the\n> only big chunk of work standing between us and a more useful inheritance\n> feature. I'm afraid we might do all that effort and then discover there\n> are other showstoppers.\n\nThat's my biggest fear as well. Here are a couple of possible\nassertions we could make about supertables and subtables that have,\nI think, some fairly far-reaching implications.\n\n 1. All constraints one places on a supertable must \"work.\" That is,\n they must apply on all subtables as well, and must always be true\n on the supertable. For example, if I apply the constraint, \"this\n int field must be no smaller than 1 and no larger than 100,\" to the\n supertable, this must apply to all subtables, and you must not be\n able to remove the constraint from just a subtable.\"\n\n 2. It must not be possible apply a constraint to a supertable that\n could be violated.\n\n 3. All constraints that one can apply to a non-inherited table in\n postgresql must also be able to be applied to a supertable.\n\nDepending on which of these you want to implement, and how you do\nit, you may get yourself into a position where you can create a\ntable that that cannot have subtables, or cannot put certain constraints\non supertables....\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Thu, 15 Aug 2002 09:05:51 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": true,
"msg_subject": "Re: Inheritance "
},
{
"msg_contents": "Curt Sampson <cjs@cynic.net> writes:\n> That's my biggest fear as well. Here are a couple of possible\n> assertions we could make about supertables and subtables that have,\n> I think, some fairly far-reaching implications.\n\nCHECK-style constraints don't seem like a huge issue to me. We already\nhave recursive ALTER TABLE ADD CONSTRAINT, and IIRC we do actually\narrange for CHECK constraints on a parent to be inherited when a child\nis created. We could argue about whether, for example, non-recursive\nADD CONSTRAINT should be disallowed or not --- but that's not any kind\nof implementation showstopper, just a definitional issue about\nflexibility vs. safety.\n\nIt's nonlocal constraints that are the problem, and here foreign keys\nand UNIQUE constraints are certainly the canonical examples. Both of\nthese would be largely solved with table-spanning indexes I think.\n\nWhat I'm not sure about is what other gotchas may be lurking...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 20:20:11 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance "
},
{
"msg_contents": "On Wed, 14 Aug 2002, Tom Lane wrote:\n\n> It's nonlocal constraints that are the problem, and here foreign keys\n> and UNIQUE constraints are certainly the canonical examples. Both of\n> these would be largely solved with table-spanning indexes I think.\n\nNote that the other obvious way to solve this would be to store all of\nthe information inherited from the parent in the parent table, so that\nyou don't have to do anything special to make all of the constraints and\nwhatnot apply.\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Thu, 15 Aug 2002 10:20:01 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": true,
"msg_subject": "Re: Inheritance "
}
] |
[
{
"msg_contents": "Hi all,\n\nIn 7.2.1, MasterInit script (rserv command) does not work correctly,\nbecause $libdir is not defined in it.\n\nI think $libdir should be replaced in Makefile as below.\n\nIs it correct?\n\n--- Makefile Mon Mar 11 13:39:14 2002\n+++ /tmp/Makefile Tue Aug 13 18:19:21 2002\n@@ -22,10 +22,10 @@\n all: $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME)\n \n %.sql: %.sql.in\n- sed 's,@MODULE_FILENAME@,$$libdir/$(NAME),g' $< >$@\n+ sed 's,@MODULE_FILENAME@,$(libdir)/$(NAME),g' $< >$@\n \n $(PERLS) $(TCLS) $(SCRIPTS): %: %.in\n- sed -e 's,@MODULE_FILENAME@,$$libdir/$(NAME),g' \\\n+ sed -e 's,@MODULE_FILENAME@,$(libdir)/$(NAME),g' \\\n -e 's:@SQLDIR@:$(datadir)/contrib:g' \\\n -e 's:@BINDIR@:$(bindir):g' \\\n -e 's:@LIBDIR@:$(datadir)/contrib:g' $< >$@\n\n-- \nNAGAYASU Satoshi <snaga@snaga.org>\n",
"msg_date": "Tue, 13 Aug 2002 18:28:03 +0900",
"msg_from": "Satoshi Nagayasu <snaga@snaga.org>",
"msg_from_op": true,
"msg_subject": "Is contrib/rserv/Makefile broken?"
},
{
"msg_contents": "Satoshi Nagayasu writes:\n\n> I think $libdir should be replaced in Makefile as below.\n\nNo, it's correct as is. Read the documentation.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Tue, 13 Aug 2002 21:52:57 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: Is contrib/rserv/Makefile broken?"
}
] |
[
{
"msg_contents": "\n> > OK, seeing as no one voted, and only Tom and I objected originally, we\n> > will keep the code as Thomas has applied it, namely that PGXLOG/-X is\n> > recognized by initdb, postmaster, postgres, and pg_ctl.\n> \n> We will? It looks to me like Thomas lost the vote 2-to-1.\n> \n> Unless there are more votes, I'm going to *insist* that this code be\n> changed. It's dangerous and offers no offsetting benefit. XLOG\n> location should be settable at initdb, noplace later.\n\n2 would get my vote too. \nMy approach though would be that initdb simply creates \na symlink. I like to find the files without resorting to additional utilities\nor an sql, at least on platforms that support symlinks. This makes the task of \nknowing what needs to be backed up easier.\n\nMy approach to tablespaces would probably also have symlinks in the datadir.\n\nAndreas\n",
"msg_date": "Tue, 13 Aug 2002 12:45:37 +0200",
"msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>",
"msg_from_op": true,
"msg_subject": "Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.cbacke "
}
] |
[
{
"msg_contents": "Hi all,\n\nI'm thinking that temporary views should be pretty trivial to\nimplement.\n\n* Allow temporary views\n\nThis should be as simple as modifying gram.y (to set\nViewStmt->view->istemp) and some logic in RemoveTempRelations() to remove\nthe view's rule\n\n* Require view using temporary tables to be temporary views\n\nThis is the non-trivial part. If you are creating a view on just a\ntemporary table there's no problem. But what happens when do the\nfollowing?\n\nCREATE VIEW abc AS select * from tab1,tab2,temp_tab3 ...\n\nSQL99 avoids this with syntax rule 6 of 11.21 <view definition>\n\n\tNo <table reference> generally contained in the <query expression> shall\n\tidentify any declared local temporary table.\n\nThere are a few ways it could be implemented:\n\n1) SQL99\n2) Views whose <query epression> contains one or more <table references>\nto temporary tables are created as temporary views\n3) Views whose <query epression> contains one or more <table references>\nto temporary tables must be explicitly include the TEMP[ORARY] syntax.\n\nThoughts?\n\nGavin\n\n",
"msg_date": "Tue, 13 Aug 2002 21:38:05 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": true,
"msg_subject": "Temporary Views"
},
{
"msg_contents": "Gavin Sherry wrote:\n> Hi all,\n> \n> I'm thinking that temporary views should be pretty trivial to\n> implement.\n> \n> * Allow temporary views\n> \n> This should be as simple as modifying gram.y (to set\n> ViewStmt->view->istemp) and some logic in RemoveTempRelations() to remove\n> the view's rule\n\nYep, pretty simple.\n\n> * Require view using temporary tables to be temporary views\n> \n> This is the non-trivial part. If you are creating a view on just a\n> temporary table there's no problem. But what happens when do the\n> following?\n> \n> CREATE VIEW abc AS select * from tab1,tab2,temp_tab3 ...\n> \n> SQL99 avoids this with syntax rule 6 of 11.21 <view definition>\n> \n> \tNo <table reference> generally contained in the <query expression> shall\n> \tidentify any declared local temporary table.\n> \n> There are a few ways it could be implemented:\n> \n> 1) SQL99\n> 2) Views whose <query epression> contains one or more <table references>\n> to temporary tables are created as temporary views\n> 3) Views whose <query epression> contains one or more <table references>\n> to temporary tables must be explicitly include the TEMP[ORARY] syntax.\n\nThe idea is that if the temp table goes away, we don't want the view\ncontinuing to exist. I think if there are any temp tables in the view,\nthe view _has_ to be specified by the user as temporary, or we throw an\nerror telling them it has to be temporary.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 11:08:58 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Gavin Sherry <swm@linuxworld.com.au> writes:\n> I'm thinking that temporary views should be pretty trivial to\n> implement.\n\n... except not so trivial, per the rest of your note.\n\nDo we actually need any such feature? Views on temp tables already work\ncorrectly in CVS tip: the implicit DROP CASCADE on temp tables at\nbackend exit makes such views go 'way too.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 11:11:23 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "Tom Lane wrote:\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > I'm thinking that temporary views should be pretty trivial to\n> > implement.\n> \n> ... except not so trivial, per the rest of your note.\n> \n> Do we actually need any such feature? Views on temp tables already work\n> correctly in CVS tip: the implicit DROP CASCADE on temp tables at\n> backend exit makes such views go 'way too.\n\nOh. but RESTRICT is the default. Seems like the view should go away no\nmatter what, and if they mix temp and non-temp tables, is it obvious\nthat the view will disappear if they didn't specify TEMP on view\ncreation.\n\nI can go either way, but I want to make sure we agree so I can modify\nthe TODO accordingly.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 11:18:17 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "On Tue, 2002-08-13 at 11:11, Tom Lane wrote:\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > I'm thinking that temporary views should be pretty trivial to\n> > implement.\n> \n> ... except not so trivial, per the rest of your note.\n> \n> Do we actually need any such feature? Views on temp tables already work\n> correctly in CVS tip: the implicit DROP CASCADE on temp tables at\n> backend exit makes such views go 'way too.\n\nI was playing with this a while back (when I had initially added CASCADE\nto tables). I believe that in the event of a crash the temp tables are\nnot removed until their next use. This means that stale *real* items\nmay litter the system but the temp table no longer exists in these rare\noccurrences.\n\nHowever, having all temporary items removed during backend startup would\nremove this case.\n\n",
"msg_date": "13 Aug 2002 11:20:53 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "On Tue, 2002-08-13 at 11:18, Bruce Momjian wrote:\n> Tom Lane wrote:\n> > Gavin Sherry <swm@linuxworld.com.au> writes:\n> > > I'm thinking that temporary views should be pretty trivial to\n> > > implement.\n> > \n> > ... except not so trivial, per the rest of your note.\n> > \n> > Do we actually need any such feature? Views on temp tables already work\n> > correctly in CVS tip: the implicit DROP CASCADE on temp tables at\n> > backend exit makes such views go 'way too.\n> \n> Oh. but RESTRICT is the default. Seems like the view should go away no\n> matter what, and if they mix temp and non-temp tables, is it obvious\n> that the view will disappear if they didn't specify TEMP on view\n> creation.\n\nWhen the backend exits the code that removes temp tables is CASCADE by\ndefault and anything depending on it will disappear.\n\n",
"msg_date": "13 Aug 2002 11:22:47 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Rod Taylor wrote:\n> On Tue, 2002-08-13 at 11:18, Bruce Momjian wrote:\n> > Tom Lane wrote:\n> > > Gavin Sherry <swm@linuxworld.com.au> writes:\n> > > > I'm thinking that temporary views should be pretty trivial to\n> > > > implement.\n> > > \n> > > ... except not so trivial, per the rest of your note.\n> > > \n> > > Do we actually need any such feature? Views on temp tables already work\n> > > correctly in CVS tip: the implicit DROP CASCADE on temp tables at\n> > > backend exit makes such views go 'way too.\n> > \n> > Oh. but RESTRICT is the default. Seems like the view should go away no\n> > matter what, and if they mix temp and non-temp tables, is it obvious\n> > that the view will disappear if they didn't specify TEMP on view\n> > creation.\n> \n> When the backend exits the code that removes temp tables is CASCADE by\n> default and anything depending on it will disappear.\n\nOh, OK, that is interesting. So that only leaves the issue of not\nspecifying TEMP in a case of views using mixed temp/non-temp tables. We\ndon't specify TEMP when creating an index on a temp table, and it is\nauto-destroyed. I guess it is OK that we don't specify TEMP on a view\ncreation using a temp table, except that the view can have a mix of temp\nand non-temp while an index is just on one table.\n\nI can go either way on this.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 11:31:23 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> I can go either way on this.\n\nAFAICS \"create temp view\" would have some small advantage of keeping the\nview's name out of possibly-public permanent namespaces, so the step of\njust adding the TEMP option to CREATE VIEW may be worth doing. The\nadvantage isn't very big but neither is the amount of work.\n\nTrying to prohibit non-temp views on temp tables strikes me as more work\nthan it's worth; that TODO item was written before we had dependencies,\nand I think it's obsolete. Basically the point of the TODO was to avoid\nhaving broken views --- and we have solved that problem.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 11:43:49 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > I can go either way on this.\n> \n> AFAICS \"create temp view\" would have some small advantage of keeping the\n> view's name out of possibly-public permanent namespaces, so the step of\n> just adding the TEMP option to CREATE VIEW may be worth doing. The\n> advantage isn't very big but neither is the amount of work.\n\nWhat about indexes? Do indexes on temp tables exist in the temp\nnamespace? I would think they should by default, as well as views based\non temp tables. Certainly no one else should be able to see the temp\nindex/views.\n\n> Trying to prohibit non-temp views on temp tables strikes me as more work\n> than it's worth; that TODO item was written before we had dependencies,\n> and I think it's obsolete. Basically the point of the TODO was to avoid\n> having broken views --- and we have solved that problem.\n\nYes, if it auto-temps because it is based on a temp object, that is fine\nby me. However, based on your comments above, I think it should\nauto-temp fully, rather than just auto-destroy.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 12:00:53 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> What about indexes? Do indexes on temp tables exist in the temp\n> namespace?\n\nYes, a fortiori: any index exists in its table's namespace. Seems\npretty irrelevant to the point at hand, though.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 12:09:22 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "Rod Taylor <rbt@zort.ca> writes:\n> I was playing with this a while back (when I had initially added CASCADE\n> to tables). I believe that in the event of a crash the temp tables are\n> not removed until their next use. This means that stale *real* items\n> may litter the system but the temp table no longer exists in these rare\n> occurrences.\n\nHuh? The view goes away at exactly the same time the temp table does.\nIf you suffer a backend crash then that may be postponed ... but the\nview continues to work up till the instant that it's removed.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 12:22:38 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > What about indexes? Do indexes on temp tables exist in the temp\n> > namespace?\n> \n> Yes, a fortiori: any index exists in its table's namespace. Seems\n> pretty irrelevant to the point at hand, though.\n\nJust checking. So the index exists in the same namespace as the table. \nMakes sense. Same with sequences, I assume.\n\nOf course, views can represent multiple tables so I think they should go\ninto the names space with the temp tables.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 12:23:40 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "On Tue, 2002-08-13 at 12:22, Tom Lane wrote:\n> Rod Taylor <rbt@zort.ca> writes:\n> > I was playing with this a while back (when I had initially added CASCADE\n> > to tables). I believe that in the event of a crash the temp tables are\n> > not removed until their next use. This means that stale *real* items\n> > may litter the system but the temp table no longer exists in these rare\n> > occurrences.\n> \n> Huh? The view goes away at exactly the same time the temp table does.\n> If you suffer a backend crash then that may be postponed ... but the\n> view continues to work up till the instant that it's removed.\n\nAfter a backend crash the temp tables exist, but are not usable by the\ncurrent backend as it is different than the one which originally created\nthe temp table (the crash causing a restart and everything).\n\nSo non-temp items which depend on the no longer usable temp table will\nbe broken until they are scrubbed, which does not happen until the next\ntime a temp table is created.\n\n\nNot that it really matters, but moving a temp-table destruction event\ninto the startup sequence would solve it.\n\n",
"msg_date": "13 Aug 2002 12:33:12 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "On Tue, 2002-08-13 at 20:43, Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > I can go either way on this.\n> \n> AFAICS \"create temp view\" would have some small advantage of keeping the\n> view's name out of possibly-public permanent namespaces, so the step of\n> just adding the TEMP option to CREATE VIEW may be worth doing. The\n> advantage isn't very big but neither is the amount of work.\n\nActually I think that having the views on any temp table also temp is\nmandatory, or else these views will be broken in all other backends than\nthe one that created them (or expose other backends temp tables and are\nthereby a security risk).\n\n> Trying to prohibit non-temp views on temp tables strikes me as more work\n> than it's worth;\n\nWhat I would expect (if I had not read this thread and did not know\nanything about PG's view implementation) would be that if view on temp\ntable was not defined temp itself, it would be automatically recompiled\non first use after the temp table was created in current session. So\nforcing it to be explicitly declared TEMP would save me from that\nmistake. \n\nI'd expect automatic recompilation of view to be done sometime in future\nvia saving view definition text, so that 'select * from t' would still\nreturn all columns after \"alter table t add column k\"\n\n> that TODO item was written before we had dependencies, and I think\n> it's obsolete. Basically the point of the TODO was to avoid\n> having broken views --- and we have solved that problem.\n\nWe may have broken views again when \"alter table drop column\" gets done\n.\n\n----------\nHannu\n",
"msg_date": "13 Aug 2002 21:50:17 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "On Wed, 2002-08-14 at 00:10, Rod Taylor wrote:\n> > > that TODO item was written before we had dependencies, and I think\n> > > it's obsolete. Basically the point of the TODO was to avoid\n> > > having broken views --- and we have solved that problem.\n> > \n> > We may have broken views again when \"alter table drop column\" gets done\n> \n> Any view depending on a column which is dropped should also be removed\n> via the dependency code. Views won't break but you can't drop a column\n> that is used in a view without specifying cascade.\n> \n> This is a case where create or replace view is useful. Change the view\n> definition to no longer be dependent on the object you wish to drop.\n\nin case of a 'SELECT *' view it could just be an (automatic) recompile.\n\nthe same in case column type gets changed.\n\n---------------\nHannu\n\n",
"msg_date": "13 Aug 2002 22:31:27 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "> > that TODO item was written before we had dependencies, and I think\n> > it's obsolete. Basically the point of the TODO was to avoid\n> > having broken views --- and we have solved that problem.\n> \n> We may have broken views again when \"alter table drop column\" gets done\n\nAny view depending on a column which is dropped should also be removed\nvia the dependency code. Views won't break but you can't drop a column\nthat is used in a view without specifying cascade.\n\nThis is a case where create or replace view is useful. Change the view\ndefinition to no longer be dependent on the object you wish to drop.\n\n\n",
"msg_date": "13 Aug 2002 15:10:09 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Hannu Krosing <hannu@tm.ee> writes:\n> We may have broken views again when \"alter table drop column\" gets done\n\nIt is done, and we do not have broken views.\n\nregression=# create table t (f1 int, f2 int, f3 int);\nCREATE TABLE\nregression=# create view v as select f1,f2 from t;\nCREATE VIEW\nregression=# alter table t drop column f3;\nALTER TABLE\nregression=# alter table t drop column f2;\nNOTICE: rule _RETURN on view v depends on table t column f2\nNOTICE: view v depends on rule _RETURN on view v\nERROR: Cannot drop table t column f2 because other objects depend on it\n Use DROP ... CASCADE to drop the dependent objects too\nregression=#\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 15:30:48 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "On Tue, 2002-08-13 at 21:50, Hannu Krosing wrote:\n> On Tue, 2002-08-13 at 20:43, Tom Lane wrote:\n> > Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > > I can go either way on this.\n> > \n> > AFAICS \"create temp view\" would have some small advantage of keeping the\n> > view's name out of possibly-public permanent namespaces, so the step of\n> > just adding the TEMP option to CREATE VIEW may be worth doing. The\n> > advantage isn't very big but neither is the amount of work.\n> \n> Actually I think that having the views on any temp table also temp is\n> mandatory, or else these views will be broken in all other backends than\n> the one that created them (or expose other backends temp tables and are\n> thereby a security risk).\n\nIt seems to be a broken view not security risk in 7.2.1\n\nbackend 1:\n\nhannu=# create temp table tmp_t1( i int);\nCREATE\nhannu=# create view tmp_v1 as select * from tmp_t1;\nCREATE\nhannu=# select * from tmp_v1;\n i \n---\n(0 rows)\n\n\nbackend 2:\n\nhannu=# select * from tmp_v1;\nERROR: Relation \"tmp_t1\" does not exist\nhannu=# create temp table tmp_t1( i int);\nCREATE\nhannu=# select * from tmp_v1;\nERROR: Relation \"tmp_t1\" with OID 34281 no longer exists\n\n----------------\nHannu\n\n",
"msg_date": "14 Aug 2002 01:10:51 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "On Wed, 2002-08-14 at 04:12, Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > Yes, I realize that, but when I create an index on a temp table, I can\n> > create it even though someone else tries to do the same in another\n> > session. If these views on temp tables go away on session exit, and\n> > can't be reliably accessed by other users, they should be in the temp\n> > schema and therefore invisible to other users and to prevent name\n> > conflicts.\n> \n> I think we should provide the *facility* for temp views; that doesn't\n> equate to feeling that we must have an enforcement mechanism to prevent\n> you from using a non-temp view on a temp table. The enforcement\n> mechanism would be notably more work to write and would slow down the\n> creation of views (at least non-temp ones),\n\nAFAIC we already have pg_depends, how much more work would it be to\ncheck that none of the tables a new view depends on are temp tables ?\n\nBoth the table definitions and pg_depend entries should be still in\ncache.\n\nIt should only be noticably slower in case we have to rollback the view\ncreation for non-temp view on temp table case. I could live with error\nhandling being a bit slow.\n\n> in order to achieve what?\n> Not much that I can see. Admittedly, it's a bit silly to use a\n> non-temp view with a temp table, but I don't think the system needs to\n> go out of its way to prevent silliness.\n\nIt would be a pity to lose lots of views on connection close just\nbecause one of then happend to reference a temp table. If the view is in\nfact temporary (in the temporal sense ;) then it better be declared as\nsuch. \n\nGiving the least amount of surprise to users is always a good policy.\n\n> (Come to think of it, it might not be completely silly to do, either.\n> Suppose you want to use a temp table, but some legacy bit of code\n> insists on accessing the table using a fully-qualified schema name.\n> You could create a view foo.bar that references temp table baz, and\n> thereby bypass the fact that you don't know a schema name for baz.\n\nThis seems to be a workaround for the fact that we store temp tables in\ntheir own schema.\n\nBTW, what does SQL standard say about using TEMP schemas for TEMP\ntables?\n\n> A bit far-fetched I agree, since if the legacy code is in your client\n> app you can probably fix it instead; but maybe there are more legitimate\n> uses.)\n\nYou mean a scenario where the legacy client code creates a temp table\nbut dont know how to access it ?\n\nPerhaps we should have SYNONYMS/ALIASES for such cases. They should act\nlike symlinks.\n\n-------------\nHannu\n\n",
"msg_date": "14 Aug 2002 02:45:20 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Hannu Krosing <hannu@tm.ee> writes:\n> It seems to be a broken view not security risk in 7.2.1\n\nThe implementation of temp tables has changed completely in CVS tip,\nso experiments with 7.2 aren't very relevant. In CVS tip I believe\nyou *could* read the contents of someone else's temp table, assuming\nyou had permissions to read the view. However, you'd not be guaranteed\nto get up-to-date information, since the guy who actually owns the temp\ntable would be using his local-buffer manager for access to it; there\nmight be many pages that you'd see stale information from because the\nonly up-to-date copy is in local memory of the owning backend.\n\nI see some potential for confusion here, but not really any\ncrash-the-database scenarios. I also do not see a security risk:\nyou did grant the other guy read permission on your view, after all.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 18:36:36 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "Tom Lane wrote:\n> Hannu Krosing <hannu@tm.ee> writes:\n> > It seems to be a broken view not security risk in 7.2.1\n> \n> The implementation of temp tables has changed completely in CVS tip,\n> so experiments with 7.2 aren't very relevant. In CVS tip I believe\n> you *could* read the contents of someone else's temp table, assuming\n> you had permissions to read the view. However, you'd not be guaranteed\n> to get up-to-date information, since the guy who actually owns the temp\n> table would be using his local-buffer manager for access to it; there\n> might be many pages that you'd see stale information from because the\n> only up-to-date copy is in local memory of the owning backend.\n> \n> I see some potential for confusion here, but not really any\n> crash-the-database scenarios. I also do not see a security risk:\n> you did grant the other guy read permission on your view, after all.\n\nDoes every other user see the view name on his temp table? Can two\npeople create a view on a temp table at the same time? It seems not:\n\t\n\ttest=> create temp table x1(x int);\n\tCREATE TABLE\n\ttest=> create view x2 as select * from x1;\n\tERROR: Relation 'x2' already exist\n\nSeems this should work.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 18:43:31 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Does every other user see the view name\n\nIf he looks in the schema where the view is created, sure --- it's no\ndifferent from any other non-temp table or view.\n\n> ... on his temp table?\n\nUm, are you thinking that a view V created to refer to user 1's temp\ntable T would refer to some other user's temp table T if accessed by\nthat other user? That's not how it works. The reference is absolute,\nie, by OID.\n\n> Can two\n> people create a view on a temp table at the same time?\n\nNot the same name in the same schema, but this has nothing to do with\nwhat the views refer to; that's just a plain old name collision.\n\nCREATE TEMP VIEW would be handy for avoiding name collisions if you want\nto use the same temp view name in different clients. But it'd only hide\nthe *name* of the view (by putting it in your private temp schema); it\nhas nothing to do with access semantics.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 18:51:50 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > Does every other user see the view name\n> \n> If he looks in the schema where the view is created, sure --- it's no\n> different from any other non-temp table or view.\n> \n> > ... on his temp table?\n> \n> Um, are you thinking that a view V created to refer to user 1's temp\n> table T would refer to some other user's temp table T if accessed by\n> that other user? That's not how it works. The reference is absolute,\n> ie, by OID.\n> \n> > Can two\n> > people create a view on a temp table at the same time?\n> \n> Not the same name in the same schema, but this has nothing to do with\n> what the views refer to; that's just a plain old name collision.\n> \n> CREATE TEMP VIEW would be handy for avoiding name collisions if you want\n> to use the same temp view name in different clients. But it'd only hide\n> the *name* of the view (by putting it in your private temp schema); it\n> has nothing to do with access semantics.\n\nYes, I realize that, but when I create an index on a temp table, I can\ncreate it even though someone else tries to do the same in another\nsession. If these views on temp tables go away on session exit, and\ncan't be reliably accessed by other users, they should be in the temp\nschema and therefore invisible to other users and to prevent name\nconflicts.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 18:56:36 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Yes, I realize that, but when I create an index on a temp table, I can\n> create it even though someone else tries to do the same in another\n> session. If these views on temp tables go away on session exit, and\n> can't be reliably accessed by other users, they should be in the temp\n> schema and therefore invisible to other users and to prevent name\n> conflicts.\n\nI think we should provide the *facility* for temp views; that doesn't\nequate to feeling that we must have an enforcement mechanism to prevent\nyou from using a non-temp view on a temp table. The enforcement\nmechanism would be notably more work to write and would slow down the\ncreation of views (at least non-temp ones), in order to achieve what?\nNot much that I can see. Admittedly, it's a bit silly to use a\nnon-temp view with a temp table, but I don't think the system needs to\ngo out of its way to prevent silliness.\n\n(Come to think of it, it might not be completely silly to do, either.\nSuppose you want to use a temp table, but some legacy bit of code\ninsists on accessing the table using a fully-qualified schema name.\nYou could create a view foo.bar that references temp table baz, and\nthereby bypass the fact that you don't know a schema name for baz.\nA bit far-fetched I agree, since if the legacy code is in your client\napp you can probably fix it instead; but maybe there are more legitimate\nuses.)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 19:12:07 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > Yes, I realize that, but when I create an index on a temp table, I can\n> > create it even though someone else tries to do the same in another\n> > session. If these views on temp tables go away on session exit, and\n> > can't be reliably accessed by other users, they should be in the temp\n> > schema and therefore invisible to other users and to prevent name\n> > conflicts.\n> \n> I think we should provide the *facility* for temp views; that doesn't\n> equate to feeling that we must have an enforcement mechanism to prevent\n> you from using a non-temp view on a temp table. The enforcement\n> mechanism would be notably more work to write and would slow down the\n> creation of views (at least non-temp ones), in order to achieve what?\n> Not much that I can see. Admittedly, it's a bit silly to use a\n> non-temp view with a temp table, but I don't think the system needs to\n> go out of its way to prevent silliness.\n\nMy feeling is that either the view is temporary, fully, or it isn't. I\ndon't see having it in the public namespace _and_ removing it on session\nexit as defensible. I would like to update the TODO list to say:\n\n\tPlace views on temporary tables in temporary namespaces\n\nIt may be difficult, but I clearly think it is a bug if we don't do it.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 19:16:44 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> My feeling is that either the view is temporary, fully, or it isn't. I\n> don't see having it in the public namespace _and_ removing it on session\n> exit as defensible.\n\nI disagree ... (and who said this was necessarily the public namespace,\nanyway? Perhaps the view is in a private, but not temp namespace.)\n\nBut I doubt we'll convince each other. Can we hear some other opinions?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 19:23:58 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "On Tue, 13 Aug 2002, Tom Lane wrote:\n\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > My feeling is that either the view is temporary, fully, or it isn't. I\n> > don't see having it in the public namespace _and_ removing it on session\n> > exit as defensible.\n> \n> I disagree ... (and who said this was necessarily the public namespace,\n> anyway? Perhaps the view is in a private, but not temp namespace.)\n> \n> But I doubt we'll convince each other. Can we hear some other opinions?\n\nSQL99 is pretty clear about temporary tables, at least.\n\n From SQL99 4.16 'Tables' pp. 40,41\n\n---\n\nA global temporary table is a named table defined by a <table definition>\nthat specifies GLOBAL TEMPORARY. A created local temporary table is a\nnamed table defined by a <table definition> that specifies LOCAL\nTEMPORARY. Global and created local temporary tables are effectively\nmaterialized only when referenced in an SQL-session. Every SQL-client\nmodule in every SQL-session that references a created local temporary\ntable causes a distinct instance of that created local temporary table to\nbe materialized. That is, the contents of a global temporary table or a\ncreated local temporary table cannot be shared between SQL-sessions.\n\nIn addition, the contents of a created local temporary table cannot be\nshared between SQL-client modules of a single SQL-session. The definition\nof a global temporary table or a created local temporary table appears in\na schema. In SQL language, the name and the scope of the name of a global\ntemporary table or a created local temporary table are indistinguishable\nfrom those of a persistent base table. However, because global temporary\ntable contents are distinct within SQL-sessions, and created local\ntemporary tables are distinct within SQL-client modules within\nSQL-sessions, the effective <schema name> of the schema in which the\nglobal temporary table or the created local temporary table is\ninstantiated is an implementation-dependent <schemaname> that may be\nthought of as having been effectively derived from the <schema name> of\nthe schema in which the global temporary table or created local temporary\ntable is defined and the implementation-dependent SQL-session identifier\nassociated with the SQL-session.\n\nIn addition, the effective <schema name> of the schema in which the\ncreated local temporary table is instantiated may be thought of as being\nfurther qualified by a unique implementation-dependent name associated\nwith the SQL-client module in which the created local temporary table is\nreferenced.\n\n---\n\nSo surely SQL sessions should not be able to see each other's temporary\ntables the the views dependent upon them.\n\nGavin\n\n",
"msg_date": "Wed, 14 Aug 2002 10:19:24 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": true,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "\nYou want to hear something funny? When I see the standards quoted, I\njump to the end to find out what the person says it really means. I\nfind reading those standards painful. I am glad others are reading\nthem.\n\n---------------------------------------------------------------------------\n\nGavin Sherry wrote:\n> SQL99 is pretty clear about temporary tables, at least.\n> \n> >From SQL99 4.16 'Tables' pp. 40,41\n> \n> ---\n> \n> A global temporary table is a named table defined by a <table definition>\n> that specifies GLOBAL TEMPORARY. A created local temporary table is a\n> named table defined by a <table definition> that specifies LOCAL\n> TEMPORARY. Global and created local temporary tables are effectively\n> materialized only when referenced in an SQL-session. Every SQL-client\n> module in every SQL-session that references a created local temporary\n> table causes a distinct instance of that created local temporary table to\n> be materialized. That is, the contents of a global temporary table or a\n> created local temporary table cannot be shared between SQL-sessions.\n> \n> In addition, the contents of a created local temporary table cannot be\n> shared between SQL-client modules of a single SQL-session. The definition\n> of a global temporary table or a created local temporary table appears in\n> a schema. In SQL language, the name and the scope of the name of a global\n> temporary table or a created local temporary table are indistinguishable\n> from those of a persistent base table. However, because global temporary\n> table contents are distinct within SQL-sessions, and created local\n> temporary tables are distinct within SQL-client modules within\n> SQL-sessions, the effective <schema name> of the schema in which the\n> global temporary table or the created local temporary table is\n> instantiated is an implementation-dependent <schemaname> that may be\n> thought of as having been effectively derived from the <schema name> of\n> the schema in which the global temporary table or created local temporary\n> table is defined and the implementation-dependent SQL-session identifier\n> associated with the SQL-session.\n> \n> In addition, the effective <schema name> of the schema in which the\n> created local temporary table is instantiated may be thought of as being\n> further qualified by a unique implementation-dependent name associated\n> with the SQL-client module in which the created local temporary table is\n> referenced.\n> \n> ---\n> \n> So surely SQL sessions should not be able to see each other's temporary\n> tables the the views dependent upon them.\n> \n> Gavin\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 2: you can get off all lists at once with the unregister command\n> (send \"unregister YourEmailAddressHere\" to majordomo@postgresql.org)\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 20:46:05 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Gavin Sherry wrote:\n> On Tue, 13 Aug 2002, Bruce Momjian wrote:\n> \n> > \n> > You want to hear something funny? When I see the standards quoted, I\n> > jump to the end to find out what the person says it really means. I\n> > find reading those standards painful. I am glad others are reading\n> > them.\n> \n> HAH!\n> \n> I did a degree in the history of English literature and French\n> philosophy. I pretty used to reading verbose, obtuse, convoluted\n> literature.\n\nI can't handle Shakespeare nor poetry because it is too confusing.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 20:56:21 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "On Tue, 13 Aug 2002, Bruce Momjian wrote:\n\n> \n> You want to hear something funny? When I see the standards quoted, I\n> jump to the end to find out what the person says it really means. I\n> find reading those standards painful. I am glad others are reading\n> them.\n\nHAH!\n\nI did a degree in the history of English literature and French\nphilosophy. I pretty used to reading verbose, obtuse, convoluted\nliterature.\n\nGavin\n\n\n",
"msg_date": "Wed, 14 Aug 2002 10:56:44 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": true,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "\"Sander Steffann\" <sander@steffann.nl> writes:\n> Now I am thinking about it, referential integrity also behaves funny with\n> temp tables. The following is allowed:\n\n>> create temp table a (x int primary key);\n>> create table b (y int references a(x));\n\nIt is?\n\nregression=# create temp table a (x int primary key);\nNOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'a_pkey' for table 'a'\nCREATE TABLE\nregression=# create table b (y int references a(x));\nNOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)\nERROR: ALTER TABLE / ADD CONSTRAINT: Unable to reference temporary table from permanent table constraint\n\nNow I realize that this existing special-case argues against the\nposition I'm taking. But let's argue from actual facts, not\nmisstatements...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 23:25:34 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "Gavin Sherry <swm@linuxworld.com.au> writes:\n> SQL99 is pretty clear about temporary tables, at least.\n\nIt is ... and in fact the spec's notion of a temp table has nearly\nnothing to do with ours. They contemplate a temp table as an abstract\ntable schema, if you will, that gets instantiated locally within a\nsession upon first use. There is no ability in the spec for two\nsessions to create unrelated temp tables of the same name --- their temp\ntables of the same name must share the same, predefined schema.\n\nI wasn't around when PG's temp table concept was created, but I think\nit's considerably superior to the spec's concept.\n\nI'm willing to compare the spec's notions for guidance, but we must not\ntake it as gospel when we're deciding how temp objects should behave.\nTheir concept of temp-ness is different and very much more limited.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 23:32:59 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "Tom Lane wrote:\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > SQL99 is pretty clear about temporary tables, at least.\n> \n> It is ... and in fact the spec's notion of a temp table has nearly\n> nothing to do with ours. They contemplate a temp table as an abstract\n> table schema, if you will, that gets instantiated locally within a\n> session upon first use. There is no ability in the spec for two\n> sessions to create unrelated temp tables of the same name --- their temp\n> tables of the same name must share the same, predefined schema.\n> \n> I wasn't around when PG's temp table concept was created, but I think\n> it's considerably superior to the spec's concept.\n\nThat was me. I think you were around, though.\n\n> I'm willing to compare the spec's notions for guidance, but we must not\n> take it as gospel when we're deciding how temp objects should behave.\n> Their concept of temp-ness is different and very much more limited.\n\nWell, again, looking at desired practice, I can't see how it can be\nargued that having a view on a temp table _not_ exist the temporary\nnamespace can be defended, and everyone else seems to think it should,\nso, added to TODO:\n\n * Have views on temporary tables exist in the temporary namespace \n\nTODO updated to remove mention of temporary views. We sort of now have\ntemporary views, but not completely so I can't mark those items as done;\nI just removed them:\n\n * Allow temporary views\n * Require view using temporary tables to be temporary views\n\nThey don't behave 100% as temporary because of the namespace conflict.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 23:44:19 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> so, added to TODO:\n> * Have views on temporary tables exist in the temporary namespace \n> TODO updated to remove mention of temporary views.\n\nThat's *clearly* backwards. Ignoring our little argument, I think there\nis no denying that temp views as such are useful --- for example,\nconsider a temp view created on permanent tables to define a\nsession-local shorthand for a complex query.\n\nIf you want a restriction, make it\n\t* Invent temporary views\n\t* Restrict permanent views from referring to temporary tables\nI agree with the first goal and disagree with the second --- but I can\nsee your point of view on the second. OTOH I can't see any reason to\nhardwire tempness-of-views to tempness-of-referenced-tables, because\nthat disallows the obviously useful case of temp view on permanent\ntable.\n\n> I just removed them:\n> * Allow temporary views\n> * Require view using temporary tables to be temporary views\n\nIt was right the first time.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 23:57:41 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views "
},
{
"msg_contents": "On Wed, 2002-08-14 at 08:32, Tom Lane wrote:\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > SQL99 is pretty clear about temporary tables, at least.\n> \n> It is ... and in fact the spec's notion of a temp table has nearly\n> nothing to do with ours. They contemplate a temp table as an abstract\n> table schema, if you will, that gets instantiated locally within a\n> session upon first use. There is no ability in the spec for two\n> sessions to create unrelated temp tables of the same name --- their temp\n> tables of the same name must share the same, predefined schema.\n\nWhat I see is that the (local) TEMP table should be indistinguishable\nfrom persistent table at the SQL level, but visible only in the module\nthat creates it. So it seems to say that TEMP tables should not\n_visibly_ be in separate schemas from the rest of tables, which again\nseems to imply that you should be able to reference them with\n<schema>.<table> .\n\n> I wasn't around when PG's temp table concept was created, but I think\n> it's considerably superior to the spec's concept.\n\nIt seems much like the spec's concept of LOCAL TEMP, with the exception\nthat they are visible everywhere, not only in defining \"module\"\n(whatever a module is ;)\n\n> I'm willing to compare the spec's notions for guidance, but we must not\n> take it as gospel when we're deciding how temp objects should behave.\n\nI just brought it up for your hypothetical case when temp tables needed\nto be referenced by full <schema>.<table> syntax. I don't think it will\nreally be an issue.\n\n> Their concept of temp-ness is different and very much more limited.\n\nNot sure about the \"more limited\" part. I really can't see good reason\nfor having two tables with the same name but different structure.\n\nNot needing to define the temp table in each and every session may seem\ndesirable for some people.\n\nPerhaps we need to get some description of differences from the spec\ninto our docs. Currently there seems to be _no_ mention of temp tables\nat all, at least in Users Guide.\n\n----------\nHannu\n\n",
"msg_date": "14 Aug 2002 09:06:01 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > so, added to TODO:\n> > * Have views on temporary tables exist in the temporary namespace \n> > TODO updated to remove mention of temporary views.\n> \n> That's *clearly* backwards. Ignoring our little argument, I think there\n> is no denying that temp views as such are useful --- for example,\n> consider a temp view created on permanent tables to define a\n> session-local shorthand for a complex query.\n\nOh, yes, good point.\n\n> If you want a restriction, make it\n> \t* Invent temporary views\n> \t* Restrict permanent views from referring to temporary tables\n> I agree with the first goal and disagree with the second --- but I can\n> see your point of view on the second. OTOH I can't see any reason to\n> hardwire tempness-of-views to tempness-of-referenced-tables, because\n> that disallows the obviously useful case of temp view on permanent\n> table.\n> \n> > I just removed them:\n> > * Allow temporary views\n> > * Require view using temporary tables to be temporary views\n> \n> It was right the first time.\n\nWell, my real quandary is \"what do we have now when we create a view\nreferencing a temporary table?\" We have the session-drop of temporary\nviews, but not the visibility restrictions of temporary views, so I\ncan't put \"Invent temporary views\". In fact, given that indexes\nauto-temp themselves, I think views should too, but fully, not just in\ndrop behavior.\n\nRight now, I can do this in two sesssions at the same time:\n\t\n\ttest=> create temp table xxy(x int);\n\tCREATE TABLE\n\ttest=> create index xxa on xxy(x); \n\tCREATE INDEX\n\nThe temp-ness tracks to dependent objects, in visibility too.\n\nIn fact, we can't create a temporary index on a permanent table in our\ncurrent sources. It just auto-temps because it is on a temp table. \nViews should do the same.\n\nWe can add the ability to do explicit temp views on permanent tables,\nbut no one has asked for that yet, as no one has asked for temp indexes;\ntemp indexes just happen on their own because it they use temp tables.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 00:38:29 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
},
{
"msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > so, added to TODO:\n> > * Have views on temporary tables exist in the temporary namespace \n> > TODO updated to remove mention of temporary views.\n> \n> That's *clearly* backwards. Ignoring our little argument, I think there\n> is no denying that temp views as such are useful --- for example,\n> consider a temp view created on permanent tables to define a\n> session-local shorthand for a complex query.\n\nYes, if someone wants that, we can add such a capability to the TODO\nlist, it is just that no one has asked yet. What they have asked for is\nproper handling of views on temporary tables, and we have only the drop\npart of that, not the visiblity part, and frankly, without the\nvisibility part, it is pretty useless.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 00:40:27 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Temporary Views"
}
] |
[
{
"msg_contents": "We have a patch for pg_dump which adds a possibility to dump\na part of table, for example:\n\ndump Top.Science.Astronomy heirarchy from dmoz catalog\n\npg_dump -d -t dmoz -w \"select * from dmoz where path <@ 'Top.Science.Astronomy'\" dmoz\n\nWe found it's very useful. We'd like to extend it to use also with COPY\nbut it has no support for select (of course it will works only for\nspecial case when ALL columns retrieved).\n\nThe question is: Is't worth to submit patch for pg_dump and look into\ncopy code ?\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n",
"msg_date": "Tue, 13 Aug 2002 14:49:39 +0300 (GMT)",
"msg_from": "Oleg Bartunov <oleg@sai.msu.su>",
"msg_from_op": true,
"msg_subject": "db partial dumping with pg_dump "
},
{
"msg_contents": "On Tue, 2002-08-13 at 07:49, Oleg Bartunov wrote:\n> We have a patch for pg_dump which adds a possibility to dump\n> a part of table, for example:\n> \n> dump Top.Science.Astronomy heirarchy from dmoz catalog\n> \n> pg_dump -d -t dmoz -w \"select * from dmoz where path <@ 'Top.Science.Astronomy'\" dmoz\n> \n> We found it's very useful. We'd like to extend it to use also with COPY\n> but it has no support for select (of course it will works only for\n> special case when ALL columns retrieved).\n> \n> The question is: Is't worth to submit patch for pg_dump and look into\n> copy code ?\n\nI've been asked by co-workers for information on how to do this type of\nthing. They do partial table dumps to a development system for the\npurpose of finding / eliminating bugs.\n\nThat said, it may be smart to make the 'select * from <table>' part\nyourself, and let the user supply a where clause.\n\n\n",
"msg_date": "13 Aug 2002 08:00:09 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump"
},
{
"msg_contents": "On 13 Aug 2002, Rod Taylor wrote:\n\n> On Tue, 2002-08-13 at 07:49, Oleg Bartunov wrote:\n> > We have a patch for pg_dump which adds a possibility to dump\n> > a part of table, for example:\n> >\n> > dump Top.Science.Astronomy heirarchy from dmoz catalog\n> >\n> > pg_dump -d -t dmoz -w \"select * from dmoz where path <@ 'Top.Science.Astronomy'\" dmoz\n> >\n> > We found it's very useful. We'd like to extend it to use also with COPY\n> > but it has no support for select (of course it will works only for\n> > special case when ALL columns retrieved).\n> >\n> > The question is: Is't worth to submit patch for pg_dump and look into\n> > copy code ?\n>\n> I've been asked by co-workers for information on how to do this type of\n> thing. They do partial table dumps to a development system for the\n> purpose of finding / eliminating bugs.\n>\n> That said, it may be smart to make the 'select * from <table>' part\n> yourself, and let the user supply a where clause.\n>\n\nfind patch (7.2) in attachement. Note, it works with -d (insert mode) option.\n\n>\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n>\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83",
"msg_date": "Tue, 13 Aug 2002 16:03:45 +0300 (GMT)",
"msg_from": "Oleg Bartunov <oleg@sai.msu.su>",
"msg_from_op": true,
"msg_subject": "Re: db partial dumping with pg_dump"
},
{
"msg_contents": "This patch seems extremely messy to me. Unless I'm missing something,\n-w just plain fails except when you are dumping a specific table (ie,\n-t must be given as well). And heaven help you if you specify a\ndifferent table in -t than the one -w is selecting from. This isn't\nwell thought out.\n\nI'm not at all convinced that such a thing belongs in pg_dump anyway.\nIt'd be more useful as a manually-invokable feature, I think. You\ncan almost do this in psql with\n\tselect * from table where something\n\t\\g outfile\nbut I don't think you can get psql to emit the data in a form that can\nbe reloaded reliably (it won't quote data characters that look the same\nas column delimiters, for instance).\n\nWhat would seem to make sense is adding a WHERE-clause option to\nCOPY TO, and then you could go\n\tCOPY table TO 'myfile' WHERE ...\nWe already have column-list support in COPY, so we can already slice the\ntable vertically --- WHERE would let you slice it horizontally, which\nseems a natural extension. (BTW, has anyone taught psql's \\copy about\ncolumn lists? AFAIR the original patch was only against the backend.)\n\nI'm finding it hard to visualize situations where I'd want the extra\nbaggage of pg_dump for something like this. If I want the schema at\nall, I'll probably want it separate from the data so that I can hack\nthe schema conveniently --- so I'd want to do a \"pg_dump -s -t table\"\nand then do the selective copying separately.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 11:24:38 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump "
},
{
"msg_contents": "On Tue, 2002-08-13 at 20:24, Tom Lane wrote:\n> \n> What would seem to make sense is adding a WHERE-clause option to\n> COPY TO, and then you could go\n> \tCOPY table TO 'myfile' WHERE ...\n\nWhat about :\n\nCOPY table TO 'myfile' [ WHERE cond ] [ AS INSERT [ WITH COLUMN ] ];\n\nto get the data as INSERT INTO statements (pg_dump -d), with optional\ncolumn list (pg_dump -D)\n\n----------------\nHannu\n\n",
"msg_date": "13 Aug 2002 22:00:14 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump"
},
{
"msg_contents": "On Tue, 13 Aug 2002, Tom Lane wrote:\n\n> This patch seems extremely messy to me. Unless I'm missing something,\n> -w just plain fails except when you are dumping a specific table (ie,\n> -t must be given as well). And heaven help you if you specify a\n> different table in -t than the one -w is selecting from. This isn't\n> well thought out.\n\nYou're right. The patch I've sent was no way for submitting to sources !\nI just asked about the feature and attached to message for Rod Taylor.\n\n>\n> I'm not at all convinced that such a thing belongs in pg_dump anyway.\n> It'd be more useful as a manually-invokable feature, I think. You\n> can almost do this in psql with\n> \tselect * from table where something\n> \t\\g outfile\n> but I don't think you can get psql to emit the data in a form that can\n> be reloaded reliably (it won't quote data characters that look the same\n> as column delimiters, for instance).\n>\n\nthat was the reason we don't use psql for dumping\n\n\n> What would seem to make sense is adding a WHERE-clause option to\n> COPY TO, and then you could go\n> \tCOPY table TO 'myfile' WHERE ...\n> We already have column-list support in COPY, so we can already slice the\n> table vertically --- WHERE would let you slice it horizontally, which\n> seems a natural extension. (BTW, has anyone taught psql's \\copy about\n> column lists? AFAIR the original patch was only against the backend.)\n>\n> I'm finding it hard to visualize situations where I'd want the extra\n> baggage of pg_dump for something like this. If I want the schema at\n> all, I'll probably want it separate from the data so that I can hack\n> the schema conveniently --- so I'd want to do a \"pg_dump -s -t table\"\n> and then do the selective copying separately.\n>\n\nthat'd be nice ! I often need such a feature because db at work are often\ntoo large to play at home :-)\n\n\n> \t\t\tregards, tom lane\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org\n>\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n",
"msg_date": "Tue, 13 Aug 2002 20:21:25 +0300 (GMT)",
"msg_from": "Oleg Bartunov <oleg@sai.msu.su>",
"msg_from_op": true,
"msg_subject": "Re: db partial dumping with pg_dump "
},
{
"msg_contents": "On Wed, 2002-08-14 at 00:03, Bruce Momjian wrote:\n> \n> Actually, loading all this stuff into COPY is not the way to go, I\n> think. \n> \n> Informix had:\n> \n> \tUNLOAD TO 'filename'\n> \tSELECT ...\n> \n> I have to admit, this is a superior way to do thing compared to what we\n> have. Is is possible for us to get:\n> \n> \tCOPY TO 'filename'\n> \tSELECT ...\n> \n> It allows any arbitrary table, group by, even order by combination.\n\n\nIt would be more in line with the rest of the system to just allow\nsubselect as 'table'\n\nCOPY (select in,name from mystuff wher id > 10) over10stuff TO stdout;\n\n-----------------\nHannu\n\n",
"msg_date": "13 Aug 2002 22:34:45 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump"
},
{
"msg_contents": "\nActually, loading all this stuff into COPY is not the way to go, I\nthink. \n\nInformix had:\n\n\tUNLOAD TO 'filename'\n\tSELECT ...\n\nI have to admit, this is a superior way to do thing compared to what we\nhave. Is is possible for us to get:\n\n\tCOPY TO 'filename'\n\tSELECT ...\n\nIt allows any arbitrary table, group by, even order by combination.\n\n\n---------------------------------------------------------------------------\n\nHannu Krosing wrote:\n> On Tue, 2002-08-13 at 20:24, Tom Lane wrote:\n> > \n> > What would seem to make sense is adding a WHERE-clause option to\n> > COPY TO, and then you could go\n> > \tCOPY table TO 'myfile' WHERE ...\n> \n> What about :\n> \n> COPY table TO 'myfile' [ WHERE cond ] [ AS INSERT [ WITH COLUMN ] ];\n> \n> to get the data as INSERT INTO statements (pg_dump -d), with optional\n> column list (pg_dump -D)\n> \n> ----------------\n> Hannu\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 15:03:21 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump"
},
{
"msg_contents": "Hannu Krosing wrote:\n> On Wed, 2002-08-14 at 00:03, Bruce Momjian wrote:\n> > \n> > Actually, loading all this stuff into COPY is not the way to go, I\n> > think. \n> > \n> > Informix had:\n> > \n> > \tUNLOAD TO 'filename'\n> > \tSELECT ...\n> > \n> > I have to admit, this is a superior way to do thing compared to what we\n> > have. Is is possible for us to get:\n> > \n> > \tCOPY TO 'filename'\n> > \tSELECT ...\n> > \n> > It allows any arbitrary table, group by, even order by combination.\n> \n> \n> It would be more in line with the rest of the system to just allow\n> subselect as 'table'\n> \n> COPY (select in,name from mystuff wher id > 10) over10stuff TO stdout;\n\nYep, that would work too. Clearly, we should shoot for something that\nleverages the existing SELECT code rather than hang more clauses off of\nCOPY.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 15:34:59 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Clearly, we should shoot for something that leverages the existing\n> SELECT code rather than hang more clauses off of COPY.\n\nYeah, that's a good point. COPY IN is still a special case, I think,\nbut seems like COPY OUT could be reimplemented as a special tuple\ndestination for the regular executor machinery.\n\nQ: how much performance hit would we be taking? If this slows down\npg_dump a lot, the extra code is worth keeping.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 15:42:23 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump "
},
{
"msg_contents": "> I'm finding it hard to visualize situations where I'd want the extra\n> baggage of pg_dump for something like this. If I want the schema at\n> all, I'll probably want it separate from the data so that I can hack\n> the schema conveniently --- so I'd want to do a \"pg_dump -s -t table\"\n> and then do the selective copying separately.\n\nTell you what I'd kill for:\n\npg_dump -t users_\\* db > users.sql\n\nSort of thing.\n\nChris\n\n",
"msg_date": "Wed, 14 Aug 2002 09:54:13 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump "
},
{
"msg_contents": "On Tue, 2002-08-13 at 19:54, Christopher Kings-Lynne wrote:\n> > I'm finding it hard to visualize situations where I'd want the extra\n> > baggage of pg_dump for something like this. If I want the schema at\n> > all, I'll probably want it separate from the data so that I can hack\n> > the schema conveniently --- so I'd want to do a \"pg_dump -s -t table\"\n> > and then do the selective copying separately.\n> \n> Tell you what I'd kill for:\n> \n> pg_dump -t users_\\* db > users.sql\n> \n> Sort of thing.\n> \n> Chris\n> \n\nI'd kill for pg_restore --ignore-missing-objects --clean .... so I could\nrun refreshes against databases that are changing schemas rather than\nhaving to constantly edit the output of -l.\n\nI'd also kill for pg_restore --ignore-existing-objects .... so I could\nrun the darn thing against a database that's already got pl/pgsql\ninstalled in template1 and the dump file wants to install it again etc.\n\nss\n\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org\n\n\n",
"msg_date": "13 Aug 2002 20:29:47 -0600",
"msg_from": "Scott Shattuck <ss@technicalpursuit.com>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump"
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> Tell you what I'd kill for:\n> pg_dump -t users_\\* db > users.sql\n\nYeah, I was just about to start working on pg_dump's -t switch.\nIt absolutely *must* be made schema-aware for 7.3 (-t schema.table\ndoesn't work today) and it seems like we might as well try to allow\nwildcard support. Another thought I had was to accept multiple -t\nswitches, eg \"pg_dump -t foo -t bar -t schema.baz*\" to dump all tables\nmatching any of the patterns.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 00:19:13 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump "
},
{
"msg_contents": "> Yeah, I was just about to start working on pg_dump's -t switch.\n> It absolutely *must* be made schema-aware for 7.3 (-t schema.table\n> doesn't work today) and it seems like we might as well try to allow\n> wildcard support. Another thought I had was to accept multiple -t\n> switches, eg \"pg_dump -t foo -t bar -t schema.baz*\" to dump all tables\n> matching any of the patterns.\n\nWhat about a switch to set schema search path as well? You could also just\nhave the tables comma separated in the -t ??\n\nChris\n\n",
"msg_date": "Wed, 14 Aug 2002 12:30:47 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump "
},
{
"msg_contents": "Scott Shattuck <ss@technicalpursuit.com> writes:\n> I'd also kill for pg_restore --ignore-existing-objects .... so I could\n> run the darn thing against a database that's already got pl/pgsql\n> installed in template1 and the dump file wants to install it again etc.\n\nIn general, I think it's a mistake for pg_restore to bail out on errors.\nThe underlying pg_dump scripts have been built and optimized on the\nassumption that psql would keep plugging after seeing an error. For\nexample, scripts containing \"\\connect - foo\" still work if there's no\n\"foo\" user ... but only because psql doesn't go belly-up. pg_restore\nis way less forgiving.\n\nI think the ideal behavior for pg_restore would be to abandon work on\nthe current dump item upon seeing a SQL error, but to pick up with the\nnext one. (Of course we could have an --anal-retentive switch to bail\non first error, but I doubt it'd be used much.) Errors associated with\nownership switches shouldn't cause failure in any case.\n\nAnybody care to submit patches to make this happen?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 00:31:55 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump "
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> What about a switch to set schema search path as well?\n\nI'm leaning to the thought that this is a bad idea, and that pg_dump\nshould act in a way that's search-path-independent. But I need to\nthink more.\n\n> You could also just have the tables comma separated in the -t ??\n\nDon't like it --- that makes comma a special character in pg_dump\ntablename patterns, which is an exception we don't need to make.\nThe multiple-dash-t approach needs no such assumption.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 01:18:31 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: db partial dumping with pg_dump "
}
] |
[
{
"msg_contents": "\n> Looking at how to deal with this, is the following going to be\n> portable?:\n> \n> in pg_dump/Makefile:\n> CFLAGS += -D_LARGEFILE_SOURCE -D_OFFSET_BITS=64\n> \n> in pg_dump.h:\n> #ifdef _LARGEFILE_SOURCE\n> #define FSEEK fseeko\n> #define FTELL ftello\n> #define OFF_T_FORMAT %Ld\n> typedef off_t OFF_T;\n> #else\n> #define FSEEK fseek\n> #define FTELL ftell\n> #define OFF_T_FORMAT %ld\n> typedef long int OFF_T;\n> #endif\n\nNo, look at the int8 code to see how to make it portable.\nOn AIX e.g it is %lld and long long int.\n\nAndreas\n",
"msg_date": "Tue, 13 Aug 2002 15:26:30 +0200",
"msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>",
"msg_from_op": true,
"msg_subject": "Re: [GENERAL] Linux Largefile Support In Postgresql RPMS"
},
{
"msg_contents": "On Tue, 2002-08-13 at 14:26, Zeugswetter Andreas SB SD wrote:\n> \n> > Looking at how to deal with this, is the following going to be\n> > portable?:\n\n> No, look at the int8 code to see how to make it portable.\n> On AIX e.g it is %lld and long long int.\n\nOK. %lld is usable by glibc, so amend %Ld to %lld.\n\nAny other comments?\n\n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight, UK \nhttp://www.lfix.co.uk/oliver\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Watch ye therefore, and pray always, that ye may be \n accounted worthy to escape all these things that shall\n come to pass, and to stand before the Son of man.\" \n Luke 21:36 \n\n",
"msg_date": "13 Aug 2002 14:51:14 +0100",
"msg_from": "Oliver Elphick <olly@lfix.co.uk>",
"msg_from_op": false,
"msg_subject": "Re: [GENERAL] Linux Largefile Support In Postgresql RPMS"
}
] |
[
{
"msg_contents": "When I attaempt to compile the lastest cvs version I get the following error\n\ngmake[4]: Entering directory \n`/usr/local/postgres/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_ascii'\ngcc -O2 -pipe -Wall -Wmissing-prototypes -Wmissing-declarations \n-I../../../../../../src/include -I/usr/local/ssl/include \n-c -o utf8_and_ascii.o utf8_and_ascii.c\nar crs libutf8_and_ascii.a utf8_and_ascii.o\ntouch libutf8_and_ascii.a\n../../../../../../src/backend/port/aix/mkldexport.sh libutf8_and_ascii.a \n> libutf8_and_ascii.exp\ngcc -O2 -pipe -Wall -Wmissing-prototypes -Wmissing-declarations \n-Wl,-H512 -Wl,-bM:SRE -Wl,-bI:../../../../../../src/backend/postgres.imp \n-Wl,-bE:libutf8_and_ascii.exp -o libutf8_and_ascii.so libutf8_and_ascii.a \n-L../../../../../../src/port\n-L/usr/local/ssl/lib -L../../../../../../src/port -L/usr/local/ssl/lib -lc\nld: 0711-224 WARNING: Duplicate symbol: __start\nld: 0711-224 WARNING: Duplicate symbol: .__start\nld: 0711-224 WARNING: Duplicate symbol: p_xargc\nld: 0711-224 WARNING: Duplicate symbol: p_xargv\nld: 0711-224 WARNING: Duplicate symbol: .__mod_init\nld: 0711-224 WARNING: Duplicate symbol: __mod_init\nld: 0711-224 WARNING: Duplicate symbol: p_xrcfg\nld: 0711-224 WARNING: Duplicate symbol: p_xrc\nld: 0711-224 WARNING: Duplicate symbol: .exit\nld: 0711-224 WARNING: Duplicate symbol: exit\nld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.\nld: 0711-317 ERROR: Undefined symbol: .pg_ascii2mic\nld: 0711-317 ERROR: Undefined symbol: .pg_mic2ascii\ncollect2: ld returned 8 exit status\ngmake[4]: *** [libutf8_and_ascii.so] Error 1\ngmake[4]: Leaving directory \n`/usr/local/postgres/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_ascii'\ngmake[3]: *** [all] Error 2\ngmake[3]: Leaving directory \n`/usr/local/postgres/pgsql/src/backend/utils/mb/conversion_procs'\n\nhorwitz@argoscomp.com (Samuel A Horwitz)\n\n\n",
"msg_date": "Tue, 13 Aug 2002 10:14:22 -0400 (EDT)",
"msg_from": "Samuel A Horwitz <horwitz@argoscomp.com>",
"msg_from_op": true,
"msg_subject": "cvs compile failure on AIX 4.3.2"
}
] |
[
{
"msg_contents": "Hi,\n\nthis is an announcement of OpenFTS 0.33 release.\nPlease, find archive in download area at openfts.sourceforge.net\n\nThis is a major release ! It has a lot of enhancements.\nIt's required PostgreSQL 7.2.1 (7.2.2 from CVS would be better)\n\nSome major changes:\n\n1. We moved from using contrib/intarray module to our new module\n contrib/tsearch, which is available from contrib directory of\n PostgreSQL distribution since 7.2 release.\n\n tsearch module provides special text data type suitable for text\n indexing. It uses words 'as is' without hashing to integers and provides\n search interface in more natural way. For example, it's possible now\n to test fulltext search from psql.\n Read documentation in contrib/tsearch module for more details.\n\n2. We changes interfaces to dictionaries to conform changes in 1.\n Methods provided by dictionaries should work with lexems instead of\n integers as before: lemms method instead of lemmsid, is_stoplexem instead\n of is_stoplemm.\n\n3. We've added a possibility to drop OpenFTS instances:\n drop - removes all OpenFTS tables, indices, dictionaries (if dictionary\n provides 'drop' method);\n drop_index - it's opposite to method 'create_index', removes all OpenFTS\n indices on index tables (INDEX1,,,INDEXN) and\n GiST index on base table (the table where the documents\n are stored together with its primary key).\n It's very convenient for adminstration and maintaince.\n\n4. We've added generic interfaces to ISpell dictionaries and Snowball stemmers.\n ISpell dictionaries are free and available for many languages and could be\n used to return base forms for a word.\n It's very important for inflective languages, i.e. russian language.\n Snowball stemmers (available from snowball.sourceforge.net)\n could be use to stemm a word, i.e. to cut a words endings and use\n remains stem for indexing and searching.\n\n\n\nUnfortunately, documentation is not completely updated.\nThere is Crash-Course in example directory which should be\nenough to start.\n\nAs always, your questions and comments are welcome.\nPlease, use openfts-general mailing list <openfts-general@lists.sourceforge.net>\n\nWe are looking for documentation manager ! Please, contact Oleg Bartunov\n<oleg@sai.msu.su> if you're willing to join the OpenFTS project.\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n\n",
"msg_date": "Tue, 13 Aug 2002 17:46:20 +0300 (GMT)",
"msg_from": "Oleg Bartunov <oleg@sai.msu.su>",
"msg_from_op": true,
"msg_subject": "OpenFTS 0.33 Release"
}
] |
[
{
"msg_contents": "CHANGES:\n\nAugust 13, 2002\n Use parser of OpenFTS v0.33.\n\n-- \nTeodor Sigaev\nteodor@stack.net",
"msg_date": "Tue, 13 Aug 2002 20:05:48 +0400",
"msg_from": "Teodor Sigaev <teodor@stack.net>",
"msg_from_op": true,
"msg_subject": "Please, apply patch for contrib/tsearch"
},
{
"msg_contents": "to current CVS, of course. Sorry\n-- \nTeodor Sigaev\nteodor@stack.net\n\n\n",
"msg_date": "Tue, 13 Aug 2002 20:08:52 +0400",
"msg_from": "Teodor Sigaev <teodor@stack.net>",
"msg_from_op": true,
"msg_subject": "Re: Please, apply patch for contrib/tsearch"
},
{
"msg_contents": "\nYour patch has been added to the PostgreSQL unapplied patches list at:\n\n\thttp://candle.pha.pa.us/cgi-bin/pgpatches\n\nI will try to apply it within the next 48 hours.\n\n---------------------------------------------------------------------------\n\n\nTeodor Sigaev wrote:\n> CHANGES:\n> \n> August 13, 2002\n> Use parser of OpenFTS v0.33.\n> \n> -- \n> Teodor Sigaev\n> teodor@stack.net\n> \n\n[ application/gzip is not supported, skipping... ]\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 12:15:32 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Please, apply patch for contrib/tsearch"
},
{
"msg_contents": "\nPatch applied. Thanks.\n\n---------------------------------------------------------------------------\n\n\nTeodor Sigaev wrote:\n> CHANGES:\n> \n> August 13, 2002\n> Use parser of OpenFTS v0.33.\n> \n> -- \n> Teodor Sigaev\n> teodor@stack.net\n> \n\n[ application/gzip is not supported, skipping... ]\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 23:02:15 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Please, apply patch for contrib/tsearch"
}
] |
[
{
"msg_contents": "With the new dependency system we have the entire system catalog content\npinned down and unchangeable. This is a tiny dent in the nice extensible\nnature of the system.\n\nWould it be feasible to identify the non-essential parts of the built-in\nobjects (say, inet type, numeric type, associated functions, etc.) and\ndeclare those with regular SQL commands in initdb? In the end, the system\ncatalog contents in include/catalog/ would only contain the \"bootstrap\"\ncontent. For example, the pg_proc content could be made more manageable\nthat way.\n\nNot sure if this is worth considering for this release, but it might be a\nmedium-term project.\n\nComments?\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Tue, 13 Aug 2002 19:19:06 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": true,
"msg_subject": "Everything is now \"required by the database system\""
},
{
"msg_contents": "Peter Eisentraut wrote:\n> With the new dependency system we have the entire system catalog content\n> pinned down and unchangeable. This is a tiny dent in the nice extensible\n> nature of the system.\n> \n> Would it be feasible to identify the non-essential parts of the built-in\n> objects (say, inet type, numeric type, associated functions, etc.) and\n> declare those with regular SQL commands in initdb? In the end, the system\n> catalog contents in include/catalog/ would only contain the \"bootstrap\"\n> content. For example, the pg_proc content could be made more manageable\n> that way.\n> \n> Not sure if this is worth considering for this release, but it might be a\n> medium-term project.\n\nUh, some tools rely on those oids being fixed values, don't they? For\nexample, I see ecpg using NUMERICOID.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 13:22:44 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Everything is now \"required by the database system\""
},
{
"msg_contents": "On Tue, 2002-08-13 at 22:38, Tom Lane wrote:\n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > With the new dependency system we have the entire system catalog content\n> > pinned down and unchangeable. This is a tiny dent in the nice extensible\n> > nature of the system.\n> \n> It's still \"extensible\", it's just not so easily \"contractible\"...\n> \n> I'm not sure that this matters, as I've never heard of anyone actually\n> troubling to remove unused datatypes etc.\n\nIt could become an issue if PostgreSQL became populat in embedded\nsystems, but then it can of course be done in include/catalog/.\n\n> > Would it be feasible to identify the non-essential parts of the built-in\n> > objects (say, inet type, numeric type, associated functions, etc.) and\n> > declare those with regular SQL commands in initdb? In the end, the system\n> > catalog contents in include/catalog/ would only contain the \"bootstrap\"\n> > content. For example, the pg_proc content could be made more manageable\n> > that way.\n> \n> No, it would become a lot less manageable because we'd have a harder\n> time controlling OIDs for builtin types and functions.\n\nWe have COPY ... WITH OIDS for some time already. \n\nMaybe we should also allow setting OID in INSERT and UPDATE ?\n\nIt could be a good idea to give out OID ranges for contrib modules so\nthat frontends would not need to worry about changing binary formats for\nsame types.\n\nThat could also suggest that the new int8-based datetime type should\nhave a separate OID from the old one.\n\n> We'd end up\n> having to push everything we deemed inessential out to non-builtin\n> status (compare the contrib items that create new types). While there's\n> some stuff like money and the geometric types\n\nIt would be nice if for example GEOMETRY could be a separate installable\npackage (a datablade in Illustra parlance).\n\nIP types (cidr, macadr) are also a good candidate for non-builtin type\n\nmoney type could be a package by its own ;)\n\n> that maybe deserve such\n> demotion, there's not enough to get me excited about trimming it.\n> While reviewing the pg_depend patch I was hoping that we could pin just\n> a subset of the initial catalog contents, but eventually decided it was\n> (a) tricky \n\nTrue\n\n> (b) not worth the trouble.\n\nBut it could still be something to watch out for doing in the future.\n\nOf course we will have then package dependency issues, but most likely\nat least the GEOMETRY,IP and MONEY packages don't need each other.\n\nThere are also two kinds of builtins - things that are almost\nexclusively used by system (smgr, oidvector, int2vector, tid, xid, cid,\nregproc, refcursor, aclitem, name) and basic types of general utility\n(int, date, text, ...)\n\nProbably every type not used in system tables themselves could be made\nloadable after initdb.\n\n-----------------\nHannu\n\n\n",
"msg_date": "13 Aug 2002 22:24:46 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: Everything is now \"required by the database system\""
},
{
"msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> With the new dependency system we have the entire system catalog content\n> pinned down and unchangeable. This is a tiny dent in the nice extensible\n> nature of the system.\n\nIt's still \"extensible\", it's just not so easily \"contractible\"...\n\nI'm not sure that this matters, as I've never heard of anyone actually\ntroubling to remove unused datatypes etc.\n\n> Would it be feasible to identify the non-essential parts of the built-in\n> objects (say, inet type, numeric type, associated functions, etc.) and\n> declare those with regular SQL commands in initdb? In the end, the system\n> catalog contents in include/catalog/ would only contain the \"bootstrap\"\n> content. For example, the pg_proc content could be made more manageable\n> that way.\n\nNo, it would become a lot less manageable because we'd have a harder\ntime controlling OIDs for builtin types and functions. We'd end up\nhaving to push everything we deemed inessential out to non-builtin\nstatus (compare the contrib items that create new types). While there's\nsome stuff like money and the geometric types that maybe deserve such\ndemotion, there's not enough to get me excited about trimming it.\n\nWhile reviewing the pg_depend patch I was hoping that we could pin just\na subset of the initial catalog contents, but eventually decided it was\n(a) tricky and (b) not worth the trouble.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 13:38:37 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Everything is now \"required by the database system\" "
},
{
"msg_contents": "On Wed, 2002-08-14 at 00:38, Tom Lane wrote:\n> Hannu Krosing <hannu@tm.ee> writes:\n> > On Tue, 2002-08-13 at 22:38, Tom Lane wrote:\n> >> It's still \"extensible\", it's just not so easily \"contractible\"...\n> >> \n> >> I'm not sure that this matters, as I've never heard of anyone actually\n> >> troubling to remove unused datatypes etc.\n> \n> > It could become an issue if PostgreSQL became populat in embedded\n> > systems, but then it can of course be done in include/catalog/.\n> \n> For an embedded system I'd think you'd want to strip out the support\n> code for the unwanted types (ie, the utils/adt/ file(s)), not only the\n> catalog entries. So it's source code changes in any case. The catalog\n> entries alone occupy so little space that it's not even worth anyone's\n> trouble to remove them, AFAICS.\n\nBut if the types themselves were installable, then it would also mean\nthat unneeded utils/adt/ code would not be installed without need.\n\n> > Probably every type not used in system tables themselves could be made\n> > loadable after initdb.\n> \n> It certainly *could* be done. Whether it's worth the trouble is highly\n> doubtful. I'd also be concerned about the performance hit (loadable\n> functions are noticeably slower than built-ins).\n\nReally ?\n\nHow much is the performance hit ?\n\nIs it unavaoidable ? \n\nIs it the same on all systems ?\n\nIs it the same for both new and old style C functions ?\n\nIs the performance hit only the first time (when function is loaded) or\nevery time ?\n\n> Again, when was the last time you heard of anyone actually bothering to\n> remove built-in entries from pg_proc or pg_type?\n\nI have sometimes removed _my_own_ unused types/functions before shipping\na product ;)\n\n> I can't see expending a considerable amount of work on a \"feature\" that\n> no one will use.\n\nSure.\n\n-----------\nHannu\n\n\n\n",
"msg_date": "13 Aug 2002 22:55:34 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": false,
"msg_subject": "Re: Everything is now \"required by the database system\""
},
{
"msg_contents": "Hannu Krosing <hannu@tm.ee> writes:\n> On Tue, 2002-08-13 at 22:38, Tom Lane wrote:\n>> It's still \"extensible\", it's just not so easily \"contractible\"...\n>> \n>> I'm not sure that this matters, as I've never heard of anyone actually\n>> troubling to remove unused datatypes etc.\n\n> It could become an issue if PostgreSQL became populat in embedded\n> systems, but then it can of course be done in include/catalog/.\n\nFor an embedded system I'd think you'd want to strip out the support\ncode for the unwanted types (ie, the utils/adt/ file(s)), not only the\ncatalog entries. So it's source code changes in any case. The catalog\nentries alone occupy so little space that it's not even worth anyone's\ntrouble to remove them, AFAICS.\n\n> Probably every type not used in system tables themselves could be made\n> loadable after initdb.\n\nIt certainly *could* be done. Whether it's worth the trouble is highly\ndoubtful. I'd also be concerned about the performance hit (loadable\nfunctions are noticeably slower than built-ins).\n\nAgain, when was the last time you heard of anyone actually bothering to\nremove built-in entries from pg_proc or pg_type? I can't see expending\na considerable amount of work on a \"feature\" that no one will use.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 15:38:13 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Everything is now \"required by the database system\" "
},
{
"msg_contents": "Hannu Krosing <hannu@tm.ee> writes:\n> On Wed, 2002-08-14 at 00:38, Tom Lane wrote:\n>> For an embedded system I'd think you'd want to strip out the support\n>> code for the unwanted types (ie, the utils/adt/ file(s)), not only the\n>> catalog entries.\n\n> But if the types themselves were installable, then it would also mean\n> that unneeded utils/adt/ code would not be installed without need.\n\nOnly if someone went to the trouble of repackaging each such datatype\nas a separate shared library. That's a lot more work than what I\nunderstood Peter to be suggesting (namely, install the catalog entries\na little later during initdb).\n\n>> I'd also be concerned about the performance hit (loadable\n>> functions are noticeably slower than built-ins).\n\n> Really ?\n\nYup.\n\n> How much is the performance hit ?\n\nI'm not sure, but it's nontrivial. I recall Oleg and Teodor moaning\nabout the poor performance of GiST-index contrib modules awhile back,\nat a time when we did fmgr_info for index access functions once per\ncall instead of caching the results in the index' relcache entry.\nIt didn't hurt for built-in access functions but you sure noticed it\nfor loadable ones.\n\nIt might be feasible to persuade fmgr.c or dfmgr.c to short-circuit\nlookups of dynamic functions after the first time, by keeping an\ninternal lookup table comparable to the compile-time-constant table\nwe have for builtins. This would not make the problem go away, but\nit would lessen the performance hit...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 16:32:04 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Everything is now \"required by the database system\" "
}
] |
[
{
"msg_contents": "\n\n> -----Original Message-----\n> From: Tom Lane [mailto:tgl@sss.pgh.pa.us] \n> Sent: 13 August 2002 18:24\n> To: Peter Eisentraut\n> Cc: Marc G. Fournier; PostgreSQL Development\n> Subject: Re: [HACKERS] libpqxx \n> \n> \n> JDBC and ODBC are almost separate projects already, and \n> perhaps should be cut loose so they can have their own \n> release cycles. I'd defer to the maintainers of those \n> interfaces about what they want to do, though.\n\nI've been thinking for some time that ODBC should be split. We have been\ndoing our own releases of the Win32 binaries and packages for some time\n- I don't remember them ever coinciding with PostgreSQL release. I'm not\neven sure what state the code has been in in recent PostgreSQL releases,\nI guess it's quite possible that people that have compiled from the\ntarball are using code that is from between the independent releases.\nHiroshi might know more about this.\n\nRegards, Dave.\n",
"msg_date": "Tue, 13 Aug 2002 21:16:38 +0100",
"msg_from": "\"Dave Page\" <dpage@vale-housing.co.uk>",
"msg_from_op": true,
"msg_subject": "Re: libpqxx "
}
] |
[
{
"msg_contents": "On Wed, 2002-08-14 at 04:08, Emmanuel Charpentier wrote:\n> Dear all,\n> \n...\n\n> Of course, I am aware that view definitions aren't just stored, but that \n> a lot of rewriting is involved before storing the actual execution \n> plan. Modifying a view definition would entail re-processing of other \n> view definitions. But so is the case with the modification of a table ...\n> \n> What do you think ?\n\nI'm trying to propose a scenario where\n\n1. The SELECT clause defining the view is preserved\n\n2. DROP of undrlying table/column will _not_ drop the view, but just\nmark it dirty\n\n3. Using the view checks for the dirty flag and if it is set tries to\nrecreate the view from its plaintext definition.\n\n---------------\nHannu\n\n",
"msg_date": "14 Aug 2002 02:18:24 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": true,
"msg_subject": "Re: Possible enhancement : replace view ?"
},
{
"msg_contents": "On Wed, 2002-08-14 at 04:23, Emmanuel Charpentier wrote:\n> Hannu Krosing wrote:\n> > \n> > I'm trying to propose a scenario where\n> > \n> > 1. The SELECT clause defining the view is preserved\n> > \n> > 2. DROP of undrlying table/column will _not_ drop the view, but just\n> > mark it dirty\n> > \n> > 3. Using the view checks for the dirty flag and if it is set tries to\n> > recreate the view from its plaintext definition.\n> \n> I might be dense, but why not try to recreate it directly after the \n> table/column modification ?\n\nIf it is a DROP TABLE/CREATE TABLE sequence you have no idea that you\nhave to recreate a view.\n\n-----------\nHannu\n",
"msg_date": "14 Aug 2002 02:46:46 +0500",
"msg_from": "Hannu Krosing <hannu@tm.ee>",
"msg_from_op": true,
"msg_subject": "Re: Possible enhancement : replace view ?"
},
{
"msg_contents": "Dear all,\n\nThe current implementation of views uses OIDs, not table/view names. As \na consequence, when you happen to replace (drop then create) an \nunderlying table or view, you also have to drop and recreate all views \nusing this table|view (and this recursively, of course ...).\n\nI stumbled on this while doing repeat analyses (involving repeated uses \nof aggregation) of the same dataset using slight variations of the \nsubset of interest. When my dataset was small, I used to do that in \n(yuck !) MS-Access by creating a view defining the subset of interest, \nthen creating views based on this view, and so on... Now that my dataset \n is too large to be Access-manageable, I migrated it to PostgreSQL \n(which, BTW, gave me nice performance enhancements), but I had to change \n my working habits. I have now to create a script defining my views, \nthen to run it at each and every variation of the subset of interest ... \nTo be able to conserve existing views would definitely be a bonus.\n\nOf course, the overhead is necessary to handle the general case. \nHowever, there is a special case where this is unnecessary : when the \nnew table or view \"class\" definition is a (possibly improper) subclass \nof the original one, or, if you prefer, when the column set of the new \ndefinition is a (possibly improper) superset of the old one.\n\nFor tables, this case is already handled by a judicious use of alter \ntable, at least in its present form (adding DROP COLUMN, which might be \nan interesting feature for other reasons, entails the risk of \ninvalidating existing views ...). However, there is currently no easily \nreachable way to do that for a view (I suppose that the special case of \nmodifying the definition of a view creating the same columns in the old \nand new definitions might be possible with a \"clever\" (ab)use of system \ncatalogs, but I tend to be *very* wary of such hacks ...).\n\nOf course, I am aware that view definitions aren't just stored, but that \n a lot of rewriting is involved before storing the actual execution \nplan. Modifying a view definition would entail re-processing of other \nview definitions. But so is the case with the modification of a table ...\n\nWhat do you think ?\n\n-- \nEmmanuel Charpentier\n\n",
"msg_date": "Wed, 14 Aug 2002 01:08:47 +0200",
"msg_from": "Emmanuel Charpentier <charpent@bacbuc.dyndns.org>",
"msg_from_op": false,
"msg_subject": "Possible enhancement : replace view ?"
},
{
"msg_contents": "Emmanuel Charpentier <charpent@bacbuc.dyndns.org> writes:\n> What do you think ?\n\nI think Gavin Sherry is already working on this.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 19:20:00 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Possible enhancement : replace view ? "
},
{
"msg_contents": "Hannu Krosing wrote:\n> On Wed, 2002-08-14 at 04:08, Emmanuel Charpentier wrote:\n> \n>>Dear all,\n>>\n> \n> ...\n> \n> \n>>Of course, I am aware that view definitions aren't just stored, but that \n>> a lot of rewriting is involved before storing the actual execution \n>>plan. Modifying a view definition would entail re-processing of other \n>>view definitions. But so is the case with the modification of a table ...\n>>\n>>What do you think ?\n> \n> \n> I'm trying to propose a scenario where\n> \n> 1. The SELECT clause defining the view is preserved\n> \n> 2. DROP of undrlying table/column will _not_ drop the view, but just\n> mark it dirty\n> \n> 3. Using the view checks for the dirty flag and if it is set tries to\n> recreate the view from its plaintext definition.\n\nI might be dense, but why not try to recreate it directly after the \ntable/column modification ?\n\n> ---------------\n> Hannu\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n\n",
"msg_date": "Wed, 14 Aug 2002 01:23:14 +0200",
"msg_from": "Emmanuel Charpentier <charpent@bacbuc.dyndns.org>",
"msg_from_op": false,
"msg_subject": "Re: Possible enhancement : replace view ?"
},
{
"msg_contents": "Tom,\n\nI submitted a patch for this a few days ago. Did it not hit pgsql-patches?\n\nGavin\n\nOn Tue, 13 Aug 2002, Tom Lane wrote:\n\n> Emmanuel Charpentier <charpent@bacbuc.dyndns.org> writes:\n> > What do you think ?\n> \n> I think Gavin Sherry is already working on this.\n> \n> \t\t\tregards, tom lane\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n> \n\n",
"msg_date": "Wed, 14 Aug 2002 09:31:52 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": false,
"msg_subject": "Re: Possible enhancement : replace view ? "
},
{
"msg_contents": "\n\nHannu Krosing wrote:\n> On Wed, 2002-08-14 at 04:23, Emmanuel Charpentier wrote:\n> \n>>Hannu Krosing wrote:\n>>\n>>>I'm trying to propose a scenario where\n>>>\n>>>1. The SELECT clause defining the view is preserved\n>>>\n>>>2. DROP of undrlying table/column will _not_ drop the view, but just\n>>>mark it dirty\n>>>\n>>>3. Using the view checks for the dirty flag and if it is set tries to\n>>>recreate the view from its plaintext definition.\n>>\n>>I might be dense, but why not try to recreate it directly after the \n>>table/column modification ?\n> \n> \n> If it is a DROP TABLE/CREATE TABLE sequence you have no idea that you\n> have to recreate a view.\n\nRight. But I was wary of delaying recreation : views are more often than \nnot created by programmers/DBAs/someone somewhat competent in DB design \nand use, in order to be used by people not necessarily aware of the real \nstruxture of data (that's the whole point of having views, BTW). \nDelaying recreation entails the risk of overlooking a problem and \ngetting a nice phone call at 2 AM from the maintainance guy stuttering \nthat he can no longer access its (vital, of course) data ...\n\nTradeoffs, again ... What about emitting warnings after table drop \n(easy)/creation (not so easy !) ?\n\nBTW : since drop column and alter various attributes (not null, primary \nkey, etc ...) will be possible, shoudn't the need to drop/recteate a \ntable drastically decrease ?\n\nE. g. : I recently created a log table wit a field date timestamptz \ndefault now(), only to discover that, due to current limitations of the \nODBC driver, I should have used timestamptz[0] (ODBC doesn't like \nfraction of seconds in datetime). I kludged away bby updating (set \ndate=date_trunc('second',date)) and altering default to \ndate_trunc('second',date) (Yuck !), but the real solution would have \nbeen of course to recreate the column with the right attribute, which \ncurrently involves dropping/recreating the table, therefore losing all \ndefined views.\n\nWhat a ten-thumbs programmer such as me would love to see in such a \nscenario would be something along the lines of :\n\n# Create table T (date as timestamp defailt now(), ...) ...;\nCREATE\n# Create view X as select date, ... from T join ...;\nCREATE\n# Create view Y as select <anthing but date> ... from T where ...;\nCREATE\nCreate view Z as select date, ... from T join ...;\n# CREATE\nCreate view U as select ... from Z left outer join ...;\n---\n--- Insert data here\n---\n...\n---\n--- Later ! Insert ODBC epiphany here\n---\n# alter table T add column newdate timestamptz[0];\nALTER --- I can't remember the exact acknowledgement sent for alter column\nupdate T set newdate=date;\nUPDATE (somenumber) 0\nalter table T rename column date to olddate;\nALTER --- ditto\nWARNING : View X might have become invalid. Please check it or drop it !\nWARNING : View Z might have become invalid. Please check it or drop it !\nWARNING : View U might have become invalid. Please check it or drop it !\nalter table T rename newdate to date;\nALTER --- ditto;\nWARNING : View X successfully recreated from it's original SQL \ndefinition. Please check it or drop it !\nWARNING : View Z successfully recreated from it's original SQL \ndefinition. Please check it or drop it !\nWARNING : View U successfully recreated from it's original SQL \ndefinition. Please check it or drop it !\nAlter table T drop column olddate;\nALTER\n\nExercise left for the reader : what about inheritance ?\nAnother exercise : what about adding/dropping indices (indexes ?) ?\n\nYour thoughs ?\n\n__\nEmmanuel Charpentier\n\n",
"msg_date": "Wed, 14 Aug 2002 02:22:23 +0200",
"msg_from": "Emmanuel Charpentier <charpent@bacbuc.dyndns.org>",
"msg_from_op": false,
"msg_subject": "Re: Possible enhancement : replace view ?"
},
{
"msg_contents": "\n> Tradeoffs, again ... What about emitting warnings after table drop \n> (easy)/creation (not so easy !) ?\n\nThe warnings are certainly there now. Dependency code won't let you do\nsuch a thing without specifying CASCADE.\n\nHopefully CREATE OR REPLACE VIEW will be applied soon, which solves part\ntwo of the problem.\n\n",
"msg_date": "13 Aug 2002 20:42:01 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: Possible enhancement : replace view ?"
},
{
"msg_contents": "Gavin Sherry <swm@linuxworld.com.au> writes:\n> I submitted a patch for this a few days ago. Did it not hit pgsql-patches?\n\nIt did ... I had some gripes about it ... I thought you were working on\nthe gripes?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 13 Aug 2002 23:18:17 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Possible enhancement : replace view ? "
},
{
"msg_contents": " \nAh, that's why it wasn't in my mailbox. Gavin,\n\n http://groups.google.com/groups?hl=en&lr=&ie=ISO-8859-1&q=replace+view+gavin&btnG=Google+Search&meta=group%3Dcomp.databases.postgresql.*\n\n\nGavin Sherry <swm@linuxworld.com.au> writes:\n> It passes all regression tests. There's only one really sketchy part of\n> the patch: UpdateAttributeTuples(). This routine is fairly dangerous since\n> it simply removes a given relid's pg_attribute entries and creates a new\n> set basic on a given TupleDesc. Naturally, it is only useful for views.\n\nYou can NOT allow CREATE OR REPLACE VIEW to change the tupledesc of the\nview, so I stopped reading right here --- take it out and install\nprevention instead. Why do you think that REPLACE VIEW is interesting?\nIt's so you can modify a view without breaking things that depend on it\n... and things that depend on it depend on the tupledesc. This is\nexactly analogous to not allowing REPLACE FUNCTION to change the return\ntype of the function.\n\n regards, tom lane\n---------------------------------------------------------------------------\n\nTom Lane wrote:\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > I submitted a patch for this a few days ago. Did it not hit pgsql-patches?\n> \n> It did ... I had some gripes about it ... I thought you were working on\n> the gripes?\n> \n> \t\t\tregards, tom lane\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n> \n> http://archives.postgresql.org\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 13 Aug 2002 23:34:28 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Possible enhancement : replace view ?"
}
] |
[
{
"msg_contents": "I posted this earlier but it didn't seem to go through. I apologize in\nadvance if you've gotten this twice. Since I posted earlier this error\nhappened 2 additional times. It's now a critical issue for our site:\n\n\n\nI'm seeing the following error about once a week or so:\n\n2002-08-13 12:37:28 [24313] FATAL 1: LWLockAcquire: can't wait without\na PROC structure\n\n\nIt's usually preceded by these:\n\n2002-08-13 12:37:28 [24313] FATAL 1: Database \"template0\" is not\ncurrently accepting connections\n\n\nAnd immediately followed by this:\n\n2002-08-13 12:37:28 [12532] DEBUG: server process (pid 24313) exited\nwith exit code 1\n2002-08-13 12:37:28 [12532] DEBUG: terminating any other active server\nprocesses\n\n\nAll active database processes then immediately do the following:\n\n2002-08-13 12:37:28 [24311] NOTICE: Message from PostgreSQL backend:\n The Postmaster has informed me that some other backend\n died abnormally and possibly corrupted shared memory.\n I have rolled back the current transaction and am\n going to terminate your database system connection and exit.\n Please reconnect to the database system and repeat your query.\n\n\nOuch!\n\nAny idea what's going on here? Is the LWLockAcquire related to something\nlike the size of the lock table or something? Any help on eliminating\nthis error would be appreciated. Thanks!\n\n\nss\n\nScott Shattuck\nTechnical Pursuit Inc.\n\n\n\n",
"msg_date": "13 Aug 2002 21:03:17 -0600",
"msg_from": "Scott Shattuck <ss@technicalpursuit.com>",
"msg_from_op": true,
"msg_subject": "LWLockAcquire problems"
},
{
"msg_contents": "Scott Shattuck <ss@technicalpursuit.com> writes:\n> I'm seeing the following error about once a week or so:\n> 2002-08-13 12:37:28 [24313] FATAL 1: LWLockAcquire: can't wait without\n> a PROC structure\n\nOh? I'd love to see what makes this happen. Can you give more context?\n\n> It's usually preceded by these:\n> 2002-08-13 12:37:28 [24313] FATAL 1: Database \"template0\" is not\n> currently accepting connections\n\nThat's interesting but I'm not sure it proves much. If I try to connect\nto template0 here, I only see the \"not currently accepting connections\"\nmessage, not any LWLock complaints. So I think there's more to it...\n\n> And immediately followed by this:\n> 2002-08-13 12:37:28 [12532] DEBUG: server process (pid 24313) exited\n> with exit code 1\n\nThat's just the effects of the FATAL 1 exit (see my comments to Tom\nO'Connell earlier today).\n\nThe \"can't wait without a PROC\" failure suggests strongly that something\nis rotten in very early backend startup --- once MyProc has been set,\nit won't happen, and *darn* little happens before MyProc gets set.\nBut I'm not sure how to proceed beyond that observation. If you can\noffer any context or information at all, it'd be helpful.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 00:42:25 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: LWLockAcquire problems "
},
{
"msg_contents": "On Tue, 2002-08-13 at 22:42, Tom Lane wrote:\n> Scott Shattuck <ss@technicalpursuit.com> writes:\n> > I'm seeing the following error about once a week or so:\n> > 2002-08-13 12:37:28 [24313] FATAL 1: LWLockAcquire: can't wait without\n> > a PROC structure\n> \n> Oh? I'd love to see what makes this happen. Can you give more context?\n\nI haven't been able to get any detailed correlation on what causes this\nover the past week and it's not happening often enough for me to turn on\nheavy logging to catch it a second time. The system details I can\nprovide are:\n\n\nSolaris 8 running on a 4 CPU box with 4GB main memory.\nPostgres 7.2.1 built with optimization flags on and max backends at 512.\n\n \nOur postgresql.conf file changes are:\n\n\n\nshared_buffers = 121600 # 2*max_connections, min 16\n\nmax_fsm_relations = 512 # min 10, fsm is free space map\n\nmax_fsm_pages = 65536 # min 1000, fsm is free space map\n\nmax_locks_per_transaction = 256 # min 10\n\nwal_buffers = 1600 # min 4\n\nsort_mem = 4096 # min 32\n\nvacuum_mem = 65536 # min 1024\n\nwal_files = 32 # range 0-64\n\n\n\nBecause we're still in tuning mode we also changed:\n\nstats_command_string = true\n\nstats_row_level = true\n\nstats_block_level = true\n\n\nFsync is true at the moment although we're considering turning that off\nbased on performance and what appears to be high IO overhead.\n\n\n\nThe average number of connections during normal operation is fairly low,\nroughly 30-50, although lock contention due to foreign key constraints\ncan cause bottlenecks that push the connection count much higher while\nrequests queue up waiting for locks to clear.\n\nWe run Java-based application servers that do connection pooling and\nthese seem to be operating properly although it might be possible that\nsome interaction between PG and the appserver connection pools may be\ninvolved here. I don't have enough understanding of the \"*darn* little\"\nthat happens before MyProc gets set to say :).\n\nSorry I don't have more data but the activity count is high enough that\nlogging all queries waiting for a crash to happen over a number of days\ncan create log files that are untenable in our current environment.\n\nAgain, any insight or assistance would be greatly appreciated. This is a\nhigh-volume E-commerce application and other than this bug PG has been\nrock solid. Eliminating this would get our uptime record where we need\nit for long term comfort.\n\n\nss\n\n\nScott Shattuck\nTechnical Pursuit Inc.\n\n\n\n",
"msg_date": "27 Aug 2002 15:06:06 -0600",
"msg_from": "Scott Shattuck <ss@technicalpursuit.com>",
"msg_from_op": true,
"msg_subject": "Re: LWLockAcquire problems"
},
{
"msg_contents": "Scott Shattuck <ss@technicalpursuit.com> writes:\n> On Tue, 2002-08-13 at 22:42, Tom Lane wrote:\n>> Scott Shattuck <ss@technicalpursuit.com> writes:\n> I'm seeing the following error about once a week or so:\n> 2002-08-13 12:37:28 [24313] FATAL 1: LWLockAcquire: can't wait without\n> a PROC structure\n>> \n>> Oh? I'd love to see what makes this happen. Can you give more context?\n\n> I haven't been able to get any detailed correlation on what causes this\n> over the past week and it's not happening often enough for me to turn on\n> heavy logging to catch it a second time.\n\nWhat would actually be useful is a stack backtrace from the point of the\nerror. If you are willing, I would suggest replacing the line\n elog(FATAL, \"LWLockAcquire: can't wait without a PROC structure\");\nwith\n abort();\n(in 7.2 this is about line 275 of src/backend/storage/lmgr/lwlock.c) so\nthat a core dump is forced when the error occurs. Then you could get a\nbacktrace from the corefile.\n\nThe downside of this is that the abort() will cause a database-wide\nrestart; I can understand if you don't want that to happen in a\nproduction system. But right at the moment I see no other way to\ngather more info ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 27 Aug 2002 17:27:20 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: LWLockAcquire problems "
}
] |
[
{
"msg_contents": "Hi,\n\nI've just done some performance comparisons between contrib/fulltextindex\nand contrib/tsearch. Even with every optimisation I can think of for\nfulltextindex, tsearch is 300 times faster ;)\n\nPlus it doesn't require a separate table or complicated queries.\n\nI think we should strongly encourage people to use tsearch instead of\nfulltextindex. I hope to commit some change to fulltextindex in the near\nfuture, so I'll add a note to the readme then.\n\nChris\n\neg:\n\naustralia=# explain analyse select food_id, category_id, description from\ntest_foods where not pending and fulltextidx ## 'baskin&fruit';\nNOTICE: QUERY PLAN:\n\nIndex Scan using fulltextidx_idx on test_foods (cost=0.00..45.93 rows=11\nwidth=40) (actual time=0.22..1.53 rows=8 loops=1)\nTotal runtime: 1.70 msec\n\nEXPLAIN\naustralia=# explain analyze SELECT distinct(f.food_id), f.category_id,\nf.description, f.brand FROM food_foods f, food_foods_fti f0, food_foods_fti\nf1 WHERE NOT f.pending AND f0.id=f.oid AND f0.string ~ '^baskin' AND\nf1.id=f.oid AND f1.string ~ '^fruit';\nNOTICE: QUERY PLAN:\n\nUnique (cost=12.10..12.11 rows=1 width=66) (actual time=532.11..532.25\nrows=8 loops=1)\n -> Sort (cost=12.10..12.10 rows=1 width=66) (actual time=532.10..532.14\nrows=8 loops=1)\n -> Nested Loop (cost=0.00..12.09 rows=1 width=66) (actual\ntime=292.41..531.89 rows=8 loops=1)\n -> Nested Loop (cost=0.00..6.07 rows=1 width=8) (actual\ntime=292.35..531.35 rows=8 loops=1)\n -> Index Scan using food_foods_fti_string_idx on\nfood_foods_fti f0 (cost=0.00..3.03 rows=1 width=4) (actual time=0.07..0.45\nrows=23 loops=1)\n -> Index Scan using food_foods_fti_string_idx on\nfood_foods_fti f1 (cost=0.00..3.03 rows=1 width=4) (actual time=0.04..16.52\nrows=1092 loops=23)\n -> Index Scan using food_foods_oid_idx on food_foods f\n(cost=0.00..6.01 rows=1 width=58) (actual time=0.03..0.04 rows=1 loops=8)\nTotal runtime: 532.49 msec\n\nEXPLAIN\n\n",
"msg_date": "Wed, 14 Aug 2002 12:37:56 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "tsearch vs. fulltextindex"
},
{
"msg_contents": "\nGood point. Some said fulltextindex was better for certain queries, but\nif no one can come up with such a case, we can remove it.\n\n---------------------------------------------------------------------------\n\nChristopher Kings-Lynne wrote:\n> Hi,\n> \n> I've just done some performance comparisons between contrib/fulltextindex\n> and contrib/tsearch. Even with every optimisation I can think of for\n> fulltextindex, tsearch is 300 times faster ;)\n> \n> Plus it doesn't require a separate table or complicated queries.\n> \n> I think we should strongly encourage people to use tsearch instead of\n> fulltextindex. I hope to commit some change to fulltextindex in the near\n> future, so I'll add a note to the readme then.\n> \n> Chris\n> \n> eg:\n> \n> australia=# explain analyse select food_id, category_id, description from\n> test_foods where not pending and fulltextidx ## 'baskin&fruit';\n> NOTICE: QUERY PLAN:\n> \n> Index Scan using fulltextidx_idx on test_foods (cost=0.00..45.93 rows=11\n> width=40) (actual time=0.22..1.53 rows=8 loops=1)\n> Total runtime: 1.70 msec\n> \n> EXPLAIN\n> australia=# explain analyze SELECT distinct(f.food_id), f.category_id,\n> f.description, f.brand FROM food_foods f, food_foods_fti f0, food_foods_fti\n> f1 WHERE NOT f.pending AND f0.id=f.oid AND f0.string ~ '^baskin' AND\n> f1.id=f.oid AND f1.string ~ '^fruit';\n> NOTICE: QUERY PLAN:\n> \n> Unique (cost=12.10..12.11 rows=1 width=66) (actual time=532.11..532.25\n> rows=8 loops=1)\n> -> Sort (cost=12.10..12.10 rows=1 width=66) (actual time=532.10..532.14\n> rows=8 loops=1)\n> -> Nested Loop (cost=0.00..12.09 rows=1 width=66) (actual\n> time=292.41..531.89 rows=8 loops=1)\n> -> Nested Loop (cost=0.00..6.07 rows=1 width=8) (actual\n> time=292.35..531.35 rows=8 loops=1)\n> -> Index Scan using food_foods_fti_string_idx on\n> food_foods_fti f0 (cost=0.00..3.03 rows=1 width=4) (actual time=0.07..0.45\n> rows=23 loops=1)\n> -> Index Scan using food_foods_fti_string_idx on\n> food_foods_fti f1 (cost=0.00..3.03 rows=1 width=4) (actual time=0.04..16.52\n> rows=1092 loops=23)\n> -> Index Scan using food_foods_oid_idx on food_foods f\n> (cost=0.00..6.01 rows=1 width=58) (actual time=0.03..0.04 rows=1 loops=8)\n> Total runtime: 532.49 msec\n> \n> EXPLAIN\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 00:42:48 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] tsearch vs. fulltextindex"
},
{
"msg_contents": "Well, I think it shouldn't disappear for a few releases yet...\n\nChris\n\n> -----Original Message-----\n> From: pgsql-hackers-owner@postgresql.org\n> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Bruce Momjian\n> Sent: Wednesday, 14 August 2002 12:43 PM\n> To: Christopher Kings-Lynne\n> Cc: Hackers; pgsql-general@postgresql.org; pgsql-sql@postgresql.org\n> Subject: Re: [HACKERS] tsearch vs. fulltextindex\n>\n>\n>\n> Good point. Some said fulltextindex was better for certain queries, but\n> if no one can come up with such a case, we can remove it.\n>\n> ------------------------------------------------------------------\n> ---------\n>\n> Christopher Kings-Lynne wrote:\n> > Hi,\n> >\n> > I've just done some performance comparisons between\n> contrib/fulltextindex\n> > and contrib/tsearch. Even with every optimisation I can think of for\n> > fulltextindex, tsearch is 300 times faster ;)\n> >\n> > Plus it doesn't require a separate table or complicated queries.\n> >\n> > I think we should strongly encourage people to use tsearch instead of\n> > fulltextindex. I hope to commit some change to fulltextindex\n> in the near\n> > future, so I'll add a note to the readme then.\n> >\n> > Chris\n> >\n> > eg:\n> >\n> > australia=# explain analyse select food_id, category_id,\n> description from\n> > test_foods where not pending and fulltextidx ## 'baskin&fruit';\n> > NOTICE: QUERY PLAN:\n> >\n> > Index Scan using fulltextidx_idx on test_foods\n> (cost=0.00..45.93 rows=11\n> > width=40) (actual time=0.22..1.53 rows=8 loops=1)\n> > Total runtime: 1.70 msec\n> >\n> > EXPLAIN\n> > australia=# explain analyze SELECT distinct(f.food_id), f.category_id,\n> > f.description, f.brand FROM food_foods f, food_foods_fti f0,\n> food_foods_fti\n> > f1 WHERE NOT f.pending AND f0.id=f.oid AND f0.string ~ '^baskin' AND\n> > f1.id=f.oid AND f1.string ~ '^fruit';\n> > NOTICE: QUERY PLAN:\n> >\n> > Unique (cost=12.10..12.11 rows=1 width=66) (actual time=532.11..532.25\n> > rows=8 loops=1)\n> > -> Sort (cost=12.10..12.10 rows=1 width=66) (actual\n> time=532.10..532.14\n> > rows=8 loops=1)\n> > -> Nested Loop (cost=0.00..12.09 rows=1 width=66) (actual\n> > time=292.41..531.89 rows=8 loops=1)\n> > -> Nested Loop (cost=0.00..6.07 rows=1 width=8) (actual\n> > time=292.35..531.35 rows=8 loops=1)\n> > -> Index Scan using food_foods_fti_string_idx on\n> > food_foods_fti f0 (cost=0.00..3.03 rows=1 width=4) (actual\n> time=0.07..0.45\n> > rows=23 loops=1)\n> > -> Index Scan using food_foods_fti_string_idx on\n> > food_foods_fti f1 (cost=0.00..3.03 rows=1 width=4) (actual\n> time=0.04..16.52\n> > rows=1092 loops=23)\n> > -> Index Scan using food_foods_oid_idx on food_foods f\n> > (cost=0.00..6.01 rows=1 width=58) (actual time=0.03..0.04\n> rows=1 loops=8)\n> > Total runtime: 532.49 msec\n> >\n> > EXPLAIN\n> >\n> >\n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 3: if posting/reading through Usenet, please send an appropriate\n> > subscribe-nomail command to majordomo@postgresql.org so that your\n> > message can get through to the mailing list cleanly\n> >\n>\n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (610) 359-1001\n> + If your life is a hard drive, | 13 Roberts Road\n> + Christ can be your backup. | Newtown Square,\n> Pennsylvania 19073\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n>\n\n",
"msg_date": "Wed, 14 Aug 2002 12:48:22 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] tsearch vs. fulltextindex"
},
{
"msg_contents": "\n> I've just done some performance comparisons between contrib/fulltextindex\n> and contrib/tsearch. Even with every optimisation I can think of for\n> fulltextindex, tsearch is 300 times faster ;)\n>\n> Plus it doesn't require a separate table or complicated queries.\n>\n> I think we should strongly encourage people to use tsearch instead of\n> fulltextindex. I hope to commit some change to fulltextindex in the near\n> future, so I'll add a note to the readme then.\n>\n\nDitto. We just replaced Oracle Context Search with tsearch and it's just as\ngood for what we were using it for and nicer to play with.\nThere's no scoring as far as I can see but I can live with that.\n\n(and hello fellow aussie)\n\nCheers,\n Graeme\n\n",
"msg_date": "Wed, 14 Aug 2002 14:53:46 +1000",
"msg_from": "\"Graeme Merrall\" <gbmerrall@aol.com>",
"msg_from_op": false,
"msg_subject": "Re: tsearch vs. fulltextindex"
}
] |
[
{
"msg_contents": "\nI think this belongs on gborg. Would you create a project there?\n\n---------------------------------------------------------------------------\n\nHans-J�rgen Sch�nig wrote:\n> \n> At my talk at the Oreilly Open Source Convention I have presented a \n> simple tool for journaling databases.\n> Tom Lane has mentioned that this might be a good choice for putting it \n> into contrib.\n> Is anybody interested in having it there?\n> \n> I have attached a tar-ball containing some documentation and some code.\n> \n> Best regards,\n> Hans-J?rgen Sch?nig\n> \n> <http://kernel.cybertec.at>\n\n[ application/x-gzip is not supported, skipping... ]\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 01:14:55 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "On Wed, 14 Aug 2002, Bruce Momjian wrote:\n\n> \n> I think this belongs on gborg. Would you create a project there?\n\nBruce,\n\nA number of people at OSCON did consider this to be a nice contrib\nfeature. Out of curiousity, what makes it more suitable for gborg?\n\nThanks,\n\nGavin\n\n\n",
"msg_date": "Wed, 14 Aug 2002 15:24:30 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": false,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "\n/contrib is mostly porting tools and loadable modules. We are actually\ntrying to trim down /contrib too, so I was afraid it wouldn't work.\n\nIf you want, post the code to patches and ask if it should be added to\n/contrib. I will do it if I can get agreement.\n\n---------------------------------------------------------------------------\n\nGavin Sherry wrote:\n> On Wed, 14 Aug 2002, Bruce Momjian wrote:\n> \n> > \n> > I think this belongs on gborg. Would you create a project there?\n> \n> Bruce,\n> \n> A number of people at OSCON did consider this to be a nice contrib\n> feature. Out of curiousity, what makes it more suitable for gborg?\n> \n> Thanks,\n> \n> Gavin\n> \n> \n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 01:28:48 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "Gavin Sherry <swm@linuxworld.com.au> writes:\n> On Wed, 14 Aug 2002, Bruce Momjian wrote:\n>> I think this belongs on gborg. Would you create a project there?\n\n> A number of people at OSCON did consider this to be a nice contrib\n> feature. Out of curiousity, what makes it more suitable for gborg?\n\nI think Bruce is unhappy with the size of the tarball (220K!), and\nI was too when I first saw it. But it turns out that nearly all of\nit is a copy of Hans' slides from his OSCON talk, which I don't think\nis appropriate to include in contrib anyway. (For one thing, not\neveryone can read .sxi format. I can't at the moment.)\n\nI'd suggest dropping the talk slides (and you might as well flatten the\nthing into one directory). Perhaps instead the README could include a\npointer to where to find the talk slides on-line. That'd bring it down\nto half a dozen K which is a more appropriate size for a contrib item\n(and hopefully will not trigger Marc's wrath ;-)).\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 10:38:51 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: journaling in contrib ... "
},
{
"msg_contents": "On Wed, 2002-08-14 at 12:47, Marc G. Fournier wrote:\n> On Wed, 14 Aug 2002, Bruce Momjian wrote:\n> \n> > Marc G. Fournier wrote:\n> > > > They are moving pgaccess more into the admin role, and pgmonitor fit in\n> > > > with that.\n> > >\n> > > Personally, I kinda like to be able to run admin modularized ... they\n> > > *should* be looking at stuff like webmin, where you can plug-n-play admin\n> > > functions as required, or horde (http://www.horde.org) ...\n\n\nor http://jfontain.free.fr/moodss/index.html\n\n\n> > > why would I\n> > > install pgaccess if all I want to do is monitor? Now, to be able to\n> > > install pgaccess and have pgmonitor tie into *that* would be cool ...\n> > >\n> > > 'bigger is better' is MicroSloth's philosophy ... sounds like the PgAccess\n> > > guys are adopting it too? :(\n> >\n> > I assume pgmonitor will just be a new tab in the pgaccess window. It is\n> > integrated only in that it is part of the tcl scripts supplied.\n> \n> Right, but, if its 'integrated', then I have to download the whole thing\n> ... I only want pgmonitor, so how can I get that now?\n> \n> Again, if they do it *properly*, it should be a seperate module you can\n> download, enable in a config file for pgaccess and have show up ... but it\n> should be runnable standalone, with all the extras ...\n> \n\nOk, this is a little off topic for this thread, but maybe I can clear\nthis up really quick, so things can move on.\n\nWe wanted to have capabilities that PGMonitor provides, in PGAccess. So,\nwe asked Bruce if we could just integrate PGMonitor, and he said yes. To\nme, it makes sense. Of course you can argue forever on which is better:\none big app that contains all the functionality, or several small apps\nthat spread the functionality (ala unix utils). You will get valid\narguments on both sides...it is more of a preference thing I believe.\n\nCurrently, I am integrating it into PGAccess, and I did have to make\nsome modifications for it to work (sorry Bruce...not too many though).\nHowever, it is my intention to make this more of a plugin, and also be\nable to run standalone. So, if you *don't* want PGMonitor, then you\ndon't have to have it, but you will also be able to call PGMonitor by\nitself (I really haven't decided on a best method yet).\n\nSo, to answer your question, in the future, you will be able to use\nPGMonitor standalone. I assumed this from the beginning, since existing\nusers of PGMonitor may not want to use PGAccess (like yourself).\n\n --brett\n\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 2: you can get off all lists at once with the unregister command\n> (send \"unregister YourEmailAddressHere\" to majordomo@postgresql.org)\n-- \nBrett Schwarz\nbrett_schwarz AT yahoo.com\n\n",
"msg_date": "14 Aug 2002 08:51:13 -0700",
"msg_from": "Brett Schwarz <brett_schwarz@yahoo.com>",
"msg_from_op": false,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "On Wed, 14 Aug 2002, Tom Lane wrote:\n\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > On Wed, 14 Aug 2002, Bruce Momjian wrote:\n> >> I think this belongs on gborg. Would you create a project there?\n>\n> > A number of people at OSCON did consider this to be a nice contrib\n> > feature. Out of curiousity, what makes it more suitable for gborg?\n>\n> I think Bruce is unhappy with the size of the tarball (220K!), and\n> I was too when I first saw it. But it turns out that nearly all of\n> it is a copy of Hans' slides from his OSCON talk, which I don't think\n> is appropriate to include in contrib anyway. (For one thing, not\n> everyone can read .sxi format. I can't at the moment.)\n>\n> I'd suggest dropping the talk slides (and you might as well flatten the\n> thing into one directory). Perhaps instead the README could include a\n> pointer to where to find the talk slides on-line. That'd bring it down\n> to half a dozen K which is a more appropriate size for a contrib item\n> (and hopefully will not trigger Marc's wrath ;-)).\n\nS'alright, I figured I'd read all the posts on the subject before I\nresponded in agreement with Bruce ...\n\n*If* we start referring ppl and projects to GBorg, more ppl will go see\nwhat is available ... how many ppl *look* in contrib to see what is\navalable in there? I know that unless I'm searching for something\nspecific, I never check out what is in contrib, but more oft search places\nlike freshmeat to see if someone has done it already ...\n\nThe original reason for contrib was *if* someone submit'd a patch to\nextend the server, but we weren't quite sure whether it should go in, we'd\ngive it one release in contrib to see if it would be useful before either\ntrashing it, or incorporating it ... the reality of the situation: we've\nnever trashed anything, and rarely incorporated ...\n\nAnything in contrib that can be built seperately from the server code,\nthat just requires libpq and headers, should be pulled and distributed as\nseperate modules, which has the added benefit that, if listed on GBorg,\nsearch engines will pick up the modules ...\n\nAnd the whole arg that someone threw out about 'nobody maintaining them if\nthey aren't part of the distribution' ... so? if nobody is maintaining,\nthen who is using??\n\n",
"msg_date": "Wed, 14 Aug 2002 14:19:19 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: journaling in contrib ... "
},
{
"msg_contents": "Tom Lane wrote:\n> I'd suggest dropping the talk slides (and you might as well flatten the\n> thing into one directory). Perhaps instead the README could include a\n> pointer to where to find the talk slides on-line. That'd bring it down\n> to half a dozen K which is a more appropriate size for a contrib item\n> (and hopefully will not trigger Marc's wrath ;-)).\n\n ^^^^^^^^^^^^\nOK, we got _that_ answer. Looks like gborg. Marc really wants to pump\nthat up.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 14:02:04 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "Marc G. Fournier wrote:\n> Anything in contrib that can be built seperately from the server code,\n> that just requires libpq and headers, should be pulled and distributed as\n> seperate modules, which has the added benefit that, if listed on GBorg,\n> search engines will pick up the modules ...\n> \n> And the whole arg that someone threw out about 'nobody maintaining them if\n> they aren't part of the distribution' ... so? if nobody is maintaining,\n> then who is using??\n\nWant to hear something funny? They are moving my pgmonitor off gborg\nand into the pgaccess. When the move is final, I will add a link on\nthat gborg page.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 14:04:00 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "On Wed, 14 Aug 2002, Bruce Momjian wrote:\n\n> Marc G. Fournier wrote:\n> > Anything in contrib that can be built seperately from the server code,\n> > that just requires libpq and headers, should be pulled and distributed as\n> > seperate modules, which has the added benefit that, if listed on GBorg,\n> > search engines will pick up the modules ...\n> >\n> > And the whole arg that someone threw out about 'nobody maintaining them if\n> > they aren't part of the distribution' ... so? if nobody is maintaining,\n> > then who is using??\n>\n> Want to hear something funny? They are moving my pgmonitor off gborg\n> and into the pgaccess. When the move is final, I will add a link on\n> that gborg page.\n\nAh, so now if I want to use pgmonitor, I have to use pgaccess? guess that\nis one way to sell pgaccess to the masses *shrug*\n\n\n",
"msg_date": "Wed, 14 Aug 2002 15:54:45 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "Marc G. Fournier wrote:\n> On Wed, 14 Aug 2002, Bruce Momjian wrote:\n> \n> > Marc G. Fournier wrote:\n> > > Anything in contrib that can be built seperately from the server code,\n> > > that just requires libpq and headers, should be pulled and distributed as\n> > > seperate modules, which has the added benefit that, if listed on GBorg,\n> > > search engines will pick up the modules ...\n> > >\n> > > And the whole arg that someone threw out about 'nobody maintaining them if\n> > > they aren't part of the distribution' ... so? if nobody is maintaining,\n> > > then who is using??\n> >\n> > Want to hear something funny? They are moving my pgmonitor off gborg\n> > and into the pgaccess. When the move is final, I will add a link on\n> > that gborg page.\n> \n> Ah, so now if I want to use pgmonitor, I have to use pgaccess? guess that\n> is one way to sell pgaccess to the masses *shrug*\n\nThey are moving pgaccess more into the admin role, and pgmonitor fit in\nwith that.\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 14:56:11 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "On Wed, 14 Aug 2002, Bruce Momjian wrote:\n\n> Marc G. Fournier wrote:\n> > On Wed, 14 Aug 2002, Bruce Momjian wrote:\n> >\n> > > Marc G. Fournier wrote:\n> > > > Anything in contrib that can be built seperately from the server code,\n> > > > that just requires libpq and headers, should be pulled and distributed as\n> > > > seperate modules, which has the added benefit that, if listed on GBorg,\n> > > > search engines will pick up the modules ...\n> > > >\n> > > > And the whole arg that someone threw out about 'nobody maintaining them if\n> > > > they aren't part of the distribution' ... so? if nobody is maintaining,\n> > > > then who is using??\n> > >\n> > > Want to hear something funny? They are moving my pgmonitor off gborg\n> > > and into the pgaccess. When the move is final, I will add a link on\n> > > that gborg page.\n> >\n> > Ah, so now if I want to use pgmonitor, I have to use pgaccess? guess that\n> > is one way to sell pgaccess to the masses *shrug*\n>\n> They are moving pgaccess more into the admin role, and pgmonitor fit in\n> with that.\n\nPersonally, I kinda like to be able to run admin modularized ... they\n*should* be looking at stuff like webmin, where you can plug-n-play admin\nfunctions as required, or horde (http://www.horde.org) ... why would I\ninstall pgaccess if all I want to do is monitor? Now, to be able to\ninstall pgaccess and have pgmonitor tie into *that* would be cool ...\n\n'bigger is better' is MicroSloth's philosophy ... sounds like the PgAccess\nguys are adopting it too? :(\n\n",
"msg_date": "Wed, 14 Aug 2002 16:22:08 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "Marc G. Fournier wrote:\n> > They are moving pgaccess more into the admin role, and pgmonitor fit in\n> > with that.\n> \n> Personally, I kinda like to be able to run admin modularized ... they\n> *should* be looking at stuff like webmin, where you can plug-n-play admin\n> functions as required, or horde (http://www.horde.org) ... why would I\n> install pgaccess if all I want to do is monitor? Now, to be able to\n> install pgaccess and have pgmonitor tie into *that* would be cool ...\n> \n> 'bigger is better' is MicroSloth's philosophy ... sounds like the PgAccess\n> guys are adopting it too? :(\n\nI assume pgmonitor will just be a new tab in the pgaccess window. It is\nintegrated only in that it is part of the tcl scripts supplied.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 15:35:06 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "On Wed, 14 Aug 2002, Bruce Momjian wrote:\n\n> Marc G. Fournier wrote:\n> > > They are moving pgaccess more into the admin role, and pgmonitor fit in\n> > > with that.\n> >\n> > Personally, I kinda like to be able to run admin modularized ... they\n> > *should* be looking at stuff like webmin, where you can plug-n-play admin\n> > functions as required, or horde (http://www.horde.org) ... why would I\n> > install pgaccess if all I want to do is monitor? Now, to be able to\n> > install pgaccess and have pgmonitor tie into *that* would be cool ...\n> >\n> > 'bigger is better' is MicroSloth's philosophy ... sounds like the PgAccess\n> > guys are adopting it too? :(\n>\n> I assume pgmonitor will just be a new tab in the pgaccess window. It is\n> integrated only in that it is part of the tcl scripts supplied.\n\nRight, but, if its 'integrated', then I have to download the whole thing\n... I only want pgmonitor, so how can I get that now?\n\nAgain, if they do it *properly*, it should be a seperate module you can\ndownload, enable in a config file for pgaccess and have show up ... but it\nshould be runnable standalone, with all the extras ...\n\n",
"msg_date": "Wed, 14 Aug 2002 16:47:51 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "Marc G. Fournier wrote:\n> On Wed, 14 Aug 2002, Bruce Momjian wrote:\n> \n> > Marc G. Fournier wrote:\n> > > > They are moving pgaccess more into the admin role, and pgmonitor fit in\n> > > > with that.\n> > >\n> > > Personally, I kinda like to be able to run admin modularized ... they\n> > > *should* be looking at stuff like webmin, where you can plug-n-play admin\n> > > functions as required, or horde (http://www.horde.org) ... why would I\n> > > install pgaccess if all I want to do is monitor? Now, to be able to\n> > > install pgaccess and have pgmonitor tie into *that* would be cool ...\n> > >\n> > > 'bigger is better' is MicroSloth's philosophy ... sounds like the PgAccess\n> > > guys are adopting it too? :(\n> >\n> > I assume pgmonitor will just be a new tab in the pgaccess window. It is\n> > integrated only in that it is part of the tcl scripts supplied.\n> \n> Right, but, if its 'integrated', then I have to download the whole thing\n> ... I only want pgmonitor, so how can I get that now?\n> \n> Again, if they do it *properly*, it should be a seperate module you can\n> download, enable in a config file for pgaccess and have show up ... but it\n> should be runnable standalone, with all the extras ...\n\nMy guess is that it will be integrated and not stand-alone, though tcl\napps are so small, you may never notice.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 15:50:00 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "Bruce Momjian writes:\n\n> OK, we got _that_ answer. Looks like gborg. Marc really wants to pump\n> that up.\n\nI think if gborg had a different name and looked more like the main site,\nmore people would consider using it without feeling \"kicked out\".\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Thu, 15 Aug 2002 00:01:41 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: journaling in contrib ..."
},
{
"msg_contents": "On Thu, 15 Aug 2002, Peter Eisentraut wrote:\n\n> Bruce Momjian writes:\n>\n> > OK, we got _that_ answer. Looks like gborg. Marc really wants to pump\n> > that up.\n>\n> I think if gborg had a different name and looked more like the main site,\n> more people would consider using it without feeling \"kicked out\".\n\nWell, that's the first I've heard of anything like that, but several\npoints to make here ... Chris Ryan has been actively working with the www\ngroup working on the web towards addresssing issues with GBorg, and be,\nthe 'main site' is currently in the process of getting totally overhauled\nby said group ...\n\nNobody is being kicked out ... we now have an effective method of managing\nprojects without them being part of the centrali distribution ... 'being\nkicked out', to me, would mean pushing them over to DB2+Sourceforge ;)\n\n\n",
"msg_date": "Wed, 14 Aug 2002 19:56:56 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: journaling in contrib ..."
}
] |
[
{
"msg_contents": "\ncvs server: Updating src/backend/utils/mb/conversion_procs/ascii_and_mic\ncvs server: failed to create lock directory for\n`/projects/cvsroot/pgsql-server/src/backend/utils/mb/conversion_procs/ascii_and_mic' (/projects/cvsroot/pgsql-server/src/backend/utils/mb/conversion_procs/ascii_and_mic/#cvs.lock): Permission denied\ncvs server: failed to obtain dir lock in repository\n`/projects/cvsroot/pgsql-server/src/backend/utils/mb/conversion_procs/ascii_and_mic'\ncvs [server aborted]: read lock failed - giving up\n\n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight, UK \nhttp://www.lfix.co.uk/oliver\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Let us therefore come boldly unto the throne of grace,\n that we may obtain mercy, and find grace to help in \n time of need.\" Hebrews 4:16 \n\n",
"msg_date": "14 Aug 2002 07:51:38 +0100",
"msg_from": "Oliver Elphick <olly@lfix.co.uk>",
"msg_from_op": true,
"msg_subject": "anoncvs - here we go again!"
},
{
"msg_contents": "On Wed, 2002-08-14 at 07:51, Oliver Elphick wrote:\n> \n> cvs server: Updating src/backend/utils/mb/conversion_procs/ascii_and_mic\n> cvs server: failed to create lock directory for\n\nMarc, can you set up a cron job to set the permissions automatically?\nThis seems to happen any time someone adds a new directory.\n\n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight, UK \nhttp://www.lfix.co.uk/oliver\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Let us therefore come boldly unto the throne of grace,\n that we may obtain mercy, and find grace to help in \n time of need.\" Hebrews 4:16 \n\n",
"msg_date": "14 Aug 2002 10:03:11 +0100",
"msg_from": "Oliver Elphick <olly@lfix.co.uk>",
"msg_from_op": true,
"msg_subject": "Re: anoncvs - here we go again!"
},
{
"msg_contents": "On 14 Aug 2002, Oliver Elphick wrote:\n\n>\n> cvs server: Updating src/backend/utils/mb/conversion_procs/ascii_and_mic\n> cvs server: failed to create lock directory for\n> `/projects/cvsroot/pgsql-server/src/backend/utils/mb/conversion_procs/ascii_and_mic' (/projects/cvsroot/pgsql-server/src/backend/utils/mb/conversion_procs/ascii_and_mic/#cvs.lock): Permission denied\n> cvs server: failed to obtain dir lock in repository\n> `/projects/cvsroot/pgsql-server/src/backend/utils/mb/conversion_procs/ascii_and_mic'\n> cvs [server aborted]: read lock failed - giving up\n\nDamn, thought I had added a chown at the end of that command ... both are\nnow fixed ...\n\n\n",
"msg_date": "Wed, 14 Aug 2002 20:10:49 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: anoncvs - here we go again!"
}
] |
[
{
"msg_contents": "Hi guys,\n\nThe fulltextindex Makefile looks like this:\n\nsubdir = contrib/fulltextindex\ntop_builddir = ../..\ninclude $(top_builddir)/src/Makefile.global\n\nMODULE_big = fti\nOBJS = list.o chtbl.o fti.o\nDATA_built = fti.sql\nDOCS = README.fti\nSCRIPTS = fti.pl\n\ninclude $(top_srcdir)/contrib/contrib-global.mk\n\nHow can I modify it to build two different C files into two different .so's?\n\nI want to have fti.so and fti2.so sort of thing...\n\nChris\n\n",
"msg_date": "Wed, 14 Aug 2002 16:31:28 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "contrib Makefiles"
},
{
"msg_contents": "Christopher Kings-Lynne writes:\n\n> How can I modify it to build two different C files into two different .so's?\n\nThat is next to impossible in the current setup.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Thu, 15 Aug 2002 00:02:07 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: contrib Makefiles"
},
{
"msg_contents": "Is it possible to have two different functions in the .so that can be made\ninto two different postgres funtions, both referencing the same .so?\n\nChris\n\n> -----Original Message-----\n> From: Peter Eisentraut [mailto:peter_e@gmx.net]\n> Sent: Thursday, 15 August 2002 6:02 AM\n> To: Christopher Kings-Lynne\n> Cc: Hackers\n> Subject: Re: [HACKERS] contrib Makefiles\n>\n>\n> Christopher Kings-Lynne writes:\n>\n> > How can I modify it to build two different C files into two\n> different .so's?\n>\n> That is next to impossible in the current setup.\n>\n> --\n> Peter Eisentraut peter_e@gmx.net\n>\n\n",
"msg_date": "Thu, 15 Aug 2002 12:43:58 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "Re: contrib Makefiles"
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> Is it possible to have two different functions in the .so that can be made\n> into two different postgres funtions, both referencing the same .so?\n\nCertainly, what's the problem there? Offhand I can't think of any\ncontrib modules that only define one function...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 15 Aug 2002 01:09:26 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: contrib Makefiles "
},
{
"msg_contents": "> \"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> > Is it possible to have two different functions in the .so that\n> can be made\n> > into two different postgres funtions, both referencing the same .so?\n>\n> Certainly, what's the problem there? Offhand I can't think of any\n> contrib modules that only define one function...\n\nOK then,\n\nI guess my question would be that currently fulltextindex generates SQL like\nthis:\n\ncreate function fti() returns opaque as\n '$libdir/fti'\n language 'C';\n\nSo it references the fti.so, but where does it say what function to actually\nrun in fti.so? Or is it assumed in C functions that the function to call in\nthe shared object is the same as the name of the function???\n\nChris\n\n",
"msg_date": "Thu, 15 Aug 2002 13:21:21 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "Re: contrib Makefiles "
},
{
"msg_contents": "Christopher Kings-Lynne wrote:\n> create function fti() returns opaque as\n> '$libdir/fti'\n> language 'C';\n> \n> So it references the fti.so, but where does it say what function to actually\n> run in fti.so? Or is it assumed in C functions that the function to call in\n> the shared object is the same as the name of the function???\n> \n\nIt does if you're not specific. Take a look at dblink.sql.in. All of the \ndblink functions are in one shared object file.\n\ne.g.\nCREATE OR REPLACE FUNCTION dblink (text,text) RETURNS setof int\n AS 'MODULE_PATHNAME','dblink' LANGUAGE 'c'\n WITH (isstrict);\n\nCREATE OR REPLACE FUNCTION dblink_tok (int,int) RETURNS text\n AS 'MODULE_PATHNAME','dblink_tok' LANGUAGE 'c'\n WITH (isstrict);\n...\netc.\n\nJoe\n\n",
"msg_date": "Wed, 14 Aug 2002 22:26:23 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: contrib Makefiles"
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> I guess my question would be that currently fulltextindex generates SQL like\n> this:\n\n> create function fti() returns opaque as\n> '$libdir/fti'\n> language 'C';\n\n> So it references the fti.so, but where does it say what function to actually\n> run in fti.so? Or is it assumed in C functions that the function to call in\n> the shared object is the same as the name of the function???\n\nThat's the assumption unless you specify differently. Time to reread\nthe CREATE FUNCTION man page ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 15 Aug 2002 01:30:22 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: contrib Makefiles "
},
{
"msg_contents": "\nYes, you can optionally specify the symbol to find in the *.so file as\npart of the CREATE FUNCTION command.\n\n---------------------------------------------------------------------------\n\nTom Lane wrote:\n> \"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> > I guess my question would be that currently fulltextindex generates SQL like\n> > this:\n> \n> > create function fti() returns opaque as\n> > '$libdir/fti'\n> > language 'C';\n> \n> > So it references the fti.so, but where does it say what function to actually\n> > run in fti.so? Or is it assumed in C functions that the function to call in\n> > the shared object is the same as the name of the function???\n> \n> That's the assumption unless you specify differently. Time to reread\n> the CREATE FUNCTION man page ...\n> \n> \t\t\tregards, tom lane\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Thu, 15 Aug 2002 10:02:51 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: contrib Makefiles"
}
] |
[
{
"msg_contents": "Damn - I'm getting it too:\n\nP src/backend/utils/fmgr/fmgr.c\nP src/backend/utils/mb/conv.c\nP src/backend/utils/mb/mbutils.c\nP src/backend/utils/mb/conversion_procs/Makefile\ncvs server: failed to create lock directory for\n`/projects/cvsroot/pgsql-server/src/backend/utils/mb/conversion_procs/ascii_\nand_mic'\n(/projects/cvsroot/pgsql-server/src/backend/utils/mb/conversion_procs/ascii_\nand_mic/#cvs.lock): Permission denied\ncvs server: failed to obtain dir lock in repository\n`/projects/cvsroot/pgsql-server/src/backend/utils/mb/conversion_procs/ascii_\nand_mic'\ncvs [server aborted]: read lock failed - giving up\n\nChris\n\n",
"msg_date": "Wed, 14 Aug 2002 16:33:38 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "cvs probs"
}
] |
[
{
"msg_contents": "\n> Added to TODO:\n> \n> \to Cluster all tables at once using pg_index.indisclustered or primary key\n> \n> > > And what happens with those tables that do not have any such index?\n> > \n> > Nothing, would be my vote. You'd just re-CLUSTER all tables that have\n> > been clustered before, the same way they were last clustered.\n\nI second Tom's opinion. If the table was not clustered before leave it as is.\n\nThus the TODO should imho (if at all :-) read:\n\to Cluster all tables at once that have a pg_index.indisclustered\n\nAndreas\n",
"msg_date": "Wed, 14 Aug 2002 14:07:01 +0200",
"msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>",
"msg_from_op": true,
"msg_subject": "Re: CLUSTER all tables at once?"
},
{
"msg_contents": "\nSounds good to me. TODO updated:\n\n o Cluster all tables at once using pg_index.indisclustered set\n\t during previous CLUSTER\n\n---------------------------------------------------------------------------\n\nZeugswetter Andreas SB SD wrote:\n> \n> > Added to TODO:\n> > \n> > \to Cluster all tables at once using pg_index.indisclustered or primary key\n> > \n> > > > And what happens with those tables that do not have any such index?\n> > > \n> > > Nothing, would be my vote. You'd just re-CLUSTER all tables that have\n> > > been clustered before, the same way they were last clustered.\n> \n> I second Tom's opinion. If the table was not clustered before leave it as is.\n> \n> Thus the TODO should imho (if at all :-) read:\n> \to Cluster all tables at once that have a pg_index.indisclustered\n> \n> Andreas\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 13:40:33 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: CLUSTER all tables at once?"
}
] |
[
{
"msg_contents": "Do any of the encodings with encoding max length > 1 have a constant \ncharacter size (e.g. unicode?). If so, how hard would it be to add \nanother member to pg_wchar_tbl, say:\n\nbool mblen_is_const; /* all chars = max bytes this charset */\n\nThen those character sets code gain back much of the same speed \nadvantages as single byte character sets when it comes to string processing.\n\nJoe\n\n",
"msg_date": "Wed, 14 Aug 2002 08:42:15 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": true,
"msg_subject": "another multibyte question"
},
{
"msg_contents": "> Do any of the encodings with encoding max length > 1 have a constant \n> character size (e.g. unicode?). If so, how hard would it be to add \n> another member to pg_wchar_tbl, say:\n> \n> bool mblen_is_const; /* all chars = max bytes this charset */\n> \n> Then those character sets code gain back much of the same speed \n> advantages as single byte character sets when it comes to string processing.\n\nSounds interesting idea, but none of encodings currently PostgreSQL\nsupports has fixed length character size. UCS-2/UCS-4 is such an\nencoding, we do not support it however.\n--\nTatsuo Ishii\n",
"msg_date": "Thu, 15 Aug 2002 10:05:05 +0900 (JST)",
"msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>",
"msg_from_op": false,
"msg_subject": "Re: another multibyte question"
}
] |
[
{
"msg_contents": "I know this is a off topic. I found this in my mailbox not long ago.\nI'm sharing because I thought it might be of some interest. While it's\nobviously a PR move by IBM, it certainly was nice to have something of\nscale like SF to tout in Postgres' favor as a success story.\n\n\nHere's a snippet from what I got:\nToday we have announced that we are moving SourceForge.net to DB2,\na powerful relational database by IBM. We are doing this because\nthe site continues to grow at a rapid rate, with 700 new users and\n70 new projects a day, and we need a database that can handle this\ngrowth. We feel that DB2 can do this for us, and IBM is giving us\nthe resources to make this transition successful. You can read the\npress release here:\n\nhttp://www.vasoftware.com/news/press.php/2002/1070.html\n\n\nSign,\n\tGreg Copeland",
"msg_date": "14 Aug 2002 11:42:50 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": true,
"msg_subject": "SF moving to DB2..."
}
] |
[
{
"msg_contents": "While the REFERENCES privilege controls who can create foreign keys\nreferring to one's tables, it seems you can evade it by using CREATE\nCONSTRAINT TRIGGER directly.\n\nThis is the \"slave\" portion of a FK constraint I got from pg_dump:\n\nCREATE CONSTRAINT TRIGGER \"$1\"\n AFTER INSERT OR UPDATE ON \"slave\"\n FROM master\n NOT DEFERRABLE INITIALLY IMMEDIATE\n FOR EACH ROW\n EXECUTE PROCEDURE \"RI_FKey_check_ins\" ('$1', 'slave', 'master', 'UNSPECIFIED', 'x', 'a');\n\nTo create this you only need to have a privilege on \"slave\", but it\ncreates a fully functional way to \"query\" the primary key of the master\ntable by brute force, and probably also to lock the table up, although I\nhaven't checked that.\n\nIt seems we need to check the privilege on the table mentioned in the FROM\n\"foo\" clause as well. Is that correct and sufficient?\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Wed, 14 Aug 2002 19:09:25 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": true,
"msg_subject": "CREATE CONSTRAINT TRIGGER appears to be a security hole"
},
{
"msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> While the REFERENCES privilege controls who can create foreign keys\n> referring to one's tables, it seems you can evade it by using CREATE\n> CONSTRAINT TRIGGER directly.\n\nGood point.\n\n> It seems we need to check the privilege on the table mentioned in the FROM\n> \"foo\" clause as well. Is that correct and sufficient?\n\nIt is if we assume that every CREATE CONSTRAINT TRIGGER is used for\nsomething that should require REFERENCES privilege. Given that the\ncommand is not really intended for user use anyway, this is probably\nokay to assume.\n\nOne might try to evade the check by mentioning something different in\nFROM than is mentioned in the trigger arguments, but as of CVS tip\nthat doesn't work --- the RI triggers don't look at the relation-name\narguments anymore, only at the FROM link.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 13:34:51 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: CREATE CONSTRAINT TRIGGER appears to be a security hole "
}
] |
[
{
"msg_contents": "I needed to move a PostgreSQL database to another product but I noticed\nthat the pg_dump output contains a few artifacts that make the output\nnonportable. Most of these should be relatively easy to fix. Here's my\nlist:\n\n* Boolean values should be dumped as true and false (rather than 't' and\n'f') in INSERT-style output.\n\n* Numeric and int8 should be dumped without quotes, except in cases like\n'NaN'.\n\n* Date, time, and timestamp literals should use standard prefixed syntax\nlike DATE 'yyyy-mm-dd'.\n\n* Identifier quoting seems to be inconsistent. The -n option gives you\nportable behaviour (quoted only if mixed case or funny characters), but\nthe default -N doesn't actually quote some things that are generated by\nthe backend, including rule and index creation commands. Is there a point\nin having the -n behavior at all?\n\n* Nonprintable characters in string literals are currently output as octal\nescape sequences (e.g., \\012). It would be more portable to just print\nout the characters as is. This should be an option -- any opinions on\nwhich might be a better default?\n\n* The expression reverse-engineering code outputs ::text and similar casts\nin many cases. These should be CAST().\n\n* It was once proposed to make SET SESSION AUTHORIZATION the default in\npg_dump. What became of that?\n\n* Is anyone working on using standard foreign key creation commands\ninstead of CREATE CONSTRAINT TRIGGER?\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Wed, 14 Aug 2002 19:09:39 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": true,
"msg_subject": "pg_dump output portability"
},
{
"msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> I needed to move a PostgreSQL database to another product but I noticed\n> that the pg_dump output contains a few artifacts that make the output\n> nonportable. Most of these should be relatively easy to fix.\n\nMost of these look like they would break a lot of people --- for\nexample, we can't just arbitrarily change the results of bool_out.\n\n> * Identifier quoting seems to be inconsistent. The -n option gives you\n> portable behaviour (quoted only if mixed case or funny characters), but\n> the default -N doesn't actually quote some things that are generated by\n> the backend, including rule and index creation commands. Is there a point\n> in having the -n behavior at all?\n\nYou mean you'd rather eliminate the -N behavior, no? I'd vote for that.\n\n> * Nonprintable characters in string literals are currently output as octal\n> escape sequences (e.g., \\012). It would be more portable to just print\n> out the characters as is. This should be an option -- any opinions on\n> which might be a better default?\n\nAgain, I'm fairly suspicious of this; it seems likely to result in\nfailures to read in the data. You can't just leave data newlines as-is\nfor example.\n\n> * The expression reverse-engineering code outputs ::text and similar casts\n> in many cases. These should be CAST().\n\nI will vote against this as being a major loss of legibility. Perhaps\nwe could compromise on controlling it by a GUC variable, though.\n\n> * It was once proposed to make SET SESSION AUTHORIZATION the default in\n> pg_dump. What became of that?\n\nI think this is a good idea, and was meaning to do it but hadn't got\nround to it.\n\n> * Is anyone working on using standard foreign key creation commands\n> instead of CREATE CONSTRAINT TRIGGER?\n\nRod Taylor submitted a patch for that, which I was planning to review\nand apply shortly.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 13:45:58 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump output portability "
},
{
"msg_contents": "\n> * Is anyone working on using standard foreign key creation commands\n> instead of CREATE CONSTRAINT TRIGGER?\n\nSubmitted with the pg_constraint patch, and more recently updated to\nmatch cvs tip. I believe Tom wishes to review this prior to\napplication.\n\n",
"msg_date": "14 Aug 2002 14:07:38 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump output portability"
},
{
"msg_contents": "Peter Eisentraut wrote:\n> I needed to move a PostgreSQL database to another product but I noticed\n\n ^^^^^^^^^^^^^^^^^^\n\nSurely this is a misprint. ;-)\n\n\n> that the pg_dump output contains a few artifacts that make the output\n> nonportable. Most of these should be relatively easy to fix. Here's my\n> list:\n\nMaybe we need a \"maximum portability\" flag for pg_dump that will do some\nof the things outlined below.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 14:16:41 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump output portability"
},
{
"msg_contents": "Tom Lane writes:\n\n> Most of these look like they would break a lot of people --- for\n> example, we can't just arbitrarily change the results of bool_out.\n\nThat wouldn't help anyway. I meant to add code in pg_dump (and possibly\nthe rule recompiler). That doesn't break anything.\n\n> You mean you'd rather eliminate the -N behavior, no? I'd vote for that.\n\nYes. Or at least switch the default to \"portable and readable\".\n\n> Again, I'm fairly suspicious of this; it seems likely to result in\n> failures to read in the data. You can't just leave data newlines as-is\n> for example.\n\nWhy not? You'd end up with\n\nINSERT ... VALUES ('multi\nline\nliteral', 'more data');\n\nThis is accepted by PostgreSQL now, is legal SQL, and is arguably at least\nas readable as octal escape sequences. (Note I'm not talking about doing\nthis in COPY, which is not portable anyway.)\n\n> > * The expression reverse-engineering code outputs ::text and similar casts\n> > in many cases. These should be CAST().\n>\n> I will vote against this as being a major loss of legibility. Perhaps\n> we could compromise on controlling it by a GUC variable, though.\n\nI was afraid of that, but to pick up the theme of the day, I'm not sure if\nI want to overcomplexify things that much. ;-)\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Thu, 15 Aug 2002 00:05:36 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump output portability "
},
{
"msg_contents": "Peter Eisentraut wrote:\n> > I will vote against this as being a major loss of legibility. Perhaps\n> > we could compromise on controlling it by a GUC variable, though.\n> \n> I was afraid of that, but to pick up the theme of the day, I'm not sure if\n> I want to overcomplexify things that much. ;-)\n\nTomorrow's theme is \"sharing\". :-)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 18:20:24 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump output portability"
},
{
"msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Tom Lane writes:\n>> Most of these look like they would break a lot of people --- for\n>> example, we can't just arbitrarily change the results of bool_out.\n\n> That wouldn't help anyway. I meant to add code in pg_dump (and possibly\n> the rule recompiler). That doesn't break anything.\n\nAh. But where exactly will you substitute true for 't'? I don't think\npg_dump necessarily knows enough to apply that transformation.\nruleutils could and probably should do it for bool constants, but that's\nonly a small part of pg_dump output.\n\n>> You mean you'd rather eliminate the -N behavior, no? I'd vote for that.\n\n> Yes. Or at least switch the default to \"portable and readable\".\n\nSwitching the default is definitely fine with me, but I'd lean towards\nripping it out entirely, given that the backend-supplied chunks of stuff\nare not going to have extra quotes. We always tell people \"always quote\nor never quote\" a given identifier; pg_dump scripts ought to follow that\nrule.\n\n>> Again, I'm fairly suspicious of this; it seems likely to result in\n>> failures to read in the data. You can't just leave data newlines as-is\n>> for example.\n\n> Why not? You'd end up with\n\n> INSERT ... VALUES ('multi\n> line\n> literal', 'more data');\n\n> This is accepted by PostgreSQL now, is legal SQL, and is arguably at least\n> as readable as octal escape sequences. (Note I'm not talking about doing\n> this in COPY, which is not portable anyway.)\n\nOkay, I missed that context; I was thinking of COPY. Yeah, in string\nliterals in INSERT it seems fairly reasonable to do nothing to the data\nexcept double ' and \\. I am a little worried however about\ncharacter-set-encoding gotchas. Hiroshi or Tatsuo might have more\ninsight here.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 18:52:17 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump output portability "
},
{
"msg_contents": "On Wed, 2002-08-14 at 18:20, Bruce Momjian wrote:\n> Peter Eisentraut wrote:\n> > > I will vote against this as being a major loss of legibility. Perhaps\n> > > we could compromise on controlling it by a GUC variable, though.\n> > \n> > I was afraid of that, but to pick up the theme of the day, I'm not sure if\n> > I want to overcomplexify things that much. ;-)\n> \n> Tomorrow's theme is \"sharing\". :-)\n\nBrought to you by the letters S, Q, L and the number 99.\n\n",
"msg_date": "14 Aug 2002 19:12:00 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump output portability"
},
{
"msg_contents": "Tom Lane writes:\n\n> Ah. But where exactly will you substitute true for 't'? I don't think\n> pg_dump necessarily knows enough to apply that transformation.\n\nSure, it does it already for other types. Look for BITOID in pg_dump.c.\n\n> Switching the default is definitely fine with me, but I'd lean towards\n> ripping it out entirely, given that the backend-supplied chunks of stuff\n> are not going to have extra quotes. We always tell people \"always quote\n> or never quote\" a given identifier; pg_dump scripts ought to follow that\n> rule.\n\nIt occurred to me that pg_dump would need to know which names are\nkeywords. Ugh.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Thu, 15 Aug 2002 21:29:56 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump output portability "
},
{
"msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Tom Lane writes:\n>> Switching the default is definitely fine with me, but I'd lean towards\n>> ripping it out entirely, given that the backend-supplied chunks of stuff\n>> are not going to have extra quotes. We always tell people \"always quote\n>> or never quote\" a given identifier; pg_dump scripts ought to follow that\n>> rule.\n\n> It occurred to me that pg_dump would need to know which names are\n> keywords. Ugh.\n\nGood point, but not insurmountable. We could easily make pg_dump\ninclude the backend's src/backend/parser/keywords.o file and then\nuse that subroutine to test for keyword-ness. This would be a 100%\nsolution when dumping from a server of the same version, and about\na 99.9% solution when dumping from an older server.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 15 Aug 2002 16:13:00 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump output portability "
}
] |
[
{
"msg_contents": "In PostgreSQL 7.1, this code goes smoothly.\n\n create table test (name varchar(5));\n insert into test values('abracadabra');\n\nLong input string was silently trimmed. But in PG7.2 an error is triggered.\n\nOK, I suppose this is just a new feature, not a bug but. But...\n\n...Is it possible to restore the old behaviour?\n\n--\nBest regards,\nSasa Markovic, Development Team Leader\nDataGate Belgrade - http://www.datagate.co.yu\n\n\n\n\n\n\n\n\n\nIn PostgreSQL 7.1, \nthis code goes smoothly. \n create table test (name \nvarchar(5)); insert into test \nvalues('abracadabra');\nLong input \nstring was silently trimmed. But in PG7.2 an error is triggered. \n\nOK, I suppose this is \njust a new feature, not a bug but. But...\n...Is it \npossible to restore the old behaviour? --Best regards,Sasa Markovic, \nDevelopment Team LeaderDataGate Belgrade - http://www.datagate.co.yu",
"msg_date": "Wed, 14 Aug 2002 20:41:29 +0200",
"msg_from": "\"Sasa Markovic\" <saxon@eunet.yu>",
"msg_from_op": true,
"msg_subject": "Long strings, short varchars"
},
{
"msg_contents": "Sasa Markovic writes:\n\n> Long input string was silently trimmed. But in PG7.2 an error is triggered.\n> OK, I suppose this is just a new feature, not a bug but. But...\n> ...Is it possible to restore the old behaviour?\n\nWrite a rule that truncates the string before it's inserted.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Thu, 15 Aug 2002 19:13:42 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: Long strings, short varchars"
},
{
"msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Sasa Markovic writes:\n>> Long input string was silently trimmed. But in PG7.2 an error is triggered.\n>> OK, I suppose this is just a new feature, not a bug but. But...\n>> ...Is it possible to restore the old behaviour?\n\n> Write a rule that truncates the string before it's inserted.\n\nPeter, did you note the thread that concluded we'd not got the SQL\nsemantics quite right here? AFAICT, raising an error when an overlength\nstring is assigned is correct per spec, but raising an error when an\noverlength string is explicitly casted is *not* correct. Something like\n\n\tselect 'foo'::char(2);\n\nshould draw a \"completion condition\" not an \"exception condition\" per\nspec. Compare SQL92 6.10 <cast specification> general rules 5.c and 6.c\nwith 9.2 store assignment general rules 3.b and 3.e; the one set says\ncompletion condition, the other says exception condition.\n\nA completion condition might be thought to be the same as our WARNING,\nbut I'd be inclined to argue on usability grounds that the cast case\nshould just silently truncate.\n\nIn any case we need to distinguish implicit coercion for a store from\nexplicit coercion. Do your recent pg_cast changes make that any easier?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 15 Aug 2002 14:02:06 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Long strings, short varchars "
},
{
"msg_contents": "Tom Lane writes:\n\n> In any case we need to distinguish implicit coercion for a store from\n> explicit coercion. Do your recent pg_cast changes make that any easier?\n\nPossibly we could allow for registering both implicit and explicit cast\nfunctions for the same combination. Or we could make cast functions take\nan optional second argument that tells whether the cast is implicit or\nexplicit. We probably also need to take into account the typemod coercion\nfunctions that are currently handled in a semi-internal way. (Any\nformalization of those should probably consider the possibility of\nallowing typemods on arbitrary types.) Not sure which way to go.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Tue, 20 Aug 2002 20:03:28 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: [BUGS] Long strings, short varchars "
}
] |
[
{
"msg_contents": "I have been getting this for at least two days:\n\n[matthew@zeut src]$ cvs -v\nConcurrent Versions System (CVS) 1.11.2 (client/server)\n\n[matthew@zeut src]$ cvs -z3 -d \n:pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot co -P pgsql\n\n[...]\n\ncvs server: Updating pgsql/src/backend/utils/mb/conversion_procs/ascii_and_mic\ncvs server: failed to create lock directory for \n`/projects/cvsroot/pgsql-server/src/backend/utils/mb/conversion_procs/ascii_and_mic' \n(/projects/cvsroot/pgsql-server/src/backend/utils/mb/conversion_procs/ascii_and_mic/#cvs.lock): \nPermission denied\ncvs server: failed to obtain dir lock in repository \n`/projects/cvsroot/pgsql-server/src/backend/utils/mb/conversion_procs/ascii_and_mic'\ncvs [server aborted]: read lock failed - giving up\n\n",
"msg_date": "Wed, 14 Aug 2002 14:47:45 -0400",
"msg_from": "\"Matthew T. O'Connor\" <matthew@zeut.net>",
"msg_from_op": true,
"msg_subject": "More CVS Problems"
}
] |
[
{
"msg_contents": "A couple questions regarding encrypted passwords:\n\n(1) There was talk of changing the default value of the\n 'password_encryption' GUC variable for 7.3; AFAIK, this hasn't\n happened yet. Should this be done?\n\n(2) What is the reasoning behind the current storage format of\n MD5-encrypted passwords? At the moment, we \"determine\" that a\n password is stored pre-hashed in pg_shadow by checking if it\n begins with \"md5\" and is 35 characters long (the isMD5() macro in\n libpq/crypt.h). This seems problematic, for a couple reasons:\n\n (a) it needlessly overloads the password field: that field\n should store the password or the digest itself, not\n meta-data about the authentication process.\n\n (b) it makes it difficult to determine if the password is\n *actually* encrypted, or whether the user just happened to\n specify an (unencrypted) password of that form.\n\n (c) it limits us to using the MD5 algorithm. MD5 is not\n looking as invincible as it once did, and having the\n capability to support SHA1 or another algorithm without\n too much pain would be nice.\n\n(3) (Related to 2b above) Shouldn't we reject an attempt by the user\n to specify an un-encrypted password that matches the isMD5() test?\n For example:\n\nnconway=# create user foo encrypted password\n'md5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';\nCREATE USER\nnconway=# create user foo2 encrypted password 'somethingelse';\nCREATE USER\nnconway=# select usename, passwd from pg_shadow\n where usename like 'foo%';\n usename | passwd \n---------+-------------------------------------\n foo | md5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n foo2 | md51b80a20a1b6cd86eb369f01009b739d3\n\n(The first password is stored \"as-is\", the second is hashed before\nbeing stored.)\n\nI don't see a need for the ability to specify pre-hashed passwords,\nand it makes the whole process of determining the type of password\nbeing used more complicated.\n\n(4) The naming standard for system catalogs would dictate that the\n 'passwd' field of pg_shadow actually be named 'usepasswd' or\n something similar, wouldn't it? The same applies to the 'valuntil\n field.\n\nCheers,\n\nNeil\n\n-- \nNeil Conway <neilconway@rogers.com>\nPGP Key ID: DB3C29FC\n\n",
"msg_date": "14 Aug 2002 16:32:26 -0400",
"msg_from": "Neil Conway <nconway@klamath.dyndns.org>",
"msg_from_op": true,
"msg_subject": "encrypted passwords"
},
{
"msg_contents": "On Wed, 2002-08-14 at 16:32, Neil Conway wrote:\n> A couple questions regarding encrypted passwords:\n> \n> (1) There was talk of changing the default value of the\n> 'password_encryption' GUC variable for 7.3; AFAIK, this hasn't\n> happened yet. Should this be done?\n\nSince ODBC is capable of using the encryption and I presume JDBC also\nis, what reason is there for not enforcing it's use?\n\n\n\n",
"msg_date": "14 Aug 2002 17:05:48 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: encrypted passwords"
},
{
"msg_contents": "Neil Conway wrote:\n> A couple questions regarding encrypted passwords:\n> \n> (1) There was talk of changing the default value of the\n> 'password_encryption' GUC variable for 7.3; AFAIK, this hasn't\n> happened yet. Should this be done?\n\nStrange. I had updated the docs and postgresql.conf, but not guc.c,\nwhere the default it set. Fixed now.\n\n> (2) What is the reasoning behind the current storage format of\n> MD5-encrypted passwords? At the moment, we \"determine\" that a\n> password is stored pre-hashed in pg_shadow by checking if it\n> begins with \"md5\" and is 35 characters long (the isMD5() macro in\n> libpq/crypt.h). This seems problematic, for a couple reasons:\n> \n> (a) it needlessly overloads the password field: that field\n> should store the password or the digest itself, not\n> meta-data about the authentication process.\n\nYep. That is how FreeBSD handles the password string, and I just\nfollowed that.\n\n> (b) it makes it difficult to determine if the password is\n> *actually* encrypted, or whether the user just happened to\n> specify an (unencrypted) password of that form.\n\nYep, good point.\n\n> (c) it limits us to using the MD5 algorithm. MD5 is not\n> looking as invincible as it once did, and having the\n> capability to support SHA1 or another algorithm without\n> too much pain would be nice.\n> \n> (3) (Related to 2b above) Shouldn't we reject an attempt by the user\n> to specify an un-encrypted password that matches the isMD5() test?\n> For example:\n> \n> nconway=# create user foo encrypted password\n> 'md5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';\n> CREATE USER\n> nconway=# create user foo2 encrypted password 'somethingelse';\n> CREATE USER\n> nconway=# select usename, passwd from pg_shadow\n> where usename like 'foo%';\n> usename | passwd \n> ---------+-------------------------------------\n> foo | md5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n> foo2 | md51b80a20a1b6cd86eb369f01009b739d3\n> \n> (The first password is stored \"as-is\", the second is hashed before\n> being stored.)\n> \n> I don't see a need for the ability to specify pre-hashed passwords,\n> and it makes the whole process of determining the type of password\n> being used more complicated.\n\nWell, pg_dump actually loads in the encrypted passwords in that format,\nso yea, we do need to allow that. Basically, if you want to split out\nthe encryption type from the encryption string, you will need a new\npg_shadow column to handle that, and an update to CREATE USER to pass\nthat flag in for pg_dump to use when reloading.\n\n> (4) The naming standard for system catalogs would dictate that the\n> 'passwd' field of pg_shadow actually be named 'usepasswd' or\n> something similar, wouldn't it? The same applies to the 'valuntil\n> field.\n\nYes, not sure what other apps access that, but clearly it is\ninconsistent. Will it cause hardship to fix that?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 18:18:04 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: encrypted passwords"
},
{
"msg_contents": "Rod Taylor wrote:\n> On Wed, 2002-08-14 at 16:32, Neil Conway wrote:\n> > A couple questions regarding encrypted passwords:\n> > \n> > (1) There was talk of changing the default value of the\n> > 'password_encryption' GUC variable for 7.3; AFAIK, this hasn't\n> > happened yet. Should this be done?\n> \n> Since ODBC is capable of using the encryption and I presume JDBC also\n> is, what reason is there for not enforcing it's use?\n\nIt was delayed until 7.3 so we had 7.2 client apps that understood it so\nan upgraded would continue to work with older clients.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 18:18:44 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: encrypted passwords"
},
{
"msg_contents": "Neil Conway <nconway@klamath.dyndns.org> writes:\n> A couple questions regarding encrypted passwords:\n> (1) There was talk of changing the default value of the\n> 'password_encryption' GUC variable for 7.3; AFAIK, this hasn't\n> happened yet. Should this be done?\n\nHmm. I thought it *was* done, but it looks like Bruce forgot to change\nthe actual guc.c value? The docs and postgresql.conf.sample claim the\ndefault is true...\n\n2002-06-14 21:29 momjian\n\n\t* doc/src/sgml/runtime.sgml,\n\tsrc/backend/utils/misc/postgresql.conf.sample: Make encryption of\n\tstored passwords the default, as discussed months ago.\n\nSeem to be one file short on that commit ...\n\n\n> (2) What is the reasoning behind the current storage format of\n> MD5-encrypted passwords?\n\nThe reasoning for the apparent leakage between encrypted and unencrypted\nformats is it allows pg_dumpall to reload an already-encrypted password,\nor an admin to copy-and-paste an encrypted password without knowing\nexactly what the password is. See the archives when this mechanism was\nbeing designed (about a year ago I think), if you want the full story.\n\n> (b) it makes it difficult to determine if the password is\n> *actually* encrypted, or whether the user just happened to\n> specify an (unencrypted) password of that form.\n\nBy definition, if it looks like that then it's encrypted. I really\ndoubt anyone will want to use a 35-character plaintext password...\nthe apparent conflict is not going to happen in practice AFAICS.\n\n> (c) it limits us to using the MD5 algorithm.\n\nNonsense. If we want another method, we just use another prefix.\n\n> (3) (Related to 2b above) Shouldn't we reject an attempt by the user\n> to specify an un-encrypted password that matches the isMD5() test?\n\nNo, see above. There are actually three cases here: entering a\npreviously encrypted password (in which case do nothing to it regardless\nof the \"encrypted\" option), entering an uncrypted password with the\n\"encrypted\" option (apply MD5 transform), or entering an uncrypted\npassword with the \"unencrypted\" option (do nothing).\n\nI suppose we could have instead invented an ALREADY_CRYPTED option\ninstead, but we didn't, for reasons I don't recall at the moment;\nbut I think it had something to do with making life easier for\npg_dumpall.\n\n> (4) The naming standard for system catalogs would dictate that the\n> 'passwd' field of pg_shadow actually be named 'usepasswd' or\n> something similar, wouldn't it? The same applies to the 'valuntil\n> field.\n\nYeah, they are both ancient mistakes. It's not worth trying to fix now\nhowever; we'd just break client queries.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 18:32:35 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: encrypted passwords "
},
{
"msg_contents": "Tom Lane wrote:\n> Hmm. I thought it *was* done, but it looks like Bruce forgot to change\n> the actual guc.c value? The docs and postgresql.conf.sample claim the\n> default is true...\n> \n> 2002-06-14 21:29 momjian\n> \n> \t* doc/src/sgml/runtime.sgml,\n> \tsrc/backend/utils/misc/postgresql.conf.sample: Make encryption of\n> \tstored passwords the default, as discussed months ago.\n> \n> Seem to be one file short on that commit ...\n\nFixed.\n\n> > (3) (Related to 2b above) Shouldn't we reject an attempt by the user\n> > to specify an un-encrypted password that matches the isMD5() test?\n> \n> No, see above. There are actually three cases here: entering a\n> previously encrypted password (in which case do nothing to it regardless\n> of the \"encrypted\" option), entering an uncrypted password with the\n> \"encrypted\" option (apply MD5 transform), or entering an uncrypted\n> password with the \"unencrypted\" option (do nothing).\n> \n> I suppose we could have instead invented an ALREADY_CRYPTED option\n> instead, but we didn't, for reasons I don't recall at the moment;\n> but I think it had something to do with making life easier for\n> pg_dumpall.\n\nI think there wasn't a reason to make the distinction because it could\nbe detected automatically, and an admin copying a password from\nsomewhere else could easily accidentally double-encrypt the password,\nwhich then wouldn't work.\n\nIt also allowed auto-migration to encrypted passwords from an old dump\nfile.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 18:38:44 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: encrypted passwords"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> It also allowed auto-migration to encrypted passwords from an old dump\n> file.\n\nAh, right, that was it: we wanted to be able to have a pg_dumpall script\ncontaining a mix of crypted and noncrypted passwords in CREATE USER\ncommands be loaded either as-is, or have all the passwords forced to\ncrypted form, depending on the setting of password_encryption. So we\ndidn't really want the CREATE USER commands in the script to say exactly\nwhat to do. Therefore, in the design as released the CREATE USER\ncommands emitted by pg_dumpall don't actually say either ENCRYPTED or\nUNENCRYPTED. We didn't see a need for ALREADY_CRYPTED either,\nfiguring that it would actually be more reliable to deduce that by\nlooking at the data than by having a separate flag for it.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 14 Aug 2002 19:01:14 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: encrypted passwords "
}
] |
[
{
"msg_contents": "interesting.\n\n\n\n>From: Peter Eisentraut <peter_e@gmx.net>\n>To: Bruce Momjian <pgman@candle.pha.pa.us>\n>CC: Tom Lane <tgl@sss.pgh.pa.us>,Gavin Sherry <swm@linuxworld.com.au>, \n><hs@cybertec.at>,<pgsql-hackers@postgresql.org>\n>Subject: Re: [HACKERS] journaling in contrib ...\n>Date: Thu, 15 Aug 2002 00:01:41 +0200 (CEST)\n>MIME-Version: 1.0\n>Received: from [64.49.215.143] by hotmail.com (3.2) with ESMTP id \n>MHotMailBF241D7B006A4004319C4031D78F0F510; Wed, 14 Aug 2002 14:58:24 -0700\n>Received: from postgresql.org (postgresql.org [64.49.215.8])by \n>relay2.pgsql.com (Postfix) with ESMTPid F0ED2EDFC30; Wed, 14 Aug 2002 \n>17:58:05 -0400 (EDT)\n>Received: from localhost (postgresql.org [64.49.215.8])by postgresql.org \n>(Postfix) with ESMTP id B278F47583Efor <pgsql-hackers@postgresql.org>; Wed, \n>14 Aug 2002 17:58:00 -0400 (EDT)\n>Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])by postgresql.org \n>(Postfix) with SMTP id A91A14754A3for <pgsql-hackers@postgresql.org>; Wed, \n>14 Aug 2002 17:57:59 -0400 (EDT)\n>Received: (qmail 26637 invoked by uid 0); 14 Aug 2002 21:58:00 -0000\n>Received: from pd902f0d4.dip0.t-ipconnect.de (217.2.240.212) by \n>mail.gmx.net (mp002-rz3) with SMTP; 14 Aug 2002 21:58:00 -0000\n>From pgsql-hackers-owner Wed, 14 Aug 2002 14:59:23 -0700\n>X-X-Sender: peter@localhost.localdomain\n>In-Reply-To: <200208141802.g7EI25214253@candle.pha.pa.us>\n>Message-ID: \n><Pine.LNX.4.44.0208142107070.20055-100000@localhost.localdomain>\n>X-Virus-Scanned: by AMaViS new-20020517\n>Precedence: bulk\n>Sender: pgsql-hackers-owner@postgresql.org\n>\n>Bruce Momjian writes:\n>\n> > OK, we got _that_ answer. Looks like gborg. Marc really wants to pump\n> > that up.\n>\n>I think if gborg had a different name and looked more like the main site,\n>more people would consider using it without feeling \"kicked out\".\n>\n>--\n>Peter Eisentraut peter_e@gmx.net\n>\n>\n>---------------------------(end of broadcast)---------------------------\n>TIP 3: if posting/reading through Usenet, please send an appropriate\n>subscribe-nomail command to majordomo@postgresql.org so that your\n>message can get through to the mailing list cleanly\n\n\n\n\n_________________________________________________________________\nMSN Photos is the easiest way to share and print your photos: \nhttp://photos.msn.com/support/worldwide.aspx\n\n",
"msg_date": "Wed, 14 Aug 2002 22:05:26 +0000",
"msg_from": "\"Robert Kernell\" <kernell0000@hotmail.com>",
"msg_from_op": true,
"msg_subject": "Fwd: Re: journaling in contrib ..."
}
] |
[
{
"msg_contents": "\nHere are some comments on the open 7.3 items. We have to start pairing\nthis down if we are going to hit beta in 2.5 weeks:\n\n---------------------------------------------------------------------------\n\n P O S T G R E S Q L\n\n 7 . 3 O P E N I T E M S\n\n\nCurrent at ftp://candle.pha.pa.us/pub/postgresql/open_items.\n\n\tSource Code Changes\n\t-------------------\n\tSocket permissions - only install user can access db by default\n\t\tunix_socket_permissions in postgresql.conf\n\nAre we going to do anything with sockets permissions to tighten things up?\nI know of one big client where PostgreSQL got a bad rap for being open\nto all local users by default.\n\n\tPoint-in-time recovery - ready for 7.3?\n\nThis seems very unlikely now. Status?\n\n\tAllow easy display of usernames in a group (pg_hba.conf uses groups now)\n\nI was hoping for something on this because we are now using groups for\npg_hba.conf. If not, we can add it to TODO. I think it is already\nthere.\n\n\tReindex/btree shrinkage - does reindex need work, can btree be shrunk?\n\nCan we do anything here?\n\n\tdisplay locks - ready?\n\nThis one is waiting to be applied.\n\n\tWin32 - timefame?\n\nSeems like a non-issue for 7.3.\n\n\tPrepared statements - ready?\n\nNew version submitted recently. Is it ready to be applied?\n\n\tSchema handling - ready? interfaces? client apps?\n\nWe need a posting describing what interfaces/applictions need to look at\nfor schemas.\n\n\tDependency - have pg_dump auto-create dependencies when loading 7.2.X\n\tdata? \n\nAre we as far as we can go here?\n\n\tglibc and mktime() - fix?\n\nI can do the work on this I need more info and no one seems to be\nconerned.\n\n\tecpg and bison issues - solved?\n\nDo we have a fallback position on this if bison can't get a fixed\nversion?\n\n\timprove macros in new tuple header code\n\thave pg_dumpall dump out db privilege and per-user/db settings\n\nThese need to be done.\n\n\tfix BeOS and QNX4 ports\n\nShould we ship 7.3 without these ports?\n\n\tfix implicit type coercions that are worse\n\nDetails?\n\n\tremove interfaces/ssl if not improved\n\nI am ready to yank this.\n\n\tintegrate or remove new libpqxx\n\tintegrate or add to gborg Pg:DBD\n\nSeems like gborg is the place for these.\n\n\tallow specification of configuration files in a different directory?\n\nAnyone working on this?\n\n\thandle lack of secondary passwords?\n\nWe are discussing this so I think we can get this done soon.\n\n\tmove pg_resetxlog and pg_controldata to main tree, add -f flag\n\nThat is me. I will get to it.\n\n\tAllow PL/PgSQL functions to return sets\n\nIs anyone working on this? We will get beaten up if we don't have this\nfor 7.3 and it is available in other languages.\n\n\tFix bytea to not encode input string\n\tFix db, function, language permissions on 7.2 database loads\n\nNot sure we can do these.\n\t\n\tAgree on PGXLOG/-X handling\n\nThis is still an open item.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Wed, 14 Aug 2002 23:47:39 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Open 7.3 issues"
},
{
"msg_contents": "> \tDependency - have pg_dump auto-create dependencies when loading 7.2.X\n> \tdata? \n> \n> Are we as far as we can go here?\n\nThe only trouble maker is foreign keys. If there was a nice way of\nfinding foreign keys in 7.2 and prior it probably would have been\nimplemented a long time ago in pg_dump :)\n\nSomething in the release notes about how the foreign key dependency\nstuff only works if they drop all current foreign keys (drop trigger)\nand re-add them via alter table add foreign key is suggested.\n\nWorst case scenario for Foreign keys is they will have what they always\nhad.\n\n",
"msg_date": "14 Aug 2002 23:58:12 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "> > \tDependency - have pg_dump auto-create dependencies when\n> loading 7.2.X\n> > \tdata?\n> >\n> > Are we as far as we can go here?\n>\n> The only trouble maker is foreign keys. If there was a nice way of\n> finding foreign keys in 7.2 and prior it probably would have been\n> implemented a long time ago in pg_dump :)\n\nWhat about this.\n\n1. Implement pg_get_foreignkey_def() or whatever\n2. Adjust pg_dump to dump foreign keys using an ALTER statement\n3. Back port the above to rel 7_2_2\n4. Release a 7.2.2 version and ask that people upgrade to that version and\ndo a dump before they upgrade to 7.3.\n5. All is well, plus ppl who don't want to switch to 7.3 on production get\nall sorts of useful bug fixes as well.\n\nChris\n\n",
"msg_date": "Thu, 15 Aug 2002 12:01:45 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> \tremove interfaces/ssl if not improved\n> \n> I am ready to yank this.\n\nAgreed.\n\n> \tintegrate or remove new libpqxx\n> \tintegrate or add to gborg Pg:DBD\n> \n> Seems like gborg is the place for these.\n\nYes, but I'd also like to see libpq++, perl5, and possibly some other\ninterfaces re-packaged separately. I think everyone agrees on the\ndirection here, it just needs someone (Marc?) to do the work.\n\n> \tallow specification of configuration files in a different directory?\n> \n> Anyone working on this?\n\nNot sure we need this for 7.3 -- unless (a) someone steps up to do the\nwork (b) there is some consensus on the design, I don't have a problem\nwith letting this wait for 7.4\n\n> \tAllow PL/PgSQL functions to return sets\n> \n> Is anyone working on this?\n\nI am. It should be ready in time for 7.3.\n\nCheers,\n\nNeil\n\n-- \nNeil Conway <neilconway@rogers.com>\nPGP Key ID: DB3C29FC\n\n",
"msg_date": "15 Aug 2002 00:09:00 -0400",
"msg_from": "Neil Conway <nconway@klamath.dyndns.org>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "On Thu, 2002-08-15 at 00:01, Christopher Kings-Lynne wrote:\n> > > \tDependency - have pg_dump auto-create dependencies when\n> > loading 7.2.X\n> > > \tdata?\n> > >\n> > > Are we as far as we can go here?\n> >\n> > The only trouble maker is foreign keys. If there was a nice way of\n> > finding foreign keys in 7.2 and prior it probably would have been\n> > implemented a long time ago in pg_dump :)\n> \n> What about this.\n> \n> 1. Implement pg_get_foreignkey_def() or whatever\n\nI've done the parsing of foreign key triggers required in the past for\nvarious documentation purposes and it wasn't overly fun -- nor am I sure\nit's right in all cases.\n\nFind 3 triggers with is_constraint true between two tables that match\nargument sets, split argument list by comma, first 4 aren't so useful,\nthe rest in pairs are source / destination columns. Foreign Key state\n(deferred, match, etc.) is in the function naming convention.\n\nIf you want to give it a shot, feel free. Whatever method is in place\nwill need to work on 7.3 for those who didn't use a newer pg_dump on the\nolder database.\n\n",
"msg_date": "15 Aug 2002 00:25:12 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> What about this.\n> 1. Implement pg_get_foreignkey_def() or whatever\n> 2. Adjust pg_dump to dump foreign keys using an ALTER statement\n> 3. Back port the above to rel 7_2_2\n> 4. Release a 7.2.2 version and ask that people upgrade to that version and\n> do a dump before they upgrade to 7.3.\n\nThe trouble with this is that 7.2.2 would include a lot of rather poorly\ntested code (code that has not even made it to CVS yet) ... and if\nthere's a problem in that code, it breaks dump files whether you are an\nearly upgrader to 7.3 or not.\n\nI think that's likely to be a hard sell. The most we are likely to get\nis to ask people to use the 7.3 pg_dump to dump their 7.2 server when\nthey are about to upgrade to 7.3 --- even that much is a difficult trick\nfor RPM users.\n\nThe other problem is that given a 7.2 system catalog setup, it's not\nreally any easier to reconstruct \"this is a foreign key\" on the server\nside than it is to do it on the pg_dump side. So if we can figure out\nhow to do it at all, we might as well make pg_dump do the work instead\nof insisting on a server update.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 15 Aug 2002 00:28:55 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues "
},
{
"msg_contents": "Bruce Momjian wrote:\n> \tPoint-in-time recovery - ready for 7.3?\n> \n> This seems very unlikely now. Status?\n\n\nIt would be a shame to have to wait for 7.4 for this one.\n\n\n> \tglibc and mktime() - fix?\n> \n> I can do the work on this I need more info and no one seems to be\n> conerned.\n\n\nI'm concerned, but in the few moments I've had to play with this, what \nlooked like the obvious fix didn't seem to work (I was hacking on glibc \nitself though).\n\n\n> \tAllow PL/PgSQL functions to return sets\n> \n> Is anyone working on this? We will get beaten up if we don't have this\n> for 7.3 and it is available in other languages.\n\n\nI saw Neil's response. I'll jump in to help if he needs any.\n\n\n> \n> \tFix bytea to not encode input string\n> \n> Not sure we can do these.\n\nAs I said, it isn't clear to me how this can be fixed without a fe/be \nprotocol change. But if someone can point me in the direction of a \nviable fix for 7.3, I'll dive in.\n\nJoe\n\n",
"msg_date": "Wed, 14 Aug 2002 22:36:31 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Joe Conway <mail@joeconway.com> writes:\n> Bruce Momjian wrote:\n>> Point-in-time recovery - ready for 7.3?\n>> \n>> This seems very unlikely now. Status?\n\n> It would be a shame to have to wait for 7.4 for this one.\n\nIf a credible patch appears before the end of the month, great ---\nbut the discussions so far have left me feeling that we're still\na ways away from PITR. And I *don't* want to hold up 7.3 to wait\nfor it. Learned that lesson with WAL for 7.1 ...\n\n>> glibc and mktime() - fix?\n>> \n>> I can do the work on this I need more info and no one seems to be\n>> conerned.\n\n> I'm concerned, but in the few moments I've had to play with this, what \n> looked like the obvious fix didn't seem to work (I was hacking on glibc \n> itself though).\n\nRed Hat's internal opinion seems to be that \"#define NO_MKTIME_BEFORE_1970\"\nis a sufficient answer. I consider that well to the south of sucking,\nbut at this point I really doubt that we have the time to implement a\nbetter answer for 7.3. A better answer seems to mean writing our own\ninterface to the zic timezone database. Make no mistake: I think we\nshould do that, and will do it eventually. I just doubt it'll happen\nin the next two weeks. And again, I do not feel we should hold up 7.3\nto wait for a solution.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 15 Aug 2002 01:54:23 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues "
},
{
"msg_contents": "Christopher Kings-Lynne wrote:\n\n[ ... ]\n\n> What about this.\n> \n> 1. Implement pg_get_foreignkey_def() or whatever\n> 2. Adjust pg_dump to dump foreign keys using an ALTER statement\n> 3. Back port the above to rel 7_2_2\n> 4. Release a 7.2.2 version and ask that people upgrade to that version and\n> do a dump before they upgrade to 7.3.\n> 5. All is well, plus ppl who don't want to switch to 7.3 on production get\n> all sorts of useful bug fixes as well.\n\nIf we have to have a 7.2.2 release, I'd like to suggest to backport \n\"create or replace view\" , it it doesn't use any 7.3-specific feature. \nThis one is my pet peeve at the moment ... ;-) Would give a *lot* of \nend-user functionality (and I am a and-user, after all), at little cost, \nif I'm not mistaken ...).\n\n--\nEmmanuel Charpeentier\n\n",
"msg_date": "Thu, 15 Aug 2002 12:04:24 +0200",
"msg_from": "Emmanuel Charpentier <charpent@bacbuc.dyndns.org>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "On Thu, Aug 15, 2002 at 12:09:00AM -0400, Neil Conway wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n... \n> > \tintegrate or remove new libpqxx\n> > \tintegrate or add to gborg Pg:DBD\n> > \n> > Seems like gborg is the place for these.\n> \n> Yes, but I'd also like to see libpq++, perl5, and possibly some other\n> interfaces re-packaged separately. I think everyone agrees on the\n> direction here, it just needs someone (Marc?) to do the work.\n\nWould the method of use be\n- checkout postgresql\n- cd pgsql/src/interfaces\n- checkout libpq++ from gborg\n- cd ../..\n- configure --with-CXX\n\nor would libpq++ become more removed.. (configure options to libpq++ to\npoint to the rest or pgsql?)\n\nCheers,\n\nPatrick\n(prefer former)\n",
"msg_date": "Thu, 15 Aug 2002 13:19:42 +0100",
"msg_from": "Patrick Welche <prlw1@newn.cam.ac.uk>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "On Thursday 15 August 2002 12:28 am, Tom Lane wrote:\n> I think that's likely to be a hard sell. The most we are likely to get\n> is to ask people to use the 7.3 pg_dump to dump their 7.2 server when\n> they are about to upgrade to 7.3 --- even that much is a difficult trick\n> for RPM users.\n\nIt's more of a difficult trick for the RPM maintainer.... :-)\n\nNo, I've thought about this possibility, and I can see packaging a \n'postgresql-pg_dump73-7.2.1' RPM consisting entirely of the 7.3 pg_dump \nlinked against the pieces of 7.2.1 necessary. Ugly, but doable.\n\nI know I sound like a broken record (for those who remember vinyl records), \nbut good upgrading tools would eliminate this recurring problem. That's all \nI'm saying about that this time -- I've said enough, and it's all archived \nfor those who care to know what I think about the state of upgrading.\n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Thu, 15 Aug 2002 10:42:03 -0400",
"msg_from": "Lamar Owen <lamar.owen@wgcr.org>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "\nActually, my _big_ question is whether the lack of dependency info\ncoming from 7.2 is going to cause problems in 7.3, i.e. do we make\nassumptions that dependency info is there and in cases it isn't, are\nthere surprises for users, where things worked fine in 7.2. I want to\nknow if there are cases where we assumed dependency info was there when\nin 7.2 we handled the lack of depenency better.\n\n---------------------------------------------------------------------------\n\nTom Lane wrote:\n> \"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> > What about this.\n> > 1. Implement pg_get_foreignkey_def() or whatever\n> > 2. Adjust pg_dump to dump foreign keys using an ALTER statement\n> > 3. Back port the above to rel 7_2_2\n> > 4. Release a 7.2.2 version and ask that people upgrade to that version and\n> > do a dump before they upgrade to 7.3.\n> \n> The trouble with this is that 7.2.2 would include a lot of rather poorly\n> tested code (code that has not even made it to CVS yet) ... and if\n> there's a problem in that code, it breaks dump files whether you are an\n> early upgrader to 7.3 or not.\n> \n> I think that's likely to be a hard sell. The most we are likely to get\n> is to ask people to use the 7.3 pg_dump to dump their 7.2 server when\n> they are about to upgrade to 7.3 --- even that much is a difficult trick\n> for RPM users.\n> \n> The other problem is that given a 7.2 system catalog setup, it's not\n> really any easier to reconstruct \"this is a foreign key\" on the server\n> side than it is to do it on the pg_dump side. So if we can figure out\n> how to do it at all, we might as well make pg_dump do the work instead\n> of insisting on a server update.\n> \n> \t\t\tregards, tom lane\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Thu, 15 Aug 2002 11:57:48 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> coming from 7.2 is going to cause problems in 7.3, i.e. do we make\n> assumptions that dependency info is there and in cases it isn't, are\n> there surprises for users, where things worked fine in 7.2. I want to\n> know if there are cases where we assumed dependency info was there when\n> in 7.2 we handled the lack of depenency better.\n\nNo, we have not broken any cases that used to work, AFAIK.\n\nThere are new features in 7.3 that will not work in a database made from\na 7.2 dump --- for example, dropping an old table containing a serial\ncolumn won't make the sequence go away, because we won't have a\ndependency link between the table and the sequence. But it didn't go\naway in 7.2 either, so the behavior's no worse. Another thing we won't\nunderstand is that certain sets of triggers make up a foreign-key\nconstraint, so you won't be able to use ALTER TABLE DROP CONSTRAINT to\ndelete 'em. But you couldn't in 7.2 either.\n\nWhile I've toyed with the notion of trying to intuit these dependencies\nas we reload a database, I'm not at all sure it's a good idea. The\nformer 7.2 user might be quite unhappy if we drop a sequence he wasn't\nexpecting to have dropped. We cannot tell for certain how the sequence\nwas made --- it might have been handmade and then used in an explicit\nDEFAULT expression, in which case an auto-drop dependency would probably\nnot be a friendly thing to spring on the user.\n\nThe bulk of the new dependencies are made automatically as we handle\nCREATE statements, so they'll be correct in a reloaded database anyway.\nAFAIR it's just serial sequences and foreign keys that are not going to\nbe as bright as they might be.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 15 Aug 2002 12:20:37 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues "
},
{
"msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > coming from 7.2 is going to cause problems in 7.3, i.e. do we make\n> > assumptions that dependency info is there and in cases it isn't, are\n> > there surprises for users, where things worked fine in 7.2. I want to\n> > know if there are cases where we assumed dependency info was there when\n> > in 7.2 we handled the lack of depenency better.\n> \n> No, we have not broken any cases that used to work, AFAIK.\n> \n> There are new features in 7.3 that will not work in a database made from\n> a 7.2 dump --- for example, dropping an old table containing a serial\n> column won't make the sequence go away, because we won't have a\n> dependency link between the table and the sequence. But it didn't go\n> away in 7.2 either, so the behavior's no worse. Another thing we won't\n> understand is that certain sets of triggers make up a foreign-key\n> constraint, so you won't be able to use ALTER TABLE DROP CONSTRAINT to\n> delete 'em. But you couldn't in 7.2 either.\n> \n> While I've toyed with the notion of trying to intuit these dependencies\n> as we reload a database, I'm not at all sure it's a good idea. The\n> former 7.2 user might be quite unhappy if we drop a sequence he wasn't\n> expecting to have dropped. We cannot tell for certain how the sequence\n> was made --- it might have been handmade and then used in an explicit\n> DEFAULT expression, in which case an auto-drop dependency would probably\n> not be a friendly thing to spring on the user.\n> \n> The bulk of the new dependencies are made automatically as we handle\n> CREATE statements, so they'll be correct in a reloaded database anyway.\n> AFAIR it's just serial sequences and foreign keys that are not going to\n> be as bright as they might be.\n\nOK, that's what I needed to know. It may be confusing to some users\nthat 7.2 serial/foreign keys don't auto-drop while 7.3 do. We need to\nmention that in the release notes. I think that will be enough, but I\ncan imagine people dumping/reloading their db's to get that dependency,\nand I am not sure how we would tell them to do that.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Thu, 15 Aug 2002 12:30:42 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Bruce Momjian writes:\n\n> \tSocket permissions - only install user can access db by default\n> \t\tunix_socket_permissions in postgresql.conf\n\nThis is dead.\n\n> \tglibc and mktime() - fix?\n\nLeave it be. If someone really needs time information from before 1970\n(and who does?) he wouldn't use an OS that doesn't support it anyway.\nThere are several platforms that don't have complete time information\nbefore 1947 and we've lived with those, too.\n\n> \tecpg and bison issues - solved?\n\nA release is cooking. 1.49b was released just a few days ago. Assuming\nthat it is sane and no final release comes out before beta, we might ship\nour beta built with their beta and coordinate with them to make a final\nrelease during our beta. It's a bit risky, but the more testing we can\nprovide to them the faster they will get a release out.\n\n> \tfix BeOS and QNX4 ports\n>\n> Should we ship 7.3 without these ports?\n\nPorters usually appear during beta.\n\n> \tintegrate or remove new libpqxx\n> \tintegrate or add to gborg Pg:DBD\n>\n> Seems like gborg is the place for these.\n\nI would volunteer to package libpq++ separately.\n\n> \tmove pg_resetxlog and pg_controldata to main tree, add -f flag\n>\n> That is me. I will get to it.\n\nWhat does -f do?\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Thu, 15 Aug 2002 21:30:28 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Bruce Momjian wrote:\n> \n> Allow PL/PgSQL functions to return sets\n> \n> Is anyone working on this? We will get beaten up if we don't have this\n> for 7.3 and it is available in other languages.\n\nThat's true. I think I have to do this one. I'm busy for the next 2-3\nweeks (Mom will be back from her Westcoast trip tonight and stay for\nanother 3 weeks). But I should be able to do something after that.\n\n\nJan\n\n-- \n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n",
"msg_date": "Thu, 15 Aug 2002 16:40:23 -0400",
"msg_from": "Jan Wieck <JanWieck@Yahoo.com>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Jan Wieck wrote:\n> Bruce Momjian wrote:\n> > \n> > Allow PL/PgSQL functions to return sets\n> > \n> > Is anyone working on this? We will get beaten up if we don't have this\n> > for 7.3 and it is available in other languages.\n> \n> That's true. I think I have to do this one. I'm busy for the next 2-3\n> weeks (Mom will be back from her Westcoast trip tonight and stay for\n> another 3 weeks). But I should be able to do something after that.\n\nNope. We are in beta then. Either someone else will have to do it or\nit will wait for 7.4.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Thu, 15 Aug 2002 21:14:19 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "\nOK, I removed this 7.3 open item and added a documentation item for the\nrelease notes:\n\n Mention foreign keys and SERIAL dependencies will not be in 7.2 loaded tables\n\n---------------------------------------------------------------------------\n\nRod Taylor wrote:\n> > \tDependency - have pg_dump auto-create dependencies when loading 7.2.X\n> > \tdata? \n> > \n> > Are we as far as we can go here?\n> \n> The only trouble maker is foreign keys. If there was a nice way of\n> finding foreign keys in 7.2 and prior it probably would have been\n> implemented a long time ago in pg_dump :)\n> \n> Something in the release notes about how the foreign key dependency\n> stuff only works if they drop all current foreign keys (drop trigger)\n> and re-add them via alter table add foreign key is suggested.\n> \n> Worst case scenario for Foreign keys is they will have what they always\n> had.\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 00:26:46 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Neil Conway wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > \tremove interfaces/ssl if not improved\n> > \n> > I am ready to yank this.\n> \n> Agreed.\n\nDone and item removed.\n\n\n> > \tallow specification of configuration files in a different directory?\n> > \n> > Anyone working on this?\n> \n> Not sure we need this for 7.3 -- unless (a) someone steps up to do the\n> work (b) there is some consensus on the design, I don't have a problem\n> with letting this wait for 7.4\n\nRemoved. No one has jumped on this. Added to TODO:\n\n* Allow configuration files to be specified in a different directory\n\n> > \tAllow PL/PgSQL functions to return sets\n> > \n> > Is anyone working on this?\n> \n> I am. It should be ready in time for 7.3.\n\nOK.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 00:32:44 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Joe Conway wrote:\n> > \tFix bytea to not encode input string\n> > \n> > Not sure we can do these.\n> \n> As I said, it isn't clear to me how this can be fixed without a fe/be \n> protocol change. But if someone can point me in the direction of a \n> viable fix for 7.3, I'll dive in.\n\nOK, item removed and added to TODO:\n\n* Prevent mismatch of frontend/backend encodings from converting bytea\n data from being interpreted as encoded strings\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 00:35:58 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Tom Lane wrote:\n> > I'm concerned, but in the few moments I've had to play with this, what \n> > looked like the obvious fix didn't seem to work (I was hacking on glibc \n> > itself though).\n> \n> Red Hat's internal opinion seems to be that \"#define NO_MKTIME_BEFORE_1970\"\n> is a sufficient answer. I consider that well to the south of sucking,\n> but at this point I really doubt that we have the time to implement a\n> better answer for 7.3. A better answer seems to mean writing our own\n> interface to the zic timezone database. Make no mistake: I think we\n> should do that, and will do it eventually. I just doubt it'll happen\n> in the next two weeks. And again, I do not feel we should hold up 7.3\n> to wait for a solution.\n\nSo everyone's conclusion is that we can't patch over this problem with a\npatched up version on the link line, so I will just add it to the TODO\nlist:\n\n\t* Fix glibc's mktime() to handle pre-1970's dates\n\nDo we have a way to detect this bug and warn users somehow?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 00:39:22 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Peter Eisentraut wrote:\n> Bruce Momjian writes:\n> \n> > \tSocket permissions - only install user can access db by default\n> > \t\tunix_socket_permissions in postgresql.conf\n> \n> This is dead.\n\nRemoved, still on TODO.\n\n> > \tglibc and mktime() - fix?\n> \n> Leave it be. If someone really needs time information from before 1970\n> (and who does?) he wouldn't use an OS that doesn't support it anyway.\n> There are several platforms that don't have complete time information\n> before 1947 and we've lived with those, too.\n\nRemoved. Added to TODO.\n\n> \n> > \tecpg and bison issues - solved?\n> \n> A release is cooking. 1.49b was released just a few days ago. Assuming\n> that it is sane and no final release comes out before beta, we might ship\n> our beta built with their beta and coordinate with them to make a final\n> release during our beta. It's a bit risky, but the more testing we can\n> provide to them the faster they will get a release out.\n\nWe will see...\n\n> \n> > \tfix BeOS and QNX4 ports\n> >\n> > Should we ship 7.3 without these ports?\n> \n> Porters usually appear during beta.\n\nWell, we don't really want porting fixes during beta unless we can help\nit. ;-)\n\n> > \tintegrate or remove new libpqxx\n> > \tintegrate or add to gborg Pg:DBD\n> >\n> > Seems like gborg is the place for these.\n> \n> I would volunteer to package libpq++ separately.\n> \n> > \tmove pg_resetxlog and pg_controldata to main tree, add -f flag\n> >\n> > That is me. I will get to it.\n> \n> What does -f do?\n\nThere is concern that using pg_resetxlog by accident could cause\nproblems, so it will prompt the user for confirmation by default. -f\n(force) disables that confirmation.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 00:43:09 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n>> What does -f do?\n\n> There is concern that using pg_resetxlog by accident could cause\n> problems, so it will prompt the user for confirmation by default. -f\n> (force) disables that confirmation.\n\npg_resetxlog already has an -f switch, and I do not think you should\nchange its semantics. At least not without putting up a better argument\nthan the above. Anyone who's running pg_resetxlog had already better\nknow what they're doing.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 01:56:41 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues "
},
{
"msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> >> What does -f do?\n> \n> > There is concern that using pg_resetxlog by accident could cause\n> > problems, so it will prompt the user for confirmation by default. -f\n> > (force) disables that confirmation.\n> \n> pg_resetxlog already has an -f switch, and I do not think you should\n> change its semantics. At least not without putting up a better argument\n> than the above. Anyone who's running pg_resetxlog had already better\n> know what they're doing.\n\nI hadn't looked at flags yet. Thomas's concern, and I think a valid\none, is that if we move it from contrib into the main tree, people may\naccidentally run pg_resetxlog without understanding the issues involved.\nWe have it /contrib partly to make sure it isn't installed in the\ndefault path for all admins.\n\nWhat do people want? We can rethink this.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 11:24:21 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> I hadn't looked at flags yet. Thomas's concern, and I think a valid\n> one, is that if we move it from contrib into the main tree, people may\n> accidentally run pg_resetxlog without understanding the issues involved.\n\nThere's already an interlock to prevent you from running it against a\nlive installation (it won't run if it sees a postmaster lock file).\nThat should also prevent an accidental run against a crashed installation\n(presumably a lockfile will still be there). And if you run it against\na cleanly-shut-down installation, it's harmless because you don't need\nthe old xlog.\n\nI don't think we need to be so paranoid as to insist that you say\n\tpg_resetxlog --yes-i-read-the-manual\nbefore it will do anything.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 12:34:25 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues "
},
{
"msg_contents": "\nOK, sounds reasonable.\n\n---------------------------------------------------------------------------\n\nTom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > I hadn't looked at flags yet. Thomas's concern, and I think a valid\n> > one, is that if we move it from contrib into the main tree, people may\n> > accidentally run pg_resetxlog without understanding the issues involved.\n> \n> There's already an interlock to prevent you from running it against a\n> live installation (it won't run if it sees a postmaster lock file).\n> That should also prevent an accidental run against a crashed installation\n> (presumably a lockfile will still be there). And if you run it against\n> a cleanly-shut-down installation, it's harmless because you don't need\n> the old xlog.\n> \n> I don't think we need to be so paranoid as to insist that you say\n> \tpg_resetxlog --yes-i-read-the-manual\n> before it will do anything.\n> \n> \t\t\tregards, tom lane\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 13:01:50 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Bruce Momjian wrote:\n> \n> Jan Wieck wrote:\n> > Bruce Momjian wrote:\n> > >\n> > > Allow PL/PgSQL functions to return sets\n> > >\n> > > Is anyone working on this? We will get beaten up if we don't have this\n> > > for 7.3 and it is available in other languages.\n> >\n> > That's true. I think I have to do this one. I'm busy for the next 2-3\n> > weeks (Mom will be back from her Westcoast trip tonight and stay for\n> > another 3 weeks). But I should be able to do something after that.\n> \n> Nope. We are in beta then. Either someone else will have to do it or\n> it will wait for 7.4.\n\nSince PL/pgSQL is a loadable module still, we might be able to provide\nan upgrade after 7.3 is out instead of waiting for 7.4.\n\n\nJan\n\n-- \n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n",
"msg_date": "Fri, 16 Aug 2002 14:40:13 -0400",
"msg_from": "Jan Wieck <JanWieck@Yahoo.com>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Jan Wieck <JanWieck@Yahoo.com> writes:\n> Since PL/pgSQL is a loadable module still, we might be able to provide\n> an upgrade after 7.3 is out instead of waiting for 7.4.\n\nMaybe, but you'd have to get the core-code end of it in before beta.\nAFAIR Joe's patch doesn't yet cover any return style from a function\nexcept one-row-at-a-time.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 14:49:58 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues "
},
{
"msg_contents": "Tom Lane wrote:\n> Jan Wieck <JanWieck@Yahoo.com> writes:\n> \n>>Since PL/pgSQL is a loadable module still, we might be able to provide\n>>an upgrade after 7.3 is out instead of waiting for 7.4.\n> \n> \n> Maybe, but you'd have to get the core-code end of it in before beta.\n> AFAIR Joe's patch doesn't yet cover any return style from a function\n> except one-row-at-a-time.\n> \n\nNeil said he was working on this and expected to have it done for 7.3. I \nthink he's using the approach we discussed at OSCON, namely generating a \ntuplestore within the plpgsql module and passing it back to FunctionNext.\n\nJoe\n\n\n\n",
"msg_date": "Fri, 16 Aug 2002 12:55:24 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "Joe Conway wrote:\n> Tom Lane wrote:\n> > Jan Wieck <JanWieck@Yahoo.com> writes:\n> > \n> >>Since PL/pgSQL is a loadable module still, we might be able to provide\n> >>an upgrade after 7.3 is out instead of waiting for 7.4.\n> > \n> > \n> > Maybe, but you'd have to get the core-code end of it in before beta.\n> > AFAIR Joe's patch doesn't yet cover any return style from a function\n> > except one-row-at-a-time.\n> > \n> \n> Neil said he was working on this and expected to have it done for 7.3. I \n> think he's using the approach we discussed at OSCON, namely generating a \n> tuplestore within the plpgsql module and passing it back to FunctionNext.\n\nIf I understand correctly, it is a great idea because it uses the cursor\nreturn support already in pl/pgsql to handle it. Great idea.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 15:58:27 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "On Thu, 15 Aug 2002, Peter Eisentraut wrote:\n\n> > \tintegrate or remove new libpqxx\n> > \tintegrate or add to gborg Pg:DBD\n> >\n> > Seems like gborg is the place for these.\n>\n> I would volunteer to package libpq++ separately.\n\nOkay, the procedure is simple, but where do we want to put this? Do we\nwant to move the extracted libraries over to gborg (would be my first\npreference), or keep them in the core repository?\n\nRegardless of which, the extraction is simple ... but if GBorg, if you go\nover and make a project and let me know what it is, I can move the library\nfrom our CVS repository straight over there, so that we lose no logs or\nanything ... just let me know its created ...\n\nBruce, can you make a project for Pg::DBD?\n\n\n",
"msg_date": "Sat, 17 Aug 2002 03:39:23 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Removing Libraries (Was: Re: Open 7.3 issues)"
},
{
"msg_contents": "Marc G. Fournier wrote:\n> On Thu, 15 Aug 2002, Peter Eisentraut wrote:\n> \n> > > \tintegrate or remove new libpqxx\n> > > \tintegrate or add to gborg Pg:DBD\n> > >\n> > > Seems like gborg is the place for these.\n> >\n> > I would volunteer to package libpq++ separately.\n> \n> Okay, the procedure is simple, but where do we want to put this? Do we\n> want to move the extracted libraries over to gborg (would be my first\n> preference), or keep them in the core repository?\n> \n> Regardless of which, the extraction is simple ... but if GBorg, if you go\n> over and make a project and let me know what it is, I can move the library\n> from our CVS repository straight over there, so that we lose no logs or\n> anything ... just let me know its created ...\n> \n> Bruce, can you make a project for Pg::DBD?\n\nOK, I am ready to do the work, but I would like to get a plan of where\nwe are going. I see in interfaces:\n\n\tcli\n\tecpg\n\tjdbc\n\tlibpgeasy\n\tlibpgtcl\n\tlibpq\n\tlibpq++\n\tlibpqxx\n\todbc\n\tperl5\n\tpython\n\nand we have Pg:DBD waiting to be added.\n\nNow, I know one of Marc's goals is to have libpq as a stand-alone\ntarball, but I thought we decided that this _didn't_ require it to be in\na separate CVS repository.\n\nIf we split these up based on activity, we have, in decreasing activity\norder:\n\n\tjdbc\n\todbc\n\tlibpq\n\tlibpqxx\n\tcli\n\tecpg\n\tlibpq++\n\tlibpgtcl\n\tpython\n\tlibpgeasy\n\tPg:DBD\n\tperl5\n\nWe already have separate web sites for jdbc and odbc, and they are in\nour main CVS.\n\nWhat goals do we have? Do we create gborg accounts for all/most of\nthese so releases can be made independently of the main server? Do we\nmove their CVS out of the main tree too?\n\nI don't think we should judge libpqxx differently than the other\ninterfaces just because it is new. We should find a consistent solution\nand apply that to all of these interfaces.\n\nLet me add that odbc and jdbc have successfully made releases\nindependent of our server for over a year now.\n\nI wonder if the best solution is to create gborg accounts for every\ninterface and keep them in our main CVS, and do independent releases\nfrom there. Should we point to jdbc/odbc.postgresql.org from gborg?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Sat, 17 Aug 2002 09:55:47 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues)"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Now, I know one of Marc's goals is to have libpq as a stand-alone\n> tarball, but I thought we decided that this _didn't_ require it to be in\n> a separate CVS repository.\n\nRemoving libpq is impossible since psql, pg_dump, etc all depend on it.\n\n> I don't think we should judge libpqxx differently than the other\n> interfaces just because it is new.\n\nThe fact that it is new is a strike against it, and the fact that it is\nnot integrated is a bigger strike against it.\n\nI think we should move out libpqxx and libpq++ now, and also perl5 if\nwe are going to put DBD::Pg on gborg rather than in the main distro.\nWe want to ensure there is a level playing field for libpqxx and DBD::Pg.\n\njdbc and odbc should be moved if and only if their maintainers want it.\n\nI'm not in a hurry to move the rest; they're small and don't generate\na lot of CVS traffic.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 17 Aug 2002 11:20:18 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues) "
},
{
"msg_contents": "\"Marc G. Fournier\" <scrappy@hub.org> writes:\n> Bruce, can you make a project for Pg::DBD?\n\nErm, has anyone contacted the maintainer of DBD::Pg? Given that Bruce\ndoesn't maintain it and AFAIK Jeffrey Baker (the current maintainer)\nand hasn't expressed any dissatisfaction with CPAN, I'm not sure why\nyou'd like to move the software to GBorg...\n\nCheers,\n\nNeil\n\n-- \nNeil Conway <neilconway@rogers.com>\nPGP Key ID: DB3C29FC\n\n",
"msg_date": "17 Aug 2002 12:16:19 -0400",
"msg_from": "Neil Conway <nconway@klamath.dyndns.org>",
"msg_from_op": false,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues)"
},
{
"msg_contents": "Neil Conway wrote:\n> \"Marc G. Fournier\" <scrappy@hub.org> writes:\n> > Bruce, can you make a project for Pg::DBD?\n> \n> Erm, has anyone contacted the maintainer of DBD::Pg? Given that Bruce\n> doesn't maintain it and AFAIK Jeffrey Baker (the current maintainer)\n> and hasn't expressed any dissatisfaction with CPAN, I'm not sure why\n> you'd like to move the software to GBorg...\n\nUh, I got OK from Edmund. I haven't talked to Jeffrey but I thought\nsomeone else had. I thought he had just taken it over and was OK with\nus handling it.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Sat, 17 Aug 2002 12:20:35 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues)"
},
{
"msg_contents": "On Sat, 17 Aug 2002, Bruce Momjian wrote:\n\n> OK, I am ready to do the work, but I would like to get a plan of where\n> we are going. I see in interfaces:\n>\n> \tcli\n> \tecpg\n> \tjdbc\n> \tlibpgeasy\n> \tlibpgtcl\n> \tlibpq\n> \tlibpq++\n> \tlibpqxx\n> \todbc\n> \tperl5\n> \tpython\n>\n> and we have Pg:DBD waiting to be added.\n>\n> Now, I know one of Marc's goals is to have libpq as a stand-alone\n> tarball, but I thought we decided that this _didn't_ require it to be in\n> a separate CVS repository.\n\nYa, this one I had no problem with ... the only thing with libpq that I do\nrequest is that it has its own configure so that it can be completely\nstandalone ... but, IMHO, if someone compiles the server, they are going\nto need libpq, I just want to make sure taht if they want libpq, they\ndon't need the server ...\n\n> If we split these up based on activity, we have, in decreasing activity\n> order:\n>\n> \tjdbc\n> \todbc\n> \tlibpq\n> \tlibpqxx\n> \tcli\n> \tecpg\n> \tlibpq++\n> \tlibpgtcl\n> \tpython\n> \tlibpgeasy\n> \tPg:DBD\n> \tperl5\n>\n> We already have separate web sites for jdbc and odbc, and they are in\n> our main CVS.\n>\n> What goals do we have? Do we create gborg accounts for all/most of\n> these so releases can be made independently of the main server? Do we\n> move their CVS out of the main tree too?\n\nIMHO, yes ...\n\n> Let me add that odbc and jdbc have successfully made releases\n> independent of our server for over a year now.\n\nCorrect, so they should be the easiest to move out as well ...\n\n> I wonder if the best solution is to create gborg accounts for every\n> interface and keep them in our main CVS, and do independent releases\n> from there. Should we point to jdbc/odbc.postgresql.org from gborg?\n\nChris has made code changes to GBorg to allow for this based on requests\nfrom Dave Page (ie. PgAdminII) ... so there is no problems with that ...\n\nAs for keeping them in our main CVS, the more we put over onto GBorg, the\nmore it will get used, test, debugged, pounded and stabilized ... hell,\nmaybe some of the 'dead projects' that are on GBorg will come alive again\nalso if ppl are going to GBorg and find them, download them and hit the\nauthors for fixes :)\n\nBut, moving the interfaces over will at least give ppl a reason to go over\nand see what is there ...\n\n",
"msg_date": "Sat, 17 Aug 2002 13:25:34 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues)"
},
{
"msg_contents": "On Sat, 17 Aug 2002, Tom Lane wrote:\n\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > Now, I know one of Marc's goals is to have libpq as a stand-alone\n> > tarball, but I thought we decided that this _didn't_ require it to be in\n> > a separate CVS repository.\n>\n> Removing libpq is impossible since psql, pg_dump, etc all depend on it.\n>\n> > I don't think we should judge libpqxx differently than the other\n> > interfaces just because it is new.\n>\n> The fact that it is new is a strike against it, and the fact that it is\n> not integrated is a bigger strike against it.\n>\n> I think we should move out libpqxx and libpq++ now, and also perl5 if\n> we are going to put DBD::Pg on gborg rather than in the main distro.\n> We want to ensure there is a level playing field for libpqxx and DBD::Pg.\n>\n> jdbc and odbc should be moved if and only if their maintainers want it.\n>\n> I'm not in a hurry to move the rest; they're small and don't generate\n> a lot of CVS traffic.\n\nNote: I'm happy enough seeing ppl starting to consider moving this stuff\nover to GBorg, I, by no means, expect everything to go overnight, or even\nbefore v7.3 ...\n\nAs I mentioned in another message, I'm also kinda hoping that if we start\nto divert traffic to GBorg for stuff like this, then some of the other\nprojects might 'come alive' again as well ...\n\n",
"msg_date": "Sat, 17 Aug 2002 13:28:43 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues) "
},
{
"msg_contents": "Marc G. Fournier wrote:\n> Chris has made code changes to GBorg to allow for this based on requests\n> from Dave Page (ie. PgAdminII) ... so there is no problems with that ...\n> \n> As for keeping them in our main CVS, the more we put over onto GBorg, the\n> more it will get used, test, debugged, pounded and stabilized ... hell,\n> maybe some of the 'dead projects' that are on GBorg will come alive again\n> also if ppl are going to GBorg and find them, download them and hit the\n> authors for fixes :)\n> \n> But, moving the interfaces over will at least give ppl a reason to go over\n> and see what is there ...\n\nOK, so create gborg projects for all interfaces, and allow them to\nrelease independently. I think we have agreement on that. It can only\nbe a win. That also gives us a mailing list and bug tracking for each\ninterface, which is nice.\n\nI think the only unknown is whether their CVS's should be moved out of\nthe main tree.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Sat, 17 Aug 2002 12:30:29 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues)"
},
{
"msg_contents": "On Sat, 17 Aug 2002, Bruce Momjian wrote:\n\n> Marc G. Fournier wrote:\n> > Chris has made code changes to GBorg to allow for this based on requests\n> > from Dave Page (ie. PgAdminII) ... so there is no problems with that ...\n> >\n> > As for keeping them in our main CVS, the more we put over onto GBorg, the\n> > more it will get used, test, debugged, pounded and stabilized ... hell,\n> > maybe some of the 'dead projects' that are on GBorg will come alive again\n> > also if ppl are going to GBorg and find them, download them and hit the\n> > authors for fixes :)\n> >\n> > But, moving the interfaces over will at least give ppl a reason to go over\n> > and see what is there ...\n>\n> OK, so create gborg projects for all interfaces, and allow them to\n> release independently. I think we have agreement on that. It can only\n> be a win. That also gives us a mailing list and bug tracking for each\n> interface, which is nice.\n>\n> I think the only unknown is whether their CVS's should be moved out of\n> the main tree.\n\nYes, they should be ... maintaining sources in two places would be\n'nightmarish' *and* at least GBorg will give a maintainer the ability to\nadd other developers to have CVS access as well, or transferrign\nmaintainership over to someone else ... GBorg is setup so that each\nproject has its own CVSROOT, and its own access controls ...\n\n",
"msg_date": "Sat, 17 Aug 2002 13:50:24 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues)"
},
{
"msg_contents": "\"Marc G. Fournier\" <scrappy@hub.org> writes:\n>> I think the only unknown is whether their CVS's should be moved out of\n>> the main tree.\n\n> Yes, they should be ...\n\nCertainly. I was a bit worried about losing CVS history, but Marc\nindicated he could make the move with history and all, so there's\nno downside.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 17 Aug 2002 13:00:01 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues) "
},
{
"msg_contents": "On Sat, 17 Aug 2002, Tom Lane wrote:\n\n> \"Marc G. Fournier\" <scrappy@hub.org> writes:\n> >> I think the only unknown is whether their CVS's should be moved out of\n> >> the main tree.\n>\n> > Yes, they should be ...\n>\n> Certainly. I was a bit worried about losing CVS history, but Marc\n> indicated he could make the move with history and all, so there's\n> no downside.\n\nOkay, here is what I'd like to suggest ... Bruce, let's start off really\nsimple ... go create a project for libpq++ (I believe someone even\nvolunteered to maintain it?) and let me know once created, and I'll move\nthe CVS directory over for libpq++ and out of the pgsql-server directory\n...\n\n\n",
"msg_date": "Sat, 17 Aug 2002 14:09:30 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues) "
},
{
"msg_contents": "On Fri, 16 Aug 2002, Bruce Momjian wrote:\n\n> Peter Eisentraut wrote:\n> > Bruce Momjian writes:\n> > \n> > > \tSocket permissions - only install user can access db by default\n> > > \t\tunix_socket_permissions in postgresql.conf\n> > \n> > This is dead.\n> \n> Removed, still on TODO.\n\nDaft question but isn't this an administrator's issue? Forcing a complete\noverride of umask isn't usually considered a decent, friendly thing to do and\nthe sys admin can change the permission bits.\n\nBesides, what was the proposed scheme? user/group writable world not I presume.\nI wouldn't even know how to port that to un unixy systems like Win32.\n\n\n-- \nNigel J. Andrews\nDirector\n\n---\nLogictree Systems Limited\nComputer Consultants\n\n",
"msg_date": "Sun, 18 Aug 2002 17:26:04 +0100 (BST)",
"msg_from": "\"Nigel J. Andrews\" <nandrews@investsystems.co.uk>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues"
},
{
"msg_contents": "\"Nigel J. Andrews\" <nandrews@investsystems.co.uk> writes:\n> Daft question but isn't this an administrator's issue?\n\nThe feature wasn't going to change; the argument was just about whether\nto change the factory-default permissions mask for the socket. An admin\ncould override the default in any case (and probably should, in many\ncases).\n\nThe argument for 0700 was that it is \"secure\", the argument against\nwas that it's useless. No one sane runs their apps as the postgres\nuser, therefore you'd always be having to open it up anyway.\n\nWe thought a little about 0770 but the problem is that the actual\nbehavior is extremely context-dependent. On some Unixes this is\njust what you want, on others it's little different from 0777.\nIn any case depending on group membership to control database access\nmeans that the DBA *must* have root privileges, which is not an\nassumption we like to make.\n\nSo unless someone comes up with a new idea, we're sticking with 0777\nfor backwards-compatibility reasons. But certainly socket permissions\nought to be on the short list of things to think about during every\ndatabase install.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 18 Aug 2002 13:19:17 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 issues "
},
{
"msg_contents": "Marc G. Fournier writes:\n\n> Okay, here is what I'd like to suggest ... Bruce, let's start off really\n> simple ... go create a project for libpq++ (I believe someone even\n> volunteered to maintain it?) and let me know once created, and I'll move\n> the CVS directory over for libpq++ and out of the pgsql-server directory\n\nI said that I would lend a hand in preparing the build system, but I'm not\ngoing to start a project on gborg if I have to agree to a two-page terms\nof service agreement and I don't get to choose the exact wording of the\nlicense.\n\nI would prefer it if libpq++ would stay in the cvs tree at\ncvs.postgresql.org. There's no point in starting an entirely new\ninfrastructure elsewhere.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Sun, 18 Aug 2002 23:06:52 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues) "
},
{
"msg_contents": "On Sun, 18 Aug 2002, Peter Eisentraut wrote:\n\n> Marc G. Fournier writes:\n>\n> > Okay, here is what I'd like to suggest ... Bruce, let's start off really\n> > simple ... go create a project for libpq++ (I believe someone even\n> > volunteered to maintain it?) and let me know once created, and I'll move\n> > the CVS directory over for libpq++ and out of the pgsql-server directory\n>\n> I said that I would lend a hand in preparing the build system, but I'm not\n> going to start a project on gborg if I have to agree to a two-page terms\n> of service agreement and I don't get to choose the exact wording of the\n> license.\n\nI didn't ask you to, I asked Bruce to ... and the license should stay BSD\n...\n\n\n",
"msg_date": "Mon, 19 Aug 2002 01:50:46 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues) "
},
{
"msg_contents": "\nActually, I think Jeroen T. Vermeulen <jtv@xs4all.nl> should create the\nproject. It is his code, and if he would add me as an admin, that would\nhelp. I am CC'ing him.\n\n\n---------------------------------------------------------------------------\n\nMarc G. Fournier wrote:\n> On Sun, 18 Aug 2002, Peter Eisentraut wrote:\n> \n> > Marc G. Fournier writes:\n> >\n> > > Okay, here is what I'd like to suggest ... Bruce, let's start off really\n> > > simple ... go create a project for libpq++ (I believe someone even\n> > > volunteered to maintain it?) and let me know once created, and I'll move\n> > > the CVS directory over for libpq++ and out of the pgsql-server directory\n> >\n> > I said that I would lend a hand in preparing the build system, but I'm not\n> > going to start a project on gborg if I have to agree to a two-page terms\n> > of service agreement and I don't get to choose the exact wording of the\n> > license.\n> \n> I didn't ask you to, I asked Bruce to ... and the license should stay BSD\n> ...\n> \n> \n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Mon, 19 Aug 2002 21:30:13 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues)"
},
{
"msg_contents": "\nWe're talking about libpq++, not libpqxx :)\n\n\nOn Mon, 19 Aug 2002, Bruce Momjian wrote:\n\n>\n> Actually, I think Jeroen T. Vermeulen <jtv@xs4all.nl> should create the\n> project. It is his code, and if he would add me as an admin, that would\n> help. I am CC'ing him.\n>\n>\n> ---------------------------------------------------------------------------\n>\n> Marc G. Fournier wrote:\n> > On Sun, 18 Aug 2002, Peter Eisentraut wrote:\n> >\n> > > Marc G. Fournier writes:\n> > >\n> > > > Okay, here is what I'd like to suggest ... Bruce, let's start off really\n> > > > simple ... go create a project for libpq++ (I believe someone even\n> > > > volunteered to maintain it?) and let me know once created, and I'll move\n> > > > the CVS directory over for libpq++ and out of the pgsql-server directory\n> > >\n> > > I said that I would lend a hand in preparing the build system, but I'm not\n> > > going to start a project on gborg if I have to agree to a two-page terms\n> > > of service agreement and I don't get to choose the exact wording of the\n> > > license.\n> >\n> > I didn't ask you to, I asked Bruce to ... and the license should stay BSD\n> > ...\n> >\n> >\n> >\n>\n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (610) 359-1001\n> + If your life is a hard drive, | 13 Roberts Road\n> + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n>\n\n",
"msg_date": "Mon, 19 Aug 2002 22:51:58 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues)"
},
{
"msg_contents": "\nOh, sorry. I will do it now.\n\n---------------------------------------------------------------------------\n\nMarc G. Fournier wrote:\n> \n> We're talking about libpq++, not libpqxx :)\n> \n> \n> On Mon, 19 Aug 2002, Bruce Momjian wrote:\n> \n> >\n> > Actually, I think Jeroen T. Vermeulen <jtv@xs4all.nl> should create the\n> > project. It is his code, and if he would add me as an admin, that would\n> > help. I am CC'ing him.\n> >\n> >\n> > ---------------------------------------------------------------------------\n> >\n> > Marc G. Fournier wrote:\n> > > On Sun, 18 Aug 2002, Peter Eisentraut wrote:\n> > >\n> > > > Marc G. Fournier writes:\n> > > >\n> > > > > Okay, here is what I'd like to suggest ... Bruce, let's start off really\n> > > > > simple ... go create a project for libpq++ (I believe someone even\n> > > > > volunteered to maintain it?) and let me know once created, and I'll move\n> > > > > the CVS directory over for libpq++ and out of the pgsql-server directory\n> > > >\n> > > > I said that I would lend a hand in preparing the build system, but I'm not\n> > > > going to start a project on gborg if I have to agree to a two-page terms\n> > > > of service agreement and I don't get to choose the exact wording of the\n> > > > license.\n> > >\n> > > I didn't ask you to, I asked Bruce to ... and the license should stay BSD\n> > > ...\n> > >\n> > >\n> > >\n> >\n> > --\n> > Bruce Momjian | http://candle.pha.pa.us\n> > pgman@candle.pha.pa.us | (610) 359-1001\n> > + If your life is a hard drive, | 13 Roberts Road\n> > + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n> >\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n> \n> http://archives.postgresql.org\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Mon, 19 Aug 2002 22:45:16 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues)"
},
{
"msg_contents": "\nDone. Called libpq++.\n\n---------------------------------------------------------------------------\n\nBruce Momjian wrote:\n> \n> Oh, sorry. I will do it now.\n> \n> ---------------------------------------------------------------------------\n> \n> Marc G. Fournier wrote:\n> > \n> > We're talking about libpq++, not libpqxx :)\n> > \n> > \n> > On Mon, 19 Aug 2002, Bruce Momjian wrote:\n> > \n> > >\n> > > Actually, I think Jeroen T. Vermeulen <jtv@xs4all.nl> should create the\n> > > project. It is his code, and if he would add me as an admin, that would\n> > > help. I am CC'ing him.\n> > >\n> > >\n> > > ---------------------------------------------------------------------------\n> > >\n> > > Marc G. Fournier wrote:\n> > > > On Sun, 18 Aug 2002, Peter Eisentraut wrote:\n> > > >\n> > > > > Marc G. Fournier writes:\n> > > > >\n> > > > > > Okay, here is what I'd like to suggest ... Bruce, let's start off really\n> > > > > > simple ... go create a project for libpq++ (I believe someone even\n> > > > > > volunteered to maintain it?) and let me know once created, and I'll move\n> > > > > > the CVS directory over for libpq++ and out of the pgsql-server directory\n> > > > >\n> > > > > I said that I would lend a hand in preparing the build system, but I'm not\n> > > > > going to start a project on gborg if I have to agree to a two-page terms\n> > > > > of service agreement and I don't get to choose the exact wording of the\n> > > > > license.\n> > > >\n> > > > I didn't ask you to, I asked Bruce to ... and the license should stay BSD\n> > > > ...\n> > > >\n> > > >\n> > > >\n> > >\n> > > --\n> > > Bruce Momjian | http://candle.pha.pa.us\n> > > pgman@candle.pha.pa.us | (610) 359-1001\n> > > + If your life is a hard drive, | 13 Roberts Road\n> > > + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n> > >\n> > \n> > \n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 6: Have you searched our list archives?\n> > \n> > http://archives.postgresql.org\n> > \n> \n> -- \n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (610) 359-1001\n> + If your life is a hard drive, | 13 Roberts Road\n> + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Mon, 19 Aug 2002 23:16:06 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Removing Libraries (Was: Re: Open 7.3 issues)"
}
] |
[
{
"msg_contents": "I believe that\nSELECT EXTRACT(EPOCH FROM TIMESTAMP '2001-02-16 20:38:40');\nahould give a fairly large integer --- in 7.2 I get 982373920.\nBut CVS tip (without the int64-timestamp option) produces\n982.35592. Broken, no?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 15 Aug 2002 01:03:33 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": true,
"msg_subject": "Problem with EXTRACT() in current sources?"
}
] |
[
{
"msg_contents": "Hi,\n\nI noticed this behaviour:\n\nusa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\nrr.ftiidx ## 's';\n id | name |\ndescription\n-----+----------------------------------+-----------------------------------\n------------------------------------------------\n 202 | Bird's Nest | An egg nestled in a crispy, hot\nbread roll.\n 293 | Reuben Triple S | Corn beef, swiss cheese and\nsauerkraut on pumpernickel.\n 30 | Hedgehogs | This is comfort food at it's\nyummiest.\n 130 | Hearty Apple & Cinnamon Porridge | A great way to warm you up on a\nwinter's morning.\n 83 | Banana & Apple Compote | Great way to finish a meal on a\ncool winter's day.\n 139 | Minestrone | Served with a crusty roll, this\nsoup is a meal on it's own.\n 75 | Mango Sorbet | A mango-lover's delight.\n 19 | Chunky Vegetable Chowder | Serve this soup with a crusty roll\nand it's a hearty meal on a cold winter's eve.\n 36 | Lemon Fish Rolls | A pleasant way to include fish in\nyour family's diet.\n(9 rows)\n\nusa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\nrr.ftiidx ## 's|a';\nERROR: Your query contained only stopword(s), ignored\nusa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\nrr.ftiidx ## 's|x';\n id | name |\ndescription\n-----+----------------------------------+-----------------------------------\n------------------------------------------------\n 202 | Bird's Nest | An egg nestled in a crispy, hot\nbread roll.\n 293 | Reuben Triple S | Corn beef, swiss cheese and\nsauerkraut on pumpernickel.\n 30 | Hedgehogs | This is comfort food at it's\nyummiest.\n 130 | Hearty Apple & Cinnamon Porridge | A great way to warm you up on a\nwinter's morning.\n 83 | Banana & Apple Compote | Great way to finish a meal on a\ncool winter's day.\n 139 | Minestrone | Served with a crusty roll, this\nsoup is a meal on it's own.\n 75 | Mango Sorbet | A mango-lover's delight.\n 19 | Chunky Vegetable Chowder | Serve this soup with a crusty roll\nand it's a hearty meal on a cold winter's eve.\n 36 | Lemon Fish Rolls | A pleasant way to include fish in\nyour family's diet.\n(9 rows)\nusa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\nrr.ftiidx ## 'st|a';\nERROR: Your query contained only stopword(s), ignored\nusa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\nrr.ftiidx ## 'st|ar';\n id | name | description\n----+------+-------------\n(0 rows)\n\nI don't see how that's correct? Those ERRORs seem to be valid syntax to\nme...\n\nChris\n\n",
"msg_date": "Thu, 15 Aug 2002 13:43:01 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "tsearch bug in 7.2.1?"
},
{
"msg_contents": "Actually, looking at this again it's possible that tsearch sees 'a' as a\nskip word and so doesn't allow a search on it. This makes it _really_ hard\nfor me to parse and check user keywords - maybe a 'isvalidsyntax' sort of\nfunction should be included? Hmmm...maybe I could use the cast to\n::mquery_txt to check it...but now I have to detect an ERROR condition and\ndeal with it appropriately...\n\nChris\n\n> -----Original Message-----\n> From: pgsql-hackers-owner@postgresql.org\n> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Christopher\n> Kings-Lynne\n> Sent: Thursday, 15 August 2002 1:43 PM\n> To: Hackers\n> Subject: [HACKERS] tsearch bug in 7.2.1?\n>\n>\n> Hi,\n>\n> I noticed this behaviour:\n>\n> usa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\n> rr.ftiidx ## 's';\n> id | name |\n> description\n> -----+----------------------------------+-------------------------\n> ----------\n> ------------------------------------------------\n> 202 | Bird's Nest | An egg nestled in a crispy, hot\n> bread roll.\n> 293 | Reuben Triple S | Corn beef, swiss cheese and\n> sauerkraut on pumpernickel.\n> 30 | Hedgehogs | This is comfort food at it's\n> yummiest.\n> 130 | Hearty Apple & Cinnamon Porridge | A great way to warm you up on a\n> winter's morning.\n> 83 | Banana & Apple Compote | Great way to finish a meal on a\n> cool winter's day.\n> 139 | Minestrone | Served with a crusty roll, this\n> soup is a meal on it's own.\n> 75 | Mango Sorbet | A mango-lover's delight.\n> 19 | Chunky Vegetable Chowder | Serve this soup with a\n> crusty roll\n> and it's a hearty meal on a cold winter's eve.\n> 36 | Lemon Fish Rolls | A pleasant way to\n> include fish in\n> your family's diet.\n> (9 rows)\n>\n> usa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\n> rr.ftiidx ## 's|a';\n> ERROR: Your query contained only stopword(s), ignored\n> usa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\n> rr.ftiidx ## 's|x';\n> id | name |\n> description\n> -----+----------------------------------+-------------------------\n> ----------\n> ------------------------------------------------\n> 202 | Bird's Nest | An egg nestled in a crispy, hot\n> bread roll.\n> 293 | Reuben Triple S | Corn beef, swiss cheese and\n> sauerkraut on pumpernickel.\n> 30 | Hedgehogs | This is comfort food at it's\n> yummiest.\n> 130 | Hearty Apple & Cinnamon Porridge | A great way to warm you up on a\n> winter's morning.\n> 83 | Banana & Apple Compote | Great way to finish a meal on a\n> cool winter's day.\n> 139 | Minestrone | Served with a crusty roll, this\n> soup is a meal on it's own.\n> 75 | Mango Sorbet | A mango-lover's delight.\n> 19 | Chunky Vegetable Chowder | Serve this soup with a\n> crusty roll\n> and it's a hearty meal on a cold winter's eve.\n> 36 | Lemon Fish Rolls | A pleasant way to\n> include fish in\n> your family's diet.\n> (9 rows)\n> usa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\n> rr.ftiidx ## 'st|a';\n> ERROR: Your query contained only stopword(s), ignored\n> usa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\n> rr.ftiidx ## 'st|ar';\n> id | name | description\n> ----+------+-------------\n> (0 rows)\n>\n> I don't see how that's correct? Those ERRORs seem to be valid syntax to\n> me...\n>\n> Chris\n>\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 2: you can get off all lists at once with the unregister command\n> (send \"unregister YourEmailAddressHere\" to majordomo@postgresql.org)\n>\n\n",
"msg_date": "Thu, 15 Aug 2002 13:47:38 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "Re: tsearch bug in 7.2.1?"
},
{
"msg_contents": "> tsearch has compiled-in stop-list, it's currently just not flexible\n> as OpenFTS does. We plan to move most functionality to tsearch but\n> currently have no time. Feel free to join us to speedup tsearch\n> development.\n\nUnfortunately I'm just as time-deprived :(\n\nChris\n\n",
"msg_date": "Thu, 15 Aug 2002 16:32:29 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "Re: tsearch bug in 7.2.1?"
},
{
"msg_contents": "tsearch has compiled-in stop-list, it's currently just not flexible\nas OpenFTS does. We plan to move most functionality to tsearch but\ncurrently have no time. Feel free to join us to speedup tsearch\ndevelopment.\n\n\tOleg\n\nOn Thu, 15 Aug 2002, Christopher Kings-Lynne wrote:\n\n> Actually, looking at this again it's possible that tsearch sees 'a' as a\n> skip word and so doesn't allow a search on it. This makes it _really_ hard\n> for me to parse and check user keywords - maybe a 'isvalidsyntax' sort of\n> function should be included? Hmmm...maybe I could use the cast to\n> ::mquery_txt to check it...but now I have to detect an ERROR condition and\n> deal with it appropriately...\n>\n> Chris\n>\n> > -----Original Message-----\n> > From: pgsql-hackers-owner@postgresql.org\n> > [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Christopher\n> > Kings-Lynne\n> > Sent: Thursday, 15 August 2002 1:43 PM\n> > To: Hackers\n> > Subject: [HACKERS] tsearch bug in 7.2.1?\n> >\n> >\n> > Hi,\n> >\n> > I noticed this behaviour:\n> >\n> > usa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\n> > rr.ftiidx ## 's';\n> > id | name |\n> > description\n> > -----+----------------------------------+-------------------------\n> > ----------\n> > ------------------------------------------------\n> > 202 | Bird's Nest | An egg nestled in a crispy, hot\n> > bread roll.\n> > 293 | Reuben Triple S | Corn beef, swiss cheese and\n> > sauerkraut on pumpernickel.\n> > 30 | Hedgehogs | This is comfort food at it's\n> > yummiest.\n> > 130 | Hearty Apple & Cinnamon Porridge | A great way to warm you up on a\n> > winter's morning.\n> > 83 | Banana & Apple Compote | Great way to finish a meal on a\n> > cool winter's day.\n> > 139 | Minestrone | Served with a crusty roll, this\n> > soup is a meal on it's own.\n> > 75 | Mango Sorbet | A mango-lover's delight.\n> > 19 | Chunky Vegetable Chowder | Serve this soup with a\n> > crusty roll\n> > and it's a hearty meal on a cold winter's eve.\n> > 36 | Lemon Fish Rolls | A pleasant way to\n> > include fish in\n> > your family's diet.\n> > (9 rows)\n> >\n> > usa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\n> > rr.ftiidx ## 's|a';\n> > ERROR: Your query contained only stopword(s), ignored\n> > usa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\n> > rr.ftiidx ## 's|x';\n> > id | name |\n> > description\n> > -----+----------------------------------+-------------------------\n> > ----------\n> > ------------------------------------------------\n> > 202 | Bird's Nest | An egg nestled in a crispy, hot\n> > bread roll.\n> > 293 | Reuben Triple S | Corn beef, swiss cheese and\n> > sauerkraut on pumpernickel.\n> > 30 | Hedgehogs | This is comfort food at it's\n> > yummiest.\n> > 130 | Hearty Apple & Cinnamon Porridge | A great way to warm you up on a\n> > winter's morning.\n> > 83 | Banana & Apple Compote | Great way to finish a meal on a\n> > cool winter's day.\n> > 139 | Minestrone | Served with a crusty roll, this\n> > soup is a meal on it's own.\n> > 75 | Mango Sorbet | A mango-lover's delight.\n> > 19 | Chunky Vegetable Chowder | Serve this soup with a\n> > crusty roll\n> > and it's a hearty meal on a cold winter's eve.\n> > 36 | Lemon Fish Rolls | A pleasant way to\n> > include fish in\n> > your family's diet.\n> > (9 rows)\n> > usa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\n> > rr.ftiidx ## 'st|a';\n> > ERROR: Your query contained only stopword(s), ignored\n> > usa=# SELECT rr.id, rr.name, rr.description FROM recipe_recipes rr WHERE\n> > rr.ftiidx ## 'st|ar';\n> > id | name | description\n> > ----+------+-------------\n> > (0 rows)\n> >\n> > I don't see how that's correct? Those ERRORs seem to be valid syntax to\n> > me...\n> >\n> > Chris\n> >\n> >\n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 2: you can get off all lists at once with the unregister command\n> > (send \"unregister YourEmailAddressHere\" to majordomo@postgresql.org)\n> >\n>\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n>\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n",
"msg_date": "Thu, 15 Aug 2002 11:59:20 +0300 (GMT)",
"msg_from": "Oleg Bartunov <oleg@sai.msu.su>",
"msg_from_op": false,
"msg_subject": "Re: tsearch bug in 7.2.1?"
},
{
"msg_contents": "On Thu, Aug 15, 2002 at 11:59:20AM +0300, Oleg Bartunov wrote:\n> tsearch has compiled-in stop-list, it's currently just not flexible\n> as OpenFTS does. We plan to move most functionality to tsearch but\n> currently have no time. Feel free to join us to speedup tsearch\n> development.\n\nOleg - \nI think Chris's issue might be the same one I ran into just last night.\n(BTW, thanks for tsearch and the OpenFTS work, it's really great)\nMy problem is that queries with only stopwords throw an ERROR, rather\nthan a WARNING or NOTICE. This means We've got to deal with catching an\nexception so our middleware doesn't spew ugly errors and tracebacks at \nour endusers, and I've got to deal with cleaning up the transaction.\n\nHaving the behavior be \"issue a notice and return no match\" would give\nus a reasonably functional interface: if I don't implement reading the\nNOTICE, I get confused users ('huh? \"the\" doesn't match anything?')\nrather than irate users ('Your search interface sucks! It keeps\ncrashing!')\n\nOh, well, off to implement some try: catch: logic.\n\nRoss\n",
"msg_date": "Thu, 15 Aug 2002 15:59:12 -0500",
"msg_from": "\"Ross J. Reedstrom\" <reedstrm@rice.edu>",
"msg_from_op": false,
"msg_subject": "Re: tsearch bug in 7.2.1?"
},
{
"msg_contents": "Ross - maybe we could work on a little function for tsearch - parse_query()\nor something like that. It could return true or false depending on whether\nit would cause tsearch to error or not...\n\nChris\n\n> -----Original Message-----\n> From: pgsql-hackers-owner@postgresql.org\n> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Ross J.\n> Reedstrom\n> Sent: Friday, 16 August 2002 4:59 AM\n> To: Oleg Bartunov\n> Cc: Christopher Kings-Lynne; Hackers\n> Subject: Re: [HACKERS] tsearch bug in 7.2.1?\n>\n>\n> On Thu, Aug 15, 2002 at 11:59:20AM +0300, Oleg Bartunov wrote:\n> > tsearch has compiled-in stop-list, it's currently just not flexible\n> > as OpenFTS does. We plan to move most functionality to tsearch but\n> > currently have no time. Feel free to join us to speedup tsearch\n> > development.\n>\n> Oleg -\n> I think Chris's issue might be the same one I ran into just last night.\n> (BTW, thanks for tsearch and the OpenFTS work, it's really great)\n> My problem is that queries with only stopwords throw an ERROR, rather\n> than a WARNING or NOTICE. This means We've got to deal with catching an\n> exception so our middleware doesn't spew ugly errors and tracebacks at\n> our endusers, and I've got to deal with cleaning up the transaction.\n>\n> Having the behavior be \"issue a notice and return no match\" would give\n> us a reasonably functional interface: if I don't implement reading the\n> NOTICE, I get confused users ('huh? \"the\" doesn't match anything?')\n> rather than irate users ('Your search interface sucks! It keeps\n> crashing!')\n>\n> Oh, well, off to implement some try: catch: logic.\n>\n> Ross\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n>\n\n",
"msg_date": "Fri, 16 Aug 2002 09:50:57 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "Re: tsearch bug in 7.2.1?"
},
{
"msg_contents": "Ross and Chris,\n\nI was reading too fast :-)\nThe problem is actually more complex:\nWe have to distinguish 4 cases when Query could returns zero result:\n\n1. normal - there are no such words\n2. query consists of stop-words only\n3. query consists of lexems of non-indexed clasess (specified in parser currently)\n4. combination of 2 and 3\n\nIdeally, we want to inform middleware all these cases.\n\n\tOleg\nOn Thu, 15 Aug 2002, Ross J. Reedstrom wrote:\n\n> On Thu, Aug 15, 2002 at 11:59:20AM +0300, Oleg Bartunov wrote:\n> > tsearch has compiled-in stop-list, it's currently just not flexible\n> > as OpenFTS does. We plan to move most functionality to tsearch but\n> > currently have no time. Feel free to join us to speedup tsearch\n> > development.\n>\n> Oleg -\n> I think Chris's issue might be the same one I ran into just last night.\n> (BTW, thanks for tsearch and the OpenFTS work, it's really great)\n> My problem is that queries with only stopwords throw an ERROR, rather\n> than a WARNING or NOTICE. This means We've got to deal with catching an\n> exception so our middleware doesn't spew ugly errors and tracebacks at\n> our endusers, and I've got to deal with cleaning up the transaction.\n>\n> Having the behavior be \"issue a notice and return no match\" would give\n> us a reasonably functional interface: if I don't implement reading the\n> NOTICE, I get confused users ('huh? \"the\" doesn't match anything?')\n> rather than irate users ('Your search interface sucks! It keeps\n> crashing!')\n>\n> Oh, well, off to implement some try: catch: logic.\n>\n> Ross\n>\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n",
"msg_date": "Fri, 16 Aug 2002 10:25:15 +0300 (GMT)",
"msg_from": "Oleg Bartunov <oleg@sai.msu.su>",
"msg_from_op": false,
"msg_subject": "Re: tsearch bug in 7.2.1?"
},
{
"msg_contents": "No you can use:\nregression=# select 'the'::mquery_txt;\nERROR: Your query contained only stopword(s), ignored\nregression=# select 'good'::mquery_txt;\n mquery_txt\n------------\n 'good'\n(1 row)\n\nI suggest:\n1.\n\tregression=# select 'the'::mquery_txt;\n\tNOTICE: Your query contained only stopword(s), ignored\n\tmquery_txt\n\t-------------\n\t\n\t(1 row)\n2. any operation with void query returns false:\n\tselect t from tbl where t ## 'the';\n\tNOTICE: Your query contained only stopword(s), ignored\n\ttbl\n\t-----\n\t(0 row)\n\t\n\n\n\n\nChristopher Kings-Lynne wrote:\n> Ross - maybe we could work on a little function for tsearch - parse_query()\n> or something like that. It could return true or false depending on whether\n> it would cause tsearch to error or not...\n> \n> Chris\n> \n> \n>>-----Original Message-----\n>>From: pgsql-hackers-owner@postgresql.org\n>>[mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Ross J.\n>>Reedstrom\n>>Sent: Friday, 16 August 2002 4:59 AM\n>>To: Oleg Bartunov\n>>Cc: Christopher Kings-Lynne; Hackers\n>>Subject: Re: [HACKERS] tsearch bug in 7.2.1?\n>>\n>>\n>>On Thu, Aug 15, 2002 at 11:59:20AM +0300, Oleg Bartunov wrote:\n>>\n>>>tsearch has compiled-in stop-list, it's currently just not flexible\n>>>as OpenFTS does. We plan to move most functionality to tsearch but\n>>>currently have no time. Feel free to join us to speedup tsearch\n>>>development.\n>>\n>>Oleg -\n>>I think Chris's issue might be the same one I ran into just last night.\n>>(BTW, thanks for tsearch and the OpenFTS work, it's really great)\n>>My problem is that queries with only stopwords throw an ERROR, rather\n>>than a WARNING or NOTICE. This means We've got to deal with catching an\n>>exception so our middleware doesn't spew ugly errors and tracebacks at\n>>our endusers, and I've got to deal with cleaning up the transaction.\n>>\n>>Having the behavior be \"issue a notice and return no match\" would give\n>>us a reasonably functional interface: if I don't implement reading the\n>>NOTICE, I get confused users ('huh? \"the\" doesn't match anything?')\n>>rather than irate users ('Your search interface sucks! It keeps\n>>crashing!')\n>>\n>>Oh, well, off to implement some try: catch: logic.\n>>\n>>Ross\n>>\n>>---------------------------(end of broadcast)---------------------------\n>>TIP 4: Don't 'kill -9' the postmaster\n>>\n> \n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n> \n\n\n-- \nTeodor Sigaev\nteodor@stack.net\n\n\n",
"msg_date": "Fri, 16 Aug 2002 13:28:29 +0400",
"msg_from": "Teodor Sigaev <teodor@stack.net>",
"msg_from_op": false,
"msg_subject": "Re: tsearch bug in 7.2.1?"
},
{
"msg_contents": "On Fri, 16 Aug 2002, Christopher Kings-Lynne wrote:\n\n> Ross - maybe we could work on a little function for tsearch - parse_query()\n> or something like that. It could return true or false depending on whether\n> it would cause tsearch to error or not...\n\nIn principle, the right way is to use the same parser and the same dictionaries\nfor query parse, which were used in indexing ! That's the way OpenFTS does\nits work, so OpenFTS knows if resulted query would be void and return\nwarning message *before* sending query to db. That's why we were didn't\nconcerned about error message returned by tsearch. But current implementation of\ntsearch doesn't have api to their parser and dictionaries, so you couldn't\nwrite parse_query(). I'd suggest to write check_query() which could use\nTeodor's suggesting (see his message) - very cheap select like\n select 'good query'::mquery_txt;\n\nThis will works after applying patch, we'll submit if you agree with\nTeodor's suggestion.\n\nThe \"right way\" will be possible in new incarnation of tsearch with all\nfunctionality of OpenFTS.\n\n\tRegards,\n\t\tOleg\n\n>\n> Chris\n>\n> > -----Original Message-----\n> > From: pgsql-hackers-owner@postgresql.org\n> > [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Ross J.\n> > Reedstrom\n> > Sent: Friday, 16 August 2002 4:59 AM\n> > To: Oleg Bartunov\n> > Cc: Christopher Kings-Lynne; Hackers\n> > Subject: Re: [HACKERS] tsearch bug in 7.2.1?\n> >\n> >\n> > On Thu, Aug 15, 2002 at 11:59:20AM +0300, Oleg Bartunov wrote:\n> > > tsearch has compiled-in stop-list, it's currently just not flexible\n> > > as OpenFTS does. We plan to move most functionality to tsearch but\n> > > currently have no time. Feel free to join us to speedup tsearch\n> > > development.\n> >\n> > Oleg -\n> > I think Chris's issue might be the same one I ran into just last night.\n> > (BTW, thanks for tsearch and the OpenFTS work, it's really great)\n> > My problem is that queries with only stopwords throw an ERROR, rather\n> > than a WARNING or NOTICE. This means We've got to deal with catching an\n> > exception so our middleware doesn't spew ugly errors and tracebacks at\n> > our endusers, and I've got to deal with cleaning up the transaction.\n> >\n> > Having the behavior be \"issue a notice and return no match\" would give\n> > us a reasonably functional interface: if I don't implement reading the\n> > NOTICE, I get confused users ('huh? \"the\" doesn't match anything?')\n> > rather than irate users ('Your search interface sucks! It keeps\n> > crashing!')\n> >\n> > Oh, well, off to implement some try: catch: logic.\n> >\n> > Ross\n> >\n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 4: Don't 'kill -9' the postmaster\n> >\n>\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n\n",
"msg_date": "Fri, 16 Aug 2002 14:12:54 +0300 (GMT)",
"msg_from": "Oleg Bartunov <oleg@sai.msu.su>",
"msg_from_op": false,
"msg_subject": "Re: tsearch bug in 7.2.1?"
},
{
"msg_contents": "Please, apply patch for tsearch to current CVS.\n\nPatch resolve ERROR problem for non-goog query_txt.\n\nTeodor Sigaev wrote:\n> Now you can use:\n> regression=# select 'the'::mquery_txt;\n> ERROR: Your query contained only stopword(s), ignored\n> regression=# select 'good'::mquery_txt;\n> mquery_txt\n> ------------\n> 'good'\n> (1 row)\n> \n> I suggest:\n> 1.\n> regression=# select 'the'::mquery_txt;\n> NOTICE: Your query contained only stopword(s), ignored\n> mquery_txt\n> -------------\n> \n> (1 row)\n> 2. any operation with void query returns false:\n> select t from tbl where t ## 'the';\n> NOTICE: Your query contained only stopword(s), ignored\n> tbl\n> -----\n> (0 row)\n> \n> \n> \n> \n> \n> Christopher Kings-Lynne wrote:\n> \n>> Ross - maybe we could work on a little function for tsearch - \n>> parse_query()\n>> or something like that. It could return true or false depending on \n>> whether\n>> it would cause tsearch to error or not...\n>>\n>> Chris\n>>\n>>\n>>> -----Original Message-----\n>>> From: pgsql-hackers-owner@postgresql.org\n>>> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Ross J.\n>>> Reedstrom\n>>> Sent: Friday, 16 August 2002 4:59 AM\n>>> To: Oleg Bartunov\n>>> Cc: Christopher Kings-Lynne; Hackers\n>>> Subject: Re: [HACKERS] tsearch bug in 7.2.1?\n>>>\n>>>\n>>> On Thu, Aug 15, 2002 at 11:59:20AM +0300, Oleg Bartunov wrote:\n>>>\n>>>> tsearch has compiled-in stop-list, it's currently just not flexible\n>>>> as OpenFTS does. We plan to move most functionality to tsearch but\n>>>> currently have no time. Feel free to join us to speedup tsearch\n>>>> development.\n>>>\n>>>\n>>> Oleg -\n>>> I think Chris's issue might be the same one I ran into just last night.\n>>> (BTW, thanks for tsearch and the OpenFTS work, it's really great)\n>>> My problem is that queries with only stopwords throw an ERROR, rather\n>>> than a WARNING or NOTICE. This means We've got to deal with catching an\n>>> exception so our middleware doesn't spew ugly errors and tracebacks at\n>>> our endusers, and I've got to deal with cleaning up the transaction.\n>>>\n>>> Having the behavior be \"issue a notice and return no match\" would give\n>>> us a reasonably functional interface: if I don't implement reading the\n>>> NOTICE, I get confused users ('huh? \"the\" doesn't match anything?')\n>>> rather than irate users ('Your search interface sucks! It keeps\n>>> crashing!')\n>>>\n>>> Oh, well, off to implement some try: catch: logic.\n>>>\n>>> Ross\n>>>\n>>> ---------------------------(end of broadcast)---------------------------\n>>> TIP 4: Don't 'kill -9' the postmaster\n>>>\n>>\n>>\n>>\n>> ---------------------------(end of broadcast)---------------------------\n>> TIP 3: if posting/reading through Usenet, please send an appropriate\n>> subscribe-nomail command to majordomo@postgresql.org so that your\n>> message can get through to the mailing list cleanly\n>>\n> \n> \n\n\n-- \nTeodor Sigaev\nteodor@stack.net",
"msg_date": "Thu, 22 Aug 2002 14:31:29 +0400",
"msg_from": "Teodor Sigaev <teodor@stack.net>",
"msg_from_op": false,
"msg_subject": "Please, apply patch"
},
{
"msg_contents": "\nYour patch has been added to the PostgreSQL unapplied patches list at:\n\n\thttp://candle.pha.pa.us/cgi-bin/pgpatches\n\nI will try to apply it within the next 48 hours.\n\n---------------------------------------------------------------------------\n\n\nTeodor Sigaev wrote:\n> Please, apply patch for tsearch to current CVS.\n> \n> Patch resolve ERROR problem for non-goog query_txt.\n> \n> Teodor Sigaev wrote:\n> > Now you can use:\n> > regression=# select 'the'::mquery_txt;\n> > ERROR: Your query contained only stopword(s), ignored\n> > regression=# select 'good'::mquery_txt;\n> > mquery_txt\n> > ------------\n> > 'good'\n> > (1 row)\n> > \n> > I suggest:\n> > 1.\n> > regression=# select 'the'::mquery_txt;\n> > NOTICE: Your query contained only stopword(s), ignored\n> > mquery_txt\n> > -------------\n> > \n> > (1 row)\n> > 2. any operation with void query returns false:\n> > select t from tbl where t ## 'the';\n> > NOTICE: Your query contained only stopword(s), ignored\n> > tbl\n> > -----\n> > (0 row)\n> > \n> > \n> > \n> > \n> > \n> > Christopher Kings-Lynne wrote:\n> > \n> >> Ross - maybe we could work on a little function for tsearch - \n> >> parse_query()\n> >> or something like that. It could return true or false depending on \n> >> whether\n> >> it would cause tsearch to error or not...\n> >>\n> >> Chris\n> >>\n> >>\n> >>> -----Original Message-----\n> >>> From: pgsql-hackers-owner@postgresql.org\n> >>> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Ross J.\n> >>> Reedstrom\n> >>> Sent: Friday, 16 August 2002 4:59 AM\n> >>> To: Oleg Bartunov\n> >>> Cc: Christopher Kings-Lynne; Hackers\n> >>> Subject: Re: [HACKERS] tsearch bug in 7.2.1?\n> >>>\n> >>>\n> >>> On Thu, Aug 15, 2002 at 11:59:20AM +0300, Oleg Bartunov wrote:\n> >>>\n> >>>> tsearch has compiled-in stop-list, it's currently just not flexible\n> >>>> as OpenFTS does. We plan to move most functionality to tsearch but\n> >>>> currently have no time. Feel free to join us to speedup tsearch\n> >>>> development.\n> >>>\n> >>>\n> >>> Oleg -\n> >>> I think Chris's issue might be the same one I ran into just last night.\n> >>> (BTW, thanks for tsearch and the OpenFTS work, it's really great)\n> >>> My problem is that queries with only stopwords throw an ERROR, rather\n> >>> than a WARNING or NOTICE. This means We've got to deal with catching an\n> >>> exception so our middleware doesn't spew ugly errors and tracebacks at\n> >>> our endusers, and I've got to deal with cleaning up the transaction.\n> >>>\n> >>> Having the behavior be \"issue a notice and return no match\" would give\n> >>> us a reasonably functional interface: if I don't implement reading the\n> >>> NOTICE, I get confused users ('huh? \"the\" doesn't match anything?')\n> >>> rather than irate users ('Your search interface sucks! It keeps\n> >>> crashing!')\n> >>>\n> >>> Oh, well, off to implement some try: catch: logic.\n> >>>\n> >>> Ross\n> >>>\n> >>> ---------------------------(end of broadcast)---------------------------\n> >>> TIP 4: Don't 'kill -9' the postmaster\n> >>>\n> >>\n> >>\n> >>\n> >> ---------------------------(end of broadcast)---------------------------\n> >> TIP 3: if posting/reading through Usenet, please send an appropriate\n> >> subscribe-nomail command to majordomo@postgresql.org so that your\n> >> message can get through to the mailing list cleanly\n> >>\n> > \n> > \n> \n> \n> -- \n> Teodor Sigaev\n> teodor@stack.net\n> \n\n[ application/gzip is not supported, skipping... ]\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Thu, 22 Aug 2002 11:32:31 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Please, apply patch"
},
{
"msg_contents": "\nPatch applied. Thanks.\n\n---------------------------------------------------------------------------\n\n\nTeodor Sigaev wrote:\n> Please, apply patch for tsearch to current CVS.\n> \n> Patch resolve ERROR problem for non-goog query_txt.\n> \n> Teodor Sigaev wrote:\n> > Now you can use:\n> > regression=# select 'the'::mquery_txt;\n> > ERROR: Your query contained only stopword(s), ignored\n> > regression=# select 'good'::mquery_txt;\n> > mquery_txt\n> > ------------\n> > 'good'\n> > (1 row)\n> > \n> > I suggest:\n> > 1.\n> > regression=# select 'the'::mquery_txt;\n> > NOTICE: Your query contained only stopword(s), ignored\n> > mquery_txt\n> > -------------\n> > \n> > (1 row)\n> > 2. any operation with void query returns false:\n> > select t from tbl where t ## 'the';\n> > NOTICE: Your query contained only stopword(s), ignored\n> > tbl\n> > -----\n> > (0 row)\n> > \n> > \n> > \n> > \n> > \n> > Christopher Kings-Lynne wrote:\n> > \n> >> Ross - maybe we could work on a little function for tsearch - \n> >> parse_query()\n> >> or something like that. It could return true or false depending on \n> >> whether\n> >> it would cause tsearch to error or not...\n> >>\n> >> Chris\n> >>\n> >>\n> >>> -----Original Message-----\n> >>> From: pgsql-hackers-owner@postgresql.org\n> >>> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Ross J.\n> >>> Reedstrom\n> >>> Sent: Friday, 16 August 2002 4:59 AM\n> >>> To: Oleg Bartunov\n> >>> Cc: Christopher Kings-Lynne; Hackers\n> >>> Subject: Re: [HACKERS] tsearch bug in 7.2.1?\n> >>>\n> >>>\n> >>> On Thu, Aug 15, 2002 at 11:59:20AM +0300, Oleg Bartunov wrote:\n> >>>\n> >>>> tsearch has compiled-in stop-list, it's currently just not flexible\n> >>>> as OpenFTS does. We plan to move most functionality to tsearch but\n> >>>> currently have no time. Feel free to join us to speedup tsearch\n> >>>> development.\n> >>>\n> >>>\n> >>> Oleg -\n> >>> I think Chris's issue might be the same one I ran into just last night.\n> >>> (BTW, thanks for tsearch and the OpenFTS work, it's really great)\n> >>> My problem is that queries with only stopwords throw an ERROR, rather\n> >>> than a WARNING or NOTICE. This means We've got to deal with catching an\n> >>> exception so our middleware doesn't spew ugly errors and tracebacks at\n> >>> our endusers, and I've got to deal with cleaning up the transaction.\n> >>>\n> >>> Having the behavior be \"issue a notice and return no match\" would give\n> >>> us a reasonably functional interface: if I don't implement reading the\n> >>> NOTICE, I get confused users ('huh? \"the\" doesn't match anything?')\n> >>> rather than irate users ('Your search interface sucks! It keeps\n> >>> crashing!')\n> >>>\n> >>> Oh, well, off to implement some try: catch: logic.\n> >>>\n> >>> Ross\n> >>>\n> >>> ---------------------------(end of broadcast)---------------------------\n> >>> TIP 4: Don't 'kill -9' the postmaster\n> >>>\n> >>\n> >>\n> >>\n> >> ---------------------------(end of broadcast)---------------------------\n> >> TIP 3: if posting/reading through Usenet, please send an appropriate\n> >> subscribe-nomail command to majordomo@postgresql.org so that your\n> >> message can get through to the mailing list cleanly\n> >>\n> > \n> > \n> \n> \n> -- \n> Teodor Sigaev\n> teodor@stack.net\n> \n\n[ application/gzip is not supported, skipping... ]\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Thu, 22 Aug 2002 22:56:42 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Please, apply patch"
},
{
"msg_contents": "Hi guys,\n\nHate to keep coming up with these bugs without patches - but I really don't\nhave time to look into the source code atm :(\n\nOK, attached is an example of the problem. Notice how trademarks and\ncopyright symbols are being indexed along with the word. This means that if\nsomeone searches for 'balance' in the above data set, they won't find\nanything.\n\nI'm not sure how this would be handled. In the English language, it'd\nprobably be safe to say that high ascii characters would be stripped from\nthe index? But you'd want to leave accents and stuff in I guess. Tricky.\n\nAnyway, just bringing it to your attention...\n\nChris",
"msg_date": "Fri, 23 Aug 2002 12:25:19 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "Another tsearch bug..."
},
{
"msg_contents": "On Fri, 23 Aug 2002, Christopher Kings-Lynne wrote:\n\n> Hi guys,\n>\n> Hate to keep coming up with these bugs without patches - but I really don't\n> have time to look into the source code atm :(\n>\n> OK, attached is an example of the problem. Notice how trademarks and\n> copyright symbols are being indexed along with the word. This means that if\n> someone searches for 'balance' in the above data set, they won't find\n> anything.\n>\n> I'm not sure how this would be handled. In the English language, it'd\n> probably be safe to say that high ascii characters would be stripped from\n> the index? But you'd want to leave accents and stuff in I guess. Tricky.\n\nRather tricky. The problem is that we don't know how to get flex to works\nwith locale. Parser recognizes latin words ([a-zA-Z]), nonLatin ([\\0200-\\0377])\nand mixed words ([a-zA-Z\\0200-\\0377]). Your case (balanceR) is the mixed word.\nThe right way is to have locale aware parser to properly recognize words.\nWe incline to refuse a flex.\n\n>\n> Anyway, just bringing it to your attention...\n>\n> Chris\n>\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n",
"msg_date": "Fri, 23 Aug 2002 15:29:25 +0300 (GMT)",
"msg_from": "Oleg Bartunov <oleg@sai.msu.su>",
"msg_from_op": false,
"msg_subject": "Re: Another tsearch bug..."
}
] |
[
{
"msg_contents": "CREATE CONSTRAINT TRIGGER doesn't respect attisdropped. Unfortunately I\nreally don't have the time to submit a patch at the moment - sorry :(\n\nctest=# create table master (x int unique, y int4 unique);\nNOTICE: CREATE TABLE / UNIQUE will create implicit index 'master_x_key' for\ntable 'master'\nNOTICE: CREATE TABLE / UNIQUE will create implicit index 'master_y_key' for\ntable 'master'\nCREATE TABLE\ntest=# create table slave (a int);\nCREATE TABLE\ntest=# alter table master drop x;\nALTER TABLE\ntest=# create constraint trigger \"$1\" after insert or update on \"slave\" from\nmaster not deferrable initially immediate for each row execute procedure\n\"RI_FKey_check_ins\" ('$1', 'slave', 'master', 'UNSPECIFIED', 'a', 'x');\nCREATE TRIGGER\ntest=# insert into master values (1);\nINSERT 16982 1\ntest=# insert into slave values (2);\nERROR: constraint $1: table master does not have an attribute x\n\nChris\n\n",
"msg_date": "Thu, 15 Aug 2002 13:55:20 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "Bug with CREATE CONSRAINT TRIGGER and attisdropped"
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> CREATE CONSTRAINT TRIGGER doesn't respect attisdropped. Unfortunately I\n> really don't have the time to submit a patch at the moment - sorry :(\n\n> test=# create constraint trigger \"$1\" after insert or update on \"slave\" from\n> master not deferrable initially immediate for each row execute procedure\n> \"RI_FKey_check_ins\" ('$1', 'slave', 'master', 'UNSPECIFIED', 'a', 'x');\n\nI'm not sure this is a bug. For CREATE CONSTRAINT TRIGGER to complain\nat trigger creation time, you'd have to make it assume that it\nunderstood the contents of the parameters passed to the trigger.\nThat seems like a bad idea; I'm willing to settle for run-time\ndetection instead.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 15 Aug 2002 02:03:18 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Bug with CREATE CONSRAINT TRIGGER and attisdropped "
}
] |
[
{
"msg_contents": "I've implemented large file support for pg_dump, in what I hope is a\nportable fashion. Please review the attached patch.\n\nThis needs an additional option from autoconf, because pg_dump prints a\nhex offset which needs to be either %Lx or %llx, but there is no hex\nequivalent to INT64_FORMAT. To get this working I have arbitrarily\ndefined OFF_T_FORMATX as \"%lld\", but that needs to be changed before the\npatch is incorporated.\n\nPeter E suggested that there was no need for the macro definitions in\npg_backup.h but I wasn't clear how else to achieve what was needed.\n\n\n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight, UK \nhttp://www.lfix.co.uk/oliver\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Praying always with all prayer and supplication in the\n Spirit, and watching thereunto with all perseverance \n and supplication for all saints.\" Ephesians 6:18",
"msg_date": "15 Aug 2002 11:41:20 +0100",
"msg_from": "Oliver Elphick <olly@lfix.co.uk>",
"msg_from_op": true,
"msg_subject": "pg_dump large file support"
},
{
"msg_contents": "On Thu, 2002-08-15 at 11:41, Oliver Elphick wrote:\n> I've implemented large file support for pg_dump, in what I hope is a\n> portable fashion. Please review the attached patch.\n\n> Index: src/bin/pg_dump/Makefile\n> ===================================================================\n> RCS file: /projects/cvsroot/pgsql-server/src/bin/pg_dump/Makefile,v\n> retrieving revision 1.36\n> diff -u -r1.36 Makefile\n> --- src/bin/pg_dump/Makefile\t2002/07/27 20:10:05\t1.36\n> +++ src/bin/pg_dump/Makefile\t2002/08/15 10:31:53\n> @@ -18,6 +18,8 @@\n> \n> override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)\n> \n> +CFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64\n> +\n\nI just realised this is the wrong place to put this definition, since it\nwill act unconditonally and attempt to compile large file support even\nwhere it is not available. This too ought to come from autoconf, I\nthink.\n\n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight, UK \nhttp://www.lfix.co.uk/oliver\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Praying always with all prayer and supplication in the\n Spirit, and watching thereunto with all perseverance \n and supplication for all saints.\" Ephesians 6:18\n\n",
"msg_date": "15 Aug 2002 12:47:33 +0100",
"msg_from": "Oliver Elphick <olly@lfix.co.uk>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump large file support"
},
{
"msg_contents": "Oliver Elphick writes:\n\n> I've implemented large file support for pg_dump, in what I hope is a\n> portable fashion. Please review the attached patch.\n\nHmm, not quite right, but since you've indicated that you're not familiar\nwith Autoconf I can take it from here.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Thu, 15 Aug 2002 21:30:22 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump large file support"
},
{
"msg_contents": "On Thu, 2002-08-15 at 20:30, Peter Eisentraut wrote:\n> Oliver Elphick writes:\n> \n> > I've implemented large file support for pg_dump, in what I hope is a\n> > portable fashion. Please review the attached patch.\n> \n> Hmm, not quite right, but since you've indicated that you're not familiar\n> with Autoconf I can take it from here.\n\nThanks, Peter\n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight, UK \nhttp://www.lfix.co.uk/oliver\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Praying always with all prayer and supplication in the\n Spirit, and watching thereunto with all perseverance \n and supplication for all saints.\" Ephesians 6:18\n\n",
"msg_date": "15 Aug 2002 20:45:45 +0100",
"msg_from": "Oliver Elphick <olly@lfix.co.uk>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump large file support"
}
] |
[
{
"msg_contents": "I think we are going to see more company-funded developers working on\nPostgreSQL. There are a handful now, but I can see lots more coming.\nI am going to work on getting those funding companies more visibility. \nWe originally were concerned that such involvement may harm the\ndevelopment process, but history has shown that it has only been a huge\nbenefit for the community.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Thu, 15 Aug 2002 11:05:07 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Companies involved in development"
},
{
"msg_contents": "I think it would be a huge benefit for the community to have some more \ncompany-funding. This would lead to the implementation of some features \npeople need urgently (replication in the core and so forth). On the \nother hand a better product makes even more developers work for \nPostgreSQL. We were thinking of funding the project as well and seems to \nbe a good way of improving the product we make our living of. We have \nalso tried to get some government funding we could invest into \nPostgreSQL but unfornately all we could get was EUR 10k which is some \nkind of ridiculous. We should have invested much more but it is just not \npossible at this point so we dropped the idea.\nFor a company PostgreSQL definitely is an interesting area to invest \nbecause it has proven to be a good product and there are just minor \nthings (sync. replication - eg. Postgres-R) missing to make it a real \nenterprise database. The support of the community of more than just \noptimal and it is an interesting subject.\nTalking about practical experience: Our customers love PostgreSQL. The \nonly thing they miss is 24x7 availability due to a lack of hot-failover \nand replication. A way to tweak the optimizer better (some have SQL \nstatements being 2 pages long).\nWe have done quite a lot of Oracle up to now but in many respects \nPostgreSQL seems to be the better product but in the case of \navailability we fail. The database never crashes but it is just to hard \nto make a cluster out of it - we have to do it on an application level \nand too many people worry about conistency if one node fails.\n\nAlso: It would be interesting to have a special section on the website \nwhere people can post that they need money to implement something really \nuseful. I guess there'd be a lot of people who'd pay for replication or \nthings like that if they knew more.\nBy the way; many people seem to think that PostgreSQL is GPL license. I \nknow it is easy to find out what it means and that it is now that way \nbut we should explain what BSD license REALLY means in just a few words. \nThis may sound ridiculous but people just don't look for information.\n\nAll in all I think that there are ways to find people contributing \nfinancially to the project.\n\n Regards,\n Hans-J�rgen Sch�nig\n\n\nBruce Momjian wrote:\n\n>I think we are going to see more company-funded developers working on\n>PostgreSQL. There are a handful now, but I can see lots more coming.\n>I am going to work on getting those funding companies more visibility. \n>We originally were concerned that such involvement may harm the\n>development process, but history has shown that it has only been a huge\n>benefit for the community.\n> \n>\n\n\n-- \n*Cybertec Geschwinde u Schoenig*\nLudo-Hartmannplatz 1/14, A-1160 Vienna, Austria\nTel: +43/1/913 68 09; +43/664/233 90 75\nwww.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at \n<http://cluster.postgresql.at>, www.cybertec.at \n<http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at>\n\n",
"msg_date": "Thu, 15 Aug 2002 17:34:13 +0200",
"msg_from": "=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <postgres@cybertec.at>",
"msg_from_op": false,
"msg_subject": "Re: Companies involved in development"
},
{
"msg_contents": "\nI will add something about the BSD license to the advocacy web page I am\ntrying to put together. My list is:\n\n P O S T G R E S Q L\n A D V O C A C Y\n\n\nCurrent at ftp://candle.pha.pa.us/pub/postgresql/advocacy.\n\nQuotations\nCompany users\nBeef up developers list, add companies\nsuccess stories\nupdate developers map\nBSD license\n\n\n---------------------------------------------------------------------------\n\nHans-J�rgen Sch�nig wrote:\n> I think it would be a huge benefit for the community to have some more \n> company-funding. This would lead to the implementation of some features \n> people need urgently (replication in the core and so forth). On the \n> other hand a better product makes even more developers work for \n> PostgreSQL. We were thinking of funding the project as well and seems to \n> be a good way of improving the product we make our living of. We have \n> also tried to get some government funding we could invest into \n> PostgreSQL but unfornately all we could get was EUR 10k which is some \n> kind of ridiculous. We should have invested much more but it is just not \n> possible at this point so we dropped the idea.\n> For a company PostgreSQL definitely is an interesting area to invest \n> because it has proven to be a good product and there are just minor \n> things (sync. replication - eg. Postgres-R) missing to make it a real \n> enterprise database. The support of the community of more than just \n> optimal and it is an interesting subject.\n> Talking about practical experience: Our customers love PostgreSQL. The \n> only thing they miss is 24x7 availability due to a lack of hot-failover \n> and replication. A way to tweak the optimizer better (some have SQL \n> statements being 2 pages long).\n> We have done quite a lot of Oracle up to now but in many respects \n> PostgreSQL seems to be the better product but in the case of \n> availability we fail. The database never crashes but it is just to hard \n> to make a cluster out of it - we have to do it on an application level \n> and too many people worry about conistency if one node fails.\n> \n> Also: It would be interesting to have a special section on the website \n> where people can post that they need money to implement something really \n> useful. I guess there'd be a lot of people who'd pay for replication or \n> things like that if they knew more.\n> By the way; many people seem to think that PostgreSQL is GPL license. I \n> know it is easy to find out what it means and that it is now that way \n> but we should explain what BSD license REALLY means in just a few words. \n> This may sound ridiculous but people just don't look for information.\n> \n> All in all I think that there are ways to find people contributing \n> financially to the project.\n> \n> Regards,\n> Hans-J?rgen Sch?nig\n> \n> \n> Bruce Momjian wrote:\n> \n> >I think we are going to see more company-funded developers working on\n> >PostgreSQL. There are a handful now, but I can see lots more coming.\n> >I am going to work on getting those funding companies more visibility. \n> >We originally were concerned that such involvement may harm the\n> >development process, but history has shown that it has only been a huge\n> >benefit for the community.\n> > \n> >\n> \n> \n> -- \n> *Cybertec Geschwinde u Schoenig*\n> Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria\n> Tel: +43/1/913 68 09; +43/664/233 90 75\n> www.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at \n> <http://cluster.postgresql.at>, www.cybertec.at \n> <http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at>\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Thu, 15 Aug 2002 11:41:10 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Companies involved in development"
},
{
"msg_contents": "I think I spelled -advocacy correctly this time.\n\nOn Thu, Aug 15, 2002 at 05:34:13PM +0200, Hans-J?rgen Sch?nig wrote:\n> I think it would be a huge benefit for the community to have some more \n> company-funding. This would lead to the implementation of some features \n> people need urgently (replication in the core and so forth). On the \n\n> For a company PostgreSQL definitely is an interesting area to invest \n> because it has proven to be a good product and there are just minor \n> things (sync. replication - eg. Postgres-R) missing to make it a real \n> enterprise database. The support of the community of more than just \n> optimal and it is an interesting subject.\n\n> Also: It would be interesting to have a special section on the website \n> where people can post that they need money to implement something really \n> useful. I guess there'd be a lot of people who'd pay for replication or \n> things like that if they knew more.\n\nSome time ago, I posted that I was looking for people interested in\nmaking the replication stuff complete. I'm still working on that\n(and I _may_ be getting somewhere, BTW), but there is a lot of work\nto be done there, and I think quite a bit of high-quality code needs\nto be written. And that high-quiality code requires high-quality\ndevelopers.\n\nNow, it strikes me that sometimes, several companies might be able to\nafford to subsidise this sort of development, if only they had a way\nof getting together to do this. I find that the corporate folks here\nreally like the idea of \"co-development\". The idea is to spread the\nrisk, where everyone gets the return. Can anyone think of an idea of\nhow to set up some sort of organisation to do this? Or maybe, are\ncommercial organisations like PostgreSQL the best answer? The\nproblem is frequently that the names of the funders frequently need\nto remain secret-ish, because a lot of companies are reluctant to\ndiscuss using Postgres.\n\nAny suggestions? I know I'd have an easier sell to support this sort\nof development if we didn't have to foot the whole bill.\n\nA\n\n-- \n----\nAndrew Sullivan 87 Mowat Avenue \nLiberty RMS Toronto, Ontario Canada\n<andrew@libertyrms.info> M6K 3E3\n +1 416 646 3304 x110\n\n",
"msg_date": "Thu, 15 Aug 2002 13:35:17 -0400",
"msg_from": "Andrew Sullivan <andrew@libertyrms.info>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Companies involved in development"
},
{
"msg_contents": "\nI am willing to talk to anyone about this. There is a reason my phone\nnumber is in my signature (note new phone number; I just moved.)\n\nAlso, I am willing to make trips to companies to talk about PostgreSQL.\nI can't make 100's of trips a year, but I try to do at least on a month.\nI just did one last week. If your company is interested in funding or a\nvisit to talk about PostgreSQL, I am ready. Also, for the advocacy\nsite, I will be putting together a list of people around the world who\nare ready to talk via phone or visit about PostgreSQL.\n\nI am a little bogged down on the pre-beta issue, but plan to hit this\nfull force once beta begins.\n\n---------------------------------------------------------------------------\n\nAndrew Sullivan wrote:\n> I think I spelled -advocacy correctly this time.\n> \n> On Thu, Aug 15, 2002 at 05:34:13PM +0200, Hans-J?rgen Sch?nig wrote:\n> > I think it would be a huge benefit for the community to have some more \n> > company-funding. This would lead to the implementation of some features \n> > people need urgently (replication in the core and so forth). On the \n> \n> > For a company PostgreSQL definitely is an interesting area to invest \n> > because it has proven to be a good product and there are just minor \n> > things (sync. replication - eg. Postgres-R) missing to make it a real \n> > enterprise database. The support of the community of more than just \n> > optimal and it is an interesting subject.\n> \n> > Also: It would be interesting to have a special section on the website \n> > where people can post that they need money to implement something really \n> > useful. I guess there'd be a lot of people who'd pay for replication or \n> > things like that if they knew more.\n> \n> Some time ago, I posted that I was looking for people interested in\n> making the replication stuff complete. I'm still working on that\n> (and I _may_ be getting somewhere, BTW), but there is a lot of work\n> to be done there, and I think quite a bit of high-quality code needs\n> to be written. And that high-quiality code requires high-quality\n> developers.\n> \n> Now, it strikes me that sometimes, several companies might be able to\n> afford to subsidise this sort of development, if only they had a way\n> of getting together to do this. I find that the corporate folks here\n> really like the idea of \"co-development\". The idea is to spread the\n> risk, where everyone gets the return. Can anyone think of an idea of\n> how to set up some sort of organisation to do this? Or maybe, are\n> commercial organisations like PostgreSQL the best answer? The\n> problem is frequently that the names of the funders frequently need\n> to remain secret-ish, because a lot of companies are reluctant to\n> discuss using Postgres.\n> \n> Any suggestions? I know I'd have an easier sell to support this sort\n> of development if we didn't have to foot the whole bill.\n> \n> A\n> \n> -- \n> ----\n> Andrew Sullivan 87 Mowat Avenue \n> Liberty RMS Toronto, Ontario Canada\n> <andrew@libertyrms.info> M6K 3E3\n> +1 416 646 3304 x110\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Thu, 15 Aug 2002 13:52:36 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Companies involved in development"
},
{
"msg_contents": "\nOf course, any funding information would be shared by the core group so\nthey are involved, but not shared to the general list until the company\nwishes.\n\n\n---------------------------------------------------------------------------\n\nAndrew Sullivan wrote:\n> I think I spelled -advocacy correctly this time.\n> \n> On Thu, Aug 15, 2002 at 05:34:13PM +0200, Hans-J?rgen Sch?nig wrote:\n> > I think it would be a huge benefit for the community to have some more \n> > company-funding. This would lead to the implementation of some features \n> > people need urgently (replication in the core and so forth). On the \n> \n> > For a company PostgreSQL definitely is an interesting area to invest \n> > because it has proven to be a good product and there are just minor \n> > things (sync. replication - eg. Postgres-R) missing to make it a real \n> > enterprise database. The support of the community of more than just \n> > optimal and it is an interesting subject.\n> \n> > Also: It would be interesting to have a special section on the website \n> > where people can post that they need money to implement something really \n> > useful. I guess there'd be a lot of people who'd pay for replication or \n> > things like that if they knew more.\n> \n> Some time ago, I posted that I was looking for people interested in\n> making the replication stuff complete. I'm still working on that\n> (and I _may_ be getting somewhere, BTW), but there is a lot of work\n> to be done there, and I think quite a bit of high-quality code needs\n> to be written. And that high-quiality code requires high-quality\n> developers.\n> \n> Now, it strikes me that sometimes, several companies might be able to\n> afford to subsidise this sort of development, if only they had a way\n> of getting together to do this. I find that the corporate folks here\n> really like the idea of \"co-development\". The idea is to spread the\n> risk, where everyone gets the return. Can anyone think of an idea of\n> how to set up some sort of organisation to do this? Or maybe, are\n> commercial organisations like PostgreSQL the best answer? The\n> problem is frequently that the names of the funders frequently need\n> to remain secret-ish, because a lot of companies are reluctant to\n> discuss using Postgres.\n> \n> Any suggestions? I know I'd have an easier sell to support this sort\n> of development if we didn't have to foot the whole bill.\n> \n> A\n> \n> -- \n> ----\n> Andrew Sullivan 87 Mowat Avenue \n> Liberty RMS Toronto, Ontario Canada\n> <andrew@libertyrms.info> M6K 3E3\n> +1 416 646 3304 x110\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Thu, 15 Aug 2002 13:53:39 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Companies involved in development"
},
{
"msg_contents": "On Thu, Aug 15, 2002 at 11:05:07AM -0400, Bruce Momjian wrote:\n> I think we are going to see more company-funded developers working on\n> PostgreSQL. There are a handful now, but I can see lots more coming.\n> I am going to work on getting those funding companies more visibility. \n> We originally were concerned that such involvement may harm the\n> development process, but history has shown that it has only been a huge\n> benefit for the community.\n\nI agree, and it's also true that while the visibility of all you\npaid-to-hack types is high, the fact that you _are_ paid, and by wha\ncompanies, is not.\n\nJust recently, one of the GnuE developers has been running on about SapDB,\nand mentioned how they've got '100 paid developers at SAP' and seemed to\nthink that since GreatBridge died, pgsql is back to all volunteer. The\nfact that GB wasn't the first nor the only nor the last corp. funding\npgsql development was clearly missed, even among a relatively PG savvy\nuser community (GnuE is the GNU/Enterprise middleware system, and is is\npgsql as its primary developement backend http://www.gnuenterprise.org/ )\n\nRoss\n",
"msg_date": "Thu, 15 Aug 2002 16:13:47 -0500",
"msg_from": "\"Ross J. Reedstrom\" <reedstrm@rice.edu>",
"msg_from_op": false,
"msg_subject": "Re: Companies involved in development"
},
{
"msg_contents": "On Thu, 2002-08-15 at 17:13, Ross J. Reedstrom wrote:\n> On Thu, Aug 15, 2002 at 11:05:07AM -0400, Bruce Momjian wrote:\n> > I think we are going to see more company-funded developers working on\n> > PostgreSQL. There are a handful now, but I can see lots more coming.\n> > I am going to work on getting those funding companies more visibility. \n> > We originally were concerned that such involvement may harm the\n> > development process, but history has shown that it has only been a huge\n> > benefit for the community.\n> \n> I agree, and it's also true that while the visibility of all you\n> paid-to-hack types is high, the fact that you _are_ paid, and by wha\n> companies, is not.\n> \n\nAt a minimum we could have people attach a company name to their\ndeveloper bios (http://developer.postgresql.org/bios.php) if their\ncompany pays them to hack on postgresql. (at the developers discretion\nof course) At the least I would think companies like postgresql inc\nwould benefit from publicity that \"we employee X number of pg\ndevelopers.\"\n\nWe could also generate a list of companies sponsoring postgresql\ndevelopment, but we'd have to come up with some criterion as to what it\nmeans to be a sponsors. For example, a coworker and I were discussing a\npatch he is getting ready to submit this morning while we were \"on the\nclock\". While our company doesn't have an issue with this, I don't know\nthat I would say they sponsor postgresql development, they just happen\nto employ two guys who are more involved than most and will hack code if\nit scratches our particular itch.\n\nRobert Treat \n\n",
"msg_date": "15 Aug 2002 19:14:50 -0400",
"msg_from": "Robert Treat <rtreat@webmd.net>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Companies involved in development"
},
{
"msg_contents": "Robert Treat wrote:\n> On Thu, 2002-08-15 at 17:13, Ross J. Reedstrom wrote:\n> > On Thu, Aug 15, 2002 at 11:05:07AM -0400, Bruce Momjian wrote:\n> > > I think we are going to see more company-funded developers working on\n> > > PostgreSQL. There are a handful now, but I can see lots more coming.\n> > > I am going to work on getting those funding companies more visibility. \n> > > We originally were concerned that such involvement may harm the\n> > > development process, but history has shown that it has only been a huge\n> > > benefit for the community.\n> > \n> > I agree, and it's also true that while the visibility of all you\n> > paid-to-hack types is high, the fact that you _are_ paid, and by wha\n> > companies, is not.\n> > \n> \n> At a minimum we could have people attach a company name to their\n> developer bios (http://developer.postgresql.org/bios.php) if their\n> company pays them to hack on postgresql. (at the developers discretion\n> of course) At the least I would think companies like postgresql inc\n> would benefit from publicity that \"we employee X number of pg\n> developers.\"\n> \n> We could also generate a list of companies sponsoring postgresql\n> development, but we'd have to come up with some criterion as to what it\n> means to be a sponsors. For example, a coworker and I were discussing a\n> patch he is getting ready to submit this morning while we were \"on the\n> clock\". While our company doesn't have an issue with this, I don't know\n> that I would say they sponsor postgresql development, they just happen\n> to employ two guys who are more involved than most and will hack code if\n> it scratches our particular itch.\n\nYea, that is a tough one, but anyone who is submitting patches regularly\nand does _some_ work on company time is eligible, I think.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 00:17:05 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Companies involved in development"
},
{
"msg_contents": "Ross J. Reedstrom wrote:\n> On Thu, Aug 15, 2002 at 11:05:07AM -0400, Bruce Momjian wrote:\n> > I think we are going to see more company-funded developers working on\n> > PostgreSQL. There are a handful now, but I can see lots more coming.\n> > I am going to work on getting those funding companies more visibility. \n> > We originally were concerned that such involvement may harm the\n> > development process, but history has shown that it has only been a huge\n> > benefit for the community.\n> \n> I agree, and it's also true that while the visibility of all you\n> paid-to-hack types is high, the fact that you _are_ paid, and by wha\n> companies, is not.\n> \n> Just recently, one of the GnuE developers has been running on about SapDB,\n> and mentioned how they've got '100 paid developers at SAP' and seemed to\n> think that since GreatBridge died, pgsql is back to all volunteer. The\n> fact that GB wasn't the first nor the only nor the last corp. funding\n> pgsql development was clearly missed, even among a relatively PG savvy\n> user community (GnuE is the GNU/Enterprise middleware system, and is is\n> pgsql as its primary developement backend http://www.gnuenterprise.org/ )\n\nYes, it is very invisible now.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 00:18:39 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Companies involved in development"
},
{
"msg_contents": "\nBruce Momjian wrote:\n\n> I am willing to talk to anyone about this. There is a reason my phone\n> number is in my signature (note new phone number; I just moved.)\n>\n> Also, I am willing to make trips to companies to talk about\n> PostgreSQL.\n> I can't make 100's of trips a year, but I try to do at least\n> on a month.\n> I just did one last week. If your company is interested in\n> funding or a\n> visit to talk about PostgreSQL, I am ready. Also, for the advocacy\n> site, I will be putting together a list of people around the world who\n> are ready to talk via phone or visit about PostgreSQL.\n>\n> I am a little bogged down on the pre-beta issue, but plan to hit this\n> full force once beta begins.\n\nI have the feeling that PostgreSQL needs a bit more of a PR effort. I\nstarted thinking about this some time ago and then I asked Bruce why\nGreat Bridge failed. Then he started this thread. But I think the issue\nis bigger.\n\nWhen we started using PostgreSQL we tried to find success stories and\nstudy cases. There were almost none. If you go to the MySQL web site -\nthe study cases are there. I find it crucial for new users - especially\ncorporations - to read study cases before taking a decision.\n\nDecisions in big corporations are taken my managers and managers need\nmore than just technical assurance that this works. Managers study MBA\nand MBA is one year reading day and night about what other companies did\nright or wrong.\n\nDevelopers tend not to like managers, but that's the wrong way. Both can\nnot do without the other. Instead of trying to work without 'them' it is\nbetter to see how to work with them.\n\nIf PostgreSQL has a management oriented section - the developers who\nwant to implement PostgreSQL will have better food to feed their\nmanagers. This will improve the climate a lot.\n\nI see this effort by starting collecting and writing high quality study\ncases - who uses it, why do they use it, how did they started using it,\nwhat were the pros and cons, how did it go, etc. There are not much\ntechnical details in that. But a lot a manager needs in order to take a\ndecision.\n\nIavor\n\n--\nIavor Raytchev\nvery small technologies (a company of CEE Solutions)\n\nin case of emergency -\n\n call: + 43 676 639 46 49\nor write to: support@verysmall.org\n\nwww.verysmall.org\n\n",
"msg_date": "Fri, 16 Aug 2002 10:40:22 +0200",
"msg_from": "\"Iavor Raytchev\" <iavor.raytchev@verysmall.org>",
"msg_from_op": false,
"msg_subject": "Re: Companies involved in development"
},
{
"msg_contents": "\nI think the areas are at least two -\n\n- funding - who funds it and areas that need funding\n- PR - what I described in my previous mail\n\nThese are pretty separated.\n\nIavor\n",
"msg_date": "Fri, 16 Aug 2002 10:40:23 +0200",
"msg_from": "\"Iavor Raytchev\" <iavor.raytchev@verysmall.org>",
"msg_from_op": false,
"msg_subject": "Re: Companies involved in development"
}
] |
[
{
"msg_contents": "\n\tI'm planning on trying out a version\nof the check done for foreign keys that does\na query on the fktable with a NOT EXISTS\nsubselect rather than the current run the\ntrigger for each row (thus doing one query\nper row of the table). I want to see if this\ntends to be faster than what we're doing now\nand want to make sure noone has any general\nobjections to doing it this way (before\nbothering to do it and timings).\n\n\n",
"msg_date": "Thu, 15 Aug 2002 08:48:44 -0700 (PDT)",
"msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>",
"msg_from_op": true,
"msg_subject": "Alter table add foreign key "
}
] |
[
{
"msg_contents": "\nWho the hell are these people and why can't they configure their\nown MTA?\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide Dialup from $16.00/mo at Pop4 Networking\n http://www.camping-usa.com http://www.cloudninegifts.com\n http://www.meanstreamradio.com http://www.unknown-artists.com\n==========================================================================\n\n\n\n---------- Forwarded message ----------\nDate: 15 Aug 2002 16:47:22 -0000\nFrom: MAILER-DAEMON@ic.kharkov.ua\nTo: vev@michvhf.com\nSubject: failure notice\n\nHi. This is the qmail-send program at ic.kharkov.ua.\nI'm afraid I wasn't able to deliver your message to the following addresses.\nThis is a permanent error; I've given up. Sorry it didn't work out.\n\n<tgl@sss.pgh.pa.us>:\nConnected to 192.204.191.242 but sender was rejected.\nRemote host said: 550 5.0.0 Go away, your mailserver is broken\n\n--- Below this line is a copy of the message.\n\nReturn-Path: <vev@michvhf.com>\nReceived: (qmail 62268 invoked from network); 15 Aug 2002 16:46:47 -0000\nReceived: from dialup44.kharkov.ukrpack.net (HELO dual.shena.ic.kharkov.ua) (212.1.112.156)\n by mail.ic.kharkov.ua with SMTP; 15 Aug 2002 16:46:47 -0000\nReceived: from dual.shena.ic.kharkov.ua (DUAL [172.16.200.1]) by dual.shena.ic.kharkov.ua with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0)\n\tid Q926YA3A; Thu, 15 Aug 2002 19:46:07 +0300\nReceived: by dual.shena.ic.kharkov.ua (Microsoft Exchange Connector for POP3 Mailboxes 4.50.2113) with SMTP (Global POP3 Download)\n\t id MSG08152002-194556-214.MMD@shena.ic.kharkov.ua; Thu, 15 Aug 2002 19:45:56 +0300\nReturn-Path: <pgsql-hackers-owner+M26848@postgresql.org>\nDelivered-To: pop-users-shena@ic.kharkov.ua\nReceived: (qmail 61671 invoked by alias); 15 Aug 2002 16:39:03 -0000\nDelivered-To: shena-shevtchenko@shena.ic.kharkov.ua\nReceived: (qmail 61668 invoked from network); 15 Aug 2002 16:39:03 -0000\nReceived: from postgresql.org (64.49.215.8)\n by mail.ic.kharkov.ua with SMTP; 15 Aug 2002 16:39:03 -0000\nReceived: from localhost (postgresql.org [64.49.215.8])\n\tby postgresql.org (Postfix) with ESMTP\n\tid 419EF47654E; Thu, 15 Aug 2002 12:38:48 -0400 (EDT)\nReceived: from postgresql.org (postgresql.org [64.49.215.8])\n\tby postgresql.org (Postfix) with SMTP\n\tid A2668475F2D; Thu, 15 Aug 2002 12:38:47 -0400 (EDT)\nReceived: from localhost (postgresql.org [64.49.215.8])\n\tby postgresql.org (Postfix) with ESMTP id EE137475974\n\tfor <pgsql-hackers@postgresql.org>; Thu, 15 Aug 2002 12:38:44 -0400 (EDT)\nReceived: from paprika.michvhf.com (adsl-67-36-71-182.dsl.sfldmi.ameritech.net [67.36.71.182])\n\tby postgresql.org (Postfix) with SMTP id DCB8947594D\n\tfor <pgsql-hackers@postgresql.org>; Thu, 15 Aug 2002 12:38:43 -0400 (EDT)\nReceived: (qmail 55151 invoked by uid 1001); 15 Aug 2002 16:38:45 -0000\nDate: Thu, 15 Aug 2002 12:38:45 -0400 (EDT)\nFrom: Vince Vielhaber <vev@michvhf.com>\nTo: Bruce Momjian <pgman@candle.pha.pa.us>\nCc: Tom Lane <tgl@sss.pgh.pa.us>, Lamar Owen <lamar.owen@wgcr.org>,\n\tPostgreSQL-development <pgsql-hackers@postgresql.org>\nSubject: Re: [HACKERS] Open 7.3 items\nIn-Reply-To: <200208151616.g7FGGW500908@candle.pha.pa.us>\nMessage-ID: <Pine.BSF.4.40.0208151235180.52449-100000@paprika.michvhf.com>\nMIME-Version: 1.0\nContent-Type: TEXT/PLAIN; charset=US-ASCII\nX-Virus-Scanned: by AMaViS new-20020517\nPrecedence: bulk\nSender: pgsql-hackers-owner@postgresql.org\nX-Virus-Scanned: by AMaViS new-20020517\n\nOn Thu, 15 Aug 2002, Bruce Momjian wrote:\n\n> Vince Vielhaber wrote:\n> > On Thu, 15 Aug 2002, Bruce Momjian wrote:\n> >\n> > >\n> > > OK, no one complained/commented on my idea of having global users have a\n> > > trailing '@', so here is a patch that implements that. It has the\n> > > advantages of:\n> >\n> > Probably because not everyone saw it. I know I didn't. This entire\n> > issue is growing more and more complex. How about a configure item\n> > to not even compile it in? Or better yet, a configure item to put\n> > it there with the default off.\n>\n> I think I am prety close, and I don't see a configure flag as any better\n> than a GUC option that is off by default.\n\nBut how many people would even use it? I can't see adding the bloat\nunnecessarily and risking it accidently being turned on. Am I wrong\nand really alot of people actually want/need this?\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide Dialup from $16.00/mo at Pop4 Networking\n http://www.camping-usa.com http://www.cloudninegifts.com\n http://www.meanstreamradio.com http://www.unknown-artists.com\n==========================================================================\n\n\n\n\n---------------------------(end of broadcast)---------------------------\nTIP 6: Have you searched our list archives?\n\nhttp://archives.postgresql.org\n\n\n",
"msg_date": "Thu, 15 Aug 2002 12:53:39 -0400 (EDT)",
"msg_from": "Vince Vielhaber <vev@michvhf.com>",
"msg_from_op": true,
"msg_subject": "failure notice (fwd)"
},
{
"msg_contents": "\nYep, I just sent email to Marc to remove them.\n\n---------------------------------------------------------------------------\n\nVince Vielhaber wrote:\n> \n> Who the hell are these people and why can't they configure their\n> own MTA?\n> \n> Vince.\n> -- \n> ==========================================================================\n> Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n> 56K Nationwide Dialup from $16.00/mo at Pop4 Networking\n> http://www.camping-usa.com http://www.cloudninegifts.com\n> http://www.meanstreamradio.com http://www.unknown-artists.com\n> ==========================================================================\n> \n> \n> \n> ---------- Forwarded message ----------\n> Date: 15 Aug 2002 16:47:22 -0000\n> From: MAILER-DAEMON@ic.kharkov.ua\n> To: vev@michvhf.com\n> Subject: failure notice\n> \n> Hi. This is the qmail-send program at ic.kharkov.ua.\n> I'm afraid I wasn't able to deliver your message to the following addresses.\n> This is a permanent error; I've given up. Sorry it didn't work out.\n> \n> <tgl@sss.pgh.pa.us>:\n> Connected to 192.204.191.242 but sender was rejected.\n> Remote host said: 550 5.0.0 Go away, your mailserver is broken\n> \n> --- Below this line is a copy of the message.\n> \n> Return-Path: <vev@michvhf.com>\n> Received: (qmail 62268 invoked from network); 15 Aug 2002 16:46:47 -0000\n> Received: from dialup44.kharkov.ukrpack.net (HELO dual.shena.ic.kharkov.ua) (212.1.112.156)\n> by mail.ic.kharkov.ua with SMTP; 15 Aug 2002 16:46:47 -0000\n> Received: from dual.shena.ic.kharkov.ua (DUAL [172.16.200.1]) by dual.shena.ic.kharkov.ua with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0)\n> \tid Q926YA3A; Thu, 15 Aug 2002 19:46:07 +0300\n> Received: by dual.shena.ic.kharkov.ua (Microsoft Exchange Connector for POP3 Mailboxes 4.50.2113) with SMTP (Global POP3 Download)\n> \t id MSG08152002-194556-214.MMD@shena.ic.kharkov.ua; Thu, 15 Aug 2002 19:45:56 +0300\n> Return-Path: <pgsql-hackers-owner+M26848@postgresql.org>\n> Delivered-To: pop-users-shena@ic.kharkov.ua\n> Received: (qmail 61671 invoked by alias); 15 Aug 2002 16:39:03 -0000\n> Delivered-To: shena-shevtchenko@shena.ic.kharkov.ua\n> Received: (qmail 61668 invoked from network); 15 Aug 2002 16:39:03 -0000\n> Received: from postgresql.org (64.49.215.8)\n> by mail.ic.kharkov.ua with SMTP; 15 Aug 2002 16:39:03 -0000\n> Received: from localhost (postgresql.org [64.49.215.8])\n> \tby postgresql.org (Postfix) with ESMTP\n> \tid 419EF47654E; Thu, 15 Aug 2002 12:38:48 -0400 (EDT)\n> Received: from postgresql.org (postgresql.org [64.49.215.8])\n> \tby postgresql.org (Postfix) with SMTP\n> \tid A2668475F2D; Thu, 15 Aug 2002 12:38:47 -0400 (EDT)\n> Received: from localhost (postgresql.org [64.49.215.8])\n> \tby postgresql.org (Postfix) with ESMTP id EE137475974\n> \tfor <pgsql-hackers@postgresql.org>; Thu, 15 Aug 2002 12:38:44 -0400 (EDT)\n> Received: from paprika.michvhf.com (adsl-67-36-71-182.dsl.sfldmi.ameritech.net [67.36.71.182])\n> \tby postgresql.org (Postfix) with SMTP id DCB8947594D\n> \tfor <pgsql-hackers@postgresql.org>; Thu, 15 Aug 2002 12:38:43 -0400 (EDT)\n> Received: (qmail 55151 invoked by uid 1001); 15 Aug 2002 16:38:45 -0000\n> Date: Thu, 15 Aug 2002 12:38:45 -0400 (EDT)\n> From: Vince Vielhaber <vev@michvhf.com>\n> To: Bruce Momjian <pgman@candle.pha.pa.us>\n> Cc: Tom Lane <tgl@sss.pgh.pa.us>, Lamar Owen <lamar.owen@wgcr.org>,\n> \tPostgreSQL-development <pgsql-hackers@postgresql.org>\n> Subject: Re: [HACKERS] Open 7.3 items\n> In-Reply-To: <200208151616.g7FGGW500908@candle.pha.pa.us>\n> Message-ID: <Pine.BSF.4.40.0208151235180.52449-100000@paprika.michvhf.com>\n> MIME-Version: 1.0\n> Content-Type: TEXT/PLAIN; charset=US-ASCII\n> X-Virus-Scanned: by AMaViS new-20020517\n> Precedence: bulk\n> Sender: pgsql-hackers-owner@postgresql.org\n> X-Virus-Scanned: by AMaViS new-20020517\n> \n> On Thu, 15 Aug 2002, Bruce Momjian wrote:\n> \n> > Vince Vielhaber wrote:\n> > > On Thu, 15 Aug 2002, Bruce Momjian wrote:\n> > >\n> > > >\n> > > > OK, no one complained/commented on my idea of having global users have a\n> > > > trailing '@', so here is a patch that implements that. It has the\n> > > > advantages of:\n> > >\n> > > Probably because not everyone saw it. I know I didn't. This entire\n> > > issue is growing more and more complex. How about a configure item\n> > > to not even compile it in? Or better yet, a configure item to put\n> > > it there with the default off.\n> >\n> > I think I am prety close, and I don't see a configure flag as any better\n> > than a GUC option that is off by default.\n> \n> But how many people would even use it? I can't see adding the bloat\n> unnecessarily and risking it accidently being turned on. Am I wrong\n> and really alot of people actually want/need this?\n> \n> Vince.\n> -- \n> ==========================================================================\n> Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n> 56K Nationwide Dialup from $16.00/mo at Pop4 Networking\n> http://www.camping-usa.com http://www.cloudninegifts.com\n> http://www.meanstreamradio.com http://www.unknown-artists.com\n> ==========================================================================\n> \n> \n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n> \n> http://archives.postgresql.org\n> \n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Thu, 15 Aug 2002 13:44:35 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: failure notice (fwd)"
},
{
"msg_contents": "Vince Vielhaber <vev@michvhf.com> writes:\n> Who the hell are these people and why can't they configure their\n> own MTA?\n\n>> Hi. This is the qmail-send program at ic.kharkov.ua.\n>> I'm afraid I wasn't able to deliver your message to the following addresses.\n>> This is a permanent error; I've given up. Sorry it didn't work out.\n\n>> <tgl@sss.pgh.pa.us>:\n>> Connected to 192.204.191.242 but sender was rejected.\n>> Remote host said: 550 5.0.0 Go away, your mailserver is broken\n\nOh my. I started blocking them about two hours ago after the first\ndozen or so duplicate copies of messages came through here. It didn't\noccur to me that I might be making the problem worse for other victims :-(.\nSorry about that.\n\nMarc, would you please kill whoever-it-is-at-kharkov.ua from the mailing\nlists, pronto?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 15 Aug 2002 14:19:17 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: failure notice (fwd) "
},
{
"msg_contents": "\nall gone ...\n\nOn Thu, 15 Aug 2002, Vince Vielhaber wrote:\n\n>\n> Who the hell are these people and why can't they configure their\n> own MTA?\n>\n> Vince.\n> --\n> ==========================================================================\n> Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n> 56K Nationwide Dialup from $16.00/mo at Pop4 Networking\n> http://www.camping-usa.com http://www.cloudninegifts.com\n> http://www.meanstreamradio.com http://www.unknown-artists.com\n> ==========================================================================\n>\n>\n>\n> ---------- Forwarded message ----------\n> Date: 15 Aug 2002 16:47:22 -0000\n> From: MAILER-DAEMON@ic.kharkov.ua\n> To: vev@michvhf.com\n> Subject: failure notice\n>\n> Hi. This is the qmail-send program at ic.kharkov.ua.\n> I'm afraid I wasn't able to deliver your message to the following addresses.\n> This is a permanent error; I've given up. Sorry it didn't work out.\n>\n> <tgl@sss.pgh.pa.us>:\n> Connected to 192.204.191.242 but sender was rejected.\n> Remote host said: 550 5.0.0 Go away, your mailserver is broken\n>\n> --- Below this line is a copy of the message.\n>\n> Return-Path: <vev@michvhf.com>\n> Received: (qmail 62268 invoked from network); 15 Aug 2002 16:46:47 -0000\n> Received: from dialup44.kharkov.ukrpack.net (HELO dual.shena.ic.kharkov.ua) (212.1.112.156)\n> by mail.ic.kharkov.ua with SMTP; 15 Aug 2002 16:46:47 -0000\n> Received: from dual.shena.ic.kharkov.ua (DUAL [172.16.200.1]) by dual.shena.ic.kharkov.ua with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0)\n> \tid Q926YA3A; Thu, 15 Aug 2002 19:46:07 +0300\n> Received: by dual.shena.ic.kharkov.ua (Microsoft Exchange Connector for POP3 Mailboxes 4.50.2113) with SMTP (Global POP3 Download)\n> \t id MSG08152002-194556-214.MMD@shena.ic.kharkov.ua; Thu, 15 Aug 2002 19:45:56 +0300\n> Return-Path: <pgsql-hackers-owner+M26848@postgresql.org>\n> Delivered-To: pop-users-shena@ic.kharkov.ua\n> Received: (qmail 61671 invoked by alias); 15 Aug 2002 16:39:03 -0000\n> Delivered-To: shena-shevtchenko@shena.ic.kharkov.ua\n> Received: (qmail 61668 invoked from network); 15 Aug 2002 16:39:03 -0000\n> Received: from postgresql.org (64.49.215.8)\n> by mail.ic.kharkov.ua with SMTP; 15 Aug 2002 16:39:03 -0000\n> Received: from localhost (postgresql.org [64.49.215.8])\n> \tby postgresql.org (Postfix) with ESMTP\n> \tid 419EF47654E; Thu, 15 Aug 2002 12:38:48 -0400 (EDT)\n> Received: from postgresql.org (postgresql.org [64.49.215.8])\n> \tby postgresql.org (Postfix) with SMTP\n> \tid A2668475F2D; Thu, 15 Aug 2002 12:38:47 -0400 (EDT)\n> Received: from localhost (postgresql.org [64.49.215.8])\n> \tby postgresql.org (Postfix) with ESMTP id EE137475974\n> \tfor <pgsql-hackers@postgresql.org>; Thu, 15 Aug 2002 12:38:44 -0400 (EDT)\n> Received: from paprika.michvhf.com (adsl-67-36-71-182.dsl.sfldmi.ameritech.net [67.36.71.182])\n> \tby postgresql.org (Postfix) with SMTP id DCB8947594D\n> \tfor <pgsql-hackers@postgresql.org>; Thu, 15 Aug 2002 12:38:43 -0400 (EDT)\n> Received: (qmail 55151 invoked by uid 1001); 15 Aug 2002 16:38:45 -0000\n> Date: Thu, 15 Aug 2002 12:38:45 -0400 (EDT)\n> From: Vince Vielhaber <vev@michvhf.com>\n> To: Bruce Momjian <pgman@candle.pha.pa.us>\n> Cc: Tom Lane <tgl@sss.pgh.pa.us>, Lamar Owen <lamar.owen@wgcr.org>,\n> \tPostgreSQL-development <pgsql-hackers@postgresql.org>\n> Subject: Re: [HACKERS] Open 7.3 items\n> In-Reply-To: <200208151616.g7FGGW500908@candle.pha.pa.us>\n> Message-ID: <Pine.BSF.4.40.0208151235180.52449-100000@paprika.michvhf.com>\n> MIME-Version: 1.0\n> Content-Type: TEXT/PLAIN; charset=US-ASCII\n> X-Virus-Scanned: by AMaViS new-20020517\n> Precedence: bulk\n> Sender: pgsql-hackers-owner@postgresql.org\n> X-Virus-Scanned: by AMaViS new-20020517\n>\n> On Thu, 15 Aug 2002, Bruce Momjian wrote:\n>\n> > Vince Vielhaber wrote:\n> > > On Thu, 15 Aug 2002, Bruce Momjian wrote:\n> > >\n> > > >\n> > > > OK, no one complained/commented on my idea of having global users have a\n> > > > trailing '@', so here is a patch that implements that. It has the\n> > > > advantages of:\n> > >\n> > > Probably because not everyone saw it. I know I didn't. This entire\n> > > issue is growing more and more complex. How about a configure item\n> > > to not even compile it in? Or better yet, a configure item to put\n> > > it there with the default off.\n> >\n> > I think I am prety close, and I don't see a configure flag as any better\n> > than a GUC option that is off by default.\n>\n> But how many people would even use it? I can't see adding the bloat\n> unnecessarily and risking it accidently being turned on. Am I wrong\n> and really alot of people actually want/need this?\n>\n> Vince.\n> --\n> ==========================================================================\n> Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n> 56K Nationwide Dialup from $16.00/mo at Pop4 Networking\n> http://www.camping-usa.com http://www.cloudninegifts.com\n> http://www.meanstreamradio.com http://www.unknown-artists.com\n> ==========================================================================\n>\n>\n>\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n>\n> http://archives.postgresql.org\n>\n>\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n>\n\n",
"msg_date": "Thu, 15 Aug 2002 16:03:31 -0300 (ADT)",
"msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>",
"msg_from_op": false,
"msg_subject": "Re: failure notice (fwd)"
}
] |
[
{
"msg_contents": "A couple of admin nice-to-have's based on the last few weeks of 24x7\noperation are:\n\nAllow DBA/Database Owner to log in even when max_connections has been\nreached so they can determine which queries are hung via\npg_stat_activity etc. and perform any other needed work to restore\nstability.\n\nLog offending query during DEBUG logging for syntax errors, missing\ntables/attributes, etc. so that the offending queries can be located in\nthe codebase.\n\n\n\nss\n\n\n\n\n",
"msg_date": "15 Aug 2002 13:53:56 -0600",
"msg_from": "Scott Shattuck <ss@technicalpursuit.com>",
"msg_from_op": true,
"msg_subject": "Admin nice-to-have's"
},
{
"msg_contents": "Scott Shattuck <ss@technicalpursuit.com> writes:\n> Allow DBA/Database Owner to log in even when max_connections has\n> been reached so they can determine which queries are hung via\n> pg_stat_activity etc. and perform any other needed work to restore\n> stability.\n\nAllowing the database owner to login seems definately wrong: it's not\nunusual for many of the normal database clients to run as the owner of\nthe database they operate on. So this would effectively disable the\nmax_connections limit in this situation.\n\nI don't see a major problem with allowing postgres to login if the\nconnection limit is hit (although I'm not sure it's worth the worry,\nwhen 'kill a backend executing SELECT ; psql template1 postgres' works\nas-is).\n\nCheers,\n\nNeil\n\n-- \nNeil Conway <neilconway@rogers.com>\nPGP Key ID: DB3C29FC\n\n",
"msg_date": "16 Aug 2002 00:50:39 -0400",
"msg_from": "Neil Conway <nconway@klamath.dyndns.org>",
"msg_from_op": false,
"msg_subject": "Re: Admin nice-to-have's"
},
{
"msg_contents": "Neil Conway wrote:\n> Scott Shattuck <ss@technicalpursuit.com> writes:\n> > Allow DBA/Database Owner to log in even when max_connections has\n> > been reached so they can determine which queries are hung via\n> > pg_stat_activity etc. and perform any other needed work to restore\n> > stability.\n> \n> Allowing the database owner to login seems definately wrong: it's not\n> unusual for many of the normal database clients to run as the owner of\n> the database they operate on. So this would effectively disable the\n> max_connections limit in this situation.\n> \n> I don't see a major problem with allowing postgres to login if the\n> connection limit is hit (although I'm not sure it's worth the worry,\n> when 'kill a backend executing SELECT ; psql template1 postgres' works\n> as-is).\n\nYou would have to do it the unix kernel way when the PROC structure\nfills; it keeps the last slot open and only lets root use it. If this\nis desirable, I can add it to TODO.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 00:55:08 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Admin nice-to-have's"
},
{
"msg_contents": "Neil Conway <nconway@klamath.dyndns.org> writes:\n> I don't see a major problem with allowing postgres to login if the\n> connection limit is hit (although I'm not sure it's worth the worry,\n> when 'kill a backend executing SELECT ; psql template1 postgres' works\n> as-is).\n\nmax_connections is a hard limit; you do not have the option of letting\npeople in anyway, because there'll be no PROC slot for them.\n\nWe could consider establishing a \"soft\" connection limit that's somewhat\nless than max_connections, and allowing non-superusers to log in only\nif the soft limit hasn't been exceeded. This does not guarantee that\nsuperusers can always get in: the extra slots might have been filled by\nother superuser connections. But it'd give them better odds than the\nrabble.\n\nI tend to concur with Neil that the usefulness of such a feature is\ndubious. But OTOH such a practice has always existed for Unix disk\nspace --- maybe we should respect that precedent.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 09:35:26 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Admin nice-to-have's "
},
{
"msg_contents": "Tom Lane wrote:\n> Neil Conway <nconway@klamath.dyndns.org> writes:\n> > I don't see a major problem with allowing postgres to login if the\n> > connection limit is hit (although I'm not sure it's worth the worry,\n> > when 'kill a backend executing SELECT ; psql template1 postgres' works\n> > as-is).\n> \n> max_connections is a hard limit; you do not have the option of letting\n> people in anyway, because there'll be no PROC slot for them.\n> \n> We could consider establishing a \"soft\" connection limit that's somewhat\n> less than max_connections, and allowing non-superusers to log in only\n> if the soft limit hasn't been exceeded. This does not guarantee that\n> superusers can always get in: the extra slots might have been filled by\n> other superuser connections. But it'd give them better odds than the\n> rabble.\n> \n> I tend to concur with Neil that the usefulness of such a feature is\n> dubious. But OTOH such a practice has always existed for Unix disk\n> space --- maybe we should respect that precedent.\n\nYea, added to TODO:\n\n\t* Reserve last process slot for super-user if max_connections reached\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 11:12:40 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Admin nice-to-have's"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Tom Lane wrote:\n>> We could consider establishing a \"soft\" connection limit that's somewhat\n>> less than max_connections, and allowing non-superusers to log in only\n>> if the soft limit hasn't been exceeded. This does not guarantee that\n>> superusers can always get in: the extra slots might have been filled by\n>> other superuser connections. But it'd give them better odds than the\n>> rabble.\n\n> Yea, added to TODO:\n> \t* Reserve last process slot for super-user if max_connections reached\n\nI don't like phrasing it that way: if we are going to do this at all\nthen the number of reserved slots should be a configurable parameter.\nIf I were a DBA I'd want it to be at least two: figure one for a cron\njob (doing backups, periodic vacuums, etc) and one for emergency\ninteractive superuser access. It definitely seems like something that\ninstallations would have differing views about.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 12:27:12 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Admin nice-to-have's "
},
{
"msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > Tom Lane wrote:\n> >> We could consider establishing a \"soft\" connection limit that's somewhat\n> >> less than max_connections, and allowing non-superusers to log in only\n> >> if the soft limit hasn't been exceeded. This does not guarantee that\n> >> superusers can always get in: the extra slots might have been filled by\n> >> other superuser connections. But it'd give them better odds than the\n> >> rabble.\n> \n> > Yea, added to TODO:\n> > \t* Reserve last process slot for super-user if max_connections reached\n> \n> I don't like phrasing it that way: if we are going to do this at all\n> then the number of reserved slots should be a configurable parameter.\n> If I were a DBA I'd want it to be at least two: figure one for a cron\n> job (doing backups, periodic vacuums, etc) and one for emergency\n> interactive superuser access. It definitely seems like something that\n> installations would have differing views about.\n\nAdded \"few\":\n\n\t* Reserve last few process slots for super-user if\n\t max_connections reached\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 13:04:35 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Admin nice-to-have's"
},
{
"msg_contents": "Scott Shattuck wrote:\n> A couple of admin nice-to-have's based on the last few weeks of 24x7\n> operation are:\n> \n> Allow DBA/Database Owner to log in even when max_connections has been\n> reached so they can determine which queries are hung via\n> pg_stat_activity etc. and perform any other needed work to restore\n> stability.\n\nDone for 7.3.\n\n> Log offending query during DEBUG logging for syntax errors, missing\n> tables/attributes, etc. so that the offending queries can be located in\n> the codebase.\n\nProbably in 7.3.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Sun, 1 Sep 2002 21:15:09 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Admin nice-to-have's"
}
] |
[
{
"msg_contents": "I was just testing my product running on a 7.3 snapshot from a few days \nago. And I ran into the following change in behavior that I consider a \nbug. You can no long insert large values into a bigint column without a \ncast. Small values (in the int range work fine though).\n\nOn 7.3 I get:\n\nfiles=# create table test (cola bigint);\nCREATE\nfiles=# insert into test values (9999999999);\nERROR: column \"cola\" is of type 'bigint' but expression is of type \n'double precision'\n You will need to rewrite or cast the expression\n\nOn 7.2.1 this works correctly:\n\nfiles=# create table test (cola bigint);\nCREATE\nfiles=# insert into test values (9999999999);\nINSERT 108683 1\n\nthanks,\n--Barry\n\n\n",
"msg_date": "Thu, 15 Aug 2002 18:03:03 -0700",
"msg_from": "Barry Lind <barry@xythos.com>",
"msg_from_op": true,
"msg_subject": "Bug/Change in behavior for 7.3 vs 7.2.1"
},
{
"msg_contents": "Dang it...meant to mention that the other day when I was working on\nthose python patches. I had to place tick marks (single quote) around\nthe number and it was converted correctly.\n\ngcope=# insert into a values ( 9999999999 ) ;\nERROR: column \"a\" is of type 'bigint' but expression is of type 'double\nprecision'\n\tYou will need to rewrite or cast the expression\ngcope=# insert into a values ( '9999999999' ) ;\nINSERT 25115 1\n\nGreg\n\n\nOn Thu, 2002-08-15 at 20:03, Barry Lind wrote:\n> I was just testing my product running on a 7.3 snapshot from a few days \n> ago. And I ran into the following change in behavior that I consider a \n> bug. You can no long insert large values into a bigint column without a \n> cast. Small values (in the int range work fine though).\n> \n> On 7.3 I get:\n> \n> files=# create table test (cola bigint);\n> CREATE\n> files=# insert into test values (9999999999);\n> ERROR: column \"cola\" is of type 'bigint' but expression is of type \n> 'double precision'\n> You will need to rewrite or cast the expression\n> \n> On 7.2.1 this works correctly:\n> \n> files=# create table test (cola bigint);\n> CREATE\n> files=# insert into test values (9999999999);\n> INSERT 108683 1\n> \n> thanks,\n> --Barry\n> \n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 2: you can get off all lists at once with the unregister command\n> (send \"unregister YourEmailAddressHere\" to majordomo@postgresql.org)",
"msg_date": "15 Aug 2002 21:42:07 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: Bug/Change in behavior for 7.3 vs 7.2.1"
},
{
"msg_contents": "Barry Lind <barry@xythos.com> writes:\n> You can no long insert large values into a bigint column without a \n> cast.\n\nThis seems to be fallout from the move to tighten up implicit coercions\n(cf http://archives.postgresql.org/pgsql-hackers/2002-04/msg00528.php\nas well as lots of earlier discussions).\n\nI said right along that this topic needed more debate, but we haven't\ngotten back to looking at it. We have a number of other nasty behaviors\nin current sources that trace back to altering the set of available\ncoercions.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 01:42:02 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Bug/Change in behavior for 7.3 vs 7.2.1 "
},
{
"msg_contents": "Then shouldn't this appear on the \"Open 7.3 issues\" list that has been \ncirculating around? This seems like an open issue to me, that needs to \nbe addressed before 7.3 ships.\n\n--Barry\n\nTom Lane wrote:\n\n>Barry Lind <barry@xythos.com> writes:\n> \n>\n>>You can no long insert large values into a bigint column without a \n>>cast.\n>> \n>>\n>\n>This seems to be fallout from the move to tighten up implicit coercions\n>(cf http://archives.postgresql.org/pgsql-hackers/2002-04/msg00528.php\n>as well as lots of earlier discussions).\n>\n>I said right along that this topic needed more debate, but we haven't\n>gotten back to looking at it. We have a number of other nasty behaviors\n>in current sources that trace back to altering the set of available\n>coercions.\n>\n>\t\t\tregards, tom lane\n>\n> \n>\n\n\n",
"msg_date": "Fri, 16 Aug 2002 09:17:47 -0700",
"msg_from": "Barry Lind <barry@xythos.com>",
"msg_from_op": true,
"msg_subject": "Re: Bug/Change in behavior for 7.3 vs 7.2.1"
},
{
"msg_contents": "Barry Lind <barry@xythos.com> writes:\n> Then shouldn't this appear on the \"Open 7.3 issues\" list that has been \n> circulating around?\n\nIt does.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 12:55:52 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Bug/Change in behavior for 7.3 vs 7.2.1 "
},
{
"msg_contents": "\nIt is already there, I think:\n\n\tfix implicit type coercions that are worse\n\n---------------------------------------------------------------------------\n\nBarry Lind wrote:\n> Then shouldn't this appear on the \"Open 7.3 issues\" list that has been \n> circulating around? This seems like an open issue to me, that needs to \n> be addressed before 7.3 ships.\n> \n> --Barry\n> \n> Tom Lane wrote:\n> \n> >Barry Lind <barry@xythos.com> writes:\n> > \n> >\n> >>You can no long insert large values into a bigint column without a \n> >>cast.\n> >> \n> >>\n> >\n> >This seems to be fallout from the move to tighten up implicit coercions\n> >(cf http://archives.postgresql.org/pgsql-hackers/2002-04/msg00528.php\n> >as well as lots of earlier discussions).\n> >\n> >I said right along that this topic needed more debate, but we haven't\n> >gotten back to looking at it. We have a number of other nasty behaviors\n> >in current sources that trace back to altering the set of available\n> >coercions.\n> >\n> >\t\t\tregards, tom lane\n> >\n> > \n> >\n> \n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 13:05:37 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Bug/Change in behavior for 7.3 vs 7.2.1"
}
] |
[
{
"msg_contents": "Hi,\n\nI notice that the new default for the contrib Makefiles is to build\nlibfti.so, etc. instead of the old fti.so. Won't this cause dump restore\nproblems for everyone already using the contrib? Anyone mind if I change it\nto use MODULES instead of MODULE_big for backwards compatibility?\n\nChris\n\n",
"msg_date": "Fri, 16 Aug 2002 11:02:47 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "more fulltextindex stuff"
},
{
"msg_contents": "Christopher Kings-Lynne writes:\n\n> I notice that the new default for the contrib Makefiles is to build\n> libfti.so, etc. instead of the old fti.so.\n\nThe default is to build nothing ... (?)\n\n> Won't this cause dump restore problems for everyone already using the\n> contrib?\n\nNo, because what is build is not what is installed.\n\n> Anyone mind if I change it to use MODULES instead of MODULE_big for\n> backwards compatibility?\n\nMODULES_big can only build one shared object per directory but it can\ncontain several object files. That is the tradeoff.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Sat, 17 Aug 2002 17:49:00 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: more fulltextindex stuff"
}
] |
[
{
"msg_contents": "Hello, I'm playing with creating an auto vacuum daemon, but it is my first \ntime inside the pg source code and I'm a bit lost.\n\nI have gotten as far as having a vacuum daemon created on postmaster startup. \nIt's just a fork from the postmaster, cribbed mostly from the stat collector \ncode. \n\nInside the main loop of the autovac daemon, I am trying to call vacuum() but I \nget the following error: \nFATAL: VACUUM cannot be executed from a function\n\nI don't understand why it thinks I'm in a function, I believe the error is \nbeing generated by this is vacuum.c:\n\n\t/* Running VACUUM from a function would free the function context */\n\tif (vacstmt->vacuum && !MemoryContextContains(QueryContext, vacstmt))\n\t\telog(ERROR, \"%s cannot be executed from a function\", stmttype);\n\nSo, I assume it has something to do with the memory context that I'm in when I \ncall the vacuum command, so I have been playing with switching contexts and \nsuch, but I have had no luck, obviously I don't really know what is going on \nhere.\n\nThe code snippet that is actually calling the vacuum looks like this:\n{\n\tVacuumStmt *n = makeNode(VacuumStmt);\n\tn->vacuum = true;\n\tn->analyze = false;\n\tn->full = false;\n\tn->freeze = false;\n\tn->verbose = false;\n\tn->relation = NULL;\n\tn->va_cols = NIL;\n\tvacuum(n);\t\t\t\n}\n\nAny help would be greatly appreciated.\n\nThanks,\n\nMatt\n",
"msg_date": "Fri, 16 Aug 2002 00:02:02 -0400",
"msg_from": "\"Matthew T. O'Connor\" <matthew@zeut.net>",
"msg_from_op": true,
"msg_subject": "Coding help"
},
{
"msg_contents": "\"Matthew T. O'Connor\" <matthew@zeut.net> writes:\n> I have gotten as far as having a vacuum daemon created on postmaster startup.\n> It's just a fork from the postmaster, cribbed mostly from the stat collector \n> code. \n\nThis will not get you very far, because the stat collector is not a real\nbackend. The checkpointer process might be a better example, but it's\nnot quite a real backend either. You need to be a real backend to\naccess shared buffers, locking, etc.\n\n> I don't understand why it thinks I'm in a function,\n\nBecause CurrentMemoryContext is not QueryContext (presumably you never\nset QueryContext at all). This is a pretty cheesy test but I can't\nthink of a better one offhand...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 01:50:21 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Coding help "
},
{
"msg_contents": "\"Matthew T. O'Connor\" wrote:\n> \n> Hello, I'm playing with creating an auto vacuum daemon, but it is my first\n> time inside the pg source code and I'm a bit lost.\n> \n> I have gotten as far as having a vacuum daemon created on postmaster startup.\n> It's just a fork from the postmaster, cribbed mostly from the stat collector\n> code.\n\nI recall that there has been discussion and so far the conclusion that\nan automatic vacuum daemon is not the solution everyone needs. If you\nreally want to spend the effort on doing this, can we please see some\nproposal about possible configuration options, how the daemon decides\nwhat to vacuum when and the like?\n\n\nJan\n\n-- \n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n",
"msg_date": "Fri, 16 Aug 2002 10:10:05 -0400",
"msg_from": "Jan Wieck <JanWieck@Yahoo.com>",
"msg_from_op": false,
"msg_subject": "Re: Coding help"
},
{
"msg_contents": "Absolutely, I have been looking into this and I have some thoughts, but right \nnow all I was trying to do was some rough implementations just to help me \nmake sure I understand all / most of the issues. I am very new to hacking on \nthe guts of the backend. \n\nI plan on posting a formal proposal when I feel more confident as to what I'm \ntalking about.\n\nOn Friday 16 August 2002 10:10 am, Jan Wieck wrote:\n> \"Matthew T. O'Connor\" wrote:\n> > Hello, I'm playing with creating an auto vacuum daemon, but it is my\n> > first time inside the pg source code and I'm a bit lost.\n> >\n> > I have gotten as far as having a vacuum daemon created on postmaster\n> > startup. It's just a fork from the postmaster, cribbed mostly from the\n> > stat collector code.\n>\n> I recall that there has been discussion and so far the conclusion that\n> an automatic vacuum daemon is not the solution everyone needs. If you\n> really want to spend the effort on doing this, can we please see some\n> proposal about possible configuration options, how the daemon decides\n> what to vacuum when and the like?\n>\n>\n> Jan\n\n",
"msg_date": "Fri, 16 Aug 2002 11:25:28 -0400",
"msg_from": "\"Matthew T. O'Connor\" <matthew@zeut.net>",
"msg_from_op": true,
"msg_subject": "Re: Coding help"
}
] |
[
{
"msg_contents": "Hi everyone,\n\nIt's taken some real time and effort to get this list together, but many\ngood people and many good companies have decided to stand up and show\noff that they use PostgreSQL for *serious* projects. For some, it's\neven Mission Critical.\n\nTo compliment this, PostgreSQL Inc. is now offering support contracts up\nto and including 24/7 with worldwide coverage.\n\nhttp://techdocs.postgresql.org/techdocs/supportcontracts.php\n\nFor an idea of how big these companies are, here are a few of the\nbiggest:\n\nAffymetrix - A market leader in the creation of state-of-the-art tools\nfor the genetic research industry, uses PostgreSQL in their\nTranscriptome Project to store data about large-scale RNA expression\nexperiments derived from high-density GeneChip� microarrays.\n\nAfilias - A global provider of domain name registry services, currently\nmanaging the first new generic extension launched on the Internet,\n.INFO.��This Ireland-based company manages over 900,000 domain names and\nover 10 million records in its PostgreSQL-backed database.\n\nBASF - The worlds largest chemical company, uses PostgreSQL to store the\ndata for their U.S. Agribusiness E-Commerce website.\n\nCognitivity - The online e-Learning provider uses PostgreSQL as the\npreferred database for their presentation and management software.\n\nJournyx - The acknowledged world-wide leader in web based time and\nexpense tracking, with over 1 million end users.��They use PostgreSQL\nfor all their internal database operations across all unix versions\n(Linux, BSD, AIX, Solaris, with MacOS X arriving shortly).\n\nRoyal - The modern Royal Typewriter company, their online e-Commerce\nwebsite stores everything using PostgreSQL.\n\nThe American Chemical Society - The largest professional organization of\nChemists in the world, with over 165,000 members, and a website that\nreceives more than 12 million visits every day. Their Journal Archive\nstores 125 years of full publications (2.5 million pages, more than 1\nterabyte of data) using PostgreSQL.\n\nTsutaya - Japan's largest video rental chain, uses PostgreSQL for a\nmulti-gigabyte, billion-record-plus business information database.\n\nI'm pretty sure everyone will appreciate the significance of these\ncompanies showing their support.\n\n:-)\n\nRegards and best wishes,\n\nJustin Clift\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n",
"msg_date": "Fri, 16 Aug 2002 14:16:12 +1000",
"msg_from": "Justin Clift <justin@postgresql.org>",
"msg_from_op": true,
"msg_subject": "Finally, a list of *big* companies using PostgreSQL for *serious*\n\tprojects. Why use PostgreSQL? Here's why."
},
{
"msg_contents": "> It's taken some real time and effort to get this list together, but many\n> good people and many good companies have decided to stand up and show\n> off that they use PostgreSQL for *serious* projects. For some, it's\n> even Mission Critical.\n\nErm, Cisco uses PostgreSQL as an embedded database in equipment. Not\nwidely known, but under some IOS products, it's PostgreSQL doing the\ndata storage and not Oracle.\n\nhttp://www-search.cisco.com/pcgi-bin/search/public.pl?q=postgresql&searchselector=0&num=10&sa=Search\n\nhttp://www.cisco.com/univercd/cc/td/doc/product/rtrmgmt/chse/1105/1_3/install/appl_cli.htm\n\n(search for PostgreSQL)\n\n-sc\n\n-- \nSean Chittenden\n",
"msg_date": "Thu, 15 Aug 2002 21:35:17 -0700",
"msg_from": "Sean Chittenden <sean@chittenden.org>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Finally,\n\ta list of *big* companies using PostgreSQL for *serious* projects.\n\tWhy use PostgreSQL? Here's why."
}
] |
[
{
"msg_contents": "I'm running Red Hat 7.3 at home. For the fun of it, I put:\n #define NO_MKTIME_BEFORE_1970\n\ninto /src/include/port/linux.h and then did:\nmake clean\nmake all\nmake install\ninitdb\nmake installcheck\n\nBut I'm still getting the < 1970 regression test failures. What else do \nI need to do?\n\nJoe\n\n",
"msg_date": "Thu, 15 Aug 2002 21:44:53 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": true,
"msg_subject": "where to put NO_MKTIME_BEFORE_1970?"
},
{
"msg_contents": "Joe Conway <mail@joeconway.com> writes:\n> I'm running Red Hat 7.3 at home. For the fun of it, I put:\n> #define NO_MKTIME_BEFORE_1970\n> But I'm still getting the < 1970 regression test failures. What else do \n> I need to do?\n\nI'd assume you need to select different regression comparison file(s)\nin src/test/regress/resultmap - probably horology-no-DST-before-1970.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 09:26:12 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: where to put NO_MKTIME_BEFORE_1970? "
},
{
"msg_contents": "Tom Lane wrote:\n> Joe Conway <mail@joeconway.com> writes:\n> \n>>I'm running Red Hat 7.3 at home. For the fun of it, I put:\n>> #define NO_MKTIME_BEFORE_1970\n>>But I'm still getting the < 1970 regression test failures. What else do \n>>I need to do?\n> \n> \n> I'd assume you need to select different regression comparison file(s)\n> in src/test/regress/resultmap - probably horology-no-DST-before-1970.\n> \n\n<slaps head>I guess that makes perfect sense!\n\nIs /src/include/port/linux.h the correct place to put this or should \nsomething more specific to Red Hat 7.3 be used (and if so, any ideas \nabout how to detect that Red Hat 7.3 is being used)?\n\nThanks,\n\nJoe\n\n",
"msg_date": "Fri, 16 Aug 2002 08:35:12 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": true,
"msg_subject": "Re: where to put NO_MKTIME_BEFORE_1970?"
},
{
"msg_contents": "Joe Conway <mail@joeconway.com> writes:\n> Is /src/include/port/linux.h the correct place to put this or should \n> something more specific to Red Hat 7.3 be used (and if so, any ideas \n> about how to detect that Red Hat 7.3 is being used)?\n\nReally what we need is a test on the glibc version, which seems a\nbit difficult. I am half inclined to put in a configure test that\nactually checks whether mktime will work on pre-1970 dates ... but\nI dunno if Peter will hold still for that. In any case we don't\ncurrently have a mechanism for reflecting whatever configure would\ndiscover into the resultmap.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 12:40:02 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: where to put NO_MKTIME_BEFORE_1970? "
},
{
"msg_contents": "Tom Lane writes:\n\n> Really what we need is a test on the glibc version, which seems a\n> bit difficult.\n\nWell, it's not that difficult to figure out the version (run\n/lib/libc.so.6), but I'm afraid the version is not going to tell you\nanything. For instance, the libc versions that are claimed to have the\nproblem in Red Hat releases don't appear to have that problem here.\n\n> In any case we don't currently have a mechanism for reflecting whatever\n> configure would discover into the resultmap.\n\nThat would appear to be very tricky. Maybe we need to misappropriate the\nalternate result file mechanism that was intended for the locale\ndifferences.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Sat, 17 Aug 2002 17:50:58 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: where to put NO_MKTIME_BEFORE_1970? "
}
] |
[
{
"msg_contents": "\nI have added the names of the people who have the power to complete each\nitem. It may not be the original author.\n\n---------------------------------------------------------------------------\n\n P O S T G R E S Q L\n\n 7 . 3 O P E N I T E M S\n\n\nCurrent at ftp://candle.pha.pa.us/pub/postgresql/open_items.\n\nSource Code Changes\n-------------------\nPoint-in-time recovery - status? (J.R., Richard)\nAllow easy display of usernames in a group (pg_hba.conf uses groups now)\nReindex/btree shrinkage - does reindex need work, can btree be shrunk?\ndisplay locks - ready? (Bruce)\nPrepared statements - ready? (Tom)\nSchema handling - ready? interfaces? client apps?\necpg and bison issues - solved? (Michael)\nimprove macros in new tuple header code (Manfred)\nhave pg_dumpall dump out db privilege and per-user/db settings\nfix BeOS and QNX4 ports\nfix implicit type coercions that are worse\nintegrate or remove new libpqxx\nintegrate or add to gborg Pg:DBD\nhandle lack of secondary passwords (Bruce)\nmove pg_resetxlog and pg_controldata to main tree, add -f flag (Bruce)\nAllow PL/PgSQL functions to return sets (Neil)\nAgree on PGXLOG/-X handling (Thomas)\n\nDocumentation Changes\n---------------------\nMention foreign keys and SERIAL dependencies will not be in 7.2 loaded tables\nDocument need to add permissions to loaded functions and languages\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 01:05:07 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Open 7.3 items, with names"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Reindex/btree shrinkage - does reindex need work, can btree be shrunk?\n\nI think there is zero probability that anything will be finished on this\nin the next two weeks, considering that (a) no one is working on it,\nand (b) it's not a small task. Push it back to TODO.\n\n> Schema handling - ready? interfaces? client apps?\n\nYou can put my name on this for backend, psql, and pg_dump issues. I am\nnot sure what needs to be done in the other client-side code.\n\n> improve macros in new tuple header code (Manfred)\n\nSince I was the one griping, not Manfred, it's probably my job to fix\nthis.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 10:19:45 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 items, with names "
},
{
"msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > Reindex/btree shrinkage - does reindex need work, can btree be shrunk?\n> \n> I think there is zero probability that anything will be finished on this\n> in the next two weeks, considering that (a) no one is working on it,\n> and (b) it's not a small task. Push it back to TODO.\n\nDone. Also, we do now have contrib/reindexdb, so it is there for people\nto use until we get it fixed. That is a step forward, and it is\na documented problem in 7.3 too.\n\n\n> > Schema handling - ready? interfaces? client apps?\n> \n> You can put my name on this for backend, psql, and pg_dump issues. I am\n> not sure what needs to be done in the other client-side code.\n\nI am worried about the other stuff. I just added \"DROP COLUMN\" to the\nopen items list to make sure that is dealt with too.\n\n> > improve macros in new tuple header code (Manfred)\n> \n> Since I was the one griping, not Manfred, it's probably my job to fix\n> this.\n\nOK, but I thought Manfred was going to address this when he got back\nfrom vacation, but he is back now. I assume you are saying that he\nisn't quite sure what you want and that you will have to do it. OK.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 11:20:34 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 items, with names"
},
{
"msg_contents": "On Fri, 16 Aug 2002 01:05:07 -0400 (EDT), Bruce Momjian\n<pgman@candle.pha.pa.us> wrote:\n>\n> P O S T G R E S Q L\n>\n> 7 . 3 O P E N I T E M S\n>\n>improve macros in new tuple header code (Manfred)\n\nISTM there's no consensus about what \"improve\" means. I tried to\nstart discussing this after my vacation, but apparently people had\nbetter things to do.\n\nOn Wed, 07 Aug 2002 16:16:14 +0200, I wrote (\"Heap tuple header\nissues\"):\n:. Transaction and command ids, performance\n:\n:I offered to provide cheaper versions of GetCmin and GetCmax to be\n:used by the tqual routines. These version would reduce additional CPU\n:work from two infomask compares to one. Is this still considered an\n:issue?\n\nHowever, I don't think this would lead to any measurable difference.\n\n:. Transaction and command ids, robustness\n:\n:I'm still of the opinion that putting *more* knowledge into the SetXxx\n:macros is the way to go. The runaway INSERT bug could as well have\n:been fixed by changing SetCmax to do nothing, if HEAP_XMAX_INVALID is\n:set, and changing SetXmaxInvalid to set HEAP_XMAX_INVALID. Likewise I\n:would change SetXmax to set HEAP_XMAX_INVALID, if xid ==\n:InvalidTransactionId, or reset it, if != (not sure about this). Same\n:for SetXminInvalid and SetXmin.\n\nThis is the main point of disagreement: Tom Lane wants lighter\nmacros, I want heavier macros. Which direction shall we go?\n\n:Further, I'll try to build a regression test using statement timeout\n:to detect runaway INSERT/UPDATE (the so called \"halloween\" problem).\n\nThis won't hurt anyway. I'll start working on this.\n\nBTW, my changes have been criticized with words like \"vague unease\",\n\"zero confidence\", \"very obviously not robust\", \"do not trust the\ncurrent code at all\" etc., while from day one all my patches have\npassed all regression tests. This makes me wonder whether there is\nsomething wrong with the regression tests ...\n\n:. Oids\n:\n:I was a bit surprised that these patches went in so smoothly, must be\n:due to the fact that there was a lot of work to do at that time.\n:Personnally I feel that these changes are more dangerous than the\n:Xmin/Cid/Xmax patches; and I ask the hackers to review especially\n:part 2, which contains changes to the executor and even to bootstrap.\n\n:. Oids, t_infomask\n:\n:There has been no comment from a tool developer.\n\n:. Oids, heap_getsysattr\n:\n:We thought that a TupleDesc parameter would have to be added for this\n:function. However, tests showed that heap_getsysattr is not called to\n:get the oid, when the tuple doesn't have an oid: \"ERROR: Attribute\n:'oid' not found\".\n\n:. Oids, micro tuning\n:\n:There are a few places, where storing an oid in a local variable might\n:be a little faster than fetching it several times from a heap tuple\n:header.\n\nHowever, I don't think this would lead to any measurable difference.\n\n:. Overall performance\n:\n:If Joe Conway can be talked into running OSDB benchmarks with old and\n:new heap tuple header format, I'll provide patches and instructions to\n:easily switch between versions. Or, Joe, can you tell me, what I need\n:to have and need to do to set up a benchmarking environment?\n\nWith Joe's help (thanks again, Joe) I've managed to setup a\nbenchmarking environment and I am continuously testing different\nconfigurations for a week now. There are issues with OSDB which I\nplan to bring up later when things cool down, but a first anawhat\nseems to show that with the reduced heap tuple header size we get a\nspeed improvement of up to 3%, especially when the database is\nsignificantly larger than system memory. When the database size is\nonly a small fraction of available memory, results vary so widely that\nI cannot tell whether the new heap tuple macros are a loss or a win.\n\n:\n:. CVS\n:\n:There have been a lot of \"CVS broken\" messages in the past few days.\n:When I tried\n: cvs -z3 log heapam.c\n:I got\n:| cvs server: failed to create lock directory for `/projects/cvsroot/pgsql/src/backend/access/heap' (/projects/cvsroot/pgsql/src/backend/access/heap/#cvs.lock): No such file or directory\n:| cvs server: failed to obtain dir lock in repository `/projects/cvsroot/pgsql/src/backend/access/heap'\n:| cvs [server aborted]: read lock failed - giving up\n:\n:Is this a temporary problem or did a miss any planned changes?\n\nAFAIK I have to re-checkout everything.\n\nServus\n Manfred\n",
"msg_date": "Fri, 16 Aug 2002 17:58:50 +0200",
"msg_from": "Manfred Koizar <mkoi-pg@aon.at>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 items: heap tuple header"
},
{
"msg_contents": "Manfred Koizar wrote:\n> On Fri, 16 Aug 2002 01:05:07 -0400 (EDT), Bruce Momjian\n> <pgman@candle.pha.pa.us> wrote:\n> >\n> > P O S T G R E S Q L\n> >\n> > 7 . 3 O P E N I T E M S\n> >\n> >improve macros in new tuple header code (Manfred)\n> \n> ISTM there's no consensus about what \"improve\" means. I tried to\n> start discussing this after my vacation, but apparently people had\n> better things to do.\n\nOK.\n\n> On Wed, 07 Aug 2002 16:16:14 +0200, I wrote (\"Heap tuple header\n> issues\"):\n> :. Transaction and command ids, performance\n> :\n> :I offered to provide cheaper versions of GetCmin and GetCmax to be\n> :used by the tqual routines. These version would reduce additional CPU\n> :work from two infomask compares to one. Is this still considered an\n> :issue?\n> \n> However, I don't think this would lead to any measurable difference.\n\nYep.\n\n> :. Transaction and command ids, robustness\n> :\n> :I'm still of the opinion that putting *more* knowledge into the SetXxx\n> :macros is the way to go. The runaway INSERT bug could as well have\n> :been fixed by changing SetCmax to do nothing, if HEAP_XMAX_INVALID is\n> :set, and changing SetXmaxInvalid to set HEAP_XMAX_INVALID. Likewise I\n> :would change SetXmax to set HEAP_XMAX_INVALID, if xid ==\n> :InvalidTransactionId, or reset it, if != (not sure about this). Same\n> :for SetXminInvalid and SetXmin.\n> \n> This is the main point of disagreement: Tom Lane wants lighter\n> macros, I want heavier macros. Which direction shall we go?\n\nCould you or Tom explain that in a way that others could understand.\n\nMy guess is that you want the sanity checks in the macros, and Tom wants\nmore of them in the main code?\n\n> :Further, I'll try to build a regression test using statement timeout\n> :to detect runaway INSERT/UPDATE (the so called \"halloween\" problem).\n> \n> This won't hurt anyway. I'll start working on this.\n> \n> BTW, my changes have been criticized with words like \"vague unease\",\n> \"zero confidence\", \"very obviously not robust\", \"do not trust the\n> current code at all\" etc., while from day one all my patches have\n> passed all regression tests.\n\nI totally agree with you here. You code has been great, and it did\nsomething (reduce tuple size) that no one else thought possible.\n\n> This makes me wonder whether there is\n> something wrong with the regression tests ...\n\nHowever, I should add that the regression tests test only a small subset\nof how the database has to operate. There are so many bizarre\nconditions that we can't test them all.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 12:25:37 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: Open 7.3 items: heap tuple header"
},
{
"msg_contents": "On Fri, 16 Aug 2002 12:25:37 -0400 (EDT), Bruce Momjian\n<pgman@candle.pha.pa.us> wrote:\n>Manfred Koizar wrote:\n>> This is the main point of disagreement: Tom Lane wants lighter\n>> macros, I want heavier macros. Which direction shall we go?\n>\n>Could you or Tom explain that in a way that others could understand.\n\nI'm not sure we understand each other :-)\n\n>My guess is that you want the sanity checks in the macros, and Tom wants\n>more of them in the main code?\n\nI guess we agree on having the sanity checks in the macros. It's more\non what the macros are allowed to change and what decisions they are\nallowed to take. Do the following quotes make it clearer?\n\n:On Sat, 20 Jul 2002 16:27:14 -0400, Tom Lane <tgl@sss.pgh.pa.us>\n:wrote:\n:>I'd recommend redesigning the HeapTupleHeaderSet macros so that they\n:>do not do any setting of t_infomask bits, or even take any conditional\n:>action based on them,\n\nto which I replied on Sun, 21 Jul 2002 23:00:22 +0200:\n:The HEAP_XMIN_IS_XMAX bit is exclusively managed by these macros.\n:Pulling the handling of this bit out of the macros and spreading it to\n:the places, where the macros are used, cannot make the whole thing\n:more robust. This would mean, the caller had to decide whether to\n:store Cmax into t_cid or t_xmax...\n\nTom:\n:> but solely Assert() that the bits are already\n:>in the appropriate state to allow storing of the value to be stored.\n:>Then, all uses have to be checked to ensure that t_infomask is coerced\n:>into the right state *before* doing HeapTupleHeaderSetFoo.\n\nme:\n:Apart from HEAP_XMIN_IS_XMAX this was my intention; we already do\n:this with HEAP_MOVED. I could add an assertion to SetCmax:\n:\tAssert(!((tup)->t_infomask & HEAP_XMAX_INVALID));\n:\n:OTOH I thought about putting *more* logic into the macros to make\n:their use less fragile. For example SetXmaxInvalid could set the\n:HEAP_XMAX_INVALID bit, likewise SetCminInvalid with XMIN_INVALID.\n\n>> BTW, my changes have been criticized with words like \"vague unease\",\n>> \"zero confidence\", \"very obviously not robust\", \"do not trust the\n>> current code at all\" etc., while from day one all my patches have\n>> passed all regression tests.\n>\n>I totally agree with you here. You code has been great, and it did\n>something (reduce tuple size) that no one else thought possible.\n\nThanks a lot! But I was not fishing for compliments, I was just\npreparing for the next sentence: There is something wrong with the\nregression tests. In fact \"vague unease\" more than once was a proper\ndescription for my own feelings when I posted a patch, because I\ndidn't know whether I could trust the tests. If core developers share\nthis unease, I find myself in good company.\n\n>> This makes me wonder whether there is\n>> something wrong with the regression tests ...\n>\n>However, I should add that the regression tests test only a small subset\n>of how the database has to operate.\n\nSo, please, could you add to TODO:\n\n * Add more regression tests\n\n>There are so many bizarre\n>conditions that we can't test them all.\n\nWhen Tom Lane recently posted a way to reproduce a bug (\"No one parent\ntuple was found\", CASE 1) I thought about how to add this case to the\nregression tests, but we have no vehicle for testing concurrent\ntransactions. TODO:\n\n * Build a test vehicle for concurrent transactions\n * Add even more regression tests\n\nServus\n Manfred\n",
"msg_date": "Sat, 17 Aug 2002 00:35:42 +0200",
"msg_from": "Manfred Koizar <mkoi-pg@aon.at>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 items: heap tuple header"
}
] |
[
{
"msg_contents": "Would it be useful to implement the SET SCHEMA command from SQL92? (I\nassume it's also in 99.)\n\nI guess that SET SCHEMA should change the front of the search path, so\nthat it would change the schema reported by current_schema(). It would\nbe a simplified form of SET SEARCH_PATH.\n \n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight, UK \nhttp://www.lfix.co.uk/oliver\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Praying always with all prayer and supplication in the\n Spirit, and watching thereunto with all perseverance \n and supplication for all saints.\" Ephesians 6:18\n\n",
"msg_date": "16 Aug 2002 06:38:00 +0100",
"msg_from": "Oliver Elphick <olly@lfix.co.uk>",
"msg_from_op": true,
"msg_subject": "SET SCHEMA?"
},
{
"msg_contents": "> Would it be useful to implement the SET SCHEMA command from SQL92? (I\n> assume it's also in 99.)\n>\n> I guess that SET SCHEMA should change the front of the search path, so\n> that it would change the schema reported by current_schema(). It would\n> be a simplified form of SET SEARCH_PATH.\n\nHrm - it would be sort of silly to launch an all-new standards-compliant\nschema support without it?\n\nChris\n\n",
"msg_date": "Fri, 16 Aug 2002 13:42:41 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: SET SCHEMA?"
},
{
"msg_contents": "\nCan someone explain where we are on this? Is it a TODO item?\n\n---------------------------------------------------------------------------\n\nChristopher Kings-Lynne wrote:\n> > Would it be useful to implement the SET SCHEMA command from SQL92? (I\n> > assume it's also in 99.)\n> >\n> > I guess that SET SCHEMA should change the front of the search path, so\n> > that it would change the schema reported by current_schema(). It would\n> > be a simplified form of SET SEARCH_PATH.\n> \n> Hrm - it would be sort of silly to launch an all-new standards-compliant\n> schema support without it?\n> \n> Chris\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 27 Aug 2002 15:25:23 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: SET SCHEMA?"
},
{
"msg_contents": "On Tue, 2002-08-27 at 20:25, Bruce Momjian wrote:\n> \n> Can someone explain where we are on this? Is it a TODO item?\n> \n\n> > > Would it be useful to implement the SET SCHEMA command from SQL92? (I\n> > > assume it's also in 99.)\n\nI think it should be.\n\n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight, UK \nhttp://www.lfix.co.uk/oliver\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"But the end of all things is at hand; be ye therefore \n sober, and watch unto prayer. And above all things \n have fervent love among yourselves; for love shall \n cover the multitude of sins.\" I Peter 4:7,8\n\n",
"msg_date": "27 Aug 2002 21:52:07 +0100",
"msg_from": "Oliver Elphick <olly@lfix.co.uk>",
"msg_from_op": true,
"msg_subject": "Re: SET SCHEMA?"
},
{
"msg_contents": "\nAdded:\n\n> o Add SET SCHEMA\n\n---------------------------------------------------------------------------\n\nOliver Elphick wrote:\n> On Tue, 2002-08-27 at 20:25, Bruce Momjian wrote:\n> > \n> > Can someone explain where we are on this? Is it a TODO item?\n> > \n> \n> > > > Would it be useful to implement the SET SCHEMA command from SQL92? (I\n> > > > assume it's also in 99.)\n> \n> I think it should be.\n> \n> -- \n> Oliver Elphick Oliver.Elphick@lfix.co.uk\n> Isle of Wight, UK \n> http://www.lfix.co.uk/oliver\n> GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n> ========================================\n> \"But the end of all things is at hand; be ye therefore \n> sober, and watch unto prayer. And above all things \n> have fervent love among yourselves; for love shall \n> cover the multitude of sins.\" I Peter 4:7,8\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 27 Aug 2002 17:16:31 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: SET SCHEMA?"
}
] |
[
{
"msg_contents": "\n> > It's nonlocal constraints that are the problem, and here foreign keys\n> > and UNIQUE constraints are certainly the canonical examples. Both of\n> > these would be largely solved with table-spanning indexes I think.\n> \n> Note that the other obvious way to solve this would be to store all of\n> the information inherited from the parent in the parent table, so that\n> you don't have to do anything special to make all of the constraints and\n> whatnot apply.\n\nSeems with above you are not able to constrain what qualifies for a supertable row,\nyou would only be able to specify constraints that apply to all it's subtables.\nTo me, the current implementation looks superior and more efficient.\n\nThe SQL inheritance is a class/subclass thing. \nAll tables have instances (==rows) that are not (by itself) related.\n(Even if they happen to share all attribute values with another row of a supertable.)\nIf you want that, then you need to resort to 3NF (or ROWREF's which iirc is another\nSQL99 feature).\n\nAndreas\n",
"msg_date": "Fri, 16 Aug 2002 10:19:54 +0200",
"msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>",
"msg_from_op": true,
"msg_subject": "Re: Inheritance "
},
{
"msg_contents": "On Fri, 16 Aug 2002, Zeugswetter Andreas SB SD wrote:\n\n> > Note that the other obvious way to solve this would be to store all of\n> > the information inherited from the parent in the parent table, so that\n> > you don't have to do anything special to make all of the constraints and\n> > whatnot apply.\n>\n> Seems with above you are not able to constrain what qualifies for a\n> supertable row, you would only be able to specify constraints that\n> apply to all it's subtables.\n\nYes, that's the whole point. If I have a constraint on a table, I think\nit should *never* be possible for that constraint to be violated. If a\nsubtable should not have constraint the supertable has, it shouldn't\ninherit from the supertable.\n\nTo do otherwise breaks the relational model.\n\n> The SQL inheritance is a class/subclass thing. All tables have\n> instances (==rows) that are not (by itself) related. (Even if\n> they happen to share all attribute values with another row of a\n> supertable.) If you want that, then you need to resort to 3NF (or\n> ROWREF's which iirc is another SQL99 feature).\n\nAs I understand it, SQL99 has the restriction that a row with the same\nprimary key appearing in a supertable and/or any of its subtables must\nbe the result of a single INSERT statement. Thus, SQL99 doesn't allow\nwhat you're saying, if I understand what you're saying. (I'm not sure\nthat I do.)\n\nAm I to take it that you think the inheritance should be inheritance\nof type information only? That is, if I have supertable A and\nsubtable A', inserting a row into A' does not make a row appear in\nA? If so, I've got not real problem with that at present, but it's\nnot what postgres currently does, nor would it conform to SQL99.\n\nWhat do others think of this idea?\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Sat, 17 Aug 2002 15:38:52 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance "
}
] |
[
{
"msg_contents": "Hi,\n\nI'm using the ltree module and located several problems, I think not all problems are really ltree related but might be a pg_dump/pg_restore problem.\n\nHere are the problems I've encountered:\n* pg_restore tries to create a table with ltree and ltree[] datatypes before the type itself is created, so it fails.\n* several functions are already defined in template1, so \"create database \" will restore these functions. pg_restore will try to restore those functions as well\n and fails. Maybe \"create or replace function\" can be used here? I'm willing to do this if it's ok.\n* I've gist indices on ltree[] columns, and when pg_restore tries to restore it it will report:\n pg_restore: [archiver (db)] could not execute query: ERROR: data type ltree[] has no default operator class for access method \"gist\"\n You must specify an operator class for the index or define a\n default operator class for the data type\n\n It seems those extra functions for index support are not restored. Removing the commit/end from ltree.sql and running it again (will report a lot of errors, but a few\n inserts as well) will make this work again. However it requires a lot of DBA assistance to restore.\n\nAll other problems are solvable by using \"pg_restore -L\" and using a modified archiv index, but IMO this should work out of the box.\n\nBest regards,\n\tMario Weilguni\n",
"msg_date": "Fri, 16 Aug 2002 11:50:57 +0200",
"msg_from": "Mario Weilguni <mweilguni@sime.com>",
"msg_from_op": true,
"msg_subject": "pg_restore and user defined types, several other pg_restore problems"
},
{
"msg_contents": "This is known problem with pg_dump.\nDon't remember if it's solved in 7.3\n\n\tRegards,\n\n\t\tOleg\nOn Fri, 16 Aug 2002, Mario Weilguni wrote:\n\n> Hi,\n>\n> I'm using the ltree module and located several problems, I think not all problems are really ltree related but might be a pg_dump/pg_restore problem.\n>\n> Here are the problems I've encountered:\n> * pg_restore tries to create a table with ltree and ltree[] datatypes before the type itself is created, so it fails.\n> * several functions are already defined in template1, so \"create database \" will restore these functions. pg_restore will try to restore those functions as well\n> and fails. Maybe \"create or replace function\" can be used here? I'm willing to do this if it's ok.\n> * I've gist indices on ltree[] columns, and when pg_restore tries to restore it it will report:\n> pg_restore: [archiver (db)] could not execute query: ERROR: data type ltree[] has no default operator class for access method \"gist\"\n> You must specify an operator class for the index or define a\n> default operator class for the data type\n>\n> It seems those extra functions for index support are not restored. Removing the commit/end from ltree.sql and running it again (will report a lot of errors, but a few\n> inserts as well) will make this work again. However it requires a lot of DBA assistance to restore.\n>\n> All other problems are solvable by using \"pg_restore -L\" and using a modified archiv index, but IMO this should work out of the box.\n>\n> Best regards,\n> \tMario Weilguni\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org\n>\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n",
"msg_date": "Fri, 16 Aug 2002 13:58:45 +0300 (GMT)",
"msg_from": "Oleg Bartunov <oleg@sai.msu.su>",
"msg_from_op": false,
"msg_subject": "Re: pg_restore and user defined types, several other"
},
{
"msg_contents": "Mario Weilguni <mweilguni@sime.com> writes:\n> Here are the problems I've encountered:\n> * pg_restore tries to create a table with ltree and ltree[] datatypes before the type itself is created, so it fails.\n\nOdd; what are the OIDs of the table and the datatypes?\n\n> * several functions are already defined in template1, so \"create database \" will restore these functions. pg_restore will try to restore those functions as well\n> and fails. Maybe \"create or replace function\" can be used here?\n\nNo. Use pg_restore per the documentation: make an empty database for it\nto restore into (by cloning template0 instead of template1).\n\n> pg_restore: [archiver (db)] could not execute query: ERROR: data type ltree[] has no default operator class for access method \"gist\"\n> You must specify an operator class for the index or define a\n> default operator class for the data type\n\nAre you using recent sources? As of two weeks or so ago, pg_dump should\nknow how to dump operator classes.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 09:51:52 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: pg_restore and user defined types,\n\tseveral other pg_restore problems"
},
{
"msg_contents": "Am Freitag, 16. August 2002 15:51 schrieben Sie:\n> Mario Weilguni <mweilguni@sime.com> writes:\n> > Here are the problems I've encountered:\n> > * pg_restore tries to create a table with ltree and ltree[] datatypes\n> > before the type itself is created, so it fails.\n>\n> Odd; what are the OIDs of the table and the datatypes?\n\nThe table has 20517267, and the datatype has 85286596. The type was introduced later on, and added with \n\"alter table add\". Maybe this is the problem?\n\n>\n> > * several functions are already defined in template1, so \"create database\n> > \" will restore these functions. pg_restore will try to restore those\n> > functions as well and fails. Maybe \"create or replace function\" can be\n> > used here?\n>\n> No. Use pg_restore per the documentation: make an empty database for it\n> to restore into (by cloning template0 instead of template1).\n\nOops, I did not know this. What happens if I use the -C switch of pg_restore?\nThe man page says:\n -C\n\n --create\n Create the database before restoring into it. (When this switch\n appears, the database named with -d is used only to issue the\n initial CREATE DATABASE command. All data is restored into the\n database name that appears in the archive.)\n\nBut does pg_restore use template0 or template1?\n\n>\n> > pg_restore: [archiver (db)] could not execute query: ERROR: data type\n> > ltree[] has no default operator class for access method \"gist\" You must\n> > specify an operator class for the index or define a default operator\n> > class for the data type\n>\n> Are you using recent sources? As of two weeks or so ago, pg_dump should\n> know how to dump operator classes.\n\nNo, I do not use 7.3cvs, this is version 7.2.1. But if this is fixed, it's not a problem for me,\nnow I know how to restore the database, and 7.3 should not be too far away :-)\n\nThanks!\n\nBest regards,\n\tMario Weilguni\n\n",
"msg_date": "Sat, 17 Aug 2002 08:51:35 +0200",
"msg_from": "Mario Weilguni <mweilguni@sime.com>",
"msg_from_op": true,
"msg_subject": "Re: pg_restore and user defined types,\n\tseveral other pg_restore problems"
}
] |
[
{
"msg_contents": "Is it possible for the cvs emails to include a URL to the appropriate\nentries in cvs web?\n\nThe below is current:\n\nModified files:\n src/backend/utils/adt: ruleutils.c\n\n\nIs this possible?\nModified files:\nhttp://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/adt/ruleutils.c\n\n\nOr perhaps have a LINKS section at the very bottom below the current\nmessages?\n\n",
"msg_date": "16 Aug 2002 17:44:50 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "CVS Messages"
},
{
"msg_contents": "Rod Taylor wrote:\n> Modified files:\n> src/backend/utils/adt: ruleutils.c\n> \n> \n> Is this possible?\n> Modified files:\n> http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/adt/ruleutils.c\n> \n\nI'd second that request! Great idea.\n\nJoe\n\n",
"msg_date": "Fri, 16 Aug 2002 14:59:36 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: CVS Messages"
},
{
"msg_contents": "It is certainly possibly. We have added that type of functionality to \nour inhouse CVS system. Below is an example. We include at the bottom \nof the checkin mail a link to the webcvs diff page so you can quickly \nsee what changed for a particular checkin.\n\n--Barry\n\nwfs checkin by barry 02/08/16 12:10:39\n\n Modified: com/.../sql/postgres SessionManagerBaseSql.java\n com/.../sql/mssql SessionManagerBaseSql.java\n com/.../sql/oracle SessionManagerBaseSql.java\n Log:\n port fix for bug 1605 from 3.3 to 4.0\n \n https://foo.bar.com/cgi-bin/viewcvs.cgi/wfs/com/.../sql/postgres/SessionManagerBaseSql.java.diff?r1=40.1&r2=40.2&diff_format=h\n https://foo.bar.com/cgi-bin/viewcvs.cgi/wfs/com/.../sql/mssql/SessionManagerBaseSql.java.diff?r1=40.0&r2=40.1&diff_format=h\n https://foo.bar.com/cgi-bin/viewcvs.cgi/wfs/com/.../sql/oracle/SessionManagerBaseSql.java.diff?r1=40.0&r2=40.1&diff_format=h\n\n\n\nRod Taylor wrote:\n\n>Is it possible for the cvs emails to include a URL to the appropriate\n>entries in cvs web?\n>\n>The below is current:\n>\n>Modified files:\n> src/backend/utils/adt: ruleutils.c\n>\n>\n>Is this possible?\n>Modified files:\n>http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/adt/ruleutils.c\n>\n>\n>Or perhaps have a LINKS section at the very bottom below the current\n>messages?\n>\n>\n>---------------------------(end of broadcast)---------------------------\n>TIP 4: Don't 'kill -9' the postmaster\n>\n> \n>\n\n\n",
"msg_date": "Fri, 16 Aug 2002 16:25:34 -0700",
"msg_from": "Barry Lind <barry@xythos.com>",
"msg_from_op": false,
"msg_subject": "Re: CVS Messages"
},
{
"msg_contents": "On Fri, Aug 16, 2002 at 05:44:50PM -0400, Rod Taylor wrote:\n> Is it possible for the cvs emails to include a URL to the appropriate\n> entries in cvs web?\n> \n> The below is current:\n> \n> Modified files:\n> src/backend/utils/adt: ruleutils.c\n\nIf you're using a Web browser with support for smart bookmarks, nicknames,\nand javascript: URLs, then you can define a bookmark as something like:\n\njavascript:re=/(:.)/;window.location=\"http://developer.postgresql.org/cvsweb.cgi/pgsql-server/\"+\"%s\".replace(re, \"/\")\n\nand then cut-and-paste the line from the email into your location field\nusing a nickname:\n\npgcvs src/backend/utils/adt: ruleutils.c\n\nand have it bring up the cvsweb page. Works with galeon; I guess other\nrecent browsers (Konqueror, Moz, IE?) can do something very similar if\nnot quite identical.\n\nRichard\n",
"msg_date": "Sat, 17 Aug 2002 23:56:38 +0100",
"msg_from": "Richard Poole <rp@guests.deus.net>",
"msg_from_op": false,
"msg_subject": "Re: CVS Messages"
}
] |
[
{
"msg_contents": "A recent change made XLogDir dynamically sized. There was a question of\nwhether this was a good idea since there are lots of other places that\nuse MAXPGPATH.\n\nI have now found that pg_resetxlog doesn't compile anymore because\nXLogDir is a char* now instead of a char[].\n\nShould I fix pg_resetxlog or revert the XLogDir change in the backend.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 18:06:27 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "XLogDir"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> A recent change made XLogDir dynamically sized. There was a question of\n> whether this was a good idea since there are lots of other places that\n> use MAXPGPATH.\n\n> I have now found that pg_resetxlog doesn't compile anymore because\n> XLogDir is a char* now instead of a char[].\n\n> Should I fix pg_resetxlog or revert the XLogDir change in the backend.\n\nRevert. The XLogDir change was incomplete and basically useless to\nstart with ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 16 Aug 2002 23:10:22 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: XLogDir "
},
{
"msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > A recent change made XLogDir dynamically sized. There was a question of\n> > whether this was a good idea since there are lots of other places that\n> > use MAXPGPATH.\n> \n> > I have now found that pg_resetxlog doesn't compile anymore because\n> > XLogDir is a char* now instead of a char[].\n> \n> > Should I fix pg_resetxlog or revert the XLogDir change in the backend.\n> \n> Revert. The XLogDir change was incomplete and basically useless to\n> start with ...\n\nYea, but it was tied into the PGXLOG commit. Thomas, what are we doing\nwith that?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Fri, 16 Aug 2002 23:55:43 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: XLogDir"
},
{
"msg_contents": "> > Revert. The XLogDir change was incomplete and basically useless to\n> > start with ...\n> Yea, but it was tied into the PGXLOG commit. Thomas, what are we doing\n> with that?\n\nWhy ask me?\n\n - Thomas\n",
"msg_date": "Mon, 19 Aug 2002 21:40:52 -0700",
"msg_from": "Thomas Lockhart <lockhart@fourpalms.org>",
"msg_from_op": false,
"msg_subject": "Re: XLogDir"
},
{
"msg_contents": "Thomas Lockhart wrote:\n> > > Revert. The XLogDir change was incomplete and basically useless to\n> > > start with ...\n> > Yea, but it was tied into the PGXLOG commit. Thomas, what are we doing\n> > with that?\n> \n> Why ask me?\n\nSorry, I mean XLOGDIR. Somehow I kept saying PGXLOG. Anyway, it is all\nout and we can re-add as needed.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 20 Aug 2002 00:44:21 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: XLogDir"
}
] |
[
{
"msg_contents": "\n From earlier postings it seems like there is no way to check that a temp \ntable exists; at the time Tom suggested schemas might solve the problem. I \nwas wondering if:\n\n (a) schema did solve the problem\nor\n (b) there was any chance of a backend function to get a temp table OID \n(or 0 is none), or a view, eg. pg_temporary_tables?\n\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n\n",
"msg_date": "Sat, 17 Aug 2002 13:09:02 +1000",
"msg_from": "Philip Warner <pjw@rhyme.com.au>",
"msg_from_op": true,
"msg_subject": "Temporary Table existence?"
}
] |
[
{
"msg_contents": "\nThis has been discussed before in the context of misunderstanding the \nmeaning of 'iscachable', but I now have a use for cached function results, \nand have seen at least one other posting with a similar need.\n\nThe reason I need it is that I have a few functions that do recursive \ninheritance lookups going up a converging inheritance tree. Typically this \nfunction will be called on several hundred objects in a single select \nstatement. Because of inheritance, it ends up with several thousand \nfunction calls, each of which is non-trivial.\n\nA solution that would be useful for me would be:\n\nIf a function is marked 'invariant' (or something similar), then\n\n- cache the most recently used 20 calls (config item) iff the args were \nless than 1K in total storage (ie. don't cache large text blocks),\n\n- calculate a very simple checksum on the args\n\n- when a function is to be evaluated, calc the checksum and if a match is \nfound, compare the args, and if they all match, return the result.\n\nI would anticipate deleting the cache when the current command exits, \nand/or certainly when a TX ends.\n\nObviously this is not a 7.3 item, but would people support such \nfunctionality going into a future version?\n\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n\n",
"msg_date": "Sat, 17 Aug 2002 13:18:02 +1000",
"msg_from": "Philip Warner <pjw@rhyme.com.au>",
"msg_from_op": true,
"msg_subject": "Function result cacheing"
},
{
"msg_contents": "Philip Warner <pjw@rhyme.com.au> writes:\n> Obviously this is not a 7.3 item, but would people support such \n> functionality going into a future version?\n\nActually, I wouldn't. I can think of very few situations where\nsuch caching is useful, and I don't believe that the mechanism required\nwould pay for itself. In the cases where a cache does make sense,\nit's sufficiently application-specific that a generic \"cache on a key\nconsisting of the function arguments\" isn't the right thing anyway;\nyou'll find you want some internal logic to decide what to cache and\nwhat key to use to retrieve it. Furthermore, a generic cache will have\nno clue whatever about cache-invalidating events, thus further\nrestricting its usefulness. (Your suggestion of \"flush at transaction\nend\" is too short-term for most applications, too long-term for some,\nand just right for hardly any.)\n\nBuild the cache internally to your function if you need it.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 17 Aug 2002 00:18:28 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Function result cacheing "
},
{
"msg_contents": "At 00:18 17/08/2002 -0400, Tom Lane wrote:\n>Philip Warner <pjw@rhyme.com.au> writes:\n> > Obviously this is not a 7.3 item, but would people support such\n> > functionality going into a future version?\n>\n>Actually, I wouldn't.\n\nThis forces application-based caches, which in turn need indexed local \ntemporary tables, and ideally the ability to either check if they exist, or \na CREATE...IF NOT EXISTS. And I'd guess the indexes would not be used, \nwhereas the 'checksum on args' model comes close to hash-index performance.\n\n\n>I can think of very few situations where\n>such caching is useful,\n\nAside, of course, from any external functions that for whatever reason are \nexpensive to execute, and which will be passwed the same args more than \nonce in a single SELECT. As well as any functions that do complex lookups \non reference data in the database; in short anything that only reads data \nand which does more than a simple lookup, and which gets the same args more \nthan once.\n\n\n> and I don't believe that the mechanism required\n>would pay for itself.\n\nIn what sense? The mechanism is close to cost-free if the flag is not set \non the function, and would presumably only be set by the definer if there \nwas likely to be a benefit. Coming from a database that supports such \nfunctions, I *know* they can help a great deal.\n\n\n>In the cases where a cache does make sense,\n>it's sufficiently application-specific that a generic \"cache on a key\n>consisting of the function arguments\" isn't the right thing anyway;\n\nNot for the the uses I have.\n\n\n>you'll find you want some internal logic to decide what to cache and\n>what key to use to retrieve it.\n\nNo, I don't. I am very happy with function parameters being used.\n\n\n> Furthermore, a generic cache will have\n>no clue whatever about cache-invalidating events, thus further\n>restricting its usefulness.\n\nThis is true, but mainly an argument for cacheing at the statement level; \nTX level cacheing seems like a bad idea. It's a matter for application \ndesign to ensure that when a developer marks a function as invariant, then \nthey mean it. If it really becomes a problem, then *maybe* we need an \napplication-level cache invalidation, but it seems very unlikely to be \na problem.\n\n> (Your suggestion of \"flush at transaction\n>end\" is too short-term for most applications, too long-term for some,\n>and just right for hardly any.)\n\nI actually suggested two options, and would personally prefer \nflush-at-statement-end.\n\n\n>Build the cache internally to your function if you need it.\n\nNot too keen on building cacheing code into 3 different functions just on \nthe one database; and doing the same on another which also would benefit.\n\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n\n",
"msg_date": "Sat, 17 Aug 2002 17:09:01 +1000",
"msg_from": "Philip Warner <pjw@rhyme.com.au>",
"msg_from_op": true,
"msg_subject": "Re: Function result cacheing "
}
] |
[
{
"msg_contents": "I can't find any TODO item that mentions fixing pg_dump's deficiencies\nconcerning choosing an order to dump the database objects in. The\nexisting method (basically, dump in OID order) tends to fail in\nsituations where you've used ALTER TABLE, and in any case it breaks down\ncompletely after OID wraparound.\n\nWhen using a 7.3 or later database, pg_dump could use the pg_depend\nentries to deduce a safe order for dumping objects. This will be a\nbig rewrite and I don't see it happening for 7.3, but I think it\nshould be on the TODO list.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 17 Aug 2002 11:02:44 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": true,
"msg_subject": "TODO item: make pg_dump use dependencies to choose dump order"
},
{
"msg_contents": "\nAdded:\n\n\t* Use dependency information to dump data in proper order\n\n---------------------------------------------------------------------------\n\nTom Lane wrote:\n> I can't find any TODO item that mentions fixing pg_dump's deficiencies\n> concerning choosing an order to dump the database objects in. The\n> existing method (basically, dump in OID order) tends to fail in\n> situations where you've used ALTER TABLE, and in any case it breaks down\n> completely after OID wraparound.\n> \n> When using a 7.3 or later database, pg_dump could use the pg_depend\n> entries to deduce a safe order for dumping objects. This will be a\n> big rewrite and I don't see it happening for 7.3, but I think it\n> should be on the TODO list.\n> \n> \t\t\tregards, tom lane\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Sat, 17 Aug 2002 11:08:36 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: TODO item: make pg_dump use dependencies to choose dump order"
}
] |
[
{
"msg_contents": "I get the following compiling the current CVS code with gcc 3.1:\n\n...\nfe-connect.c: In function `connectDBComplete':\nfe-connect.c:1081: warning: suggest parentheses around && within ||\nfe-connect.c:1086: warning: implicit declaration of function `gettimeofday'\n...\npg_controldata.c: In function `main':\npg_controldata.c:91: warning: `%c' yields only last 2 digits of year in some locales\npg_controldata.c:93: warning: `%c' yields only last 2 digits of year in some locales\n\nCheers,\n\nNeil\n\n-- \nNeil Conway <neilconway@rogers.com>\nPGP Key ID: DB3C29FC\n\n",
"msg_date": "17 Aug 2002 15:42:53 -0400",
"msg_from": "Neil Conway <nconway@klamath.dyndns.org>",
"msg_from_op": true,
"msg_subject": "compile warnings in CVS"
},
{
"msg_contents": "Neil Conway <nconway@klamath.dyndns.org> writes:\n> I get the following compiling the current CVS code with gcc 3.1:\n\nI also get 4 regression test failures, due to Gavin's improvements to\nthe parser error messages. AFAICT no actual problems, the expected\nerror message strings just needed to be updated.\n\nCheers,\n\nNeil\n\n-- \nNeil Conway <neilconway@rogers.com>\nPGP Key ID: DB3C29FC\n\n",
"msg_date": "17 Aug 2002 15:51:40 -0400",
"msg_from": "Neil Conway <nconway@klamath.dyndns.org>",
"msg_from_op": true,
"msg_subject": "Re: compile warnings in CVS"
},
{
"msg_contents": "Neil Conway <nconway@klamath.dyndns.org> writes:\n> pg_controldata.c: In function `main':\n> pg_controldata.c:91: warning: `%c' yields only last 2 digits of year in some locales\n> pg_controldata.c:93: warning: `%c' yields only last 2 digits of year in some locales\n\nYeah. I was willing to ignore that while pg_controldata was in contrib,\nbut it's much more annoying when it's in the main tree. Anyone know if\ngcc has a --not-quite-so-nannyish warnings mode?\n\nIMHO %c is a perfectly reasonable format choice --- the strftime man\npage defines it as\n %c Locale's appropriate date and time representation.\nWhile we could go over to some %Y-%M-etc-etc notation, that doesn't\nstrike me as a step forward. pg_controldata's output should be\nconveniently human-readable IMHO, and that means following local\nconventions.\n\nAnother alternative is\n\tchar *fmt = \"%c\";\n\t...\n\tstrftime(..., fmt, ...);\n\nwhich I think will probably defeat gcc's check (haven't tried it\nthough).\n\nDoes anyone want to argue that %c is actually a bad choice? I think\ngcc's just being unreasonable here, but maybe I'm missing something\n(and no, Y2K arguments won't change my mind).\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 17 Aug 2002 16:11:19 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: compile warnings in CVS "
},
{
"msg_contents": "OK, I have fixed the first two with the following patch. The second\npair Tom has commented on.\n\n---------------------------------------------------------------------------\n\nNeil Conway wrote:\n> I get the following compiling the current CVS code with gcc 3.1:\n> \n> ...\n> fe-connect.c: In function `connectDBComplete':\n> fe-connect.c:1081: warning: suggest parentheses around && within ||\n> fe-connect.c:1086: warning: implicit declaration of function `gettimeofday'\n> ...\n> pg_controldata.c: In function `main':\n> pg_controldata.c:91: warning: `%c' yields only last 2 digits of year in some locales\n> pg_controldata.c:93: warning: `%c' yields only last 2 digits of year in some locales\n> \n> Cheers,\n> \n> Neil\n> \n> -- \n> Neil Conway <neilconway@rogers.com>\n> PGP Key ID: DB3C29FC\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n\nIndex: src/interfaces/libpq/fe-connect.c\n===================================================================\nRCS file: /cvsroot/pgsql-server/src/interfaces/libpq/fe-connect.c,v\nretrieving revision 1.192\ndiff -c -r1.192 fe-connect.c\n*** src/interfaces/libpq/fe-connect.c\t17 Aug 2002 12:33:17 -0000\t1.192\n--- src/interfaces/libpq/fe-connect.c\t18 Aug 2002 00:04:07 -0000\n***************\n*** 19,24 ****\n--- 19,25 ----\n #include <fcntl.h>\n #include <errno.h>\n #include <ctype.h>\n+ #include <time.h>\n \n #include \"libpq-fe.h\"\n #include \"libpq-int.h\"\n***************\n*** 1078,1095 ****\n }\n \n \n! while (NULL == rp || remains.tv_sec > 0 || remains.tv_sec == 0 && remains.tv_usec > 0)\n {\n \t\t/*\n * If connecting timeout is set, get current time.\n */\n! if ( NULL != rp && -1 == gettimeofday(&start_time, NULL))\n {\n conn->status = CONNECTION_BAD;\n return 0;\n }\n \n! /*\n \t\t * Wait, if necessary.\tNote that the initial state (just after\n \t\t * PQconnectStart) is to wait for the socket to select for\n \t\t * writing.\n--- 1079,1096 ----\n }\n \n \n! while (rp == NULL || remains.tv_sec > 0 || (remains.tv_sec == 0 && remains.tv_usec > 0))\n {\n \t\t/*\n * If connecting timeout is set, get current time.\n */\n! if (rp != NULL && gettimeofday(&start_time, NULL) == -1)\n {\n conn->status = CONNECTION_BAD;\n return 0;\n }\n \n! /*\n \t\t * Wait, if necessary.\tNote that the initial state (just after\n \t\t * PQconnectStart) is to wait for the socket to select for\n \t\t * writing.",
"msg_date": "Sat, 17 Aug 2002 20:05:49 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: compile warnings in CVS"
},
{
"msg_contents": "\nYes, very nanny-ish. Not sure how to turn it off.\n\n---------------------------------------------------------------------------\n\nTom Lane wrote:\n> Neil Conway <nconway@klamath.dyndns.org> writes:\n> > pg_controldata.c: In function `main':\n> > pg_controldata.c:91: warning: `%c' yields only last 2 digits of year in some locales\n> > pg_controldata.c:93: warning: `%c' yields only last 2 digits of year in some locales\n> \n> Yeah. I was willing to ignore that while pg_controldata was in contrib,\n> but it's much more annoying when it's in the main tree. Anyone know if\n> gcc has a --not-quite-so-nannyish warnings mode?\n> \n> IMHO %c is a perfectly reasonable format choice --- the strftime man\n> page defines it as\n> %c Locale's appropriate date and time representation.\n> While we could go over to some %Y-%M-etc-etc notation, that doesn't\n> strike me as a step forward. pg_controldata's output should be\n> conveniently human-readable IMHO, and that means following local\n> conventions.\n> \n> Another alternative is\n> \tchar *fmt = \"%c\";\n> \t...\n> \tstrftime(..., fmt, ...);\n> \n> which I think will probably defeat gcc's check (haven't tried it\n> though).\n> \n> Does anyone want to argue that %c is actually a bad choice? I think\n> gcc's just being unreasonable here, but maybe I'm missing something\n> (and no, Y2K arguments won't change my mind).\n> \n> \t\t\tregards, tom lane\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Sat, 17 Aug 2002 20:06:18 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: compile warnings in CVS"
},
{
"msg_contents": "\nI have applied patches to the regression test to fix this. Thanks.\n\n---------------------------------------------------------------------------\n\nNeil Conway wrote:\n> Neil Conway <nconway@klamath.dyndns.org> writes:\n> > I get the following compiling the current CVS code with gcc 3.1:\n> \n> I also get 4 regression test failures, due to Gavin's improvements to\n> the parser error messages. AFAICT no actual problems, the expected\n> error message strings just needed to be updated.\n> \n> Cheers,\n> \n> Neil\n> \n> -- \n> Neil Conway <neilconway@rogers.com>\n> PGP Key ID: DB3C29FC\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Sat, 17 Aug 2002 22:34:42 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: compile warnings in CVS"
},
{
"msg_contents": "I said:\n> Another alternative is\n> \tchar *fmt = \"%c\";\n> \t...\n> \tstrftime(..., fmt, ...);\n> which I think will probably defeat gcc's check (haven't tried it\n> though).\n\nI tried this, and it did shut up the warning in my local copy of gcc.\nSo I committed it.\n\n> Does anyone want to argue that %c is actually a bad choice?\n\nThis is still open to debate if anyone wants to make the case...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 17 Aug 2002 22:50:55 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: compile warnings in CVS "
}
] |
[
{
"msg_contents": "I'd like to propose dropping the auto-creation of UNIQUE indexes on\nserial columns for the following reasons:\n\n1. Serials with indexes are quite difficult to handle in pg_dump. It\nmeans that the implicitly created unique index must be destroyed prior\nto loading the data, then re-created afterward else risk a performance\nhit.\n\n\n2. SERIAL columns are usually used as the primary key of the table. As\nsuch one must specify PRIMARY KEY at creation time to override the\nimplicitly created UNIQUE index.\n\n3. Consistency with other databases.\n\nMySQL's AUTO_INCREMENT suggests quite heavily that an index be applied,\nbut it doesn't appear to do it for you.\n\nOracle has SEQUENCES, but it is up to the user to associate them with a\ncolumn as per my understanding. At least, thats all I could find.\n\nSAP -> SERIAL and SERIAL(n). No index is created (creates sequence /\ndefault)\n\n\n\nA nice side effect is that analyze.c will become somewhat cleaner.\n\n\nAny thoughts?\n\nDoes anyone create serial columns without manually specifying UNIQUE\nwhen wanting an index? Examples in our documentation do. See section\n5.1.4 in the current docset:\nhttp://developer.postgresql.org/docs/postgres/datatype.html\n\n\nRemoval of implicit UNIQUE index creation would not affect structure of\ncurrent or prior db versions -- strictly new tables on 7.3.\n\n\n",
"msg_date": "17 Aug 2002 16:57:40 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "Remove implicit unique index creation on SERIAL columns?"
},
{
"msg_contents": "Rod Taylor wrote:\n> I'd like to propose dropping the auto-creation of UNIQUE indexes on\n> serial columns for the following reasons:\n> \n> 1. Serials with indexes are quite difficult to handle in pg_dump. It\n> means that the implicitly created unique index must be destroyed prior\n> to loading the data, then re-created afterward else risk a performance\n> hit.\n> \n> \n> 2. SERIAL columns are usually used as the primary key of the table. As\n> such one must specify PRIMARY KEY at creation time to override the\n> implicitly created UNIQUE index.\n> \n> 3. Consistency with other databases.\n> \n> MySQL's AUTO_INCREMENT suggests quite heavily that an index be applied,\n> but it doesn't appear to do it for you.\n> \n> Oracle has SEQUENCES, but it is up to the user to associate them with a\n> column as per my understanding. At least, thats all I could find.\n> \n> SAP -> SERIAL and SERIAL(n). No index is created (creates sequence /\n> default)\n\nFWIW, also MSSQL.\n\nI agree 100%. If you want an index, unique constraint, or primary key on \na SERIAL, I think you should explicitly add it. SERIAL should give me a \ncolumn that automatically increments -- no more, no less.\n\nJoe\n\n",
"msg_date": "Sat, 17 Aug 2002 14:26:10 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL columns?"
},
{
"msg_contents": "Joe Conway <mail@joeconway.com> writes:\n> I agree 100%. If you want an index, unique constraint, or primary key on \n> a SERIAL, I think you should explicitly add it. SERIAL should give me a \n> column that automatically increments -- no more, no less.\n\nHmm, do you also want to eliminate the implicit NOT NULL constraint?\n\nI think that efficiency and orthogonality are adequate reasons for\ndissociating UNIQUE from SERIAL. The efficiency argument is pretty\nweak in the case of the NOT NULL part, though, so maybe backwards\ncompatibility should win out there.\n\nAnother line of thought: as near as I can tell, SQL92 allows defaults\nand CHECK constraints to be associated with domains. Taking the\nviewpoint that SERIAL is a domain would say that the DEFAULT nextval()\nis okay, and CHECK NOT NULL is okay, but UNIQUE is not okay to be\nimplied by the domain type. Perhaps the SQL authors knew what they\nwere doing when they made that restriction...\n\n(Note that although I just dissuaded Rod from actually turning SERIAL\ninto a domain on compatibility grounds, I don't see any reason why\nwe shouldn't use the spec's rules about domains to reason about how\nit should work. In a slightly longer timeframe we may decide that\nwe do want to make it a domain.)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 17 Aug 2002 21:13:18 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL columns? "
},
{
"msg_contents": "Tom Lane wrote:\n> Joe Conway <mail@joeconway.com> writes:\n>>I agree 100%. If you want an index, unique constraint, or primary key on \n>>a SERIAL, I think you should explicitly add it. SERIAL should give me a \n>>column that automatically increments -- no more, no less.\n> \n> Hmm, do you also want to eliminate the implicit NOT NULL constraint?\n> \n> I think that efficiency and orthogonality are adequate reasons for\n> dissociating UNIQUE from SERIAL. The efficiency argument is pretty\n> weak in the case of the NOT NULL part, though, so maybe backwards\n> compatibility should win out there.\n\nTo be honest I wasn't thinking about NOT NULL. I'd agree with leaving \nthat in place.\n\nMaybe I should restate my comment above: SERIAL should give me a column \nthat automatically increments -- no more, no less -- and it should not \nallow me to override the value that it gives. Hence an implicit NOT \nNULL, but also an implicit rejection of a manual insert/update of that \nfield (how hard would this be to do?).\n\nI know this causes problems for dumped and reloaded data. In MSSQL this \nis gotten around by allowing the properties of the data type to be \naltered, e.g. in MSSQL you can turn the IDENTITY property on or off (in \nfact, I just checked and MSSQL won't allow you to turn on IDENTITY for a \ncolumn unless you turn off ALLOW NULLS). You can also specify an \nexception to the rule when running BCP (the bulk loader command line \nprogram).\n\nThe reason I think this behavior is good, is that it helps prevent toe \nloss from stray bullets. E.g. you manually add a row where you've \nspecified some value that has not yet been reached by the sequence -- \nthen when someday the sequence reaches said value, your insert fails on \na duplicate primary key insertion attempt.\n\nIf you really need to be able to insert or update a field with an \nexplicit value *sometimes* (and you really know what you're doing), then \nuse a plain sequence and a default, not a SERIAL.\n\nAnyway, just my thoughts.\n\nJoe\n\n\n",
"msg_date": "Sat, 17 Aug 2002 23:35:32 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL columns?"
},
{
"msg_contents": "Hi\n\n-*- Joe Conway <mail@joeconway.com> [ 2002-08-18 06:36 ]:\n> Maybe I should restate my comment above: SERIAL should give me a column \n> that automatically increments -- no more, no less -- and it should not \n> allow me to override the value that it gives. Hence an implicit NOT \n> NULL, but also an implicit rejection of a manual insert/update of that \n> field (how hard would this be to do?).\n> \n> I know this causes problems for dumped and reloaded data. In MSSQL this \n> is gotten around by allowing the properties of the data type to be \n> altered, e.g. in MSSQL you can turn the IDENTITY property on or off (in \n> fact, I just checked and MSSQL won't allow you to turn on IDENTITY for a \n> column unless you turn off ALLOW NULLS). You can also specify an \n> exception to the rule when running BCP (the bulk loader command line \n> program).\n> \n> The reason I think this behavior is good, is that it helps prevent toe \n> loss from stray bullets. E.g. you manually add a row where you've \n> specified some value that has not yet been reached by the sequence -- \n> then when someday the sequence reaches said value, your insert fails on \n> a duplicate primary key insertion attempt.\n> \n> If you really need to be able to insert or update a field with an \n> explicit value *sometimes* (and you really know what you're doing), then \n> use a plain sequence and a default, not a SERIAL.\n\n\nI like the functionality you are suggesting. However, when I started thinking about what size this field should be, the idea of keeping the current SERIAL \"data type\" and having a SERIAL flag (CREATE TABLE foo (id int serial))... so it's pretty much the same as a seqence, but enforced so that you can't tamper with it. The best part about this is obviously that it doesn't change behaviour of the old SERIAL.\n\nAm I right about this, or am I missing something here?\n\n-- \nRegards,\nTolli\ntolli@tol.li\n",
"msg_date": "Sun, 18 Aug 2002 12:37:51 +0000",
"msg_from": "=?iso-8859-1?Q?=DE=F3rhallur_H=E1lfd=E1narson?= <tolli@tol.li>",
"msg_from_op": false,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL columns?"
},
{
"msg_contents": "On Sun, 2002-08-18 at 02:35, Joe Conway wrote:\n> Tom Lane wrote:\n> > Joe Conway <mail@joeconway.com> writes:\n> >>I agree 100%. If you want an index, unique constraint, or primary key on \n> >>a SERIAL, I think you should explicitly add it. SERIAL should give me a \n> >>column that automatically increments -- no more, no less.\n> > \n> > Hmm, do you also want to eliminate the implicit NOT NULL constraint?\n> > \n> > I think that efficiency and orthogonality are adequate reasons for\n> > dissociating UNIQUE from SERIAL. The efficiency argument is pretty\n> > weak in the case of the NOT NULL part, though, so maybe backwards\n> > compatibility should win out there.\n> \n> To be honest I wasn't thinking about NOT NULL. I'd agree with leaving \n> that in place.\n> \n> Maybe I should restate my comment above: SERIAL should give me a column \n> that automatically increments -- no more, no less -- and it should not \n> allow me to override the value that it gives. Hence an implicit NOT \n> NULL, but also an implicit rejection of a manual insert/update of that \n> field (how hard would this be to do?).\n\nI don't like not overriding the value. A dataload example is a perfect\nreason why you would want to. Anyway, this would require placing 2\ntriggers on the table in order to prevent changes of the value.\n\nPersonally I prefer the method that SAPdb uses. They make the column a\nfixed() type (integer) and set the default. Nothing about NOT NULL or\nUNIQUE.\n\nAnyway, I think SERIAL is about assisting creation of a entry, not\nenforcing it. Enforcement is trivial for those who don't mind the\nadditional overhead.\n\n",
"msg_date": "18 Aug 2002 09:21:24 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL"
},
{
"msg_contents": "Joe Conway <mail@joeconway.com> writes:\n> I know this causes problems for dumped and reloaded data.\n\nYup.\n\n> In MSSQL this \n> is gotten around by allowing the properties of the data type to be \n> altered, e.g. in MSSQL you can turn the IDENTITY property on or off\n\nRather pointless if it can be turned off, wouldn't you say?\n\nWhat I would do if I wanted such a guarantee is to make insertions\ngo through a view rule that prevents the serial column from being\nsupplied directly. That's a general technique that applies to more than\njust serial columns, and it is also easy to control who has privileges\nto bypass the view. AFAICT this \"IDENTITY\" thingie is an extremely\nlimited kluge.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 18 Aug 2002 12:46:47 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL columns? "
},
{
"msg_contents": "> > In MSSQL this \n> > is gotten around by allowing the properties of the data type to be \n> > altered, e.g. in MSSQL you can turn the IDENTITY property on or off\n> \n> Rather pointless if it can be turned off, wouldn't you say?\n> \n> What I would do if I wanted such a guarantee is to make insertions\n> go through a view rule that prevents the serial column from being\n\nIn the future if we have per column privileges, we could disable insert\nand update on serial columns by default for everyone but the table owner\nand super-users (to accommodate dataloads).\n\nTill then a trigger or view will do the job for those who wish to add\nthem.\n\n",
"msg_date": "18 Aug 2002 12:57:35 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL"
},
{
"msg_contents": "Tom Lane wrote:\n> Joe Conway <mail@joeconway.com> writes:\n>>In MSSQL this \n>>is gotten around by allowing the properties of the data type to be \n>>altered, e.g. in MSSQL you can turn the IDENTITY property on or off\n> \n> Rather pointless if it can be turned off, wouldn't you say?\n\nNot really. Turning it off takes an explict act of the dba (ALTER TABLE) \nfor a special circumstance such as importing data. In the normal case \nwhile it's turned on, it is the developers who need and get the foot \nteflon (INSERT/UPDATE).\n\n\n> What I would do if I wanted such a guarantee is to make insertions\n> go through a view rule that prevents the serial column from being\n> supplied directly. That's a general technique that applies to more than\n> just serial columns, and it is also easy to control who has privileges\n> to bypass the view.\n\nI thought about the view rule myself. Nice, but beyond the grasp of \ninexperienced users, who I think SERIAL is target for.\n\n> AFAICT this \"IDENTITY\" thingie is an extremely limited kluge.\n\nIt is extremely limited -- that's why sequences are so much better \n(IMHO). But SERIAL is for those who want something simple to use, don't \nwant to think about the implementation details, and don't mind it being \nlimited. Otherwise why have it at all -- just make everyone use sequences.\n\nJoe\n\n",
"msg_date": "Sun, 18 Aug 2002 10:07:23 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL columns?"
},
{
"msg_contents": "Rod Taylor wrote:\n>>>In MSSQL this \n>>>is gotten around by allowing the properties of the data type to be \n>>>altered, e.g. in MSSQL you can turn the IDENTITY property on or off\n>>\n>>Rather pointless if it can be turned off, wouldn't you say?\n>>\n>>What I would do if I wanted such a guarantee is to make insertions\n>>go through a view rule that prevents the serial column from being\n> \n> \n> In the future if we have per column privileges, we could disable insert\n> and update on serial columns by default for everyone but the table owner\n> and super-users (to accommodate dataloads).\n\nThat sounds like the best way-to-go.\n\n\n> Till then a trigger or view will do the job for those who wish to add\n> them.\n\nAgreed.\n\nJoe\n\n",
"msg_date": "Sun, 18 Aug 2002 12:02:43 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL\tcolumns?"
},
{
"msg_contents": "Since there didn't seem to be anyone objecting to the notion of\ndecoupling UNIQUE from SERIAL, I'm going to go ahead with\nreviewing/applying Rod's recent patch that does that (and fixes pg_dump\nto dump 7.3 serials correctly). We can continue to debate about\nthe merits of making additional changes in SERIAL behavior, of course,\nbut this is the one that pg_dump needs.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 12:00:22 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL "
},
{
"msg_contents": "Joe Conway wrote:\n> Tom Lane wrote:\n> > Joe Conway <mail@joeconway.com> writes:\n> >>I agree 100%. If you want an index, unique constraint, or primary key on \n> >>a SERIAL, I think you should explicitly add it. SERIAL should give me a \n> >>column that automatically increments -- no more, no less.\n> > \n> > Hmm, do you also want to eliminate the implicit NOT NULL constraint?\n> > \n> > I think that efficiency and orthogonality are adequate reasons for\n> > dissociating UNIQUE from SERIAL. The efficiency argument is pretty\n> > weak in the case of the NOT NULL part, though, so maybe backwards\n> > compatibility should win out there.\n> \n> To be honest I wasn't thinking about NOT NULL. I'd agree with leaving \n> that in place.\n> \n> Maybe I should restate my comment above: SERIAL should give me a column \n> that automatically increments -- no more, no less -- and it should not \n> allow me to override the value that it gives. Hence an implicit NOT \n> NULL, but also an implicit rejection of a manual insert/update of that \n> field (how hard would this be to do?).\n\nIf don't understand. We already have a unique index on the SERIAL\ncolumn, so why bother rejecting an insert/update that supplies the\nvalue? We need the column to be unique, and that is forced, but why\nprevent _any_ unique value from being used.\n\nClearly NULL is not a valid value and should be prevented with NOT NULL.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Mon, 19 Aug 2002 21:34:10 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL columns?"
},
{
"msg_contents": "\nOn Mon, 19 Aug 2002, Bruce Momjian wrote:\n\n> Joe Conway wrote:\n> > Tom Lane wrote:\n> > > Joe Conway <mail@joeconway.com> writes:\n> > >>I agree 100%. If you want an index, unique constraint, or primary key on\n> > >>a SERIAL, I think you should explicitly add it. SERIAL should give me a\n> > >>column that automatically increments -- no more, no less.\n> > >\n> > > Hmm, do you also want to eliminate the implicit NOT NULL constraint?\n> > >\n> > > I think that efficiency and orthogonality are adequate reasons for\n> > > dissociating UNIQUE from SERIAL. The efficiency argument is pretty\n> > > weak in the case of the NOT NULL part, though, so maybe backwards\n> > > compatibility should win out there.\n> >\n> > To be honest I wasn't thinking about NOT NULL. I'd agree with leaving\n> > that in place.\n> >\n> > Maybe I should restate my comment above: SERIAL should give me a column\n> > that automatically increments -- no more, no less -- and it should not\n> > allow me to override the value that it gives. Hence an implicit NOT\n> > NULL, but also an implicit rejection of a manual insert/update of that\n> > field (how hard would this be to do?).\n>\n> If don't understand. We already have a unique index on the SERIAL\n> column, so why bother rejecting an insert/update that supplies the\n> value? We need the column to be unique, and that is forced, but why\n> prevent _any_ unique value from being used.\n\nOne reason is that the sequence won't respect those inserted values and\nyou'll get uniqueness errors on statements that don't give a value for the\ncolumn where you'd expect to be getting a working autogenerated value.\n\n",
"msg_date": "Mon, 19 Aug 2002 20:01:58 -0700 (PDT)",
"msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>",
"msg_from_op": false,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL columns?"
},
{
"msg_contents": "Stephan Szabo wrote:\n> > If don't understand. We already have a unique index on the SERIAL\n> > column, so why bother rejecting an insert/update that supplies the\n> > value? We need the column to be unique, and that is forced, but why\n> > prevent _any_ unique value from being used.\n> \n> One reason is that the sequence won't respect those inserted values and\n> you'll get uniqueness errors on statements that don't give a value for the\n> column where you'd expect to be getting a working autogenerated value.\n\nOh, it causes problems later on. Interesting. However, preventing\nINSERT/UPDATE seems quite extreme.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Mon, 19 Aug 2002 23:17:55 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Remove implicit unique index creation on SERIAL columns?"
}
] |
[
{
"msg_contents": "n file included from fe-connect.c:24:\nlibpq-int.h:337: warning: `struct timeval' declared inside parameter\nlist\nlibpq-int.h:337: warning: its scope is only this definition or\ndeclaration, which is probably not what you want.\nfe-connect.c: In function `connectDBComplete':\nfe-connect.c:1060: storage size of `remains' isn't known\nfe-connect.c:1060: storage size of `finish_time' isn't known\nfe-connect.c:1060: storage size of `start_time' isn't known\nfe-connect.c:1081: warning: suggest parentheses around && within ||\nfe-connect.c:1086: warning: implicit declaration of function\n`gettimeofday'\nfe-connect.c:1106: warning: passing arg 4 of `pqWaitTimed' from\nincompatible pointer type\nfe-connect.c:1114: warning: passing arg 4 of `pqWaitTimed' from\nincompatible pointer type\nfe-connect.c:1060: warning: unused variable `start_time'\nfe-connect.c:1060: warning: unused variable `finish_time'\nfe-connect.c:1060: warning: unused variable `remains'\n\n\n\n\n",
"msg_date": "17 Aug 2002 20:42:53 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "cvs-tip broken"
},
{
"msg_contents": "\nI am not seeing the failure here on BSD/OS. I just fixed the\nlibpq-int.h problem. Please update to cvs current and let me know what\nyou see.\n\n---------------------------------------------------------------------------\n\nRod Taylor wrote:\n> n file included from fe-connect.c:24:\n> libpq-int.h:337: warning: `struct timeval' declared inside parameter\n> list\n> libpq-int.h:337: warning: its scope is only this definition or\n> declaration, which is probably not what you want.\n> fe-connect.c: In function `connectDBComplete':\n> fe-connect.c:1060: storage size of `remains' isn't known\n> fe-connect.c:1060: storage size of `finish_time' isn't known\n> fe-connect.c:1060: storage size of `start_time' isn't known\n> fe-connect.c:1081: warning: suggest parentheses around && within ||\n> fe-connect.c:1086: warning: implicit declaration of function\n> `gettimeofday'\n> fe-connect.c:1106: warning: passing arg 4 of `pqWaitTimed' from\n> incompatible pointer type\n> fe-connect.c:1114: warning: passing arg 4 of `pqWaitTimed' from\n> incompatible pointer type\n> fe-connect.c:1060: warning: unused variable `start_time'\n> fe-connect.c:1060: warning: unused variable `finish_time'\n> fe-connect.c:1060: warning: unused variable `remains'\n> \n> \n> \n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Sat, 17 Aug 2002 21:35:28 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: cvs-tip broken"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> I am not seeing the failure here on BSD/OS. I just fixed the\n> libpq-int.h problem. Please update to cvs current and let me know what\n> you see.\n\nFWIW, libpq seems to build fine here (HPUX 10.20) both before and after\nyour latest commit. Rod should probably mention what platform he's\nusing, and where it defines struct timeval...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 17 Aug 2002 22:08:12 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: cvs-tip broken "
},
{
"msg_contents": "\nThe code was clearly wrong, mentioning timeval with no time.h nor\nsys/types.h include. My patches should fix him [good]. :-)\n\nWho used to say, \"I will fix him good\"? I don't remember.\n\n---------------------------------------------------------------------------\n\nTom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > I am not seeing the failure here on BSD/OS. I just fixed the\n> > libpq-int.h problem. Please update to cvs current and let me know what\n> > you see.\n> \n> FWIW, libpq seems to build fine here (HPUX 10.20) both before and after\n> your latest commit. Rod should probably mention what platform he's\n> using, and where it defines struct timeval...\n> \n> \t\t\tregards, tom lane\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Sat, 17 Aug 2002 22:19:47 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: cvs-tip broken"
},
{
"msg_contents": "On Sat, 2002-08-17 at 22:08, Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > I am not seeing the failure here on BSD/OS. I just fixed the\n> > libpq-int.h problem. Please update to cvs current and let me know what\n> > you see.\n> \n> FWIW, libpq seems to build fine here (HPUX 10.20) both before and after\n> your latest commit. Rod should probably mention what platform he's\n> using, and where it defines struct timeval...\n\nI still have to wait another 30 minutes before I can update to the\nlatest revision, but here's what's needed:\n\n\nbash-2.05b$ uname -a\nFreeBSD jester 4.6-RELEASE FreeBSD 4.6-RELEASE #8: Fri Jul 19 23:45:16\nEDT 2002 root@jester:/usr/obj/usr/src/sys/JESTER i386",
"msg_date": "17 Aug 2002 22:40:48 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "Re: cvs-tip broken"
},
{
"msg_contents": "\nI think I added time.h and sys/types.h. That should do it for you.\n\n---------------------------------------------------------------------------\n\nRod Taylor wrote:\n> On Sat, 2002-08-17 at 22:08, Tom Lane wrote:\n> > Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > > I am not seeing the failure here on BSD/OS. I just fixed the\n> > > libpq-int.h problem. Please update to cvs current and let me know what\n> > > you see.\n> > \n> > FWIW, libpq seems to build fine here (HPUX 10.20) both before and after\n> > your latest commit. Rod should probably mention what platform he's\n> > using, and where it defines struct timeval...\n> \n> I still have to wait another 30 minutes before I can update to the\n> latest revision, but here's what's needed:\n> \n> \n> bash-2.05b$ uname -a\n> FreeBSD jester 4.6-RELEASE FreeBSD 4.6-RELEASE #8: Fri Jul 19 23:45:16\n> EDT 2002 root@jester:/usr/obj/usr/src/sys/JESTER i386\n> \n> \n\n[ Attachment, skipping... ]\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Sat, 17 Aug 2002 22:44:16 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: cvs-tip broken"
},
{
"msg_contents": "On Sat, 2002-08-17 at 22:44, Bruce Momjian wrote:\n> \n> I think I added time.h and sys/types.h. That should do it for you.\n\nHmm.. whelp, the file in question on FreeBSD is sys/time.h (attached\nearlier) so this won't fix it.\n\n> ---------------------------------------------------------------------------\n> \n> Rod Taylor wrote:\n> > On Sat, 2002-08-17 at 22:08, Tom Lane wrote:\n> > > Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > > > I am not seeing the failure here on BSD/OS. I just fixed the\n> > > > libpq-int.h problem. Please update to cvs current and let me know what\n> > > > you see.\n> > > \n> > > FWIW, libpq seems to build fine here (HPUX 10.20) both before and after\n> > > your latest commit. Rod should probably mention what platform he's\n> > > using, and where it defines struct timeval...\n> > \n> > I still have to wait another 30 minutes before I can update to the\n> > latest revision, but here's what's needed:\n> > \n> > \n> > bash-2.05b$ uname -a\n> > FreeBSD jester 4.6-RELEASE FreeBSD 4.6-RELEASE #8: Fri Jul 19 23:45:16\n> > EDT 2002 root@jester:/usr/obj/usr/src/sys/JESTER i386\n> > \n> > \n> \n> [ Attachment, skipping... ]\n> \n> -- \n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (610) 359-1001\n> + If your life is a hard drive, | 13 Roberts Road\n> + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n> \n\n\n",
"msg_date": "17 Aug 2002 23:11:31 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "Re: cvs-tip broken"
},
{
"msg_contents": "Rod Taylor <rbt@zort.ca> writes:\n> Hmm.. whelp, the file in question on FreeBSD is sys/time.h (attached\n> earlier) so this won't fix it.\n\nAdded #include <sys/time.h>. We seem to use this unconditionally in\nmany other files, so I don't see a reason not to include it here.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 17 Aug 2002 23:48:55 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: cvs-tip broken "
}
] |
[
{
"msg_contents": "\nAs you can see, the open items list is greatly shrunk. We have two\nweeks to go and most of these seems do-able, except for point-in-time\nrecovery, which may not make it. I haven't heard anything recently on\nit.\n\nWould someone put together a porting document for schema changes and\ndrop column changes?\n\n---------------------------------------------------------------------------\n P O S T G R E S Q L\n\n 7 . 3 O P E N I T E M S\n\n\nCurrent at ftp://candle.pha.pa.us/pub/postgresql/open_items.\n\nSource Code Changes\n-------------------\nPoint-in-time recovery - status? (J.R., Richard)\nSchema handling - ready? interfaces? client apps?\nDrop column handling - ready for all clients, apps?\necpg and bison issues - solved? (Michael)\nhave pg_dumpall dump out db privilege and per-user/db settings\nfix implicit type coercions that are worse\nPrepared statements - to be reviewed (Tom)\nimprove macros in new tuple header code (Tom)\nintegrate or move to gborg libpqxx, Pg:DBD\nAllow PL/PgSQL functions to return sets (Neil)\nAllow easy display of usernames in a group (pg_hba.conf uses groups now)\nfix BeOS and QNX4 ports\n\nDocumentation Changes\n---------------------\nMention foreign keys and SERIAL dependencies will not be in 7.2 loaded tables\nDocument need to add permissions to loaded functions and languages\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Sat, 17 Aug 2002 23:08:45 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": true,
"msg_subject": "Open 7.3 items"
},
{
"msg_contents": "On Sat, Aug 17, 2002 at 11:08:45PM -0400, Bruce Momjian wrote:\n> \n> integrate or move to gborg libpqxx, Pg:DBD\n\nIt's no longer my CVS home tree... Is there something I can/should \ndo for this?\n\n\nJeroen\n\n",
"msg_date": "Tue, 20 Aug 2002 00:08:24 +0200",
"msg_from": "\"Jeroen T. Vermeulen\" <jtv@xs4all.nl>",
"msg_from_op": false,
"msg_subject": "Re: Open 7.3 items"
}
] |
[
{
"msg_contents": "Hi everyone,\n\nConni is the author of a German PostgreSQL book, and is also a member of\nthe PHP documentation team.\n\nShe's updating some parts of the official PHP manual at present, an\nshe'll be up to the PostgreSQL section pretty soon.\n\nDoes anyone have stuff they'd like to see included, etc?\n\n:-)\n\nRegards and best wishes,\n\nJustin Clift\n\n\n-------- Original Message --------\nSubject: [GENERAL] About to update the PostgreSQL-Functions in the PHP\nManual\nDate: Sun, 18 Aug 2002 13:32:21 +0200\nFrom: \"Cornelia Boenigk\" <poppcorn@cornelia-boenigk.de>\n\n\nHi everyone,\n\nI am in the process of updating some parts of the PHP manual, and\nin the next few days the \"PostgreSQL Functions\" area is where I'll be\nup\nto.\n\nIs there anything which anyone would like to be added, clarified,\nupdated, or similar for this?\n\n:-)\n\nRegards\nConni\n\n\n---------------------------(end of broadcast)---------------------------\nTIP 5: Have you checked our extensive FAQ?\n\nhttp://www.postgresql.org/users-lounge/docs/faq.html\n",
"msg_date": "Mon, 19 Aug 2002 09:03:04 +1000",
"msg_from": "Justin Clift <justin@postgresql.org>",
"msg_from_op": true,
"msg_subject": "About to update the PostgreSQL Functions in the official PHP Manual"
},
{
"msg_contents": "There's a couple of new bytea encoding/decoding functions in libpq aren't\nthere? Or at least there's one...\n\nChris\n\n> -----Original Message-----\n> From: pgsql-hackers-owner@postgresql.org\n> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Justin Clift\n> Sent: Monday, 19 August 2002 7:03 AM\n> To: PostgreSQL Hackers Mailing List\n> Subject: [HACKERS] About to update the PostgreSQL Functions in the\n> official PHP Manual\n>\n>\n> Hi everyone,\n>\n> Conni is the author of a German PostgreSQL book, and is also a member of\n> the PHP documentation team.\n>\n> She's updating some parts of the official PHP manual at present, an\n> she'll be up to the PostgreSQL section pretty soon.\n>\n> Does anyone have stuff they'd like to see included, etc?\n>\n> :-)\n>\n> Regards and best wishes,\n>\n> Justin Clift\n>\n>\n> -------- Original Message --------\n> Subject: [GENERAL] About to update the PostgreSQL-Functions in the PHP\n> Manual\n> Date: Sun, 18 Aug 2002 13:32:21 +0200\n> From: \"Cornelia Boenigk\" <poppcorn@cornelia-boenigk.de>\n>\n>\n> Hi everyone,\n>\n> I am in the process of updating some parts of the PHP manual, and\n> in the next few days the \"PostgreSQL Functions\" area is where I'll be\n> up\n> to.\n>\n> Is there anything which anyone would like to be added, clarified,\n> updated, or similar for this?\n>\n> :-)\n>\n> Regards\n> Conni\n>\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n>\n> http://www.postgresql.org/users-lounge/docs/faq.html\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n>\n> http://www.postgresql.org/users-lounge/docs/faq.html\n>\n\n",
"msg_date": "Mon, 19 Aug 2002 09:37:16 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: About to update the PostgreSQL Functions in the official PHP\n\tManual"
}
] |
[
{
"msg_contents": "I've just noticed that a bunch of places use strVal() to access the name\nfield of an Ident node. (Try changing strVal() to\n\n#define strVal(v) (AssertMacro(IsA(v, String)), ((Value *)(v))->val.str)\n\nand watch the fur fly...)\n\nThis works, at the moment, because Ident and Value nodes have a similar\nlayout. But it sure looks like trouble waiting to happen.\n\nAs far as I can tell, there's no really good reason to keep Ident around\nat all. The only thing it's still used for is lists of column names in\na couple of statement types --- which is something that we do elsewhere\nwith lists of String nodes. Indeed I imagine that the buggy places got\nthat way because someone copied-and-pasted code that was legitimately\ndealing with a list of column names in String form.\n\nAlso, strVal() and makeString() provide handy notational infrastructure\nthat we don't have for Ident.\n\nConsidering these points, I'd rather rip out Ident and replace its uses\nwith String nodes than try to clean up the misuses of strVal(). Any\nobjections out there?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 18 Aug 2002 21:27:02 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": true,
"msg_subject": "Ident nodetype considered harmful"
}
] |
[
{
"msg_contents": "# Disallow TRUNCATE on tables that are involved in referential\nconstraints\n\nThe above is on the TODO list. Are there any thoughts as to what we\nwant to do with this? The patch I submitted earlier received heavy\nfeedback saying it wasn't wanted due to rules and triggers (foreign\nkeys) being difficult to drop and re-create.\n\n\nForeign keys no longer have this issue, as such I'd like to re-apply the\ncheck and prevention of TRUNCATE when a foreign key constraint exists.\n\nPrimary reason is to prevent users from shooting their own feet -- yes,\nI have structure owners who use Access, MSSql, MySQL, and Oracle on a\nregular basis. Oracle and MSSql both (if memory serves) prevents this\ncase, so it comes as a surprise the first time they run it.\n\n",
"msg_date": "18 Aug 2002 23:13:58 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": true,
"msg_subject": "TRUNCATE TODO Item"
}
] |
[
{
"msg_contents": "\nOK - I assume from everybody else's silence that they either (a) agree with \nthe idea, or (b) think Tom hit the idea on the head, so they feel they \ndon't need to respond.\n\nSo what I would like to do is implement a simple version of this to attempt \nto justify my claims of performance gains. The sort of trivial places where \nI think gains *may* be had are:\n\ncreate table departments(id integer, name text, manager_id integer);\ncreate table people(id integer, department_id, name text);\n\ncreate function get_manager_name(integer) returns text as\n 'select name from departments d, people p\n where d.id = $1 and p.id = d.manager_id';\n\nselect name,get_manager_name(department_id) from people;\n\nThis is obviously a case where a LOJ or column-select would do the trick, \n*but* it does represent a class of problems that people frequently write \nprocedures to perform a single (sometimes complex) action. Using a function \nalso encapsulates some knowledge of the data structures, resulting in more \nmaintainable code.\n\neg. even the above simple example becomes a lot less readable and maintainable:\n\nselect name,\n (select m.name from departments d, people m\n where d.id = p.department_id and m.id = d.manager_id) as manager_name\n from people p;\n\nif a function is not used.\n\nMy theory is that if such a piece of code gets a performance gain, then the \ncode is probably worth including, assuming that the function manager does \nnot need to be butchered to achieve the desired goal. Does that sound \nreasonable?\n\nSo the obvious question is - in the opinion of people who know the code, \ncan a function-result-cache be implemented with a lifetime of a single \nstatement, without butchering the function manager?\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n\n",
"msg_date": "Mon, 19 Aug 2002 14:16:27 +1000",
"msg_from": "Philip Warner <pjw@rhyme.com.au>",
"msg_from_op": true,
"msg_subject": "Re: Function result cacheing - any comments?"
},
{
"msg_contents": "Philip Warner wrote:\n> So the obvious question is - in the opinion of people who know the code, \n> can a function-result-cache be implemented with a lifetime of a single \n> statement, without butchering the function manager?\n> \n\nI don't know if I fully understand what you're proposing, but if I \nunderstand it correctly, I think the table function feature in current \nsources does just what you want already. If you can write your function \nas a table function, the results are put in a tuplestore for the \nduration of the statement, and rescanned when needed.\n\nYour example ends up looking like this:\n\ncreate table departments(id integer, name text, manager_id integer);\ninsert into departments values(1, 'manufacturing', 1);\ninsert into departments values(2, 'accounting', 2);\n\ncreate table people(id integer, department_id, name text);\ninsert into people values(1, 1, 'mfg boss');\ninsert into people values(2, 2, 'acct boss');\ninsert into people values(3, 1, 'mfg emp');\ninsert into people values(4, 2, 'acct emp');\n\ncreate type manager_names as (dept_id int, name text);\n\ncreate function get_manager_names() returns setof manager_names as\n 'select d.id, p.name from departments d, people p\n where p.id = d.manager_id' language sql;\n\nselect p.name, m.name as boss from people p, get_manager_names() m where \np.department_id = m.dept_id;\n name | boss\n-----------+-----------\n mfg boss | mfg boss\n mfg emp | mfg boss\n acct boss | acct boss\n acct emp | acct boss\n(4 rows)\n\nIs this anything close what you had in mind?\n\nJoe\n\n",
"msg_date": "Sun, 18 Aug 2002 22:29:35 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: Function result cacheing - any comments?"
},
{
"msg_contents": "At 22:29 18/08/2002 -0700, Joe Conway wrote:\n>create function get_manager_names() returns setof manager_names as\n> 'select d.id, p.name from departments d, people p\n> where p.id = d.manager_id' language sql;\n>\n>select p.name, m.name as boss from people p, get_manager_names() m where \n>p.department_id = m.dept_id;\n>...\n>Is this anything close what you had in mind?\n\nNice thought, and it probably works for the example I gave, but in the case \nwhere the secondary table is large potentially large, I think it falls down.\n\nTo give an example, in my case I have a function 'has_access_to_object' \nwhich does access checking up a tree of ownership & inheritance. While the \nfirst level access check is always unique, subsequent ones will be executed \nmore than once in a typical tree.\n\nAs a result, what I would like to implement is a new attribute for \nfunctions (eg. 'invariant') which tells the function manager that in the \ncontext of one command, if the function is called with the same args, the \nresult will be the same. The idea is for the function manager(?) to \nmaintain a cache of, say, up to 100K of cached function results for \nfunctions marked 'invariant'. A hash will be used to check if a function \nresult is in the cache, and the least recently used results will be purged \nwhen necessary.\n\nWhile my example is quite specific, the benefits would apply to any simple \nlookup function, as well as any external function that is expensive to execute.\n\n\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n\n",
"msg_date": "Mon, 19 Aug 2002 15:51:43 +1000",
"msg_from": "Philip Warner <pjw@rhyme.com.au>",
"msg_from_op": true,
"msg_subject": "Re: Function result cacheing - any comments?"
},
{
"msg_contents": "On Sun, 18 Aug 2002, Joe Conway wrote:\n\n> Philip Warner wrote:\n> > So the obvious question is - in the opinion of people who know the code, \n> > can a function-result-cache be implemented with a lifetime of a single \n> > statement, without butchering the function manager?\n> > \n> \n> I don't know if I fully understand what you're proposing, but if I \n\nHi Joe,\n\nWhat Philip seems to be asking for is a mechanism where by if a function\nis marked as being mathematically deterministic (given a particular set of\nparameters the same result is always returned -- eg: cos(), sin(),\netc) then the result is cached and next time the function is called with\nthe same argument(s) the result is retrieved from the cache instead of the\nfunction being run again.\n\nIf I have got this correct, there is merit in this request. It is a\nfeature of other databases (such as oracle) and SQL99 provides for a\ndifferentiation between deterministic and 'possibly non-deterministic'\nroutines. It does not discuss, to my knowledge, how this information\nshould be used.\n\nI do not know if it is worth while implementing a deterministic function\nresult cache in Postgres -- I haven't looked at the complexity. Needless\nto say, it would not be trivial :-).\n\nGavin\n\n\n",
"msg_date": "Mon, 19 Aug 2002 17:03:18 +1000 (EST)",
"msg_from": "Gavin Sherry <swm@linuxworld.com.au>",
"msg_from_op": false,
"msg_subject": "Re: Function result cacheing - any comments?"
},
{
"msg_contents": "> What Philip seems to be asking for is a mechanism where by if a function\n> is marked as being mathematically deterministic (given a particular set of\n> parameters the same result is always returned -- eg: cos(), sin(),\n> etc) then the result is cached and next time the function is called with\n> the same argument(s) the result is retrieved from the cache instead of the\n> function being run again.\n\nI was under the impression that the sin, cos, tan and like functions are\nmarked non-volatile in the system catalogs and so are evaluated once per\ntransaction only.\n\nChris\n\n",
"msg_date": "Mon, 19 Aug 2002 15:18:14 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: Function result cacheing - any comments?"
},
{
"msg_contents": "At 17:03 19/08/2002 +1000, Gavin Sherry wrote:\n\n>What Philip seems to be asking for is a mechanism where by if a function\n>is marked as being mathematically deterministic (given a particular set of\n>parameters the same result is always returned -- eg: cos(), sin(),\n>etc) then the result is cached and next time the function is called with\n>the same argument(s) the result is retrieved from the cache instead of the\n>function being run again.\n\nExactly. But obviously not limited to simple mathematical functions.\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n\n",
"msg_date": "Mon, 19 Aug 2002 17:34:22 +1000",
"msg_from": "Philip Warner <pjw@rhyme.com.au>",
"msg_from_op": true,
"msg_subject": "Re: Function result cacheing - any comments?"
},
{
"msg_contents": "> >What Philip seems to be asking for is a mechanism where by if a function\n> >is marked as being mathematically deterministic (given a\n> particular set of\n> >parameters the same result is always returned -- eg: cos(), sin(),\n> >etc) then the result is cached and next time the function is called with\n> >the same argument(s) the result is retrieved from the cache\n> instead of the\n> >function being run again.\n>\n> Exactly. But obviously not limited to simple mathematical functions.\n\n>From 7.3 docs:\n\nhttp://candle.pha.pa.us/main/writings/pgsql/sgml/sql-createfunction.html\n\nCREATE [ OR REPLACE ] FUNCTION name ( [ argtype [, ...] ] )\n RETURNS rettype\n { LANGUAGE langname\n | IMMUTABLE | STABLE | VOLATILE\n | CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT\n | [EXTERNAL] SECURITY INVOKER | [EXTERNAL] SECURITY DEFINER\n | AS 'definition'\n | AS 'obj_file', 'link_symbol'\n } ...\n [ WITH ( attribute [, ...] ) ]\n\nAnd:\n\nIMMUTABLE\nSTABLE\nVOLATILE\nThese attributes inform the system whether it is safe to replace multiple\nevaluations of the function with a single evaluation, for run-time\noptimization. At most one choice should be specified. If none of these\nappear, VOLATILE is the default assumption.\n\nIMMUTABLE indicates that the function always returns the same result when\ngiven the same argument values; that is, it does not do database lookups or\notherwise use information not directly present in its parameter list. If\nthis option is given, any call of the function with all-constant arguments\ncan be immediately replaced with the function value.\n\nSTABLE indicates that within a single table scan the function will\nconsistently return the same result for the same argument values, but that\nits result could change across SQL statements. This is the appropriate\nselection for functions whose results depend on database lookups, parameter\nvariables (such as the current time zone), etc. Also note that the\nCURRENT_TIMESTAMP family of functions qualify as stable, since their values\ndo not change within a transaction.\n\nVOLATILE indicates that the function value can change even within a single\ntable scan, so no optimizations can be made. Relatively few database\nfunctions are volatile in this sense; some examples are random(), currval(),\ntimeofday(). Note that any function that has side-effects must be classified\nvolatile, even if its result is quite predictable, to prevent calls from\nbeing optimized away; an example is setval().\n\nSo it seems Philip already has what he wants?\n\nChris\n\n",
"msg_date": "Mon, 19 Aug 2002 15:41:48 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: Function result cacheing - any comments?"
},
{
"msg_contents": "At 15:41 19/08/2002 +0800, Christopher Kings-Lynne wrote:\n>So it seems Philip already has what he wants?\n\nI really hope so, but my understanding is that this information is used \nduring optimization, not execution; I want it to be used in execution.\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n\n",
"msg_date": "Mon, 19 Aug 2002 17:54:56 +1000",
"msg_from": "Philip Warner <pjw@rhyme.com.au>",
"msg_from_op": true,
"msg_subject": "Re: Function result cacheing - any comments?"
},
{
"msg_contents": "Philip Warner <pjw@rhyme.com.au> writes:\n> My theory is that if such a piece of code gets a performance gain, then the \n> code is probably worth including, assuming that the function manager does \n> not need to be butchered to achieve the desired goal. Does that sound \n> reasonable?\n\nSome real results would certainly bolster your case.\n\n> So the obvious question is - in the opinion of people who know the code, \n> can a function-result-cache be implemented with a lifetime of a single \n> statement, without butchering the function manager?\n\nI'd suggest trying to make it a function call handler. Look at the way\nPeter did \"SECURITY DEFINER\" functions for inspiration.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 09:46:50 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Function result cacheing - any comments? "
},
{
"msg_contents": "Philip Warner <pjw@rhyme.com.au> writes:\n> At 15:41 19/08/2002 +0800, Christopher Kings-Lynne wrote:\n>> So it seems Philip already has what he wants?\n\n> I really hope so, but my understanding is that this information is used \n> during optimization, not execution; I want it to be used in execution.\n\nPhilip is correct that there is no cacheing of the sort he wants.\n\nThe existing volatility classifications are somewhat relevant in the\nsense that an IMMUTABLE or STABLE function would be legal to cache the\nway he wants ... but the system doesn't do so, it only uses these\nclassifications to drive before-the-query constant folding and decisions\nabout whether indexscans are safe.\n\nI would resist any attempt to install cacheing by default for immutable\nor stable functions. Philip was proposing that function authors would\nhave to explicitly ask for cacheing (ie, add another function property)\nand that seems a necessary component of an acceptable solution IMHO.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 10:33:35 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Function result cacheing - any comments? "
}
] |
[
{
"msg_contents": "I'm seeing this:\n\ntest=# create schema s1;\nCREATE SCHEMA\ntest=# set search_path to 'public, s1';\nERROR: Namespace \"public, s1\" does not exist\n\nAm I missing something?\n--\nTatsuo Ishii\n",
"msg_date": "Mon, 19 Aug 2002 15:31:05 +0900 (JST)",
"msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>",
"msg_from_op": true,
"msg_subject": "set search_path failure"
},
{
"msg_contents": "Try 'public','s1' perhaps...\n\nChris\n\n> -----Original Message-----\n> From: pgsql-hackers-owner@postgresql.org\n> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Tatsuo Ishii\n> Sent: Monday, 19 August 2002 2:31 PM\n> To: pgsql-hackers@postgresql.org\n> Subject: [HACKERS] set search_path failure\n> \n> \n> I'm seeing this:\n> \n> test=# create schema s1;\n> CREATE SCHEMA\n> test=# set search_path to 'public, s1';\n> ERROR: Namespace \"public, s1\" does not exist\n> \n> Am I missing something?\n> --\n> Tatsuo Ishii\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n",
"msg_date": "Mon, 19 Aug 2002 14:41:23 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: set search_path failure"
},
{
"msg_contents": "> Try 'public','s1' perhaps...\n\nWao, this is confusing:-)\n\nThe man page says:\n\n SET variable { TO | = } { value | 'value' | DEFAULT }\n\nAnd:\n\ntest=# show search_path;\n search_path \n-------------\n public, s1\n(1 row)\n\nSo user naturally thinks\n\nset search_path to 'public,s1';\n\nis a correct syntax, no?\n--\nTatsuo Ishii\n",
"msg_date": "Mon, 19 Aug 2002 15:51:21 +0900 (JST)",
"msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>",
"msg_from_op": true,
"msg_subject": "Re: set search_path failure"
},
{
"msg_contents": "Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> The man page says:\n> SET variable { TO | = } { value | 'value' | DEFAULT }\n\n> So user naturally thinks\n> set search_path to 'public,s1';\n> is a correct syntax, no?\n\nThe man page needs improvement --- some variables accept a list of\nvalues now. In particular\n\tSET search_path = public, s1;\n\tSET search_path = \"public\", \"s1\";\n\tSET search_path = 'public', 's1';\nwould all be correct ways of expressing this. The other is not, and\ncan't be because it would require excluding commas from the set of\ncharacters allowed in quoted schema names.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 09:53:50 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: set search_path failure "
}
] |
[
{
"msg_contents": "Having contributed to the need for pg_dump/initdb/restore when\nupgrading from 7.2 to 7.3, I plan to submit a patch which *could* make\nfuture transitions easier.\n\nbufpage.h:\n\ntypedef struct PageHeaderData\n{\n...\n\tuint32\t\tpd_type;\t\t/* kind and version */\n...\n}\n\n#define PKIND_HEAP 0x36ae\n#define PKIND_BTREEMETA 0x696e\n#define PKIND_BTREEINT 0x7552\n#define PKIND_BTREELEAF 0x0c9c\n#define PKIND_HASH 0xce79\n#define PKIND_SEQUENCE 0xd863\n#define PKIND_GISTINT 0x5b52\n#define PKIND_GISTLEAF 0xde08\n#define PKIND_RTREEINT 0x6d17\n#define PKIND_RTREELEAF 0x239e\n\n#define PageSetType(page, kind, major, minor) \\\n\t(((PageHeader) (page))->pd_type = \\\n\t (((kind) << 16) | ((major) << 12) | ((minor) << 8)) \\\n\t)\n\n#define PageSetTypeCurrent (page, kind) PageSetType(page, kind, 7, 3)\n\n#define PageGetKind(page) \\\n\t((((PageHeader) (page))->pd_type & 0xffff0000) >> 16)\n\n#define PageGetFormat(page) \\\n\t((((PageHeader) (page))->pd_type & 0x0000ff00) >> 8)\n\n#define PageGetFormatMinor(page) \\\n\t((((PageHeader) (page))->pd_type & 0x00000f00) >> 8)\n\n#define PageGetFormatMajor(page) \\\n\t((((PageHeader) (page))->pd_type & 0x0000f000) >> 12)\n\nWith most page types this looks like a waste of space (0,05%), which I\nhope can be compensated for by greater flexibility in future Postgres\nversions. With rtree and gist pd_type replaces a flags field in\nOpaqueData (not yet sure about this; will investigate further).\n\nNote, that this or any other kind of version information has to be\nimplemented at least one release *before* it can be used for the first\ntime.\n\nComments? Any chance for this to go into 7.3?\n\nServus\n Manfred\n",
"msg_date": "Mon, 19 Aug 2002 11:28:01 +0200",
"msg_from": "Manfred Koizar <mkoi-pg@aon.at>",
"msg_from_op": true,
"msg_subject": "Page type"
},
{
"msg_contents": "Manfred Koizar <mkoi-pg@aon.at> writes:\n> Having contributed to the need for pg_dump/initdb/restore when\n> upgrading from 7.2 to 7.3, I plan to submit a patch which *could* make\n> future transitions easier.\n\nWe do need a page version code but I do not want to waste 4 bytes per\npage on it.\n\nI was intending to steal the low order byte of the pd_pagesize field,\nthereby restricting page sizes to be multiples of 256 (no big loss).\nExtant databases would appear to have page version number zero.\n\n> #define PKIND_HEAP 0x36ae\n> #define PKIND_BTREEMETA 0x696e\n> #define PKIND_BTREEINT 0x7552\n> #define PKIND_BTREELEAF 0x0c9c\n> #define PKIND_HASH 0xce79\n> #define PKIND_SEQUENCE 0xd863\n> #define PKIND_GISTINT 0x5b52\n> #define PKIND_GISTLEAF 0xde08\n> #define PKIND_RTREEINT 0x6d17\n> #define PKIND_RTREELEAF 0x239e\n\nThis is vast overkill. There might be some value in distinguishing the\ndifferent kinds of indexes (although I think you can already do that by\npaying attention to the size of the special space; if not, you'd have to\nactually look into page zero). We do not need redundant marking of the\ntype of the individual index page.\n\n> With rtree and gist pd_type replaces a flags field in\n> OpaqueData (not yet sure about this; will investigate further).\n\nThis is not an improvement, only change for the sake of change.\nI'd suggest leaving the existing index logic alone.\n\nI was intending only to mark 7.3 pages with page version 1 (instead of\n0), viewing that as a way of signaling the different header tuple\nlayout.\n\nI could also be talked into moving the LP_xxx flags in ItemIds per your\nsuggestion of awhile back --- the efficiency gain from letting\noffset/size be cleanly aligned is probably marginal, but simply letting\nhex dumps of pages be more easily readable has some value. And since\nwe're breaking dump tools already this doesn't seem to have much cost.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 10:18:25 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Page type "
},
{
"msg_contents": "\nI didn't follow the index part completely, but will heap and index pages\nhave the version info in the same offset? Will there be a way to\neasily identify an index page vs. a heap page.\n\n---------------------------------------------------------------------------\n\nTom Lane wrote:\n> Manfred Koizar <mkoi-pg@aon.at> writes:\n> > Having contributed to the need for pg_dump/initdb/restore when\n> > upgrading from 7.2 to 7.3, I plan to submit a patch which *could* make\n> > future transitions easier.\n> \n> We do need a page version code but I do not want to waste 4 bytes per\n> page on it.\n> \n> I was intending to steal the low order byte of the pd_pagesize field,\n> thereby restricting page sizes to be multiples of 256 (no big loss).\n> Extant databases would appear to have page version number zero.\n> \n> > #define PKIND_HEAP 0x36ae\n> > #define PKIND_BTREEMETA 0x696e\n> > #define PKIND_BTREEINT 0x7552\n> > #define PKIND_BTREELEAF 0x0c9c\n> > #define PKIND_HASH 0xce79\n> > #define PKIND_SEQUENCE 0xd863\n> > #define PKIND_GISTINT 0x5b52\n> > #define PKIND_GISTLEAF 0xde08\n> > #define PKIND_RTREEINT 0x6d17\n> > #define PKIND_RTREELEAF 0x239e\n> \n> This is vast overkill. There might be some value in distinguishing the\n> different kinds of indexes (although I think you can already do that by\n> paying attention to the size of the special space; if not, you'd have to\n> actually look into page zero). We do not need redundant marking of the\n> type of the individual index page.\n> \n> > With rtree and gist pd_type replaces a flags field in\n> > OpaqueData (not yet sure about this; will investigate further).\n> \n> This is not an improvement, only change for the sake of change.\n> I'd suggest leaving the existing index logic alone.\n> \n> I was intending only to mark 7.3 pages with page version 1 (instead of\n> 0), viewing that as a way of signaling the different header tuple\n> layout.\n> \n> I could also be talked into moving the LP_xxx flags in ItemIds per your\n> suggestion of awhile back --- the efficiency gain from letting\n> offset/size be cleanly aligned is probably marginal, but simply letting\n> hex dumps of pages be more easily readable has some value. And since\n> we're breaking dump tools already this doesn't seem to have much cost.\n> \n> \t\t\tregards, tom lane\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n> \n> http://archives.postgresql.org\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Mon, 19 Aug 2002 22:15:06 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Page type"
},
{
"msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> I didn't follow the index part completely, but will heap and index pages\n> have the version info in the same offset?\n\nSure, low byte of pd_pagesize.\n\n> Will there be a way to easily identify an index page vs. a heap page.\n\nThere already is: heap pages have zero special-space size, indexes\ndon't.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 22:33:13 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Page type "
}
] |
[
{
"msg_contents": "\n> > Seems with above you are not able to constrain what qualifies for a\n> > supertable row, you would only be able to specify constraints that\n> > apply to all it's subtables.\n> \n> Yes, that's the whole point. If I have a constraint on a table, I think\n> it should *never* be possible for that constraint to be violated. If a\n> subtable should not have constraint the supertable has, it shouldn't\n> inherit from the supertable.\n\nIf you want that, you simply need to only create constraints that apply to\nall tables in the hierarchy. Note that you *can* do this. It should imho be \nthe default behavior.\n\n> \n> To do otherwise breaks the relational model.\n>\n\nThat is probably a point of argument. Imho the inheritance feature\nis something orthogonal to the relational model. It is something else, and \nthus cannot break the relational model.\n\n> \n> > The SQL inheritance is a class/subclass thing. All tables have\n> > instances (==rows) that are not (by itself) related. (Even if\n> > they happen to share all attribute values with another row of a\n> > supertable.) If you want that, then you need to resort to 3NF (or\n> > ROWREF's which iirc is another SQL99 feature).\n> \n> As I understand it, SQL99 has the restriction that a row with the same\n> primary key appearing in a supertable and/or any of its subtables must\n> be the result of a single INSERT statement. Thus, SQL99 doesn't allow\n> what you're saying, if I understand what you're saying. (I'm not sure\n> that I do.)\n\nI was not talking about primary key, not all tables have a primary key.\nIf the supertable has a PK, then of course an exact match of columns is not \npossible in supertable/subtable rows.\n \n> Am I to take it that you think the inheritance should be inheritance\n> of type information only? That is, if I have supertable A and\n> subtable A', inserting a row into A' does not make a row appear in\n> A? If so, I've got not real problem with that at present, but it's\n> not what postgres currently does, nor would it conform to SQL99.\n\nNo, not at all. All I am saying is that I want to be able to create a \nconstraint that only applies to the supertable rows, and not the\nsubtable rows. I would *not* want this as default behavior when creating a\nconstraint though.\n\nAndreas\n",
"msg_date": "Mon, 19 Aug 2002 11:34:53 +0200",
"msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>",
"msg_from_op": true,
"msg_subject": "Re: Inheritance "
},
{
"msg_contents": "On Mon, 19 Aug 2002, Zeugswetter Andreas SB SD wrote:\n\n> > Yes, that's the whole point. If I have a constraint on a table, I think\n> > it should *never* be possible for that constraint to be violated. If a\n> > subtable should not have constraint the supertable has, it shouldn't\n> > inherit from the supertable.\n>\n> If you want that, you simply need to only create constraints that apply to\n> all tables in the hierarchy. Note that you *can* do this. It should imho be\n> the default behavior.\n\nSo what you're saying is that constraints shouldn't be inherited?\n\n> > To do otherwise breaks the relational model.\n>\n> That is probably a point of argument. Imho the inheritance feature\n> is something orthogonal to the relational model. It is something else, and\n> thus cannot break the relational model.\n\nSo then constraints must be inherited. The relational model, if I\nam not incorrect here, says that, given a table definition such as\nthis:\n\n CREATE TABLE my_table (\n\tmy_key int PRIMARY KEY,\n\tmy_value text UNIQUE,\n\tmy_other_value int CHECK (my_other_value > 0)\n )\n\nYou will never, ever, when selecting from this table, have returned to you\n\n 1. two rows with the same value of my_key but different values\n for the other columns,\n\n 2. two rows with the same value of my_value but different values\n for the other columns, or\n\n 3. a row in which the value of my_other_value is not greater than zero.\n\nBreaking these sorts of guarantees under any circumstances really\ndoesn't do it for me; what's the point of having guarantees if they\naren't guarantees?\n\n> > As I understand it, SQL99 has the restriction that a row with the same\n> > primary key appearing in a supertable and/or any of its subtables must\n> > be the result of a single INSERT statement. Thus, SQL99 doesn't allow\n> > what you're saying, if I understand what you're saying. (I'm not sure\n> > that I do.)\n>\n> I was not talking about primary key, not all tables have a primary key.\n\nWell, for those that do....\n\nAlso, I should amend that; I suspect (though I could well be wrong,\nknowing how screwed up SQL is at times) that this really applies\nto all candidate keys in the table.\n\n(And this is one of my complaints about SQL; it's possible for a table to\nexist without candidate keys. So much for set theory!)\n\n> No, not at all. All I am saying is that I want to be able to create a\n> constraint that only applies to the supertable rows, and not the\n> subtable rows.\n\nI would strongly object to that. It should not be possible to SELECT\ndata from a table that violates the constraints that that table is\nguaranteeing on the data.\n\ncjs\n-- \nCurt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org\n Don't you know, in this new Dark Age, we're all light. --XTC\n\n",
"msg_date": "Mon, 19 Aug 2002 22:56:04 +0900 (JST)",
"msg_from": "Curt Sampson <cjs@cynic.net>",
"msg_from_op": false,
"msg_subject": "Re: Inheritance "
}
] |
[
{
"msg_contents": "Hi Guys,\n\nIt would be really neat if the contrib makefile could run an sql script upon\nuninstall as well as removing the files. Is that a neat idea? Means it can\nget rid off all the functions, types, etc. automatically.\n\nUnfortunately it's a bit beyond my meagre Makefile abilities...\n\nChris\n\n\n",
"msg_date": "Mon, 19 Aug 2002 23:20:35 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "Uninstall in contrib/"
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> It would be really neat if the contrib makefile could run an sql script upon\n> uninstall as well as removing the files. Is that a neat idea? Means it can\n> get rid off all the functions, types, etc. automatically.\n\nAutomatically? How will it determine which database(s) contain the\ntypes? What if the databases require password access?\n\nIt probably would be useful to supply an uninstall SQL script to reverse\nthe effects of the install script, but since we have no idea where the\ninstall was run I think we'll have to rely on the DBA to use the script.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 11:29:41 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: Uninstall in contrib/ "
},
{
"msg_contents": "> Automatically? How will it determine which database(s) contain the\n> types? What if the databases require password access?\n> \n> It probably would be useful to supply an uninstall SQL script to reverse\n> the effects of the install script, but since we have no idea where the\n> install was run I think we'll have to rely on the DBA to use the script.\n\nAh - that's probably what I meant.\n\nChris\n\n",
"msg_date": "Mon, 19 Aug 2002 23:51:48 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": true,
"msg_subject": "Re: Uninstall in contrib/ "
}
] |
[
{
"msg_contents": "\nSurprised it took this long.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide Dialup from $16.00/mo at Pop4 Networking\n http://www.camping-usa.com http://www.cloudninegifts.com\n http://www.meanstreamradio.com http://www.unknown-artists.com\n==========================================================================\n\n\n\n---------- Forwarded message ----------\nDate: Mon, 19 Aug 2002 15:40:28 +0000\nFrom: Sir Mordred The Traitor <mordred@s-mail.com>\nTo: bugtraq@securityfocus.com\nSubject: @(#) Mordred Labs advisory 0x0001: Buffer overflow in PostgreSQL\n\n// @(#) Mordred Labs Advisory 0x0001\n\nRelease data: 19/08/02\nName: Buffer overflow in PostgreSQL\nVersions affected: <= 7.2\nRisk: average\n\n--[ Description:\nPostgreSQL is an advanced object-relational database management system\nthat supports an extended subset of the SQL standard, including\ntransactions,\nforeign keys, subqueries, triggers, user-defined types and functions.\n\nThere exists a stack based buffer overflow in cash_words() function, that\npotentially allows an attacker to execute malicious code.\n\n--[ How to reproduce:\npsql> select cash_words('-700000000000000000000000000000');\npgReadData() -- backend closed the channel unexpectedly.\n\t.... ....\nThe connection to the server was lost...\n\n--[ Solution:\nUpgrade to version 7.2.1.\n\n\n\n\n________________________________________________________________________\nThis letter has been delivered unencrypted. We'd like to remind you that\nthe full protection of e-mail correspondence is provided by S-mail\nencryption mechanisms if only both, Sender and Recipient use S-mail.\nRegister at S-mail.com: http://www.s-mail.com/inf/en\n\n",
"msg_date": "Mon, 19 Aug 2002 12:44:33 -0400 (EDT)",
"msg_from": "Vince Vielhaber <vev@michvhf.com>",
"msg_from_op": true,
"msg_subject": "@(#) Mordred Labs advisory 0x0001: Buffer overflow in PostgreSQL\n (fwd)"
},
{
"msg_contents": "Hi Vince,\n\nGlad he made the advisory for something there's a fix for. :)\n\nRegards and best wishes,\n\nJustin Clift\n\n\nVince Vielhaber wrote:\n> \n> Surprised it took this long.\n> \n> Vince.\n> --\n> ==========================================================================\n> Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n> 56K Nationwide Dialup from $16.00/mo at Pop4 Networking\n> http://www.camping-usa.com http://www.cloudninegifts.com\n> http://www.meanstreamradio.com http://www.unknown-artists.com\n> ==========================================================================\n> \n> ---------- Forwarded message ----------\n> Date: Mon, 19 Aug 2002 15:40:28 +0000\n> From: Sir Mordred The Traitor <mordred@s-mail.com>\n> To: bugtraq@securityfocus.com\n> Subject: @(#) Mordred Labs advisory 0x0001: Buffer overflow in PostgreSQL\n> \n> // @(#) Mordred Labs Advisory 0x0001\n> \n> Release data: 19/08/02\n> Name: Buffer overflow in PostgreSQL\n> Versions affected: <= 7.2\n> Risk: average\n> \n> --[ Description:\n> PostgreSQL is an advanced object-relational database management system\n> that supports an extended subset of the SQL standard, including\n> transactions,\n> foreign keys, subqueries, triggers, user-defined types and functions.\n> \n> There exists a stack based buffer overflow in cash_words() function, that\n> potentially allows an attacker to execute malicious code.\n> \n> --[ How to reproduce:\n> psql> select cash_words('-700000000000000000000000000000');\n> pgReadData() -- backend closed the channel unexpectedly.\n> .... ....\n> The connection to the server was lost...\n> \n> --[ Solution:\n> Upgrade to version 7.2.1.\n> \n> ________________________________________________________________________\n> This letter has been delivered unencrypted. We'd like to remind you that\n> the full protection of e-mail correspondence is provided by S-mail\n> encryption mechanisms if only both, Sender and Recipient use S-mail.\n> Register at S-mail.com: http://www.s-mail.com/inf/en\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n",
"msg_date": "Tue, 20 Aug 2002 02:51:30 +1000",
"msg_from": "Justin Clift <justin@postgresql.org>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "Justin Clift <justin@postgresql.org> writes:\n> Glad he made the advisory for something there's a fix for. :)\n\nThe claim that this bug allows execution of arbitrary code is bogus anyway.\nThe overflow at INT_MIN will clobber the stack, yes, but in an absolutely\npredetermined way; an attacker will have no opportunity to insert code\nof his choosing.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 14:24:08 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "Vince,\n\nDo you reckon it's worth you responding to \"Sir Mordred\" and pointing\nout that he overstated the vulnerability?\n\n:-)\n\nRegards and best wishes,\n\nJustin Clift\n\n\nTom Lane wrote:\n> \n> Justin Clift <justin@postgresql.org> writes:\n> > Glad he made the advisory for something there's a fix for. :)\n> \n> The claim that this bug allows execution of arbitrary code is bogus anyway.\n> The overflow at INT_MIN will clobber the stack, yes, but in an absolutely\n> predetermined way; an attacker will have no opportunity to insert code\n> of his choosing.\n> \n> regards, tom lane\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n",
"msg_date": "Tue, 20 Aug 2002 08:56:02 +1000",
"msg_from": "Justin Clift <justin@postgresql.org>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Tue, 20 Aug 2002, Justin Clift wrote:\n\n> Vince,\n>\n> Do you reckon it's worth you responding to \"Sir Mordred\" and pointing\n> out that he overstated the vulnerability?\n\nNot me. Tom (pref) or Marc would be the proper respondent.\n\n>\n> :-)\n>\n> Regards and best wishes,\n>\n> Justin Clift\n>\n>\n> Tom Lane wrote:\n> >\n> > Justin Clift <justin@postgresql.org> writes:\n> > > Glad he made the advisory for something there's a fix for. :)\n> >\n> > The claim that this bug allows execution of arbitrary code is bogus anyway.\n> > The overflow at INT_MIN will clobber the stack, yes, but in an absolutely\n> > predetermined way; an attacker will have no opportunity to insert code\n> > of his choosing.\n> >\n> > regards, tom lane\n>\n>\n\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide Dialup from $16.00/mo at Pop4 Networking\n http://www.camping-usa.com http://www.cloudninegifts.com\n http://www.meanstreamradio.com http://www.unknown-artists.com\n==========================================================================\n\n\n\n",
"msg_date": "Mon, 19 Aug 2002 18:59:44 -0400 (EDT)",
"msg_from": "Vince Vielhaber <vev@michvhf.com>",
"msg_from_op": true,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "> On Tue, 20 Aug 2002, Justin Clift wrote:\n> \n> > Vince,\n> >\n> > Do you reckon it's worth you responding to \"Sir Mordred\" and pointing\n> > out that he overstated the vulnerability?\n> \n> Not me. Tom (pref) or Marc would be the proper respondent.\n\nHas it actually been fixed?\n\nChris\n\n",
"msg_date": "Tue, 20 Aug 2002 09:36:16 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Christopher Kings-Lynne wrote:\n> \n> > On Tue, 20 Aug 2002, Justin Clift wrote:\n> >\n> > > Vince,\n> > >\n> > > Do you reckon it's worth you responding to \"Sir Mordred\" and pointing\n> > > out that he overstated the vulnerability?\n> >\n> > Not me. Tom (pref) or Marc would be the proper respondent.\n> \n> Has it actually been fixed?\n\nThe TODO list only mentions the cash_out(2) problem, whilst the email\narchives mention them both.\n\n From the info still around, this looks to mean that the cash_words()\nproblem was fixed, but the cash_out() problem was harder to fix.\n\nTom/Bruce, is that correct?\n\n+ Justin\n \n> Chris\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n",
"msg_date": "Tue, 20 Aug 2002 11:51:35 +1000",
"msg_from": "Justin Clift <justin@postgresql.org>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Vince Vielhaber wrote:\n> \n> Surprised it took this long.\n\nYes, me too, and it says the solution is to upgrade to 7.2.1. Nope.\n\n\n> ---------- Forwarded message ----------\n> Date: Mon, 19 Aug 2002 15:40:28 +0000\n> From: Sir Mordred The Traitor <mordred@s-mail.com>\n> To: bugtraq@securityfocus.com\n> Subject: @(#) Mordred Labs advisory 0x0001: Buffer overflow in PostgreSQL\n> \n> // @(#) Mordred Labs Advisory 0x0001\n> \n> Release data: 19/08/02\n> Name: Buffer overflow in PostgreSQL\n> Versions affected: <= 7.2\n> Risk: average\n> \n> --[ Description:\n> PostgreSQL is an advanced object-relational database management system\n> that supports an extended subset of the SQL standard, including\n> transactions,\n> foreign keys, subqueries, triggers, user-defined types and functions.\n> \n> There exists a stack based buffer overflow in cash_words() function, that\n> potentially allows an attacker to execute malicious code.\n> \n> --[ How to reproduce:\n> psql> select cash_words('-700000000000000000000000000000');\n> pgReadData() -- backend closed the channel unexpectedly.\n> \t.... ....\n> The connection to the server was lost...\n> \n> --[ Solution:\n> Upgrade to version 7.2.1.\n> \n> \n> \n> \n> ________________________________________________________________________\n> This letter has been delivered unencrypted. We'd like to remind you that\n> the full protection of e-mail correspondence is provided by S-mail\n> encryption mechanisms if only both, Sender and Recipient use S-mail.\n> Register at S-mail.com: http://www.s-mail.com/inf/en\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Mon, 19 Aug 2002 22:28:58 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n> Has it actually been fixed?\n\nI couldn't reproduce a problem with his example. The buffer size in\ncash_words is awfully tight though --- it's dimensioned 128 which looks\nlike a round number rather than a carefully calculated one, and the\nrequired size is at least 115. I was thinking of bumping it up to 256\njust to be sure.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 22:30:26 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "Justin Clift wrote:\n> Hi Vince,\n> \n> Glad he made the advisory for something there's a fix for. :)\n\nOh, I see he jumpe on cash_words() and didn't mention cash_out.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Mon, 19 Aug 2002 22:30:47 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Justin Clift wrote:\n> Christopher Kings-Lynne wrote:\n> > \n> > > On Tue, 20 Aug 2002, Justin Clift wrote:\n> > >\n> > > > Vince,\n> > > >\n> > > > Do you reckon it's worth you responding to \"Sir Mordred\" and pointing\n> > > > out that he overstated the vulnerability?\n> > >\n> > > Not me. Tom (pref) or Marc would be the proper respondent.\n> > \n> > Has it actually been fixed?\n> \n> The TODO list only mentions the cash_out(2) problem, whilst the email\n> archives mention them both.\n> \n> >From the info still around, this looks to mean that the cash_words()\n> problem was fixed, but the cash_out() problem was harder to fix.\n> \n> Tom/Bruce, is that correct?\n\nLooks like cash_words is fixed in current CVS, so I guess in 7.2.1:\n\t\n\tWelcome to psql 7.3devel, the PostgreSQL interactive terminal.\n\t\n\tType: \\copyright for distribution terms\n\t \\h for help with SQL commands\n\t \\? for help on internal slash commands\n\t \\g or terminate with semicolon to execute query\n\t \\q to quit\n\t\n\ttest=> select cash_words('-700000000000000000000000000000');\n\t cash_words \n\t \n\t--------------------------------------------------------------------------------------------------------------------\n\t\n\t Minus twenty one million four hundred seventy four thousand eight\n\thundred thirty six dollars and forty eight cents\n\t(1 row)\n\nLooks like cash_out still bombs:\n\n\n\ttest=> select cash_out(2);\n\tserver closed the connection unexpectedly\n\t This probably means the server terminated abnormally\n\t before or while processing the request.\n\tThe connection to the server was lost. Attempting reset: Failed.\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Mon, 19 Aug 2002 22:32:35 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Justin Clift <justin@postgresql.org> writes:\n> From the info still around, this looks to mean that the cash_words()\n> problem was fixed, but the cash_out() problem was harder to fix.\n\n> Tom/Bruce, is that correct?\n\nThe cash_out problem can't really be fixed until we do something about\nsubdividing type \"opaque\" into multiple pseudo-types with more carefully\ndefined meanings. cash_out is declared cash_out(opaque) which does not\nreally mean that it accepts any input type ... but one of the several\nmeanings of \"opaque\" is \"accepts any type\", so the parser doesn't reject\ncash_out(2).\n\nI'd like to see something done about this fairly soon, but it's not\nhappening for 7.3 ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 22:42:26 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "Tom Lane wrote:\n> \n> Justin Clift <justin@postgresql.org> writes:\n> > From the info still around, this looks to mean that the cash_words()\n> > problem was fixed, but the cash_out() problem was harder to fix.\n> \n> > Tom/Bruce, is that correct?\n> \n> The cash_out problem can't really be fixed until we do something about\n> subdividing type \"opaque\" into multiple pseudo-types with more carefully\n> defined meanings. cash_out is declared cash_out(opaque) which does not\n> really mean that it accepts any input type ... but one of the several\n> meanings of \"opaque\" is \"accepts any type\", so the parser doesn't reject\n> cash_out(2).\n> \n> I'd like to see something done about this fairly soon, but it's not\n> happening for 7.3 ...\n\nHang on, you seem to be suggesting we release a major new upgrade, with\nmajor new functionality, knowing it contains a way to trivially crash\nthe backend.\n\nErr.. hang on. What happened to our reputation for quality and\nreleasing \"when it's ready\"?\n\nSince when were we Microsoft-ized?\n\n;-)\n\nRegards and best wishes,\n\nJustin Clift\n \n> regards, tom lane\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n",
"msg_date": "Tue, 20 Aug 2002 13:17:44 +1000",
"msg_from": "Justin Clift <justin@postgresql.org>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "> Looks like cash_words is fixed in current CVS, so I guess in 7.2.1:\n> \t\n> \tWelcome to psql 7.3devel, the PostgreSQL interactive terminal.\n> \t\n> \tType: \\copyright for distribution terms\n> \t \\h for help with SQL commands\n> \t \\? for help on internal slash commands\n> \t \\g or terminate with semicolon to execute query\n> \t \\q to quit\n> \t\n> \ttest=> select cash_words('-700000000000000000000000000000');\n> \t \n> cash_words \n> \t \n> \t\n> ------------------------------------------------------------------\n> --------------------------------------------------\n> \t\n> \t Minus twenty one million four hundred seventy four thousand eight\n> \thundred thirty six dollars and forty eight cents\n> \t(1 row)\n\nIt doesn't crash - but it sure is giving the wrong answer ;)\n\nChris\n\n",
"msg_date": "Tue, 20 Aug 2002 11:24:43 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Justin Clift <justin@postgresql.org> writes:\n> Hang on, you seem to be suggesting we release a major new upgrade, with\n> major new functionality, knowing it contains a way to trivially crash\n> the backend.\n\nThis particular hole has been in *every* release since Postgres 1.01.\n\nI'm really not interested in responding to any argument that we cannot\nrelease 7.3 until we have fixed everything that could be labeled a DOS\nthreat. 7.3 already contains a bunch of bug fixes; shall we postpone\nreleasing those because there are other unfixed bugs?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 23:27:43 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "Tom Lane wrote:\n> \n> Justin Clift <justin@postgresql.org> writes:\n> > Hang on, you seem to be suggesting we release a major new upgrade, with\n> > major new functionality, knowing it contains a way to trivially crash\n> > the backend.\n> \n> This particular hole has been in *every* release since Postgres 1.01.\n\nHow many releases have we known about this and still done a major\nrelease?\n \n> I'm really not interested in responding to any argument that we cannot\n> release 7.3 until we have fixed everything that could be labeled a DOS\n> threat. 7.3 already contains a bunch of bug fixes; shall we postpone\n> releasing those because there are other unfixed bugs?\n\nHow trivial are they to exploit?\n\nFor example, thinking about something like the various ISP's around who\nhost PostgreSQL databases; how much effort would it take to fix the\nvulnerabilities that let someone with remote access, but no ability to\nrun a \"trusted\" language, take out the backend?\n\nRegards and best wishes,\n\nJustin Clift\n \n> regards, tom lane\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n",
"msg_date": "Tue, 20 Aug 2002 13:40:22 +1000",
"msg_from": "Justin Clift <justin@postgresql.org>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au> writes:\n>> test=> select cash_words('-700000000000000000000000000000');\n>> Minus twenty one million four hundred seventy four thousand eight\n>> hundred thirty six dollars and forty eight cents\n\n> It doesn't crash - but it sure is giving the wrong answer ;)\n\nWell, yeah, it's only a 32-bit storage value. Overflow per se is not\nthe issue here. (One reason why I'm not excited about fixing this on an\nemergency basis is that I can't believe anyone is using the money type\nfor any mission-critical applications... it's too limited.)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 23:47:30 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "> > I'd like to see something done about this fairly soon, but it's not\n> > happening for 7.3 ...\n>\n> Hang on, you seem to be suggesting we release a major new upgrade, with\n> major new functionality, knowing it contains a way to trivially crash\n> the backend.\n>\n> Err.. hang on. What happened to our reputation for quality and\n> releasing \"when it's ready\"?\n>\n> Since when were we Microsoft-ized?\n\nI personally agree with Justin that it should be fixed for 7.3 (just imagine\nall those people selling colo postgres services). There should be a 7.2.2\nas well that fixes the date parser problem.\n\nHowever, if you let people just run anything they want on your server (eg.\nselect cash_out(2);) then you're already in a world of pain because they can\nquite easily DOS you by doing large, expensive queries, creating 1000\nbillion row tables, etc., etc.\n\nChris\n\n",
"msg_date": "Tue, 20 Aug 2002 11:50:47 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Mon, 2002-08-19 at 23:50, Christopher Kings-Lynne wrote:\n> > > I'd like to see something done about this fairly soon, but it's not\n> > > happening for 7.3 ...\n> >\n> > Hang on, you seem to be suggesting we release a major new upgrade, with\n> > major new functionality, knowing it contains a way to trivially crash\n> > the backend.\n> >\n> > Err.. hang on. What happened to our reputation for quality and\n> > releasing \"when it's ready\"?\n> >\n> > Since when were we Microsoft-ized?\n> \n> I personally agree with Justin that it should be fixed for 7.3 (just imagine\n> all those people selling colo postgres services). There should be a 7.2.2\n> as well that fixes the date parser problem.\n\nHas anyone actually considered the time required to make the appropriate\nfix (clean up use of OPAQUE)? I don't think this bug is worthy of\npushing the 7.3 release out a few weeks.\n\nThe simple fix is to drop the money type entirely as it serves few\npurposes -- but there are some who use it.\n\n",
"msg_date": "19 Aug 2002 23:58:06 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Justin Clift <justin@postgresql.org> writes:\n> Tom Lane wrote:\n>> This particular hole has been in *every* release since Postgres 1.01.\n\n> How many releases have we known about this and still done a major\n> release?\n\nSeveral; a quick glance in the archives shows this has been on the TODO\nlist since 7.0.something.\n\nI really have zero patience for arguments that \"problem FOO is so bad\nthat we should drop everything else until we've fixed it\". There are\ntoo many possible candidates for problem FOO, and there are still only\n24 hours in the day.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 23:58:49 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "Rod Taylor dijo: \n\n> The simple fix is to drop the money type entirely as it serves few\n> purposes -- but there are some who use it.\n\nThere are a lot of other functions that cause the same problem. Just\ndropping or fixing cash_out is not the solution.\n\n-- \nAlvaro Herrera (<alvherre[a]atentus.com>)\nOne man's impedance mismatch is another man's layer of abstraction.\n(Lincoln Yeoh)\n\n",
"msg_date": "Tue, 20 Aug 2002 00:17:30 -0400 (CLT)",
"msg_from": "Alvaro Herrera <alvherre@atentus.com>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Tue, 20 Aug 2002 13:40, Justin Clift wrote:\n[snip]\n> For example, thinking about something like the various ISP's around who\n> host PostgreSQL databases; how much effort would it take to fix the\n> vulnerabilities that let someone with remote access, but no ability to\n> run a \"trusted\" language, take out the backend?\n\nI believe its been said before, in this forum no less, that PostgreSQL should \nfocus on its primary role as an RDBMS and not be paranoid about security. I \nbelieve it was the thread on SSL connections, and Tom suggested a simple ssh \ntunnel or vpn.\n\nOf course, lets not leave the door wide open, but perhaps the developer's time \nwould be better spent on features such as schemas and replication.\n\nI know that all of my clients have their databases behind several layers of \nfirewalls, and taking advantage of a vulnerability such as this remotely is \nextremely difficult.\n\nFinally, question the due dilligence process that selects an ISP partner who \nwould leave a database open to the world, even if they run \"unbreakable\" \nOracle :)\n\nCheers\n\nMark\n",
"msg_date": "Tue, 20 Aug 2002 14:46:24 +1000",
"msg_from": "Mark Pritchard <mark@tangent.net.au>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Hi Mark,\n\nMark Pritchard wrote:\n> \n<snip> \n> I believe its been said before, in this forum no less, that PostgreSQL should\n> focus on its primary role as an RDBMS and not be paranoid about security. I\n> believe it was the thread on SSL connections, and Tom suggested a simple ssh\n> tunnel or vpn.\n> \n> Of course, lets not leave the door wide open, but perhaps the developer's time\n> would be better spent on features such as schemas and replication.\n\nWhat you're saying has a lot of merit, these are important features. \nHowever, part of our reputation is as being a higher-end, more powerful,\nmore mature, database offering than other solutions around.\n\nAs Tom pointed out, we've already had several releases without getting\nrid of this OPAQUE DOS bug, and as pointed out he also really doesn't\nhave the patience for fixing it (yet).\n\nWas hoping we could get serious bugs fixed sooner rather than later,\notherwise I'm afraid of us just adding more bugs over time until we\nstart to affect our \"having come good\" reputation.\n \n> I know that all of my clients have their databases behind several layers of\n> firewalls, and taking advantage of a vulnerability such as this remotely is\n> extremely difficult.\n\nTotally agreed. Lots of higher end or corporate places are, and that's\nnot a bad thing in any way.\n\nFor your clients, this particular bugfix doesn't sounds like its\nnecessary.\n\n> Finally, question the due dilligence process that selects an ISP partner who\n> would leave a database open to the world, even if they run \"unbreakable\"\n> Oracle :)\n\nThis is the one point of yours I don't feel you've quite got down pat. \nErr... *why* is it safe to leave a HTTP, SSH, IMAP, etc server open to\nthe world (configured correctly of course), but somehow fundamentally\nwrong to leave a database server open to the world. If we've got a\nproduct without these bugs, there wouldnt be a security vulnerability\nwould there?\n\nThe schema side of things could be *really* useful for ISPs' for\nexample, yet a large number of them probably wouldn't be so comfortable\nhaving PostgreSQL available for their clients whilst knowing that these\nkinds of DOS bugs exists. Mentally, it's not a good thing.\n\nNot trying to be a pain here, but instead trying to keep our QA level\nup.\n\n:)\n\nRegards and best wishes,\n\nJustin Clift\n \n> Cheers\n> \n> Mark\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n",
"msg_date": "Tue, 20 Aug 2002 15:19:42 +1000",
"msg_from": "Justin Clift <justin@postgresql.org>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Mark Pritchard <mark@tangent.net.au> writes:\n> I believe its been said before, in this forum no less, that\n> PostgreSQL should focus on its primary role as an RDBMS and not be\n> paranoid about security. I believe it was the thread on SSL\n> connections, and Tom suggested a simple ssh tunnel or vpn.\n\nI'd say the two issues are pretty different. IMHO, buffer overruns and\nsimilar security problems are just a special class of software bug\n(it's interesting to note that most of the buffer overruns have been\nfound in the less-maintained parts of the system, like the cash type\nor contrib/). Therefore, the justification for fixing buffer overruns\n(and avoiding them in the first place) is the same as for fixing other\nkinds of bugs: it makes the system more reliable.\n\nOn the other hand, adding something like SSL tends to make the system\nmore complex (and therefore *less* reliable). There may or may not be\na pay-off from a user's POV, but it's not the clear win that avoiding\nbuffer overruns is, IMHO.\n\n> Of course, lets not leave the door wide open, but perhaps the\n> developer's time would be better spent on features such as schemas\n> and replication.\n\nIt's probably worth noting that the \"barrier to entry\" for fixing\nbuffer overruns or doing a code audit is much, much lower than for\nimplementing advanced features like schemas or replication. The main\nthing that auditing code requires is time, rather than coding\nskill/knowledge.\n\nCheers,\n\nNeil\n\n-- \nNeil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC\n\n",
"msg_date": "20 Aug 2002 01:22:09 -0400",
"msg_from": "Neil Conway <neilc@samurai.com>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "> As Tom pointed out, we've already had several releases without getting\n> rid of this OPAQUE DOS bug, and as pointed out he also really doesn't\n> have the patience for fixing it (yet).\n>\n> Was hoping we could get serious bugs fixed sooner rather than later,\n> otherwise I'm afraid of us just adding more bugs over time until we\n> start to affect our \"having come good\" reputation.\n\nGetting a buggy rep on BugTraq has got to be a Bad Thing. We already have\nenough trouble competing with MySQL mindshare, and they haven't had BugTraq\nproblems.\n\nChris\n\n",
"msg_date": "Tue, 20 Aug 2002 13:31:38 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Tue, 20 Aug 2002 15:22, Neil Conway wrote:\n> I'd say the two issues are pretty different. IMHO, buffer overruns and\n> similar security problems are just a special class of software bug\n> (it's interesting to note that most of the buffer overruns have been\n> found in the less-maintained parts of the system, like the cash type\n> or contrib/). Therefore, the justification for fixing buffer overruns\n> (and avoiding them in the first place) is the same as for fixing other\n> kinds of bugs: it makes the system more reliable.\n\nAgreed - different issues, similar argument. They should be fixed, I just \ndon't think its a sky is falling type problem. Not saying you said I was \n(*grin*), just that a competent network administrator has taken steps to \nsecure the database over and above that expected of the developers.\n\n> It's probably worth noting that the \"barrier to entry\" for fixing\n> buffer overruns or doing a code audit is much, much lower than for\n> implementing advanced features like schemas or replication. The main\n> thing that auditing code requires is time, rather than coding\n> skill/knowledge.\n\nDefinitely, and I wish I had some to spend on Postgres! Time that is :)\n\nAs you noted, most of the issues are in contrib - obviously due to the \nskills/knowledge of the core team and the strength of the development model. \nHowever, if the quality of programmers in the market is anything to go by, I \ndon't hold out for the future unless Postgres is rewritten in something that \nholds hands as well as Java :)\n\nCheers\n\nMark\n",
"msg_date": "Tue, 20 Aug 2002 16:15:03 +1000",
"msg_from": "Mark Pritchard <mark@tangent.net.au>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Mon, 19 Aug 2002, Tom Lane wrote:\n\n> Justin Clift <justin@postgresql.org> writes:\n> > From the info still around, this looks to mean that the cash_words()\n> > problem was fixed, but the cash_out() problem was harder to fix.\n>\n> > Tom/Bruce, is that correct?\n>\n> The cash_out problem can't really be fixed until we do something about\n> subdividing type \"opaque\" into multiple pseudo-types with more carefully\n> defined meanings. cash_out is declared cash_out(opaque) which does not\n> really mean that it accepts any input type ... but one of the several\n> meanings of \"opaque\" is \"accepts any type\", so the parser doesn't reject\n> cash_out(2).\n>\n> I'd like to see something done about this fairly soon, but it's not\n> happening for 7.3 ...\n\nCan we trap and just return an error before it goes into the weeds and\nput the subdividing opaque fix in later?\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide Dialup from $16.00/mo at Pop4 Networking\n http://www.camping-usa.com http://www.cloudninegifts.com\n http://www.meanstreamradio.com http://www.unknown-artists.com\n==========================================================================\n\n\n\n",
"msg_date": "Tue, 20 Aug 2002 07:36:29 -0400 (EDT)",
"msg_from": "Vince Vielhaber <vev@michvhf.com>",
"msg_from_op": true,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Mon, 19 Aug 2002, Tom Lane wrote:\n\n> Justin Clift <justin@postgresql.org> writes:\n> > From the info still around, this looks to mean that the cash_words()\n> > problem was fixed, but the cash_out() problem was harder to fix.\n> \n> > Tom/Bruce, is that correct?\n> \n> The cash_out problem can't really be fixed until we do something about\n> subdividing type \"opaque\" into multiple pseudo-types with more carefully\n> defined meanings. cash_out is declared cash_out(opaque) which does not\n> really mean that it accepts any input type ... but one of the several\n> meanings of \"opaque\" is \"accepts any type\", so the parser doesn't reject\n> cash_out(2).\n> \n> I'd like to see something done about this fairly soon, but it's not\n> happening for 7.3 ...\n\nDoes anyone have an idea about what other functions are affected by this?\n\nAs a stop gap measure to remove the *known* DoS issue how about changing the\npg_proc entry to restrict input types, i.e. not cash_out(opaque)? cash_words is\nalready listed as only taking the money type is cash_out really that different?\n\nOn a related topic cash_out() is listed in pg_proc as returning an int4 but\ndoesn't the code clearly show that is incorrect?\n\n\n-- \nNigel J. Andrews\nDirector\n\n---\nLogictree Systems Limited\nComputer Consultants\n\n\n",
"msg_date": "Tue, 20 Aug 2002 12:59:22 +0100 (BST)",
"msg_from": "\"Nigel J. Andrews\" <nandrews@investsystems.co.uk>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On August 19, 2002 11:58 pm, Rod Taylor wrote:\n> On Mon, 2002-08-19 at 23:50, Christopher Kings-Lynne wrote:\n> The simple fix is to drop the money type entirely as it serves few\n> purposes -- but there are some who use it.\n\nAs the original creator of the type I probably have the most emotional \nattachment to it but even I am thinking of dropping its use. I would have \npreferred to fix it (more automatic casts and 64 bit storage as well as the \nfixes in the current thread) but I seem to be alone so it hardly seems worth \nit. I still think that there is some benefit to being able to do integer \narithmetic though. I know that I do a lot of calculations (mostly sums) on \nmoney and going to numeric is going to be a hit. No matter how efficient it \nis it can't be as efficient as a cpu register addition.\n\nBut maybe I'm wrong and the hit will be negligible.\n\n-- \nD'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\nhttp://www.druid.net/darcy/ | and a sheep voting on\n+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.\n",
"msg_date": "Tue, 20 Aug 2002 08:22:52 -0400",
"msg_from": "\"D'Arcy J.M. Cain\" <darcy@druid.net>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Tue, 20 Aug 2002, D'Arcy J.M. Cain wrote:\n\n> On August 19, 2002 11:58 pm, Rod Taylor wrote:\n> > On Mon, 2002-08-19 at 23:50, Christopher Kings-Lynne wrote:\n> > The simple fix is to drop the money type entirely as it serves few\n> > purposes -- but there are some who use it.\n>\n> As the original creator of the type I probably have the most emotional\n> attachment to it but even I am thinking of dropping its use. I would have\n> preferred to fix it (more automatic casts and 64 bit storage as well as the\n> fixes in the current thread) but I seem to be alone so it hardly seems worth\n> it. I still think that there is some benefit to being able to do integer\n> arithmetic though. I know that I do a lot of calculations (mostly sums) on\n> money and going to numeric is going to be a hit. No matter how efficient it\n> is it can't be as efficient as a cpu register addition.\n>\n> But maybe I'm wrong and the hit will be negligible.\n\nI used to use the money tag but someone said it was going away in a future\nversion and to use the numeric type instead. I was under the impression\nthat it was going to be history long before now - it seems I was told this\nback in 6.3.something.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide Dialup from $16.00/mo at Pop4 Networking\n http://www.camping-usa.com http://www.cloudninegifts.com\n http://www.meanstreamradio.com http://www.unknown-artists.com\n==========================================================================\n\n\n\n",
"msg_date": "Tue, 20 Aug 2002 08:30:42 -0400 (EDT)",
"msg_from": "Vince Vielhaber <vev@michvhf.com>",
"msg_from_op": true,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Justin Clift wrote:\n> \n> Hi Mark,\n> \n> Mark Pritchard wrote:\n> >\n> [...]\n> > Finally, question the due dilligence process that selects an ISP partner who\n> > would leave a database open to the world, even if they run \"unbreakable\"\n> > Oracle :)\n> \n> This is the one point of yours I don't feel you've quite got down pat.\n> Err... *why* is it safe to leave a HTTP, SSH, IMAP, etc server open to\n> the world (configured correctly of course), but somehow fundamentally\n> wrong to leave a database server open to the world. If we've got a\n> product without these bugs, there wouldnt be a security vulnerability\n> would there?\n\nBecause in every system I've seen so far, the application plays a major\nrole in ensuring the data integrity by implementing at least part of the\nbusiness logic. Referential integrity and all the stuff is nice to have\nand supports the application developer fighting against concurrency\nissues, very hard to solve on the application layer. But the decision if\naccountant Victor is permitted to cancel this payment for Hugo is still\nup to the application.\n\nIf you say your users need direct DB access on the SQL interface level,\nI say trash your application because the data it produces isn't worth\nthe magnetism on the media. It's not that we ugently need to fix such a\nbug that can only cause a DOS in case someone finds a way to hack\nthrough the application into the SQL interface. It's that the\napplication has to be fixed not to allow that, because even if the\nserver wouldn't be crashable, such a hack would end in a disaster. \n\n\nJan\n\n-- \n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n",
"msg_date": "Tue, 20 Aug 2002 09:05:03 -0400",
"msg_from": "Jan Wieck <JanWieck@Yahoo.com>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Vince Vielhaber <vev@michvhf.com> writes:\n> On Mon, 19 Aug 2002, Tom Lane wrote:\n>> I'd like to see something done about this fairly soon, but it's not\n>> happening for 7.3 ...\n\n> Can we trap and just return an error before it goes into the weeds and\n> put the subdividing opaque fix in later?\n\nI don't think there's any quick and dirty solution.\n\nOne thing we could probably do in a relatively short amount of time,\nconsidering that we already have one pseudo-type in the system, is to\ngo ahead and invent the \"C string\" pseudo-type and then change all the\nbuilt-in I/O functions to be declared as taking or returning C string\n(as appropriate). We couldn't really do strong type checking on this\nyet, because we couldn't expect user-defined types' I/O functions to be\ndeclared correctly for awhile yet, but at least it would plug the hole\nfor built-in types.\n\nWhat this needs is someone to do the legwork...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 20 Aug 2002 09:39:58 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "On Tue, 2002-08-20 at 08:05, Jan Wieck wrote:\n> If you say your users need direct DB access on the SQL interface level,\n> I say trash your application because the data it produces isn't worth\n> the magnetism on the media. It's not that we ugently need to fix such a\n> bug that can only cause a DOS in case someone finds a way to hack\n> through the application into the SQL interface. It's that the\n> application has to be fixed not to allow that, because even if the\n> server wouldn't be crashable, such a hack would end in a disaster. \n> \n\nThe problem is, the vast majority of these issues are actually caused by\ninternal resources (people) rather than external \"attacks\".\n\nThe real fear is internal resources DoSing internal resources. The\nreaction on the list is usually to look outward for sources of possible\nproblems. That in it self is a problem. It's well documented the vast\nmajority (what, 70+%) of these issues actually originate internally.\n\nIt is because of these issues that it is often, no longer an issue of\n\"application this or that\", as an application may of been completely\nbypassed.\n\nAnd yes, you can argue all day long that if this happens, you should be\nfearing destruction of your data. While that's true, data can be\nrestored. It also requires a different personality type. Many people\nwould be willing to DoS a system, however, that doesn't have to mean\nthey are willing to destroy data.\n\n\nRegards,\n\n\tGreg Copeland",
"msg_date": "20 Aug 2002 09:05:16 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "\"Nigel J. Andrews\" <nandrews@investsystems.co.uk> writes:\n>> I'd like to see something done about this fairly soon, but it's not\n>> happening for 7.3 ...\n\n> Does anyone have an idea about what other functions are affected by this?\n\nAs a first approximation, every output function for a built-in\npass-by-reference datatype will show this same behavior. cash_out is\njust getting picked on because it was the one mentioned in the first\ncomplaint. For that matter, every input function for any datatype\nhas the same problem:\n\tregression=# select cash_in(2);\n\tserver closed the connection unexpectedly\n\nLet's see ... I count 264 standard pg_proc entries that are declared\nwith one or more \"opaque\" parameters. Many but by no means all are I/O\nfunctions. There are another 13 standard functions declared to return\n\"opaque\". To plug the hole in a credible fashion we'd need to do\nsomething about every one of these; so belay that last suggestion that\njust implementing a \"C string\" pseudo-type would be enough to be\nmeaningful.\n\nRight offhand it looks like we'd need at least:\n\t\"C string\" for the I/O functions\n\t\"internal type\" for index access functions, selectivity, etc\n\t\"any array\" for array_eq and array_dims\n\t\"any type\" for count(*) (and not much else!)\n\t\"tuple\" for the return type of trigger functions\n\t\"void\" for the return type of things that return void\n\tnot sure about encoding conversion functions\n\nThe functions handling internal-type stuff are probably things we don't\nwant the user calling at all. As long as we don't declare any of them\nto *return* an internal type, there would be no way to construct a\nfunction call that the parser would accept, so that hole would be\nplugged with just one pseudo-type; we don't really need to distinguish\nwhich internal type is meant in any one case. The \"any array\"\npseudo-type would probably take a special-case kluge in parse_coerce,\nbut that doesn't seem intolerable.\n\nAnyone see something I missed? Tatsuo, what exactly should the function\nsignature really be for all those encoding conversion functions you just\nadded?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 20 Aug 2002 10:09:01 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "On Tue, 2002-08-20 at 08:22, D'Arcy J.M. Cain wrote:\n> On August 19, 2002 11:58 pm, Rod Taylor wrote:\n> > On Mon, 2002-08-19 at 23:50, Christopher Kings-Lynne wrote:\n> > The simple fix is to drop the money type entirely as it serves few\n> > purposes -- but there are some who use it.\n> \n> As the original creator of the type I probably have the most emotional \n> attachment to it but even I am thinking of dropping its use. I would have \n> preferred to fix it (more automatic casts and 64 bit storage as well as the \n\n> But maybe I'm wrong and the hit will be negligible.\n\nIt wouldn't fix this particular problem anyway :) -- so I'm going to\nvote to keep it.\n\nThough for my own work I've created a money domain due to lack of digits\nwith the type -- not to mention I needed to store hundredths of a cent.\n\n",
"msg_date": "20 Aug 2002 10:21:25 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "> Anyone see something I missed? Tatsuo, what exactly should the function\n> signature really be for all those encoding conversion functions you just\n> added?\n\ntest=# \\df iso8859_1_to_utf8\n List of functions\n Result data type | Schema | Name | Argument data types \n------------------+------------+-------------------+---------------------------------\n integer | pg_catalog | iso8859_1_to_utf8 | integer, integer, -, -, integer\n(1 row)\n--\nTatsuo Ishii\n",
"msg_date": "Wed, 21 Aug 2002 00:08:37 +0900 (JST)",
"msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow"
},
{
"msg_contents": "Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n>> Anyone see something I missed? Tatsuo, what exactly should the function\n>> signature really be for all those encoding conversion functions you just\n>> added?\n\n> test=# \\df iso8859_1_to_utf8\n> List of functions\n> Result data type | Schema | Name | Argument data types \n> ------------------+------------+-------------------+---------------------------------\n> integer | pg_catalog | iso8859_1_to_utf8 | integer, integer, -, -, integer\n\nRight, that's what they are now, but what do the \"-\" entries really\nmean? Also, are the \"integer\" args and result truthful, or do they\nreally mean something else?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 20 Aug 2002 11:13:38 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "On Tue, 20 Aug 2002, Tom Lane wrote:\n\n> \"Nigel J. Andrews\" <nandrews@investsystems.co.uk> writes:\n> >> I'd like to see something done about this fairly soon, but it's not\n> >> happening for 7.3 ...\n> \n> > Does anyone have an idea about what other functions are affected by this?\n> \n> As a first approximation, every output function for a built-in\n> pass-by-reference datatype will show this same behavior. cash_out is\n> just getting picked on because it was the one mentioned in the first\n> complaint. For that matter, every input function for any datatype\n> has the same problem:\n> \tregression=# select cash_in(2);\n> \tserver closed the connection unexpectedly\n>\n> ...\n\nBut going back to the idea that it seems that the only problem being publicised\nin the 'outside world' is the cash_out(2) version can we not do the restriction\non acceptable input type in order to claim that the fix?\n\nObviously this is only a marketing ploy but on the basis that a real fix seems\nunlikely before beta in 11 days time (I'm still trying to work out what Tom's\nsuggestion is) perhaps one worth implementing.\n \n\n-- \nNigel J. Andrews\nDirector\n\n---\nLogictree Systems Limited\nComputer Consultants\n\n",
"msg_date": "Tue, 20 Aug 2002 16:22:35 +0100 (BST)",
"msg_from": "\"Nigel J. Andrews\" <nandrews@investsystems.co.uk>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "\"Nigel J. Andrews\" <nandrews@investsystems.co.uk> writes:\n> But going back to the idea that it seems that the only problem being\n> publicised in the 'outside world' is the cash_out(2) version can we\n> not do the restriction on acceptable input type in order to claim that\n> the fix?\n\nTotally pointless IMHO, when the same problem exists in hundreds of\nother functions. Also, there really is no way to patch cash_out per se;\nthe problem is a system-level problem, namely failure to enforce type\nchecking. cash_out has no way to know that what it's been passed is the\nwrong kind of datum.\n\nBasically, we've used \"opaque\" as a substitute for accurate type\ndeclarations; that's got to stop.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 20 Aug 2002 11:28:32 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "Tom Lane wrote:\n> \"Nigel J. Andrews\" <nandrews@investsystems.co.uk> writes:\n> \n>>>I'd like to see something done about this fairly soon, but it's not\n>>>happening for 7.3 ...\n>>\n> \n>>Does anyone have an idea about what other functions are affected by this?\n> \n> \n> As a first approximation, every output function for a built-in\n> pass-by-reference datatype will show this same behavior. cash_out is\n> just getting picked on because it was the one mentioned in the first\n> complaint. For that matter, every input function for any datatype\n> has the same problem:\n> \tregression=# select cash_in(2);\n> \tserver closed the connection unexpectedly\n> \n> Let's see ... I count 264 standard pg_proc entries that are declared\n> with one or more \"opaque\" parameters. Many but by no means all are I/O\n> functions. There are another 13 standard functions declared to return\n> \"opaque\". To plug the hole in a credible fashion we'd need to do\n> something about every one of these; so belay that last suggestion that\n> just implementing a \"C string\" pseudo-type would be enough to be\n> meaningful.\n\nIs there ever a reason for a user to call a function with an opaque \nparameter directly? If not, can we simply REVOKE EXECUTE for these \nfunctions?\n\n\nJoe\n\n",
"msg_date": "Tue, 20 Aug 2002 08:37:18 -0700",
"msg_from": "Joe Conway <mail@joeconway.com>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow"
},
{
"msg_contents": "On Tue, Aug 20, 2002 at 11:28:32AM -0400, Tom Lane wrote:\n> \"Nigel J. Andrews\" <nandrews@investsystems.co.uk> writes:\n> > But going back to the idea that it seems that the only problem being\n> > publicised in the 'outside world' is the cash_out(2) version can we\n> > not do the restriction on acceptable input type in order to claim that\n> > the fix?\n> \n> Totally pointless IMHO, when the same problem exists in hundreds of\n> other functions. Also, there really is no way to patch cash_out per se;\n> the problem is a system-level problem, namely failure to enforce type\n> checking. cash_out has no way to know that what it's been passed is the\n> wrong kind of datum.\n> \n> Basically, we've used \"opaque\" as a substitute for accurate type\n> declarations; that's got to stop.\n\nHmm, are there _any_ cases where it's appropriate to call an 'opaque'\nfunction directly from user code? cash_out() and it's kin are type\noutput functions that are called under controlled conditions, with\nbackend controlled parameters. Trigger functions also are called with\nbackend controlled parameters. Is there a 'hack' fix that doesn't allow\nopaque returning functions in user-defined locations?\n\nRoss\n",
"msg_date": "Tue, 20 Aug 2002 10:44:20 -0500",
"msg_from": "\"Ross J. Reedstrom\" <reedstrm@rice.edu>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Joe Conway <mail@joeconway.com> writes:\n> Is there ever a reason for a user to call a function with an opaque \n> parameter directly? If not, can we simply REVOKE EXECUTE for these \n> functions?\n\nNot sure, but that doesn't solve the problem for array_eq and array_dims\nin any case.\n\nGood thought though ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 20 Aug 2002 11:45:37 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "On Tuesday 20 August 2002 11:28 am, Tom Lane wrote:\n> \"Nigel J. Andrews\" <nandrews@investsystems.co.uk> writes:\n> > But going back to the idea that it seems that the only problem being\n> > publicised in the 'outside world' is the cash_out(2) version can we\n> > not do the restriction on acceptable input type in order to claim that\n> > the fix?\n\n> Basically, we've used \"opaque\" as a substitute for accurate type\n> declarations; that's got to stop.\n\nUmm, but what about the reply buffer overrun advisory? I've read this whole \nthread, and the reply advisory (AFAICT, unless I've just hit delete too \nquickly) has NOT been addressed. Let's repeat the salient portion of Florian \nWeimer's message:\n\n> PostgreSQL 7.2.1 has a buffer overflow bug in the date parser (which\n> is invoked each time a string is converted to a datetime object). If\n> a frontend does not perform proper date checking and rejects overlong\n> date strings, a buffer is overwritten by parser. The string has to\n> pass some checks of the parser, so it is not immediately obvious that\n> this can be exploited. Denial of service is possible, though,\n> especially if the frontend does not automatically reestablish the\n> database connection. (All connections are affected, not just the one\n> that is issueing the query.)\n\nIn the DATE parser, not money. Not cash_out. Where do we stand on the DATE \noverrun, if one actually exists? If it exists, can it be exploited by a bad \ndate entry on someone's web form or other client application? If it's not \nexploitable, then it lessens the impact -- but it is irresponsible to assume \nthat just because we can't find a way to exploit it that no one else can.\n\nNow it's possible I just hit delete too quickly; but it's also possible that \neveryone has just assumed that this was the cash_out problem and has started \nhashing on that. Although this reply advisory hasn't been out as long as the \noriginal one, which WAS cash_words.\n\nIf there is indeed an exploitable overrun in the DATE parser, then I believe \nwe should issue a 7.2.2 to fix this problem. I know that MANY people will be \nusing 7.2.x for quite awhile, as they won't want to make a MAJOR database \nupgrade (which is not painless thanks to the need to use 7.3's pg_dump for \nthings). If the upgrade was painless, I'd agree that 7.3 is the solution -- \nbut a real security fix shouldn't wait for 7.3. But I'm holding judgment on \na proven exploit. A proven exploit will change my mind to say 'we need a \n7.2.2 NOW that fixes this overrun.'\n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Tue, 20 Aug 2002 11:59:20 -0400",
"msg_from": "Lamar Owen <lamar.owen@wgcr.org>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Lamar Owen <lamar.owen@wgcr.org> writes:\n> Umm, but what about the reply buffer overrun advisory? I've read this whole \n> thread, and the reply advisory (AFAICT, unless I've just hit delete too \n> quickly) has NOT been addressed.\n\nYes it has. CVS logs show\n\n2002-08-04 02:44 thomas\n\n\t* src/backend/utils/adt/: date.c, datetime.c, format_type.c,\n\tnabstime.c, timestamp.c, varlena.c: Add guard code to protect from\n\tbuffer overruns on long date/time input strings. [other\n\tcomments pruned, but note this commit did a lot of other stuff too]\n\nThe original argument was about whether we should push out a 7.2.2\nrelease just because of this fix. AFAIK no one has even troubled to\nlook at the patch and see whether it applies directly to the 7.2 branch;\nThomas has revised the date/time code quite a bit since 7.2, so I'd\nexpect that it's not going to apply exactly.\n\nI'd put more stock in the concern level of the people making complaints\nif anyone had bothered to do even that much legwork. Without an offered\npatch against 7.2 branch, I don't think the folks who push out releases\n(which is not me, but Marc, Bruce, you, Trond, etc) should bother to\ntake notice of the complaints at all.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 20 Aug 2002 12:15:38 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
},
{
"msg_contents": "On Tuesday 20 August 2002 12:15 pm, Tom Lane wrote:\n> Lamar Owen <lamar.owen@wgcr.org> writes:\n> > Umm, but what about the reply buffer overrun advisory? I've read this\n> > whole thread, and the reply advisory (AFAICT, unless I've just hit delete\n> > too quickly) has NOT been addressed.\n\n> Yes it has. CVS logs show\n\n> I'd put more stock in the concern level of the people making complaints\n> if anyone had bothered to do even that much legwork. Without an offered\n> patch against 7.2 branch, I don't think the folks who push out releases\n> (which is not me, but Marc, Bruce, you, Trond, etc) should bother to\n> take notice of the complaints at all.\n\nIf a patch is proffered to 7.2.1 to fix this, I'll be happy to roll a new \nRPMset. I tend to agree with you on this detail, Tom.\n\nI had just apparently missed that portion; thanks for the reminder.\n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Tue, 20 Aug 2002 12:28:27 -0400",
"msg_from": "Lamar Owen <lamar.owen@wgcr.org>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Nigel J. Andrews wrote:\n> On Tue, 20 Aug 2002, Tom Lane wrote:\n> \n> > \"Nigel J. Andrews\" <nandrews@investsystems.co.uk> writes:\n> > >> I'd like to see something done about this fairly soon, but it's not\n> > >> happening for 7.3 ...\n> > \n> > > Does anyone have an idea about what other functions are affected by this?\n> > \n> > As a first approximation, every output function for a built-in\n> > pass-by-reference datatype will show this same behavior. cash_out is\n> > just getting picked on because it was the one mentioned in the first\n> > complaint. For that matter, every input function for any datatype\n> > has the same problem:\n> > \tregression=# select cash_in(2);\n> > \tserver closed the connection unexpectedly\n> >\n> > ...\n> \n> But going back to the idea that it seems that the only problem being publicized\n> in the 'outside world' is the cash_out(2) version can we not do the restriction\n> on acceptable input type in order to claim that the fix?\n> \n> Obviously this is only a marketing ploy but on the basis that a real fix seems\n> unlikely before beta in 11 days time (I'm still trying to work out what Tom's\n> suggestion is) perhaps one worth implementing.\n\nIf we wanted to hide the vulnerability, I wouldn't have put it on the\nTODO list. One of our styles is not to deceive people; if we have a\nproblem, we document it so others know about it and so someday someone\nwill fix it --- today may be that day. ;-)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 359-1001\n + If your life is a hard drive, | 13 Roberts Road\n + Christ can be your backup. | Newtown Square, Pennsylvania 19073\n",
"msg_date": "Tue, 20 Aug 2002 16:04:32 -0400 (EDT)",
"msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Tue, 2002-08-20 at 17:15, Tom Lane wrote:\n> Yes it has. CVS logs show\n> \n> 2002-08-04 02:44 thomas\n> \n> \t* src/backend/utils/adt/: date.c, datetime.c, format_type.c,\n> \tnabstime.c, timestamp.c, varlena.c: Add guard code to protect from\n> \tbuffer overruns on long date/time input strings. [other\n> \tcomments pruned, but note this commit did a lot of other stuff too]\n> \n> The original argument was about whether we should push out a 7.2.2\n> release just because of this fix. AFAIK no one has even troubled to\n> look at the patch and see whether it applies directly to the 7.2 branch;\n> Thomas has revised the date/time code quite a bit since 7.2, so I'd\n> expect that it's not going to apply exactly.\n\nIt doesn't. I tried, since there's a Debian bug requesting those\npatches be applied, but as far as I remember every hunk failed.\nI didn't have time to try to make it fit.\n\n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight, UK \nhttp://www.lfix.co.uk/oliver\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"But I would not have you to be ignorant, brethren, \n concerning them which are asleep, that ye sorrow not, \n even as others which have no hope. For if we believe \n that Jesus died and rose again, even so them also \n which sleep in Jesus will God bring with him.\" \n I Thessalonians 4:13,14 \n\n",
"msg_date": "20 Aug 2002 22:23:41 +0100",
"msg_from": "Oliver Elphick <olly@lfix.co.uk>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "> > test=# \\df iso8859_1_to_utf8\n> > List of functions\n> > Result data type | Schema | Name | Argument data types \n> > ------------------+------------+-------------------+---------------------------------\n> > integer | pg_catalog | iso8859_1_to_utf8 | integer, integer, -, -, integer\n> \n> Right, that's what they are now, but what do the \"-\" entries really\n> mean? Also, are the \"integer\" args and result truthful, or do they\n> really mean something else?\n\nThey are like:\n\n * conv_proc(\n *\t\tINTEGER,\t-- source encoding id\n *\t\tINTEGER,\t-- destination encoding id\n *\t\tOPAQUE,\t\t-- source string (null terminated C string)\n *\t\tOPAQUE,\t\t-- destination string (null terminated C string)\n *\t\tINTEGER\t\t-- source string length\n\nFor the second and third argument they are actually treated as:\n\nunsigned char *src = PG_GETARG_CSTRING(2);\nunsigned char *dest = PG_GETARG_CSTRING(3);\n\nThe first one is an input parameter(source string), and second one is\nan output parameter(destination string). The caller of this function\nis responsible for allocationg enough memory for destination string.\n\nThe returned integer is actually dummy. The function always returns 1.\n--\nTatsuo Ishii\n",
"msg_date": "Wed, 21 Aug 2002 10:10:09 +0900 (JST)",
"msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow"
},
{
"msg_contents": "Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> They are like:\n\n> * conv_proc(\n> *\t\tINTEGER,\t-- source encoding id\n> *\t\tINTEGER,\t-- destination encoding id\n> *\t\tOPAQUE,\t\t-- source string (null terminated C string)\n> *\t\tOPAQUE,\t\t-- destination string (null terminated C string)\n> *\t\tINTEGER\t\t-- source string length\n\nGot it (shoulda read the documentation before asking ;-))\n\n> The returned integer is actually dummy. The function always returns 1.\n\nYes. I will change these to be declared as\n\n\tfoo(int, int, cstring, cstring, int) returns void\n\nunless anyone has a problem with that?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 20 Aug 2002 23:13:52 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in "
}
] |
[
{
"msg_contents": "Using pg_dump and pg_dumpall I ran into the following problems and had \naddressed it earlier to this list with no response.\n\nUsing PostgreSQL 7.2.x\n\n1. create a user with createdb privilege.\n2. create a database as that user (allowing that user full reign over \nthat particular db)\n3. drop the createdb from the user.\n4. pg_dumpall the databases to a single file\n5. either use pg_restore or psql < infile to restore the databases and \nit fails.\n\nThe problem is that the user does not have createdb privilege and \ntherefore the system cannot create a database with that particular user \nas the owner.\n\nIs it possible to address this before the 7.3 release or is this concern \nno longer a problem in the 7.3 branch?\n\n\n\n",
"msg_date": "Mon, 19 Aug 2002 14:40:06 -0500",
"msg_from": "Thomas Swan <tswan@idigx.com>",
"msg_from_op": true,
"msg_subject": "pg_dump, pg_dumpall and createdb privilege"
},
{
"msg_contents": "Thomas Swan <tswan@idigx.com> writes:\n> 1. create a user with createdb privilege.\n> 2. create a database as that user (allowing that user full reign over\n> that particular db)\n> 3. drop the createdb from the user.\n> 4. pg_dumpall the databases to a single file\n> 5. either use pg_restore or psql < infile to restore the databases and\n> it fails.\n\nThis is a known problem, I remember raising it on hackers several\nmonths ago.\n\n> Is it possible to address this before the 7.3 release or is this\n> concern no longer a problem in the 7.3 branch?\n\nIt's fixed in CVS. Databases are now created using CREATE DATABASE xxx\nWITH OWNER yyy: this technique can also be used by the DBA in the\nfirst place, avoiding the need to manually add and then remove\nCREATEDB privs from the new user account.\n\nCheers,\n\nNeil\n\n-- \nNeil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC\n\n",
"msg_date": "19 Aug 2002 15:46:36 -0400",
"msg_from": "Neil Conway <neilc@samurai.com>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump, pg_dumpall and createdb privilege"
},
{
"msg_contents": "\n\n\n\n\n\nNeil Conway wrote:\n\nThomas Swan <tswan@idigx.com> writes:\n \n\n1. create a user with createdb privilege.\n2. create a database as that user (allowing that user full reign over\nthat particular db)\n3. drop the createdb from the user.\n4. pg_dumpall the databases to a single file\n5. either use pg_restore or psql < infile to restore the databases and\nit fails.\n \n\n\nThis is a known problem, I remember raising it on hackers several\nmonths ago.\n\nIf there was a 7.2.2 release it would be wonderful for this to be knocked\nout, too.\n\n\n\n \n\nIs it possible to address this before the 7.3 release or is this\nconcern no longer a problem in the 7.3 branch?\n \n\n\nIt's fixed in CVS. Databases are now created using CREATE DATABASE xxx\nWITH OWNER yyy: this technique can also be used by the DBA in the\nfirst place, avoiding the need to manually add and then remove\nCREATEDB privs from the new user account.\n\nThis is a wonderful thing for those of us running postgresql in a hosting\nenvironment.\n\n\n\n",
"msg_date": "Mon, 19 Aug 2002 15:06:19 -0500",
"msg_from": "Thomas Swan <tswan@idigx.com>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump, pg_dumpall and createdb privilege"
}
] |
[
{
"msg_contents": "foobar\n",
"msg_date": "Mon, 19 Aug 2002 14:26:20 -0600",
"msg_from": "\"Andrew J. Kopciuch\" <akopciuch@bddf.ca>",
"msg_from_op": true,
"msg_subject": "ignore me"
}
] |
[
{
"msg_contents": "CREATE CAST WITHOUT FUNCTION is capable of creating binary equivalences\nthat will crash the backend when used (eg, between pass-by-value and\npass-by-reference datatypes). The existing restriction that you must\nown one of the datatypes hardly seems like an adequate permissions\ncheck ... especially since any unprivileged user is able to create his\nown datatypes.\n\nI think it might be a good idea to require superuser permissions to\ncreate a binary-equivalence cast. This is equivalent to the permissions\nyou'd need to create a dummy C function so as to cause the same failure\nwithout using WITHOUT FUNCTION. Comments?\n\nAlso, in the present state of the code a WITHOUT FUNCTION cast does\nnot work if AS ASSIGNMENT isn't given: parse_coerce.c won't ever find\nit. Is this intentional, or just an oversight?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 19 Aug 2002 16:35:57 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": true,
"msg_subject": "CREATE CAST WITHOUT FUNCTION should require superuserness?"
},
{
"msg_contents": "Tom Lane writes:\n\n> I think it might be a good idea to require superuser permissions to\n> create a binary-equivalence cast.\n\nOK\n\n> Also, in the present state of the code a WITHOUT FUNCTION cast does\n> not work if AS ASSIGNMENT isn't given: parse_coerce.c won't ever find\n> it. Is this intentional, or just an oversight?\n\nIt's a transition state that might be inadequately documented. In the\nnear future the code should be restructured to allow for non-implicit\nbinary compatible casts. But currently there are not candidates for that\nanyway.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Tue, 20 Aug 2002 19:58:56 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: CREATE CAST WITHOUT FUNCTION should require superuserness?"
},
{
"msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Tom Lane writes:\n>> Also, in the present state of the code a WITHOUT FUNCTION cast does\n>> not work if AS ASSIGNMENT isn't given: parse_coerce.c won't ever find\n>> it. Is this intentional, or just an oversight?\n\n> It's a transition state that might be inadequately documented.\n\nOkay. Are you intending to work on it? I was thinking of doing some\ncleanup work in parse_coerce, but will refrain from joggling your elbow\nif you're going to deal with it.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 20 Aug 2002 14:18:59 -0400",
"msg_from": "Tom Lane <tgl@sss.pgh.pa.us>",
"msg_from_op": true,
"msg_subject": "Re: CREATE CAST WITHOUT FUNCTION should require superuserness? "
},
{
"msg_contents": "Tom Lane writes:\n\n> Okay. Are you intending to work on it? I was thinking of doing some\n> cleanup work in parse_coerce, but will refrain from joggling your elbow\n> if you're going to deal with it.\n\nFeel free.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n",
"msg_date": "Wed, 21 Aug 2002 22:48:14 +0200 (CEST)",
"msg_from": "Peter Eisentraut <peter_e@gmx.net>",
"msg_from_op": false,
"msg_subject": "Re: CREATE CAST WITHOUT FUNCTION should require superuserness?"
}
] |
[
{
"msg_contents": "> -----Original Message-----\n> From: Neil Conway [mailto:neilc@samurai.com] \n> Sent: Monday, August 19, 2002 10:22 PM\n> To: Mark Pritchard\n> Cc: Justin Clift; Tom Lane; Christopher Kings-Lynne; \n> pgsql-hackers@postgresql.org\n> Subject: Re: [HACKERS] @(#) Mordred Labs advisory 0x0001: \n> Buffer overflow in\n> \n> \n> Mark Pritchard <mark@tangent.net.au> writes:\n> > I believe its been said before, in this forum no less, that \n> PostgreSQL \n> > should focus on its primary role as an RDBMS and not be \n> paranoid about \n> > security. I believe it was the thread on SSL connections, and Tom \n> > suggested a simple ssh tunnel or vpn.\n> \n> I'd say the two issues are pretty different. IMHO, buffer \n> overruns and similar security problems are just a special \n> class of software bug (it's interesting to note that most of \n> the buffer overruns have been found in the less-maintained \n> parts of the system, like the cash type or contrib/). \n> Therefore, the justification for fixing buffer overruns (and \n> avoiding them in the first place) is the same as for fixing \n> other kinds of bugs: it makes the system more reliable.\n> \n> On the other hand, adding something like SSL tends to make \n> the system more complex (and therefore *less* reliable). \n> There may or may not be a pay-off from a user's POV, but it's \n> not the clear win that avoiding buffer overruns is, IMHO.\n> \n> > Of course, lets not leave the door wide open, but perhaps the \n> > developer's time would be better spent on features such as \n> schemas and \n> > replication.\n> \n> It's probably worth noting that the \"barrier to entry\" for \n> fixing buffer overruns or doing a code audit is much, much \n> lower than for implementing advanced features like schemas or \n> replication. The main thing that auditing code requires is \n> time, rather than coding skill/knowledge.\n\nMost computer virus problems are caused by buffer overrun. Someone\ndecided it wasn't very important.\n\nSome computer viruses have caused billions of dollars in damage. Sounds\nimportant to me.\n\n\"Please try our database. Someday, we hope to close off all the virus\nentry points, but right now, we figure it isn't too important.\"\n\nWill you trust your multi-million dollar database to someone who says\nthe above? I think the priorities are upside down. Any *known*\nbuffer-overrun _must_ be repaired, and as quickly as possible. And\npotential overruns should be identified. A grep for memcpy, strcpy,\ngets, etc. should hunt down most of them. A known buffer overrun should\nfill the designer of a product with abject terror. And I really mean\nthat, literally. If you *know* of a buffer overrun, and simply decide\nnot to fix it, that sounds very negligent to me. For a public project\nlike PostgreSQL, there is probably very little liability for the\nprogrammers, but I am thinking of the damage that can be inflicted upon\npotential clients using the database.\n",
"msg_date": "Mon, 19 Aug 2002 22:35:26 -0700",
"msg_from": "\"Dann Corbit\" <DCorbit@connx.com>",
"msg_from_op": true,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "\"Dann Corbit\" <DCorbit@connx.com> writes:\n> If you *know* of a buffer overrun, and simply decide not to fix it,\n> that sounds very negligent to me.\n\n*sigh*, no one is doing that, and it is pure negligence on your part\nfor replying to a thread that you clearly have not read.\n\nCheers,\n\nNeil\n\n-- \nNeil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC\n\n",
"msg_date": "20 Aug 2002 01:41:34 -0400",
"msg_from": "Neil Conway <neilc@samurai.com>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Tue, 20 Aug 2002 15:35, Dann Corbit wrote:\n> Most computer virus problems are caused by buffer overrun. Someone\n> decided it wasn't very important.\n>\n> Some computer viruses have caused billions of dollars in damage. Sounds\n> important to me.\n>\n> \"Please try our database. Someday, we hope to close off all the virus\n> entry points, but right now, we figure it isn't too important.\"\n\nThis sounds a little hysterical to me...don't happen to have a remotely \naccessible database do you? :)\n\n> Will you trust your multi-million dollar database to someone who says\n> the above? I think the priorities are upside down. Any *known*\n> buffer-overrun _must_ be repaired, and as quickly as possible. And\n\nAs always, feedback accepted in diff -c format. \n\nSeriously though, Oracle was unbreakable for what, two days? Software has \nbugs. I'm sure there are a stack more in PostgreSQL. \n\nYou limit your exposure to bugs/defects/etc through the use of multiple layers \nof protection. If you leave your database out in the wild, you deserve to be \nhacked. \n\n> potential overruns should be identified. A grep for memcpy, strcpy,\n> gets, etc. should hunt down most of them. A known buffer overrun should\n> fill the designer of a product with abject terror. And I really mean\n> that, literally. If you *know* of a buffer overrun, and simply decide\n\nI'd be worried if my IT consultants experienced \"abject terror\". I much prefer \nthem to be calm, safe in the knowledge that vulnerabilities such as this will \nnot cause me any problems, because they had the forethought to plan for \nsituations like this and limit their exposure.\n\nI worry about two pieces of software - Apache and OpenSSH. I compile from \nsource, knowing that I can fix the issue (be it the recent issues with either \npiece of software) as soon as the fixed source becomes available. I may be in \nthe minority, but at least I don't experience abject terror too often (well, \nunless I let my sister drive my car...but that is another story).\n\nCheers\n\nMark\n",
"msg_date": "Tue, 20 Aug 2002 16:26:57 +1000",
"msg_from": "Mark Pritchard <mark@tangent.net.au>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Mon, Aug 19, 2002 at 22:35:26 -0700,\n> \n> Most computer virus problems are caused by buffer overrun. Someone\n> decided it wasn't very important.\n\nI disaggree with this. Most computer viruses that I see are rely on\npoorly designed software and poorly trained users to propagate.\n\nBuffer overruns are used by worms and by some tools designed to get unauthorized\naccess to machines.\n",
"msg_date": "Tue, 20 Aug 2002 07:57:38 -0500",
"msg_from": "Bruno Wolff III <bruno@wolff.to>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Tue, 2002-08-20 at 00:35, Dann Corbit wrote:\n> \n> Most computer virus problems are caused by buffer overrun. Someone\n> decided it wasn't very important.\n\nThis is true. IMO, it is extremely arrogant to ignore a buffer overrun\nand announce it can't be exploited. There is many cases where this\nassertion has been proved to be false. The real risk of overrun is not\nwhat you think can be done with it (or lack there of), rather, it's how\nsomeone else might decide to use it in some obscure manner which you can\nnot currently fathom or foresee.\n\n> Will you trust your multi-million dollar database to someone who says\n> the above? I think the priorities are upside down. Any *known*\n> buffer-overrun _must_ be repaired, and as quickly as possible. And\n\nI agree with that too. When setting priorities, using a scale of 1-10,\n10 being highest priority, anything that effects stability or\nreliability should always be a 10. As such, they should always be\nrepaired even above new wiz-bang features.\n\nIMO, if you don't embrace that rule of thumb, a developer shouldn't be\nworking on a project where stability and reliability are key components\nof the end product.\n\n> potential overruns should be identified. A grep for memcpy, strcpy,\n> gets, etc. should hunt down most of them. A known buffer overrun should\n> fill the designer of a product with abject terror. And I really mean\n\nAgreed. It is horribly irresponsible to thumb a nose at such things in\nthis day and age.\n\n> that, literally. If you *know* of a buffer overrun, and simply decide\n> not to fix it, that sounds very negligent to me. For a public project\n> like PostgreSQL, there is probably very little liability for the\n> programmers, but I am thinking of the damage that can be inflicted upon\n> potential clients using the database.\n> \n\nNot a question of it sounding negligent. It is negligent.\n\nIf quality and stability is not the core developers #1 goal then\nexpecting people to trust the resulting product is laughable. Please\ntell me why anyone should use a database to maintain important data when\nquality and stability is not important to the developers of such a\nproduct. It's an oxymoron.\n\nTime and time again I've read what basically amounts to, \"...if someone\ncan crash it it's because someone is stupid enough to allow someone to\nbe able to do it in the first place...\" Maybe you're right. After all,\nif core developers continue to turn a blind eye to such issues, they are\nin fact, the facilitators of allowing people to do it to begin with. \nThat is, they are the ones that allowing people to do it in the first\nplace. In short, every time I see that response, I immediately think,\n\"...now that's the pot calling the kettle black.\"\n\nAt some point in time, you have to stand and say, \"the buck stops here.\"\n\nNow then, after that long rant and rave, since these are known issues, I\ndon't have a problem with the next release going out as planned. Once\nit does go out, I would certainly hope that the developers would\nreadjust their priorities and target a bug fix release to immediately\nfollow.\n\nYou know, I've seen many people trash Oracle's \"unbreakable\" mantra. \nI'm sure no one is confused at the fact that it is nothing but a\nmarketing ploy, however, perhaps there is a culture behind it. Perhaps\nthis is their way of saying stability and reliability is very important\nto them. Perhaps their mantra is the rule of thumb outlined above.\n\nSign,\n\n\tGreg Copeland",
"msg_date": "20 Aug 2002 08:48:00 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Tue, 20 Aug 2002 23:48, Greg Copeland wrote:\n> On Tue, 2002-08-20 at 00:35, Dann Corbit wrote:\n> > Most computer virus problems are caused by buffer overrun. Someone\n> > decided it wasn't very important.\n>\n> This is true. IMO, it is extremely arrogant to ignore a buffer overrun\n> and announce it can't be exploited. There is many cases where this\n> assertion has been proved to be false. The real risk of overrun is not\n\nI would certainly hope you are not misquoting me here. I have never stated we \nshould ignore the bug. I suggested that with proper network level protection, \nthe bug should not be exploitable.\n\nIf you did indeed misquote me, perhaps extreme arrogance in this case is the \nattribution of comments to people without basis?\n\n> I agree with that too. When setting priorities, using a scale of 1-10,\n> 10 being highest priority, anything that effects stability or\n> reliability should always be a 10. As such, they should always be\n> repaired even above new wiz-bang features.\n\nSo, cutting through the self-supporting hyperbole, you believe that stability \nor reliability is more important than new features. I don't disagree. What I \ndo disagree with is the \"panic\" mentality that seems so evident in this type \nof post.\n\nIf you have set up your production infrastructure in a sensible manner (of \ncourse sensible is open for interpretation), this bug does not affect you. \n\nThis does highlight the root cause of our difference in opinions - I don't \nfeel this is an issue because it doesn't affect me. You may be concerned by \nthese issues because your infrastructure allows the general 'net using public \nto directly access your database. While I disagree with this \nconfiguration...it doesn't make you fundamentely wrong, simply different in \nour respective approaches.\n\n> IMO, if you don't embrace that rule of thumb, a developer shouldn't be\n> working on a project where stability and reliability are key components\n> of the end product.\n\nI wasn't aware that PostgreSQL as an open source collaborative project had any \nspecific requirements of upon it at all. While stability and reliability are \nobvious goals, if you feel the project does not meet your needs you are more \nthan welcome to try one of the alternatives. MySQL for example :)\n\nSeriously though, its similar to the people who run Linus' kernels. Oh my god \nthey say, the stable 2.4.x series has VM issues. We can't trust it anymore! \n\nWhy are you using that kernel in the first place? Where has Linus said that \nthis is suitable for production use? Stable does not mean \"production ready\".\n\n> > potential overruns should be identified. A grep for memcpy, strcpy,\n> > gets, etc. should hunt down most of them. A known buffer overrun should\n> > fill the designer of a product with abject terror. And I really mean\n>\n> Agreed. It is horribly irresponsible to thumb a nose at such things in\n> this day and age.\n\nI'm not going to restate my previous response to this view, but I will ask, \nwho is affected by the \"horribly irresponsible\" approach? If it is you, then \nwhy hasn't your due dilligence process audited the code? Perhaps you would \nfeel more comfortable with one of the closed source/closed development model \norganisations? But what bugs lie within the depths of DBs such as SQL Server? \nHow will you audit those? Or will you just trust the sales guy?\n\n> > programmers, but I am thinking of the damage that can be inflicted upon\n> > potential clients using the database.\n>\n> Not a question of it sounding negligent. It is negligent.\n>\n> If quality and stability is not the core developers #1 goal then\n> expecting people to trust the resulting product is laughable. Please\n\nWhere is an expectation at all? If you want to use PostgreSQL, then use it. If \nit doesn't meet your needs, don't use it, or start fixing the issues \nyourself. If you can't do it, buy Oracle, or DB2, or whatever else.\n\n> Time and time again I've read what basically amounts to, \"...if someone\n> can crash it it's because someone is stupid enough to allow someone to\n> be able to do it in the first place...\" Maybe you're right. After all,\n> if core developers continue to turn a blind eye to such issues, they are\n> in fact, the facilitators of allowing people to do it to begin with.\n\nI'm not sure how you make the jump from knowing that an issue exists and \nallowing people to exploit it, to the inference that core developers are \nturning a blind eye to it. Forgive me if I misquote you Tom, but I don't \nthink he has ever said \"we should not fix this bug\", simply that the effort \nis significant, and there are other factors to consider.\n\n> You know, I've seen many people trash Oracle's \"unbreakable\" mantra.\n> I'm sure no one is confused at the fact that it is nothing but a\n> marketing ploy, however, perhaps there is a culture behind it. Perhaps\n> this is their way of saying stability and reliability is very important\n> to them. Perhaps their mantra is the rule of thumb outlined above.\n\nPerhaps we need a pgsql-hackers-heated_discussions list so we can take these \ndiscussions offline? :)\n\nCheers\n\nMark\n",
"msg_date": "Wed, 21 Aug 2002 09:40:02 +1000",
"msg_from": "Mark Pritchard <mark@tangent.net.au>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "greg@CopelandConsulting.Net (Greg Copeland) wrote\n\n> Time and time again I've read what basically amounts to, \"...if someone\n> can crash it it's because someone is stupid enough to allow someone to\n> be able to do it in the first place...\" Maybe you're right. After all,\n> if core developers continue to turn a blind eye to such issues, they are\n> in fact, the facilitators of allowing people to do it to begin with.=20\n> That is, they are the ones that allowing people to do it in the first\n> place. In short, every time I see that response, I immediately think,\n> \"...now that's the pot calling the kettle black.\"\n> \n> At some point in time, you have to stand and say, \"the buck stops here.\"\n> \n\nI agree here, but at the same time you cannot put 100% of the \nresponsibility on the developers. If you are the dba/sysadmin/whatever/etc \nthen it is your responsibility. It is up to you to know about potential \nproblems and have workarounds or whatever it is you need to do. I think \nthat is one of the things that seperates a \"good\" admin from a \"not-so-\ngood\" one.\n\nAfterall, when your boss calls you into his office monday morning and asks \nfor a really good explanation for why the db was cracked, I dont think he \nis going to accept the excuse \"this guy, you dont know him but his name is \ntom lane.. well anyway, he didnt fix this bug i knew about so i didnt do \nnothing about it because i shouldnt have to because that would be like the \npot calling the kettle black\"\n\nThat being said, I do agree the developers should give things like this \nmore priority. But, its open source... so you either live with it or \nwrite your own patch.\n",
"msg_date": "Wed, 21 Aug 2002 00:59:33 +0000 (UTC)",
"msg_from": "ngpg@grymmjack.com",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Tue, 2002-08-20 at 18:40, Mark Pritchard wrote:\n> On Tue, 20 Aug 2002 23:48, Greg Copeland wrote:\n> > On Tue, 2002-08-20 at 00:35, Dann Corbit wrote:\n> > > Most computer virus problems are caused by buffer overrun. Someone\n> > > decided it wasn't very important.\n> >\n> > This is true. IMO, it is extremely arrogant to ignore a buffer overrun\n> > and announce it can't be exploited. There is many cases where this\n> > assertion has been proved to be false. The real risk of overrun is not\n> \n> I would certainly hope you are not misquoting me here. I have never stated we \n> should ignore the bug. I suggested that with proper network level protection, \n> the bug should not be exploitable.\n\nDon't think I quoted you at all. I don't see quotation marks and am\nincluding Dan's remark. Perhaps everyone isn't talking about you after\nall. Continue with the green pills. ;)\n\n> do disagree with is the \"panic\" mentality that seems so evident in this type \n> of post.\n\nHmmm. Interesting. I didn't see panic or anything alarmist in my post.\n\n> \n> \n> > IMO, if you don't embrace that rule of thumb, a developer shouldn't be\n> > working on a project where stability and reliability are key components\n> > of the end product.\n> \n> I wasn't aware that PostgreSQL as an open source collaborative project had any \n> specific requirements of upon it at all. While stability and reliability are \n> obvious goals, if you feel the project does not meet your needs you are more \n> than welcome to try one of the alternatives. MySQL for example :)\n\nIn other words, if someone if verbal about development goals or\nobjectives they should go elsewhere.\n\nAs for specific requirements, I've said nothing which are not inherently\nobvious. Without a stable and reliable product, no one is going to use\nit for serious work. As such, it's certainly not a leap of faith to\nassume that developers without such ideals in mind should be shunned or\nproperly guided. Why? Obviously (amazed I have to spell this out),\nsaid developer efforts would be counter to the project's objectives\n(stated or otherwise implicitly obvious).\n\nYou also seem to imply that \"open source collaborative project[s]\"\nshould not aim for high goals. I think it's safe to say, we disagree.\n\n> I'm not going to restate my previous response to this view, but I will ask, \n> who is affected by the \"horribly irresponsible\" approach? If it is you, then \n> why hasn't your due dilligence process audited the code? Perhaps you would \n> feel more comfortable with one of the closed source/closed development model \n> organisations? But what bugs lie within the depths of DBs such as SQL Server? \n> How will you audit those? Or will you just trust the sales guy?\n\nHmm. Keep a blind and pretend it doesn't exist. Not a good response. \nSince this thread came out of someone's dilligence (coders or\notherwise), I fail to see the significance of your comments. After all,\nmucho-peer review is supposed to be one of the perks of using OSS\nsoftware. Considering I'm not asserted I'm performance a code audit,\nthis seems completely unrelated to the topic at hand.\n\n> Where is an expectation at all? If you want to use PostgreSQL, then use it. If \n> it doesn't meet your needs, don't use it, or start fixing the issues \n> yourself. If you can't do it, buy Oracle, or DB2, or whatever else.\n\nIn other words, if someone if verbal about development goals they should\ngo elsewhere. Furthermore, you seem to assert that only the core\ndevelopers should be using this database. Wow, I'm amazed. Just\nbecause someone does or does not contributes code doesn't suddenly\ninvalidate observations. That, of course, doesn't mean the observations\nhave to be valid.\n\nSimply stated, if it meets my needs, shut-up and use it. If it doesn't,\ngo elsewhere. Bad attitude.\n\n> I'm not sure how you make the jump from knowing that an issue exists and \n> allowing people to exploit it, to the inference that core developers are \n> turning a blind eye to it. Forgive me if I misquote you Tom, but I don't \n> think he has ever said \"we should not fix this bug\", simply that the effort \n> is significant, and there are other factors to consider.\n\nBecause it was stated that these are known issues. Because it was\nstated these have been known issues for a very long time. Because it\nwas stated that, more or less, no one is excited about doing the lots of\neffort which is seemingly required to put some of these issues to bed.\n\nThe expression, \"turning a blind eye\", means that something is being\nignored. It means it won't be focused on for now. That does not have\nto mean forever. The statement is valid and supported by pretty much\nevery posting on this list on the topic at hand. I stand by my\nstatement.\n\nStop with the misquoting comments already. The quotes I used were\nproperly attributed. Believe it or not, everyone is not talking about\nyou or trying to place words in your mouth. Believe it or not, the\nquotes are correct. I have no idea what you're talking about.\n\n> Perhaps we need a pgsql-hackers-heated_discussions list so we can take these \n> discussions offline? :)\n> \n\nI'm concerned that you feel comments on corporate culture should be\nconsidered a heated discussion. I in no way, shape or form, asserted\nanything other then perhaps there is a cultural emphasis behind the\nmarketing ploy. You can say no and I can say maybe all day long. \nEither way, that's hardly heated.\n\nSomewhere around here, we've wondered from the road.\n\nRegards,\n\n\tGreg Copeland",
"msg_date": "21 Aug 2002 10:00:43 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "On Tue, 2002-08-20 at 19:59, ngpg@grymmjack.com wrote:\n> greg@CopelandConsulting.Net (Greg Copeland) wrote\n> > At some point in time, you have to stand and say, \"the buck stops here.\"\n> > \n> \n> I agree here, but at the same time you cannot put 100% of the \n> responsibility on the developers. If you are the dba/sysadmin/whatever/etc \n> then it is your responsibility. It is up to you to know about potential \n> problems and have workarounds or whatever it is you need to do. I think \n> that is one of the things that seperates a \"good\" admin from a \"not-so-\n> good\" one.\n\nI absolutely agree. I was not trying to say that bugs don't happen and\nthat sometimes those bugs may cause crashes. What I was trying to say\nis what amounts to, \"dr, when I move my arm like this, it hurts\", and\nthe response is, \"don't do that.\" Humor aside, surely there has to be a\nhappy medium in between. Perhaps, with a skewing toward fixing rather\nthan prescribing. ;)\n\n> \n> Afterall, when your boss calls you into his office monday morning and asks \n> for a really good explanation for why the db was cracked, I dont think he \n> is going to accept the excuse \"this guy, you dont know him but his name is \n\nI understand and agree with ya.\n\n> \n> That being said, I do agree the developers should give things like this \n> more priority. But, its open source... so you either live with it or \n> write your own patch.\n> \n\nWell, the priority portion was what I was shooting for. Perhaps it came\noff being over zealous. I'm not really sure. I re-read it and I didn't\nthink so. But, I'm not you and you're not me...so, it's hard to say how\nexactly it was received.\n\nAs for the open source comment, that fine and all...but...there are\ncompanies which are paying for postgres' development too. Some of the\ndevelopers are being paid to do this. The \"write your own patch\" has\nmuch more meaning on simple projects. For a project as complex as\npostgres, simply asking for a patch is almost meaningless. Along those\nlines, I have been reading (code and the list) and learning for sometime\nnow, as time allows. One day, I will contribute significant patches. \nHowever, until that day comes, I would hope that observational\ncommentary is simply not invalidated just because they're not one with\nthe code yet.\n\n\nRegards,\n\n\tGreg Copeland",
"msg_date": "21 Aug 2002 10:13:21 -0500",
"msg_from": "Greg Copeland <greg@CopelandConsulting.Net>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
}
] |
[
{
"msg_contents": "The 'type_sanity' and 'domain' regression tests seem to fail with CVS\nHEAD. Here's the diff:\n\n*** ./expected/type_sanity.out\tSun Aug 4 15:48:11 2002\n--- ./results/type_sanity.out\tTue Aug 20 01:32:35 2002\n***************\n*** 16,22 ****\n SELECT p1.oid, p1.typname\n FROM pg_type as p1\n WHERE (p1.typlen <= 0 AND p1.typlen != -1) OR\n! (p1.typtype != 'b' AND p1.typtype != 'c' AND p1.typtype != 'p') OR\n NOT p1.typisdefined OR\n (p1.typalign != 'c' AND p1.typalign != 's' AND\n p1.typalign != 'i' AND p1.typalign != 'd') OR\n--- 16,22 ----\n SELECT p1.oid, p1.typname\n FROM pg_type as p1\n WHERE (p1.typlen <= 0 AND p1.typlen != -1) OR\n! p1.typtype not in('b', 'c', 'd', 'p') OR\n NOT p1.typisdefined OR\n (p1.typalign != 'c' AND p1.typalign != 's' AND\n p1.typalign != 'i' AND p1.typalign != 'd') OR\n***************\n*** 60,66 ****\n -- NOTE: as of 7.3, this check finds SET, smgr, and unknown.\n SELECT p1.oid, p1.typname\n FROM pg_type as p1\n! WHERE p1.typtype = 'b' AND p1.typname NOT LIKE '\\\\_%' AND NOT EXISTS\n (SELECT 1 FROM pg_type as p2\n WHERE p2.typname = ('_' || p1.typname)::name AND\n p2.typelem = p1.oid);\n--- 60,66 ----\n -- NOTE: as of 7.3, this check finds SET, smgr, and unknown.\n SELECT p1.oid, p1.typname\n FROM pg_type as p1\n! WHERE p1.typtype in ('b','d') AND p1.typname NOT LIKE '\\\\_%' AND NOT EXISTS\n (SELECT 1 FROM pg_type as p2\n WHERE p2.typname = ('_' || p1.typname)::name AND\n p2.typelem = p1.oid);\n\n======================================================================\n\n*** ./expected/domain.out\tFri Jul 12 14:43:19 2002\n--- ./results/domain.out\tTue Aug 20 01:32:57 2002\n***************\n*** 143,154 ****\n ( col1 ddef1\n , col2 ddef2\n , col3 ddef3\n! , col4 ddef4\n , col5 ddef1 NOT NULL DEFAULT NULL\n , col6 ddef2 DEFAULT '88'\n , col7 ddef4 DEFAULT 8000\n \t\t, col8 ddef5\n );\n insert into defaulttest default values;\n insert into defaulttest default values;\n insert into defaulttest default values;\n--- 143,155 ----\n ( col1 ddef1\n , col2 ddef2\n , col3 ddef3\n! , col4 ddef4 PRIMARY KEY\n , col5 ddef1 NOT NULL DEFAULT NULL\n , col6 ddef2 DEFAULT '88'\n , col7 ddef4 DEFAULT 8000\n , col8 ddef5\n );\n+ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'defaulttest_pkey' for table 'defaulttest'\n insert into defaulttest default values;\n insert into defaulttest default values;\n insert into defaulttest default values;\n\n======================================================================\n\nCheers,\n\nNeil\n\n-- \nNeil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC\n\n",
"msg_date": "20 Aug 2002 01:37:52 -0400",
"msg_from": "Neil Conway <neilc@samurai.com>",
"msg_from_op": true,
"msg_subject": "regression test failures in CVS HEAD"
},
{
"msg_contents": "Looks like the expected files weren't updated.\n\nProbably my fault, but the tests themselves are fine.\n\nOn Tue, 2002-08-20 at 01:37, Neil Conway wrote:\n> The 'type_sanity' and 'domain' regression tests seem to fail with CVS\n> HEAD. Here's the diff:\n> \n> *** ./expected/type_sanity.out\tSun Aug 4 15:48:11 2002\n> --- ./results/type_sanity.out\tTue Aug 20 01:32:35 2002\n> ***************\n> *** 16,22 ****\n> SELECT p1.oid, p1.typname\n> FROM pg_type as p1\n> WHERE (p1.typlen <= 0 AND p1.typlen != -1) OR\n> ! (p1.typtype != 'b' AND p1.typtype != 'c' AND p1.typtype != 'p') OR\n> NOT p1.typisdefined OR\n> (p1.typalign != 'c' AND p1.typalign != 's' AND\n> p1.typalign != 'i' AND p1.typalign != 'd') OR\n> --- 16,22 ----\n> SELECT p1.oid, p1.typname\n> FROM pg_type as p1\n> WHERE (p1.typlen <= 0 AND p1.typlen != -1) OR\n> ! p1.typtype not in('b', 'c', 'd', 'p') OR\n> NOT p1.typisdefined OR\n> (p1.typalign != 'c' AND p1.typalign != 's' AND\n> p1.typalign != 'i' AND p1.typalign != 'd') OR\n> ***************\n> *** 60,66 ****\n> -- NOTE: as of 7.3, this check finds SET, smgr, and unknown.\n> SELECT p1.oid, p1.typname\n> FROM pg_type as p1\n> ! WHERE p1.typtype = 'b' AND p1.typname NOT LIKE '\\\\_%' AND NOT EXISTS\n> (SELECT 1 FROM pg_type as p2\n> WHERE p2.typname = ('_' || p1.typname)::name AND\n> p2.typelem = p1.oid);\n> --- 60,66 ----\n> -- NOTE: as of 7.3, this check finds SET, smgr, and unknown.\n> SELECT p1.oid, p1.typname\n> FROM pg_type as p1\n> ! WHERE p1.typtype in ('b','d') AND p1.typname NOT LIKE '\\\\_%' AND NOT EXISTS\n> (SELECT 1 FROM pg_type as p2\n> WHERE p2.typname = ('_' || p1.typname)::name AND\n> p2.typelem = p1.oid);\n> \n> ======================================================================\n> \n> *** ./expected/domain.out\tFri Jul 12 14:43:19 2002\n> --- ./results/domain.out\tTue Aug 20 01:32:57 2002\n> ***************\n> *** 143,154 ****\n> ( col1 ddef1\n> , col2 ddef2\n> , col3 ddef3\n> ! , col4 ddef4\n> , col5 ddef1 NOT NULL DEFAULT NULL\n> , col6 ddef2 DEFAULT '88'\n> , col7 ddef4 DEFAULT 8000\n> \t\t, col8 ddef5\n> );\n> insert into defaulttest default values;\n> insert into defaulttest default values;\n> insert into defaulttest default values;\n> --- 143,155 ----\n> ( col1 ddef1\n> , col2 ddef2\n> , col3 ddef3\n> ! , col4 ddef4 PRIMARY KEY\n> , col5 ddef1 NOT NULL DEFAULT NULL\n> , col6 ddef2 DEFAULT '88'\n> , col7 ddef4 DEFAULT 8000\n> , col8 ddef5\n> );\n> + NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'defaulttest_pkey' for table 'defaulttest'\n> insert into defaulttest default values;\n> insert into defaulttest default values;\n> insert into defaulttest default values;\n> \n> ======================================================================\n> \n> Cheers,\n> \n> Neil\n> \n> -- \n> Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n> \n\n\n",
"msg_date": "20 Aug 2002 08:05:45 -0400",
"msg_from": "Rod Taylor <rbt@zort.ca>",
"msg_from_op": false,
"msg_subject": "Re: regression test failures in CVS HEAD"
}
] |
[
{
"msg_contents": "\"Dann Corbit\" <DCorbit@connx.com> writes:\n> I read (in some other message) that this buffer overrun problem has been\n> known for a very, very long time.\n\nNo, the problem you're referring to (cash_out() and friends) is *not*\na buffer overrun.\n\nCheers,\n\nNeil\n\n-- \nNeil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC\n\n",
"msg_date": "20 Aug 2002 01:47:35 -0400",
"msg_from": "Neil Conway <neilc@samurai.com>",
"msg_from_op": true,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "> -----Original Message-----\n> From: Neil Conway [mailto:neilc@samurai.com] \n> Sent: Monday, August 19, 2002 10:42 PM\n> To: Dann Corbit\n> Cc: Neil Conway; Mark Pritchard; Justin Clift; Tom Lane; \n> Christopher Kings-Lynne; pgsql-hackers@postgresql.org\n> Subject: Re: [HACKERS] @(#) Mordred Labs advisory 0x0001: \n> Buffer overflow in\n> \n> \n> \"Dann Corbit\" <DCorbit@connx.com> writes:\n> > If you *know* of a buffer overrun, and simply decide not to fix it, \n> > that sounds very negligent to me.\n> \n> *sigh*, no one is doing that, and it is pure negligence on \n> your part for replying to a thread that you clearly have not read.\n\nI read (in some other message) that this buffer overrun problem has been\nknown for a very, very long time.\n\nTo simply decide not to fix it means:\n\"It's on the todo list\"\nFor generation after generation after generation.\n\nIt does not mean that \"Someday, we hope to fix this.\"\n\nWhat I am saying is that there is nothing that could possibly be more\nimportant than fixing this, except some other known problem that could\nalso cause billions of dollars worth of damage. Are there any such\nproblems besides the buffer overrun problems?\n",
"msg_date": "Mon, 19 Aug 2002 22:49:05 -0700",
"msg_from": "\"Dann Corbit\" <DCorbit@connx.com>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "> To simply decide not to fix it means:\n<snip>\n> What I am saying is that there is nothing that could possibly be more\n> important than fixing this, except some other known problem that could\n> also cause billions of dollars worth of damage. Are there any such\n> problems besides the buffer overrun problems?\n\nThis is an open source project. If you, or others with similar strong\nfeelings about what is important to you, would like to submit patches in\nthose areas I'm sure that they would be looked on favorably.\n\nTo simply insist that everyone else have the same priorities on any\ntopic is a bit unrealistic. However, I'd hope that if there are folks\nwho look at this particular issue with your PoV they would speak up and\nthink about helping out. If you didn't state a strong opinion on the\ntopic then others might never catch on that there is a potential issue,\nlet alone that they could contribute to a solution...\n\n - Thomas\n",
"msg_date": "Mon, 19 Aug 2002 23:21:06 -0700",
"msg_from": "Thomas Lockhart <lockhart@fourpalms.org>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
},
{
"msg_contents": "Dann Corbit wrote:\n> [...]\n> \n> What I am saying is that there is nothing that could possibly be more\n> important than fixing this, except some other known problem that could\n> also cause billions of dollars worth of damage. Are there any such\n> problems besides the buffer overrun problems?\n\nAnd what others tried to tell you is, that there are different types of\nsystems and levels of vulnerability. A software that by nature needs to\nbe exposed to the internet (like an SMTP, HTTP or SSH server) is in high\ndanger and needs to be fixed immediately. But software that by nature\nneeds to be well protected from uncontrolled access (like a database, a\nbackup management system or a logical volume manager) does not.\n\nThe matter of the fact is, that if you grant someone access to your\ndatabase that gives him the power to execute the statement that triggers\nthis bug, you're lost anyway. Whatever constraints you have set up, an\nempty database is usually very consistent but not neccessarily useful.\n\n\nJan\n\n-- \n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n",
"msg_date": "Tue, 20 Aug 2002 09:53:47 -0400",
"msg_from": "Jan Wieck <JanWieck@Yahoo.com>",
"msg_from_op": false,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
}
] |
[
{
"msg_contents": "> -----Original Message-----\n> From: Neil Conway [mailto:neilc@samurai.com] \n> Sent: Monday, August 19, 2002 10:48 PM\n> To: Dann Corbit\n> Cc: Neil Conway; Mark Pritchard; Justin Clift; Tom Lane; \n> Christopher Kings-Lynne; pgsql-hackers@postgresql.org\n> Subject: Re: [HACKERS] @(#) Mordred Labs advisory 0x0001: \n> Buffer overflow in\n> \n> \n> \"Dann Corbit\" <DCorbit@connx.com> writes:\n> > I read (in some other message) that this buffer overrun problem has \n> > been known for a very, very long time.\n> \n> No, the problem you're referring to (cash_out() and friends) \n> is *not* a buffer overrun.\n\nI did miss the one message that said it was not a buffer overrun (I just\ngot back from vacation, sorry).\n\nHowever, if it *can* crash the server, that sounds pretty important to\nme. Another message in this thread seemed to indicate that security was\nnot a major focus (lagging behind adding new features). I do hope that\nis not true.\n",
"msg_date": "Mon, 19 Aug 2002 22:59:31 -0700",
"msg_from": "\"Dann Corbit\" <DCorbit@connx.com>",
"msg_from_op": true,
"msg_subject": "Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.