threads
listlengths 1
2.99k
|
---|
[
{
"msg_contents": "Hi,\n\n I just committed some changes to a couple of files (43).\n They're required for the ability to have HeapTuple and\n HeapTupleHeader in different allocations.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Thu, 16 Dec 1999 23:25:06 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Prepared for LONG"
}
] |
[
{
"msg_contents": "[ Note redirection to hackers list ]\n\nPeter Eisentraut <[email protected]> writes:\n>> It should actually almost work to write sq.nextval as things stand,\n>> because Postgres has for a long time considered table.function and\n>> function(table) to be interchangeable notations for certain kinds of\n\n> May I wonder what the point and value of that practice is and why one\n> would want to extend it further?\n\nI think the reason the Berkeley guys did it originally was to support\nfunctions that return tuples, and in particular extracting individual\ncolumns of such a function's result. They didn't want to allow\n\n\tfunction(sourcetable).column\n\n(for reasons not real clear to me, but maybe they had good ones),\nso they wrote it as\n\n\tsourcetable.function.column\n\nThis actually still works; you can find examples in the regress tests.\n\nMy first reaction to Jeroen's patch was that it was a good idea poorly\nimplemented. I've never liked nextval('sequenceobject') from a\nsyntactic point of view, because a quoted string isn't an identifier\nbut you really want to have a normal SQL identifier to name the sequence.\n(For example, right now we have some truly ugly hacks to try to make\nthat constant behave like a regular identifier as far as\ncase-folding-or-not-case-folding goes.)\n\nIt'd be a lot nicer if the syntax could be just nextval(sequencename)\nor sequencename.nextval. And since you can select parameters of the\nsequence with sequencename.field, why shouldn't sequencename.nextval\nwork?\n\nHowever, on second thought I wonder if we'd be opening a can of worms\nto do it that way. If I write\n\n\tSELECT a, foo.b FROM bar;\n\nwhat I actually get is a join across tables foo and bar --- foo is\nimplicitly added to the FROM list. Now, if I were to write\n\n\tSELECT a, foo.nextval FROM bar;\n\npresumably I don't want a join against the sequence foo, but I am not\nsure that this will be clear either to a human reader or to the machine.\nAnd if you think that's clear enough, what about\n\n\tSELECT a, foo.nextval, foo.min_value FROM bar;\n\nwhich surely *must* cause a true join to be generated, since min_value\nis a perfectly ordinary field of foo?\n\nSo now I'm worried that making the sequence object visible as a table\nidentifier will cause strange misbehaviors, or at least great confusion.\nThis needs careful thought before we can accept it.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 16 Dec 1999 20:35:34 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Notation for nextval() (was Re: Several small patches)"
},
{
"msg_contents": "At 08:35 PM 12/16/99 -0500, Tom Lane wrote:\n\n>presumably I don't want a join against the sequence foo, but I am not\n>sure that this will be clear either to a human reader or to the machine.\n\nI haven't personally heard of any human readers of Oracle SQL getting\nconfused by this notation... :)\n\nOn the other hand, I think nextval(foo) makes more sense, it's a\nfunction operating on the sequence foo, not part of foo. nextval('foo')\nis just bizarre, though it's clear and I can't say I worry much about\nit now that I'm used to it!\n\nIn the porting-from-Oracle project I'm working on, we're just\nregsub'ing all foo.nextval's into nextval('foo').\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Thu, 16 Dec 1999 18:38:46 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Notation for nextval() (was Re: Several small patches)"
},
{
"msg_contents": "At 20:19 16-12-99 -0500, Tom Lane wrote:\n>Bruce Momjian <[email protected]> writes:\n> > Applied nextval patch.\n>\n>I'm still not happy with it --- it may be in a different place, but it\n>still breaks regular tables that have \"nextval\" or \"currval\" columns,\n>because foo.nextval is still transformed to nextval('foo') regardless\n>of whether foo is a sequence or not.\n>\n>\n>What I was hoping for was something that would *first* determine whether\n>foo is a sequence and *then* do the transformation only if so.\n>This is obviously not possible at the grammar level (the grammar doesn't\n>know what kind of table foo is, if indeed foo is a table at all), but\n>ParseFuncOrColumn does have enough info to inspect foo's type.\n\nI thought about this, but couldn't figure out how to test for foo being a \nsequence.\n\n\n>Now that I think about it, though, there are some potential semantic\n>problems with the whole idea. See my about-to-be-written response to\n>Peter's comment.\n>\n> > I don't agree with the parts of the patch, and\n> > did not apply them.\n>\n>I believe his patch to bin/psql/describe.c is reasonable. Evidently\n>he's dealing with a C compiler that tries to fold multi-part strings\n>into one part during preprocessing, and it's getting confused by\n>the conditional compilation of one line of the string. His proposed\n>fix is more readable than the original code anyway, IMHO.\n\nYes, I needed this to get psql to compile at all.\n\n>I'm dubious about the other two patches also. Evidently there is some\n>variation across platforms in the desirable switches for ctags --- but\n>diking out the ones not wanted on a particular platform is no answer.\n>Perhaps the proper fix is to make the ctags flags a configurable\n>macro...\n\nThe difference in the copyright notice patch is just extending the 1994 - \n1999 to 2000 and aligning the quotes.\n\nAbout ctags: is no one using Linux and ctags on the Postgres sources? Am I \nthe first one to find this bug?\n\nAt 20:35 16-12-99 -0500, Tom Lane wrote:\n>Peter Eisentraut <[email protected]> writes:\n> >> It should actually almost work to write sq.nextval as things stand,\n> >> because Postgres has for a long time considered table.function and\n> >> function(table) to be interchangeable notations for certain kinds of\n>\n> > May I wonder what the point and value of that practice is and why one\n> > would want to extend it further?\n>\n>I think the reason the Berkeley guys did it originally was to support\n>functions that return tuples, and in particular extracting individual\n>columns of such a function's result. They didn't want to allow\n>\n> function(sourcetable).column\n>\n>(for reasons not real clear to me, but maybe they had good ones),\n>so they wrote it as\n>\n> sourcetable.function.column\n>\n>This actually still works; you can find examples in the regress tests.\n>\n>My first reaction to Jeroen's patch was that it was a good idea poorly\n>implemented. I've never liked nextval('sequenceobject') from a\n>syntactic point of view, because a quoted string isn't an identifier\n>but you really want to have a normal SQL identifier to name the sequence.\n>(For example, right now we have some truly ugly hacks to try to make\n>that constant behave like a regular identifier as far as\n>case-folding-or-not-case-folding goes.)\n>\n>It'd be a lot nicer if the syntax could be just nextval(sequencename)\n>or sequencename.nextval. And since you can select parameters of the\n>sequence with sequencename.field, why shouldn't sequencename.nextval\n>work?\n>\n>However, on second thought I wonder if we'd be opening a can of worms\n>to do it that way. If I write\n>\n> SELECT a, foo.b FROM bar;\n>\n>what I actually get is a join across tables foo and bar --- foo is\n>implicitly added to the FROM list. Now, if I were to write\n>\n> SELECT a, foo.nextval FROM bar;\n>\n>presumably I don't want a join against the sequence foo, but I am not\n>sure that this will be clear either to a human reader or to the machine.\n>And if you think that's clear enough, what about\n>\n> SELECT a, foo.nextval, foo.min_value FROM bar;\n>\n>which surely *must* cause a true join to be generated, since min_value\n>is a perfectly ordinary field of foo?\n>\n>So now I'm worried that making the sequence object visible as a table\n>identifier will cause strange misbehaviors, or at least great confusion.\n>This needs careful thought before we can accept it.\n\nI didn't think about these complications at all (thought that my small \npatch would just add a little more compatibility with a minimum of fuss, \nbut I was wrong). Let me investigate whether I can come up with a better \nsolution.\n\n\nCheers,\n\nJeroen\n\n",
"msg_date": "Fri, 17 Dec 1999 06:23:08 +0100",
"msg_from": "Jeroen van Vianen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Notation for nextval() (was Re: Several small patches)"
},
{
"msg_contents": "\nOK, I have read this. Please give me reasons for any patches you\nsupply. I would be glad to apply the patch you needed to get psql to\ncompile if you sent it to me again. I had no idea why the change was\nbeing made. Same for the copyright change.\n\n\n\n> At 20:19 16-12-99 -0500, Tom Lane wrote:\n> >Bruce Momjian <[email protected]> writes:\n> > > Applied nextval patch.\n> >\n> >I'm still not happy with it --- it may be in a different place, but it\n> >still breaks regular tables that have \"nextval\" or \"currval\" columns,\n> >because foo.nextval is still transformed to nextval('foo') regardless\n> >of whether foo is a sequence or not.\n> >\n> >\n> >What I was hoping for was something that would *first* determine whether\n> >foo is a sequence and *then* do the transformation only if so.\n> >This is obviously not possible at the grammar level (the grammar doesn't\n> >know what kind of table foo is, if indeed foo is a table at all), but\n> >ParseFuncOrColumn does have enough info to inspect foo's type.\n> \n> I thought about this, but couldn't figure out how to test for foo being a \n> sequence.\n> \n> \n> >Now that I think about it, though, there are some potential semantic\n> >problems with the whole idea. See my about-to-be-written response to\n> >Peter's comment.\n> >\n> > > I don't agree with the parts of the patch, and\n> > > did not apply them.\n> >\n> >I believe his patch to bin/psql/describe.c is reasonable. Evidently\n> >he's dealing with a C compiler that tries to fold multi-part strings\n> >into one part during preprocessing, and it's getting confused by\n> >the conditional compilation of one line of the string. His proposed\n> >fix is more readable than the original code anyway, IMHO.\n> \n> Yes, I needed this to get psql to compile at all.\n> \n> >I'm dubious about the other two patches also. Evidently there is some\n> >variation across platforms in the desirable switches for ctags --- but\n> >diking out the ones not wanted on a particular platform is no answer.\n> >Perhaps the proper fix is to make the ctags flags a configurable\n> >macro...\n> \n> The difference in the copyright notice patch is just extending the 1994 - \n> 1999 to 2000 and aligning the quotes.\n> \n> About ctags: is no one using Linux and ctags on the Postgres sources? Am I \n> the first one to find this bug?\n> \n> At 20:35 16-12-99 -0500, Tom Lane wrote:\n> >Peter Eisentraut <[email protected]> writes:\n> > >> It should actually almost work to write sq.nextval as things stand,\n> > >> because Postgres has for a long time considered table.function and\n> > >> function(table) to be interchangeable notations for certain kinds of\n> >\n> > > May I wonder what the point and value of that practice is and why one\n> > > would want to extend it further?\n> >\n> >I think the reason the Berkeley guys did it originally was to support\n> >functions that return tuples, and in particular extracting individual\n> >columns of such a function's result. They didn't want to allow\n> >\n> > function(sourcetable).column\n> >\n> >(for reasons not real clear to me, but maybe they had good ones),\n> >so they wrote it as\n> >\n> > sourcetable.function.column\n> >\n> >This actually still works; you can find examples in the regress tests.\n> >\n> >My first reaction to Jeroen's patch was that it was a good idea poorly\n> >implemented. I've never liked nextval('sequenceobject') from a\n> >syntactic point of view, because a quoted string isn't an identifier\n> >but you really want to have a normal SQL identifier to name the sequence.\n> >(For example, right now we have some truly ugly hacks to try to make\n> >that constant behave like a regular identifier as far as\n> >case-folding-or-not-case-folding goes.)\n> >\n> >It'd be a lot nicer if the syntax could be just nextval(sequencename)\n> >or sequencename.nextval. And since you can select parameters of the\n> >sequence with sequencename.field, why shouldn't sequencename.nextval\n> >work?\n> >\n> >However, on second thought I wonder if we'd be opening a can of worms\n> >to do it that way. If I write\n> >\n> > SELECT a, foo.b FROM bar;\n> >\n> >what I actually get is a join across tables foo and bar --- foo is\n> >implicitly added to the FROM list. Now, if I were to write\n> >\n> > SELECT a, foo.nextval FROM bar;\n> >\n> >presumably I don't want a join against the sequence foo, but I am not\n> >sure that this will be clear either to a human reader or to the machine.\n> >And if you think that's clear enough, what about\n> >\n> > SELECT a, foo.nextval, foo.min_value FROM bar;\n> >\n> >which surely *must* cause a true join to be generated, since min_value\n> >is a perfectly ordinary field of foo?\n> >\n> >So now I'm worried that making the sequence object visible as a table\n> >identifier will cause strange misbehaviors, or at least great confusion.\n> >This needs careful thought before we can accept it.\n> \n> I didn't think about these complications at all (thought that my small \n> patch would just add a little more compatibility with a minimum of fuss, \n> but I was wrong). Let me investigate whether I can come up with a better \n> solution.\n> \n> \n> Cheers,\n> \n> Jeroen\n> \n> \n> ************\n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 00:33:50 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: Notation for nextval() (was Re: Several small\n\tpatches)"
},
{
"msg_contents": "Jeroen van Vianen <[email protected]> writes:\n>> I'm dubious about the other two patches also. Evidently there is some\n>> variation across platforms in the desirable switches for ctags --- but\n>> diking out the ones not wanted on a particular platform is no answer.\n>> Perhaps the proper fix is to make the ctags flags a configurable\n>> macro...\n\n> About ctags: is no one using Linux and ctags on the Postgres sources? Am I \n> the first one to find this bug?\n\nApparently you're a little new to the world of portable software.\nI don't use ctags myself, being an Emacs man rather than a vi'er,\nbut a few minutes' research yielded the following results:\n\nGNU ctags (from Emacs 19.34 distribution): -a, -d, -t, -f accepted.\n\nHPUX ctags (which claims to be based on the original UCB code and\ncompliant to XPG4 standard): -a, -t, but no -d nor -f.\n\nSunOS 4.1: same as HPUX.\n\nRedHat 4.2 Linux: comes with something called \"Exuberant Ctags, Version\n1.5\" which accepts all four (apparently this is NOT the same code as the\nGNU distribution).\n\nWhatever Linux you're running: evidently only -a and -f.\n\nI don't know which variant of ctags you're running, but it's definitely\nodd man out as far as not accepting -t goes. I'd certainly want to use\n-d (index #defines) anywhere it was accepted, too. Other side of the\ncoin is that -a is the only one of these switches that works on all the\nctags versions I was able to lay my hands on in five minutes plus yours.\nThat should give you some pause about asserting that if -a -f is the\nright incantation for the version you have, then it must be the right\nthing for everybody.\n\nBottom line here is that what we probably really need is a configurable\nmakefile macro for the ctags switches. (In fact, what I'd personally\nlike is another macro to determine whether we're using ctags or etags in\nthe first place ;-).) But short of that, I'd definitely lean towards\nthe GNU definition as being the most widespread code. I'm pretty\nsurprised that your Linux distribution (which one is it?) seems to\ncontain a non-GNU-compatible ctags.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 17 Dec 1999 01:24:43 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Re: Notation for nextval() (was Re: Several small\n\tpatches)"
},
{
"msg_contents": "Jeroen van Vianen <[email protected]> writes:\n>> What I was hoping for was something that would *first* determine whether\n>> foo is a sequence and *then* do the transformation only if so.\n\n> I thought about this, but couldn't figure out how to test for foo being a \n> sequence.\n\nIIRC, foo is a sequence if it has relkind 'S'. You can check the\nrelkind by looking into the struct returned by heap_open. The main\nthing that needs to be thought about is how to ensure that the sequence\nobject won't be added to the query's rangetable list if it is used in\na way that looks like a table reference. It may be that hacking up\nParseFuncOrColumn will be enough to prevent that, or it may not...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 17 Dec 1999 01:37:13 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Re: Notation for nextval() (was Re: Several small\n\tpatches)"
},
{
"msg_contents": "On 1999-12-17, Jeroen van Vianen mentioned:\n\n> The difference in the copyright notice patch is just extending the 1994 - \n> 1999 to 2000 and aligning the quotes.\n\nI believe that at one point we came to a sort-of conclusion that this\nwhole deal is (C) UCB until 1995(6?) and (C) PostgreSQL Global Development\nGroup 1996-present. Don't give intellectual property to people that didn't\ndo anything.\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n",
"msg_date": "Fri, 17 Dec 1999 16:44:54 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Notation for nextval() (was Re: Several small patches)"
},
{
"msg_contents": "> > The difference in the copyright notice patch is just extending the 1994 -\n> > 1999 to 2000 and aligning the quotes.\n> I believe that at one point we came to a sort-of conclusion that this\n> whole deal is (C) UCB until 1995(6?) and (C) PostgreSQL Global Development\n> Group 1996-present. Don't give intellectual property to people that didn't\n> do anything.\n\nYes, this is the way we should be annotating Postgres afaik. UCB would\nbe aghast to find that they need to defend themselves against all of\nthe changes in the last three years :)\n\nDo we now have things in the code tree which do not carry two\ncopyrights, or just the Postgres Dev Group copyright plus a reference\nto the full text in the docs?\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Fri, 17 Dec 1999 17:13:05 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: Notation for nextval() (was Re: Several small\n\tpatches)"
},
{
"msg_contents": "Thomas Lockhart wrote:\n\n> Do we now have things in the code tree which do not carry two\n> copyrights, or just the Postgres Dev Group copyright plus a reference\n> to the full text in the docs?\n\n Seen some recently - wait...\n\nbackend/optimizer/geqo/... (c) 1990 Darrell L. Whitley\n\nbackend/port/inet_aton.* Outch - see below\n * This inet_aton() function was taken from the GNU C library and\n * incorporated into Postgres for those systems which do not have this\n * routine in their standard C libraries.\n *\n * The function was been extracted whole from the file inet_aton.c in\n * Release 5.3.12 of the Linux C library, which is derived from the\n * GNU C library, by Bryan Henderson in October 1996. The copyright\n * notice from that file is below.\n\nbackend/port/snprintf.c (c) 1993 Eric P. Allman\nbackend/port/dynloader/aix.* (c) 1992 HELIOS Software GmbH\nbackend/port/dynloader/qnx4.c (c) 1999, repas AEG Automation GmbH\nbackend/port/qnx4/isnan.c (c) 1999, repas AEG Automation GmbH\nbackend/port/qnx4/rint.c (c) 1999, repas AEG Automation GmbH\nbackend/port/qnx4/sem.c (c) 1999, repas AEG Automation GmbH\nbackend/port/qnx4/shm.c (c) 1999, repas AEG Automation GmbH\nbackend/port/qnx4/tstrint.c (c) 1999, repas AEG Automation GmbH\nbackend/port/qnx4/tstsem.c (c) 1999, repas AEG Automation GmbH\nbackend/port/qnx4/tstshm.c (c) 1999, repas AEG Automation GmbH\nbackend/regex/... (c) 1992, 1993, 1994 Henry Spencer.\nbackend/utils/adt/float.c (c) 1994 by Sun Microsystems, Inc. (line 1510)\nbackend/utils/adt/geo_ops.c (c) 1995 <by John Franks>\nbackend/utils/adt/inet_net_ntop.c (c) 1996 by Internet Software Consortium.\nbackend/utils/adt/inet_net_pton.c (c) 1996 by Internet Software Consortium.\nbackend/utils/adt/ruleutils.c (c) Jan Wieck :-) - I'll remove that.\n\nbackend/utils/mb/big5.c\n * conversion between BIG5 and Mule Internal Code(CNS 116643-1992\n * plane 1 and plane 2).\n * This program is partially copied from lv(Multilingual file viewer)\n * and slightly modified. lv is written and copyrighted by NARITA Tomio\n * ([email protected]).\n\n That's all I can find that quick.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Fri, 17 Dec 1999 18:42:36 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: Notation for nextval() (was Re: Several small\n\tpatches)"
},
{
"msg_contents": "\nWell, that's a royal mess. Guess we can remove the code if someone asks\nus to? Not much more we can do.\n\n\n> Thomas Lockhart wrote:\n> \n> > Do we now have things in the code tree which do not carry two\n> > copyrights, or just the Postgres Dev Group copyright plus a reference\n> > to the full text in the docs?\n> \n> Seen some recently - wait...\n> \n> backend/optimizer/geqo/... (c) 1990 Darrell L. Whitley\n> \n> backend/port/inet_aton.* Outch - see below\n> * This inet_aton() function was taken from the GNU C library and\n> * incorporated into Postgres for those systems which do not have this\n> * routine in their standard C libraries.\n> *\n> * The function was been extracted whole from the file inet_aton.c in\n> * Release 5.3.12 of the Linux C library, which is derived from the\n> * GNU C library, by Bryan Henderson in October 1996. The copyright\n> * notice from that file is below.\n> \n> backend/port/snprintf.c (c) 1993 Eric P. Allman\n> backend/port/dynloader/aix.* (c) 1992 HELIOS Software GmbH\n> backend/port/dynloader/qnx4.c (c) 1999, repas AEG Automation GmbH\n> backend/port/qnx4/isnan.c (c) 1999, repas AEG Automation GmbH\n> backend/port/qnx4/rint.c (c) 1999, repas AEG Automation GmbH\n> backend/port/qnx4/sem.c (c) 1999, repas AEG Automation GmbH\n> backend/port/qnx4/shm.c (c) 1999, repas AEG Automation GmbH\n> backend/port/qnx4/tstrint.c (c) 1999, repas AEG Automation GmbH\n> backend/port/qnx4/tstsem.c (c) 1999, repas AEG Automation GmbH\n> backend/port/qnx4/tstshm.c (c) 1999, repas AEG Automation GmbH\n> backend/regex/... (c) 1992, 1993, 1994 Henry Spencer.\n> backend/utils/adt/float.c (c) 1994 by Sun Microsystems, Inc. (line 1510)\n> backend/utils/adt/geo_ops.c (c) 1995 <by John Franks>\n> backend/utils/adt/inet_net_ntop.c (c) 1996 by Internet Software Consortium.\n> backend/utils/adt/inet_net_pton.c (c) 1996 by Internet Software Consortium.\n> backend/utils/adt/ruleutils.c (c) Jan Wieck :-) - I'll remove that.\n> \n> backend/utils/mb/big5.c\n> * conversion between BIG5 and Mule Internal Code(CNS 116643-1992\n> * plane 1 and plane 2).\n> * This program is partially copied from lv(Multilingual file viewer)\n> * and slightly modified. lv is written and copyrighted by NARITA Tomio\n> * ([email protected]).\n> \n> That's all I can find that quick.\n> \n> \n> Jan\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> #========================================= [email protected] (Jan Wieck) #\n> \n> \n> \n> ************\n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 13:10:41 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: Notation for nextval() (was Re: Several small\n\tpatches)"
},
{
"msg_contents": "> Well, that's a royal mess. Guess we can remove the code if someone asks\n> us to? Not much more we can do.\n\nI think the issue is the license term, not the copyright. In my\nopinion, we could live with copyrights other than ours as long as\ntheir licenses are as free as the PostgreSQL license.\n\n> \n> > Thomas Lockhart wrote:\n> > \n> > > Do we now have things in the code tree which do not carry two\n> > > copyrights, or just the Postgres Dev Group copyright plus a reference\n> > > to the full text in the docs?\n> > \n> > Seen some recently - wait...\n> > \n> > backend/optimizer/geqo/... (c) 1990 Darrell L. Whitley\n\n>From the source code:\n>Permission is hereby granted to copy all or any part of\n>this program for free distribution. The author's name\n>and this copyright notice must be included in any copy.\n\nThis looks safe for me.\n\n> > backend/port/inet_aton.* Outch - see below\n> > * This inet_aton() function was taken from the GNU C library and\n> > * incorporated into Postgres for those systems which do not have this\n> > * routine in their standard C libraries.\n\nSeems bad for us, since they are GPL'd...\n\n> > backend/port/snprintf.c (c) 1993 Eric P. Allman\n\nLooks good. Its licence is BSD.\n\n> > backend/port/dynloader/aix.* (c) 1992 HELIOS Software GmbH\n\n/*\n * @(#)dlfcn.c\t1.7 revision of 95/08/14 19:08:38\n * This is an unpublished work copyright (c) 1992 HELIOS Software GmbH\n * 30159 Hannover, Germany\n */\n\nNot sure about above.\n\n> > backend/port/dynloader/qnx4.c (c) 1999, repas AEG Automation GmbH\n> > backend/port/qnx4/isnan.c (c) 1999, repas AEG Automation GmbH\n> > backend/port/qnx4/rint.c (c) 1999, repas AEG Automation GmbH\n> > backend/port/qnx4/sem.c (c) 1999, repas AEG Automation GmbH\n> > backend/port/qnx4/shm.c (c) 1999, repas AEG Automation GmbH\n> > backend/port/qnx4/tstrint.c (c) 1999, repas AEG Automation GmbH\n> > backend/port/qnx4/tstsem.c (c) 1999, repas AEG Automation GmbH\n> > backend/port/qnx4/tstshm.c (c) 1999, repas AEG Automation GmbH\n\nNothing is mentioned about the license. We could ask the author about\nit.\n\n> > backend/regex/... (c) 1992, 1993, 1994 Henry Spencer.\n\n> * Copyright (c) 1992, 1993, 1994 Henry Spencer.\n> * Copyright (c) 1992, 1993, 1994\n> *\t\tThe Regents of the University of California. All rights reserved.\n> *\n> * This code is derived from software contributed to Berkeley by\n> * Henry Spencer.\n\nSeems ok for me.\n\n> > backend/utils/adt/float.c (c) 1994 by Sun Microsystems, Inc. (line 1510)\n\n> * Developed at SunPro, a Sun Microsystems, Inc. business.\n> * Permission to use, copy, modify, and distribute this\n> * software is freely granted, provided that this notice\n> * is preserved.\n\nAlso good.\n\n> > backend/utils/adt/geo_ops.c (c) 1995 <by John Franks>\n\n> * (code offered for use by J. Franks in Linux Journal letter.)\n\nThis indicates it's safe?\n\n> > backend/utils/adt/inet_net_ntop.c (c) 1996 by Internet Software Consortium.\n> > backend/utils/adt/inet_net_pton.c (c) 1996 by Internet Software Consortium.\n\nLicense term seems ok for us.\n\n> > backend/utils/adt/ruleutils.c (c) Jan Wieck :-) - I'll remove that.\n\nI think he could leave his copyright, but it is up to him...\n\n> > backend/utils/mb/big5.c\n> > * conversion between BIG5 and Mule Internal Code(CNS 116643-1992\n> > * plane 1 and plane 2).\n> > * This program is partially copied from lv(Multilingual file viewer)\n> > * and slightly modified. lv is written and copyrighted by NARITA Tomio\n> > * ([email protected]).\n\nI contacted the author when I borrowed his code. At that time its\nlicense seemed to be sort of \"public domain.\" But today I found on his\nweb page (http://www.ff.iij4u.or.jp/~nrt/lv/) that he seems changed\nthe license to GPL2. This is bad news for me, so I have written to him\nabout it and am waiting for his reply...\n--\nTatsuo Ishii\n",
"msg_date": "Sat, 18 Dec 1999 11:06:32 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: Notation for nextval() (was Re: Several small\n\tpatches)"
},
{
"msg_contents": "> > > backend/utils/mb/big5.c\n> > > * conversion between BIG5 and Mule Internal Code(CNS 116643-1992\n> > > * plane 1 and plane 2).\n> > > * This program is partially copied from lv(Multilingual file viewer)\n> > > * and slightly modified. lv is written and copyrighted by NARITA Tomio\n> > > * ([email protected]).\n> \n> I contacted the author when I borrowed his code. At that time its\n> license seemed to be sort of \"public domain.\" But today I found on his\n> web page (http://www.ff.iij4u.or.jp/~nrt/lv/) that he seems changed\n> the license to GPL2. This is bad news for me, so I have written to him\n> about it and am waiting for his reply...\n\nI have gotten a reply from him. He has changed the license term\n*after* I copied the code from it. And he and I regard it is ok to use\nthe codes for PostgreSQL under the old license term.\n--\nTatsuo Ishii\n",
"msg_date": "Mon, 20 Dec 1999 16:24:44 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: Notation for nextval() (was Re: Several small\n\tpatches)"
}
] |
[
{
"msg_contents": "Hi,\n\n Is there any feature in postgres which gives a pointer to a row \nin a table ? I was previously using Illustra as my database as I \nneeded the object oriented features. Since there is not much support\nfor Illustra I thought of shifting to Postgresql. But in Illustra\nthere was the feature of getting a pointer to an object of type\nsome_type by using the following function\n ref (some_type)\nIs there any such feature in postgres? Or is there some way i can\nget the value of attributes in a row by using just the OID of that\nrow?\n\nR.Rahul\n\n4th Yr BTech\nComputer Science and Engineering\nIIT-Bombay\nINDIA - 400076\nemail : [email protected]\n\n",
"msg_date": "Fri, 17 Dec 1999 13:30:33 +0530",
"msg_from": "Rahul Ravindrudu <[email protected]>",
"msg_from_op": true,
"msg_subject": "pointer to a table"
}
] |
[
{
"msg_contents": "\n> Yes, you are right, of course, it doesn't mean that it's incorrect.\n> However, assuming that Oracle adheres strictly to the \n> standard (which is a\n> good, but not infallible, assumption), \n\nWhich imho is a bad assumption (take Oracle's outer join syntax e.g.).\n\n> it means that we don't. Of course,\n> we may just extend the standard, but in this particular area, \n> I'm not sure that it's a good idea,\n\nimho the advantage to have it is big.\n\n> because it can be very confusing, and lead to\n> inadvertent mistakes, which can be very difficult to find.\n\nIn what particular way ? Please give an example.\nImho it is bad practice if you call your labels like possible \ncolumn names anyway.\n\nAndreas\n",
"msg_date": "Fri, 17 Dec 1999 10:29:40 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING"
}
] |
[
{
"msg_contents": "How I would like to go on:\n\n What I've done so far is to prepare the HeapTuple handling so\n it should be possible to reallocate the t_data part from\n inside the heap_insert() and heap_update().\n\n Next would be to define how the runtime configuration is to\n be stored and configured. So I can get at least the minimum\n required system catalog changes made soon. If we leave out\n auto-compression for now, a rellongrelid (type Oid default\n Invalid) in pg_class, and a attcanlong (type bool default\n true) in pg_attribute would do it. This would give space to\n enable a single relation for this feature, and then disable\n single columns again. New utility commands will finally gain\n access to the features. Some scripts will do it during\n development, so the feature will not show up - thus beeing\n silently unavailable to the user - until we want to ship it.\n\n I think these are the best places to put the configuration\n into, because the information would be already available at\n no cost inside heap access (rel->rd_rel->rellongrelid and\n rel->rd_att...).\n\n What I want to implement for now, is to store extended\n VARLENA attributes into a regular (but other relkind)\n relation with the Oid key as discussed. That will cause\n minimum changes to VACUUM. If storage/retrieval of attributes\n is encapsulated right, it could get replaced by something\n different at any time in the future when we have enough\n experience with this new technique.\n\n Christof Petig and me then could start implementing it, using\n lztext with locally disabled compression feature for the\n basics. I'll not commit any changes until after feature\n freeze of the upcoming release. During the last changes (for\n HeapTuple handling) I've seen many places in the code, that\n deal themself on VARSIZE/VARDATA with text type attributes,\n which then must use textout() instead (what IMHO is better\n anyway). So implementing an ALL-varsize move off, instead of\n a special LONG datatype, will take longer than February 1st.\n\n This plan means in summary:\n\n 1. Full possible configurability with minimum catalog\n changes.\n\n 2. Hidden without any side effects until we agree to enable\n it.\n\n 3. Later optimizable storage of extended attributes.\n\n I can't see any reason to way much longer. Can we please have\n a consensus to get started?\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Fri, 17 Dec 1999 11:59:50 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "LONG varsize - how to go on"
},
{
"msg_contents": "> How I would like to go on:\n> \n> What I've done so far is to prepare the HeapTuple handling so\n> it should be possible to reallocate the t_data part from\n> inside the heap_insert() and heap_update().\n\nOK, I assume this is so you can change the tuple size on the fly when\ninserting the tuple.\n\n> \n> Next would be to define how the runtime configuration is to\n> be stored and configured. So I can get at least the minimum\n> required system catalog changes made soon. If we leave out\n> auto-compression for now, a rellongrelid (type Oid default\n> Invalid) in pg_class, and a attcanlong (type bool default\n> true) in pg_attribute would do it. This would give space to\n> enable a single relation for this feature, and then disable\n> single columns again. New utility commands will finally gain\n> access to the features. Some scripts will do it during\n> development, so the feature will not show up - thus beeing\n> silently unavailable to the user - until we want to ship it.\n\nGot it. You want to store the oid of the long table for the base table\ninside the pg_class/Relation structure. Good idea.\n\n> \n> I think these are the best places to put the configuration\n> into, because the information would be already available at\n> no cost inside heap access (rel->rd_rel->rellongrelid and\n> rel->rd_att...).\n> \n\nYes, I recommand a macro so access is clear. See\nRelationGetRelationName for an example.\n\n> What I want to implement for now, is to store extended\n> VARLENA attributes into a regular (but other relkind)\n> relation with the Oid key as discussed. That will cause\n> minimum changes to VACUUM. If storage/retrieval of attributes\n> is encapsulated right, it could get replaced by something\n> different at any time in the future when we have enough\n> experience with this new technique.\n\nGood. I recommend calling it pg_* so it is automatically excluded from\nclient table lists.\n\n> \n> Christof Petig and me then could start implementing it, using\n> lztext with locally disabled compression feature for the\n\nI would recommand having compression disabled by default, and enabled by\nthe user.\n\n> basics. I'll not commit any changes until after feature\n> freeze of the upcoming release. During the last changes (for\n> HeapTuple handling) I've seen many places in the code, that\n> deal themself on VARSIZE/VARDATA with text type attributes,\n> which then must use textout() instead (what IMHO is better\n> anyway). So implementing an ALL-varsize move off, instead of\n> a special LONG datatype, will take longer than February 1st.\n\nOK, so we are going to see this after 7.0 is released, which is fine. I\nunderstand the concern about all the accesses to VARDATA() inside the\ncode. That will clearly be difficult.\n\n> \n> This plan means in summary:\n> \n> 1. Full possible configurability with minimum catalog\n> changes.\n> \n> 2. Hidden without any side effects until we agree to enable\n> it.\n> \n> 3. Later optimizable storage of extended attributes.\n> \n> I can't see any reason to way much longer. Can we please have\n> a consensus to get started?\n\nSounds good.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 12:36:55 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "Bruce Momjian wrote:\n\n> > What I want to implement for now, is to store extended\n> > VARLENA attributes into a regular (but other relkind)\n> > relation with the Oid key as discussed. That will cause\n> > minimum changes to VACUUM. If storage/retrieval of attributes\n> > is encapsulated right, it could get replaced by something\n> > different at any time in the future when we have enough\n> > experience with this new technique.\n>\n> Good. I recommend calling it pg_* so it is automatically excluded from\n> client table lists.\n\n Additionally, exclude them from psql's \\dS by looking at the\n relkind. And for security reasons, disable regular SELECT for\n non-superusers. Also, psql's \\d should list the \"secondary\"\n relation name after indices. But that's all stuff far away.\n\n> >\n> > Christof Petig and me then could start implementing it, using\n> > lztext with locally disabled compression feature for the\n>\n> I would recommand having compression disabled by default, and enabled by\n> the user.\n\n Missed me here. I wanted to abuse lztext during development,\n having that only beeing considered for move off at all to get\n the in place tuple modification going. Then add all the other\n varsize types (there are 12 plus arrays currently) to have\n only one source of errors.\n\n> OK, so we are going to see this after 7.0 is released, which is fine. I\n> understand the concern about all the accesses to VARDATA() inside the\n> code. That will clearly be difficult.\n\n Seems so.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Fri, 17 Dec 1999 18:57:40 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "> > >\n> > > Christof Petig and me then could start implementing it, using\n> > > lztext with locally disabled compression feature for the\n> >\n> > I would recommand having compression disabled by default, and enabled by\n> > the user.\n> \n> Missed me here. I wanted to abuse lztext during development,\n> having that only beeing considered for move off at all to get\n> the in place tuple modification going. Then add all the other\n> varsize types (there are 12 plus arrays currently) to have\n> only one source of errors.\n\nOh, got it. You are going to implement long tuples for only the lztext\ntype at first. Excellent idea. Did you see someone on the general list\nalready is asking about long tuples for 7.0? I replied on our current\nstatus.\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 13:12:34 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "Bruce Momjian wrote:\n\n> Oh, got it. You are going to implement long tuples for only the lztext\n> type at first. Excellent idea. Did you see someone on the general list\n> already is asking about long tuples for 7.0? I replied on our current\n> status.\n\n I've seen several such questions these days. And I fear, if\n I'm not able to get at least the required catalog changes\n into 7.0, I'd have to wait until after 7.0 freeze + CVS\n branch before I can start at all. That'd cost us too much\n time.\n\n I know that I can deal with a bunch of deferred patches,\n staying in sync with CURRENT and having new features only as\n patches. But that worx only as long as I have most catalog\n changes in CURRENT. One single concurrent catalog change can\n cost me days of work in the worst case otherwise.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Fri, 17 Dec 1999 20:26:36 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "> Bruce Momjian wrote:\n> \n> > Oh, got it. You are going to implement long tuples for only the lztext\n> > type at first. Excellent idea. Did you see someone on the general list\n> > already is asking about long tuples for 7.0? I replied on our current\n> > status.\n> \n> I've seen several such questions these days. And I fear, if\n> I'm not able to get at least the required catalog changes\n> into 7.0, I'd have to wait until after 7.0 freeze + CVS\n> branch before I can start at all. That'd cost us too much\n> time.\n> \n> I know that I can deal with a bunch of deferred patches,\n> staying in sync with CURRENT and having new features only as\n> patches. But that worx only as long as I have most catalog\n> changes in CURRENT. One single concurrent catalog change can\n> cost me days of work in the worst case otherwise.\n\nThe Feb 1 date is not set in stone. If you would prefer March 1, we can\nlook at that option.\n\nI pushed for an earlier release because I didn't want to wait for _all_\nopen items to be completed before a release.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 15:37:55 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "Bruce Momjian wrote:\n\n> > I know that I can deal with a bunch of deferred patches,\n> > staying in sync with CURRENT and having new features only as\n> > patches. But that worx only as long as I have most catalog\n> > changes in CURRENT. One single concurrent catalog change can\n> > cost me days of work in the worst case otherwise.\n>\n> The Feb 1 date is not set in stone. If you would prefer March 1, we can\n> look at that option.\n\n Let's see how far I can get it in the next 3-4 weeks. Then it\n should have turned out if it's worth to delay the release for\n another couple of weeks or not.\n\n Had an Idea just as I wrote the (now deleted) text that\n appeared here :-)\n\n The problem I wanted to write about are sections (possible,\n even if I don't know about one I haven't written myself :-)\n in the code, where a Datum is explicitly or implicitly\n casted, to get access to vl_len and vl_dat.\n\n Well, I intend to redefine the varlena struct and rename any\n macro that deals with it. This way I'll catch any location in\n the code, that does anything with variable size attributes in\n a usual way.\n\n We wanted to use the top 2 bits of vl_len for flags, leaving\n us a theoretical maximum size of 1GB for one single extended\n attribute value. Since I want to leave out the compression\n part for now, I could set the compression info bit ALLWAYS.\n That would force any part of the code, where the above\n casting (abuse) occurs, to immediately CRASH at first hit\n (would allocate or access >=1G of memory and I think this is\n enough to trigger a crash somewhere). If such a setup passes\n BETA, I'll feel comfortable with it.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Fri, 17 Dec 1999 22:14:05 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "> Bruce Momjian wrote:\n> \n> > > I know that I can deal with a bunch of deferred patches,\n> > > staying in sync with CURRENT and having new features only as\n> > > patches. But that worx only as long as I have most catalog\n> > > changes in CURRENT. One single concurrent catalog change can\n> > > cost me days of work in the worst case otherwise.\n> >\n> > The Feb 1 date is not set in stone. If you would prefer March 1, we can\n> > look at that option.\n> \n> Let's see how far I can get it in the next 3-4 weeks. Then it\n> should have turned out if it's worth to delay the release for\n> another couple of weeks or not.\n\nYes, let's see how it goes.\n\n> \n> Had an Idea just as I wrote the (now deleted) text that\n> appeared here :-)\n> \n> The problem I wanted to write about are sections (possible,\n> even if I don't know about one I haven't written myself :-)\n> in the code, where a Datum is explicitly or implicitly\n> casted, to get access to vl_len and vl_dat.\n\nYou will find only a few files that access vl_len/vl_dat, and the rest\nall use macros. mkid or whatever indexing you use on the source tree\nwill do nicely. The bigger question is going to be handling the VARDATA\nentries properly when the relate to system tables. The scope of how\nlong that data has to exist may be an issue, and textout() may be the\ntrick in all those cases. The only issue there is pfree'ing the string\nonce your are done with it.\n\n\n> \n> Well, I intend to redefine the varlena struct and rename any\n> macro that deals with it. This way I'll catch any location in\n> the code, that does anything with variable size attributes in\n> a usual way.\n\nYes, but again, just using mkid or something else will find all of them\nquickly.\n\nSetting the compress bit to catch any unusual cases may be interesting,\nthough I can't see how any routine could get to the varlena data without\naccessing the field name or macros.\n\n> \n> We wanted to use the top 2 bits of vl_len for flags, leaving\n> us a theoretical maximum size of 1GB for one single extended\n> attribute value. Since I want to leave out the compression\n> part for now, I could set the compression info bit ALLWAYS.\n> That would force any part of the code, where the above\n> casting (abuse) occurs, to immediately CRASH at first hit\n> (would allocate or access >=1G of memory and I think this is\n> enough to trigger a crash somewhere). If such a setup passes\n> BETA, I'll feel comfortable with it.\n\nYes, makes sense. Good thing user applications will never see our long\npointers. That would be very confusing for them.\n\nI am concerned about your trying to continue development on a snapshot\nwhile we release the 7.0 release. A single pgindent run will mess you\nup terribly. I can prevent that, but other work will affect you.\n\nI don't want a release to cause you any additional work. Marc is very\nclear on that.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 17:02:32 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "> Setting the compress bit to catch any unusual cases may be interesting,\n> though I can't see how any routine could get to the varlena data without\n> accessing the field name or macros.\n\n Take a look at NUMERIC or LZTEXT types (both by me and thus I\n knew) and you'll know. That's what I meant with implicit\n casting.\n\n> I am concerned about your trying to continue development on a snapshot\n> while we release the 7.0 release. A single pgindent run will mess you\n> up terribly. I can prevent that, but other work will affect you.\n\n Oh - yes! Please don't do a pgindent.\n\n Otherwise it's relatively simple if you know how (screwed up)\n I usually work.\n\n First of all, I only use a very limited set of actions while\n I'm in my checked out CVS working directory:\n\n cvs update\n patch <... (and remove .orig files)\n cvs commit\n\n To do a hack, I copy the entire CVS working dir to another\n location, configure it and save another copy of the\n configured sources into a .orig tree. Then I start hacking,\n and if something useful falls out finally, there are two\n possible ways depending on the time, the 'hacking' step took:\n\n 1. Short (less than 4 hours)\n I apply the patch to my CVS working directory and commit\n it.\n\n 2. Long\n I do a 'cvs update', take a copy of it and try to apply\n my own patch to that. If it works well down to the\n regression test, I can use this patch to apply it to CVS,\n otherwise, I need to fix, rediff and start over at 2.\n\n To stay in sync with CURRENT during a long time hack, I just\n have to do this:\n\n - Every some days, take a diff of my so far done changes,\n - do a 'cvs update',\n - take a fresh copy of the CURRENT tree\n - and apply my patch onto it.\n\n The last step might show up some rejected hunks, resulting\n from conflicting changes by others. Or it might cause other\n errors due to conflicts, patch cannot detect. But if doing\n these steps frequently enough, the efford to stay in sync\n with CURRENT is relatively low.\n\n Someone might think that's a very expensive way of\n developing. But over the years, I had good success on long\n term hacks with it. And since some folks seem not to agree\n with my point of view about using CVS branching for long term\n development, it's the only way for me to do it in a similar\n way (saving intermediate states of my patches also gives me\n the power to start over on an earlier stage).\n\n I assume, some people lost me during the description. But\n anyway, I use this for a couple of years now, and it works\n fine.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Sat, 18 Dec 1999 00:24:13 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "[email protected] (Jan Wieck) writes:\n> Christof Petig and me then could start implementing it, using\n> lztext with locally disabled compression feature for the\n> basics. I'll not commit any changes until after feature\n> freeze of the upcoming release. During the last changes (for\n> HeapTuple handling) I've seen many places in the code, that\n> deal themself on VARSIZE/VARDATA with text type attributes,\n> which then must use textout() instead (what IMHO is better\n> anyway). So implementing an ALL-varsize move off, instead of\n> a special LONG datatype, will take longer than February 1st.\n\nOK, I feel a lot better about planning this for next release instead\nof the Feb-1 release.\n\nIt seems like what we ought to be doing in the near term is finishing\nup the loose ends that remain with table locking, cache invalidation,\netc. The recently reported \"LockRelease\" errors seem to fall into\nthat category as well. Anyway, my point is we ought to go full steam\nahead into cleanup-and-make-ready-for-release mode. Dare I suggest\nthat we should declare feature freeze *now*, and concentrate on bug\nfixes only for the next six weeks? If not, what features are on the\nnear horizon?\n\nIf Bruce wants to run pgindent before the Feb release, maybe the easiest\nanswer is to do it now (in the next few days) and then Jan can start\nworking on his new stuff without worrying about it.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 18 Dec 1999 00:58:53 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on "
},
{
"msg_contents": "> It seems like what we ought to be doing in the near term is finishing\n> up the loose ends that remain with table locking, cache invalidation,\n> etc. The recently reported \"LockRelease\" errors seem to fall into\n> that category as well. Anyway, my point is we ought to go full steam\n> ahead into cleanup-and-make-ready-for-release mode. Dare I suggest\n> that we should declare feature freeze *now*, and concentrate on bug\n> fixes only for the next six weeks? If not, what features are on the\n> near horizon?\n> \n> If Bruce wants to run pgindent before the Feb release, maybe the easiest\n> answer is to do it now (in the next few days) and then Jan can start\n> working on his new stuff without worrying about it.\n\nI don't need to run pgindent before _every_ release. No problem.\n\nI don't see Jan's work chaning what the rest of us focus on. Let's see\nhow it goes. I certainly don't have anything planned.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 18 Dec 1999 01:13:31 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "On 1999-12-18, Tom Lane mentioned:\n\n> ahead into cleanup-and-make-ready-for-release mode. Dare I suggest\n> that we should declare feature freeze *now*, and concentrate on bug\n> fixes only for the next six weeks? If not, what features are on the\n> near horizon?\n\nWhat would be the difference between a feature-freeze and a beta then? I'm\nsure every sane developer wouldn't start anything completely new right now\nbut I for my part still see up to a handful of TODO items that could be\nfixed with two nights' work each.\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n",
"msg_date": "Sat, 18 Dec 1999 17:13:17 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on "
},
{
"msg_contents": "On 1999-12-18, Bruce Momjian mentioned:\n\n> I don't need to run pgindent before _every_ release. No problem.\n\nIs this pgindent thing negotiable at all? IMHO the output of plain indent\n-orig looks much nicer (and readable). It also tends to look like the bsd\nc-style in emacs. If we could just tell people 'set up {emacs|vi|ed} like\nthis' (such as c-set-style bsd) there wouldn't be half a dozen different\nformats propagating through the source until someone comes around with\npgindent.\n\nBtw., I use GNU indent 2.2.1 which is a long way from the versions\npgindent tries to warn about.\n\nMore important than arguing about code formatting, however: Could we lose\nthis a-tab-looks-like-4-spaces thing, now that Bruce has a new editor(?) ?\nIn any unprepar{ed|able} viewer (cat/more/less/pico) the code looks like\nhell. Maybe we could lose the tab altogether because it's a pain. Just\ninsert 4 (8, 12, ...) spaces.\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n",
"msg_date": "Sat, 18 Dec 1999 17:13:28 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "pgindent (Re: [HACKERS] LONG varsize - how to go on)"
},
{
"msg_contents": "[Charset ISO-8859-1 unsupported, filtering to ASCII...]\n> On 1999-12-18, Bruce Momjian mentioned:\n> \n> > I don't need to run pgindent before _every_ release. No problem.\n> \n> Is this pgindent thing negotiable at all? IMHO the output of plain indent\n> -orig looks much nicer (and readable). It also tends to look like the bsd\n> c-style in emacs. If we could just tell people 'set up {emacs|vi|ed} like\n> this' (such as c-set-style bsd) there wouldn't be half a dozen different\n> formats propagating through the source until someone comes around with\n> pgindent.\n\nI did not decide on this format myself, but several developers said they\nprefer this format, and I do too. I am willing to open the discussion\nto see what people would prefer.\n\nThe current format does match my C style for non-PostgreSQL projects\ntoo.\n\nI remember clear mention that we did not like:\n\n\tif () {\n\n\t}\n\nI see you are writing your shell scripts with that, and am not a fan of\nit, but it is only a shell script.\n\n> \n> Btw., I use GNU indent 2.2.1 which is a long way from the versions\n> pgindent tries to warn about.\n\nYes, the message was from when GNU indent had stoppped development in\n1994 or so, and they bugs never had been fixed. I have no idea how the\nnew GNU indent is. I am sure it has fixed some of the older bugs, but I\ndon't know if they added new bugs.\n\n\n> \n> More important than arguing about code formatting, however: Could we lose\n> this a-tab-looks-like-4-spaces thing, now that Bruce has a new editor(?) ?\n> In any unprepar{ed|able} viewer (cat/more/less/pico) the code looks like\n> hell. Maybe we could lose the tab altogether because it's a pain. Just\n> insert 4 (8, 12, ...) spaces.\n\nAgain, I think everyone liked it at the time, but this may have changed.\n\nSpeak up, folks.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 18 Dec 1999 15:32:35 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t"
},
{
"msg_contents": "\nOn 18-Dec-99 Bruce Momjian wrote:\n> [Charset ISO-8859-1 unsupported, filtering to ASCII...]\n> \n> I remember clear mention that we did not like:\n> \n> if () {\n> \n> }\n\nFigures. that's the only method I do like!\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n",
"msg_date": "Sat, 18 Dec 1999 16:44:39 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> Again, I think everyone liked it at the time, but this may have changed.\n>\n> Speak up, folks.\n\nI can live with the code layout conventions we have in place; I like K&R\nlayout better, but not enough to fight about it. It's easy enough to\nset up Emacs to handle the style we have.\n\nWhat I do *not* like is the tab-stops-are-4-spaces convention. As Peter\nsays, that makes the code look horrible in any tool that can't easily be\nadjusted to a nonstandard tab spacing.\n\nMy preference would be to use standard 8-space meaning of tabs, but\nstick with our current conventions for visible layout of code (4 columns\nper logical indent level, etc). That means people contributing code\nwould need to use editors that understand the difference between a\nphysical tab character and a logical indent level. I get the impression\nthat a number of key developers don't use such editors, so maybe\nswitching over isn't going to be practical.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 18 Dec 1999 17:14:07 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)"
},
{
"msg_contents": "On 1999-12-18, Bruce Momjian mentioned:\n\n> I remember clear mention that we did not like:\n> \n> \tif () {\n> \n> \t}\n> \n> I see you are writing your shell scripts with that, and am not a fan of\n> it, but it is only a shell script.\n\nWhat do I know about shell scripting? :)\n\nSeriously though, I didn't use to do that, but I get to like it more every\nday ... I was going to look for an example of uglily-formatted code now,\nbut can't find one. My concern was more about the 4-space-tabs, because a\ntab is 8 spaces in the rest of the world. I have no problem with 4 space\nindentation and the good old bsd format.\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n",
"msg_date": "Mon, 20 Dec 1999 01:18:46 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t"
},
{
"msg_contents": "[Charset ISO-8859-1 unsupported, filtering to ASCII...]\n> On 1999-12-18, Bruce Momjian mentioned:\n> \n> > I remember clear mention that we did not like:\n> > \n> > \tif () {\n> > \n> > \t}\n> > \n> > I see you are writing your shell scripts with that, and am not a fan of\n> > it, but it is only a shell script.\n> \n> What do I know about shell scripting? :)\n> \n> Seriously though, I didn't use to do that, but I get to like it more every\n> day ... I was going to look for an example of uglily-formatted code now,\n> but can't find one. My concern was more about the 4-space-tabs, because a\n> tab is 8 spaces in the rest of the world. I have no problem with 4 space\n> indentation and the good old bsd format.\n\nAs a workaround, there is a C program I wrote called entab in\npgsql/src/tools/entab. It has a manual page and everything. It does a\ngood job of converting tabs to any size, or removing all tabs. It does\ncertain fancy things like prevent tab changes inside quoted strings, and\nclip trailing whitespace. That is what I do in my print filters.\n\nI admit our current system is a pain. Our options are:\n\n\to go to 8 space tabs and 8 space indenting\n\to go to 8 space tabs and 4 space indenting\n\to keep 4 space tabs and 4 space indenting\n\nThe first option is out. Eight space indenting is a pain, and our code\nwould look terrible. Eight is just too much and prevents meaningful\nindenting.\n\nThe second option is your preference. It is easier to print, but\nediting the file can be a pain for editors that don't support\ndifferent tab/indent values. Also, I like cursoring over tabs, so\nhaving some indents as 4 spaces and some as full tabs give the code a\nfunny feeling for me.\n\nI print a lot less, and use entab do handle the 4-space issue, so it\nseems the best for me.\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sun, 19 Dec 1999 21:29:35 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t"
},
{
"msg_contents": "Tom Lane wrote:\n\n> Dare I suggest\n> that we should declare feature freeze *now*, and concentrate on bug\n> fixes only for the next six weeks? If not, what features are on the\n> near horizon?\n\n Only if the implementation of the temp file buffered deferred\n trigger event queue isn't considered a feature, and after I\n committed the catalog changes I need to go on with LONG\n quietly.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Mon, 20 Dec 1999 09:33:32 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "Bruce Momjian wrote:\n\n> > If Bruce wants to run pgindent before the Feb release, maybe the easiest\n> > answer is to do it now (in the next few days) and then Jan can start\n> > working on his new stuff without worrying about it.\n>\n> I don't need to run pgindent before _every_ release. No problem.\n>\n> I don't see Jan's work chaning what the rest of us focus on. Let's see\n> how it goes. I certainly don't have anything planned.\n\n Would be best for me if you can leave out the pgindent run\n for this release. I already have some small things as\n patches, that I apply to the latest cvs update. And I fear\n what's currently discussed about changing 4 column tabstops\n would break them completely.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Mon, 20 Dec 1999 12:15:08 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "> Bruce Momjian wrote:\n> \n> > > If Bruce wants to run pgindent before the Feb release, maybe the easiest\n> > > answer is to do it now (in the next few days) and then Jan can start\n> > > working on his new stuff without worrying about it.\n> >\n> > I don't need to run pgindent before _every_ release. No problem.\n> >\n> > I don't see Jan's work chaning what the rest of us focus on. Let's see\n> > how it goes. I certainly don't have anything planned.\n> \n> Would be best for me if you can leave out the pgindent run\n> for this release. I already have some small things as\n> patches, that I apply to the latest cvs update. And I fear\n> what's currently discussed about changing 4 column tabstops\n> would break them completely.\n\nGot it, no pgindent run.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 20 Dec 1999 09:39:15 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "[email protected] (Jan Wieck) writes:\n> Tom Lane wrote:\n>> Dare I suggest that we should declare feature freeze *now*,\n\n> Only if the implementation of the temp file buffered deferred\n> trigger event queue isn't considered a feature,\n\nIt's obviously a necessary fix. But no one seemed excited about an\nearly feature freeze anyway, so disregard that comment...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 20 Dec 1999 10:02:27 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on "
},
{
"msg_contents": "[email protected] (Jan Wieck) writes:\n> Would be best for me if you can leave out the pgindent run\n> for this release. I already have some small things as\n> patches, that I apply to the latest cvs update.\n\nWhy not do what Vadim is doing for XLOG: commit your changes under\n#ifdefs for a symbol that isn't yet defined?\n\n#ifdef LONG_ATTRS\n\tnew code\n#else\n\told code\n#endif\n\nI think this'd possibly be helpful anyway for study and debugging\npurposes, since people could easily see what you've changed and where.\nEventually, after all the dust settles, we can get rid of the #if's\nand the old-code fragments.\n\nI don't normally like #ifdef'd patches of this sort, but as a temporary\nmeasure during implementation I think it'd be better than keeping a\nprivate set of files.\n\n> And I fear\n> what's currently discussed about changing 4 column tabstops\n> would break them completely.\n\nBruce doesn't want to do that, and I doubt anyone will force the issue\nover his veto. But it would be nice to be able to do a pgindent run;\nthere's a lot of new code in this release.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 20 Dec 1999 10:09:21 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on "
},
{
"msg_contents": "> [email protected] (Jan Wieck) writes:\n> > Tom Lane wrote:\n> >> Dare I suggest that we should declare feature freeze *now*,\n> \n> > Only if the implementation of the temp file buffered deferred\n> > trigger event queue isn't considered a feature,\n> \n> It's obviously a necessary fix. But no one seemed excited about an\n> early feature freeze anyway, so disregard that comment...\n\nYes, Tom, I was wondering about your early freeze proposal. If we\nfreeze, we may as well start beta. However, I believe it was you who\nsuggested Feb 1 rather than Jan 1 because you wanted to clean up some\nthings.\n\nSo, I assume we are scheduled for a Feb 1 beta, and anything Jan can get\ndone by then should be added, including any working implementation of\nforeign keys or long tuples. \n\nIt doesn't have to be 100% tested, just working. Testing is for the beta\nperiod. And Jan, others are ready to assist you. I didn't understand\nforeign keys, but I think I have an idea about long tuples.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 20 Dec 1999 13:04:54 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "> [email protected] (Jan Wieck) writes:\n> > Would be best for me if you can leave out the pgindent run\n> > for this release. I already have some small things as\n> > patches, that I apply to the latest cvs update.\n> \n> Why not do what Vadim is doing for XLOG: commit your changes under\n> #ifdefs for a symbol that isn't yet defined?\n> \n> #ifdef LONG_ATTRS\n> \tnew code\n> #else\n> \told code\n> #endif\n> \n> I think this'd possibly be helpful anyway for study and debugging\n> purposes, since people could easily see what you've changed and where.\n> Eventually, after all the dust settles, we can get rid of the #if's\n> and the old-code fragments.\n\nI think Vadim had a single entry point that he could control in that\nway. Not sure Jan has such an entry point. If the stuff goes all over\nthe place, #ifdef can be hard to read as you are coding.\n\nHowever, he may be able to get to a point with his new macros that he\ncan commit the changes and have long handling turned off until he is\nhappy with it. That would be nice so we can test it by just changing\nthe macro.\n\n> \n> I don't normally like #ifdef'd patches of this sort, but as a temporary\n> measure during implementation I think it'd be better than keeping a\n> private set of files.\n> \n> > And I fear\n> > what's currently discussed about changing 4 column tabstops\n> > would break them completely.\n> \n> Bruce doesn't want to do that, and I doubt anyone will force the issue\n> over his veto. But it would be nice to be able to do a pgindent run;\n> there's a lot of new code in this release.\n\nI hope I didn't \"veto\" it. I just wanted to mention my reasons, and\nlook for other people to vote too. I have Vince, Peter, and Tom who\nwant 8-space tabs and 4-space indents. Because the old standard was\nvoted on by many more people, I need to hear additional votes to change\nour standard.\n\nJan, can we run a pgindent on the current sources with the current tab\nsize unchanged? I don't think that would affect you very much. \nHowever, I can wait until most of your code is committed. I don't\nnormally run pgindent until just before the final release date.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 20 Dec 1999 13:09:46 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on"
},
{
"msg_contents": "Bruce Momjian wrote:\n\n> I think Vadim had a single entry point that he could control in that\n> way. Not sure Jan has such an entry point. If the stuff goes all over\n> the place, #ifdef can be hard to read as you are coding.\n\n Sure, there will be some more entry points this time. But as\n far as I see up to now, not too many in the beginning. And\n for storing values, they're all located in heapam.c.\n\n Since we decided not to create a separate LONG datatype, and\n not doing LONG attributes alone (compression at some point\n too), I looked for some unique name for it - and found one.\n The characters 'toast' did not show up on a case insensitive\n grep over the entire CVS tree. Thus, I'll call it\n\n tuple toaster\n\n subsequently. I think there are enough similarities to a\n toaster in this case. If you take a bread (tuple) and toast\n some of the slices (attributes), anything can work as you\n want and it will smell and taste delicious. In some cases,\n slices might get burned (occationally hitting an indexed\n value), taste bitter and it will stink.\n\n BTW: The idea itself was stolen from toast/untoast, a GSM\n voice data compression/decompression tool.\n\n I'll commit some more changes that put in the basics #ifdef'd\n out soon.\n\n> > Bruce doesn't want to do that, and I doubt anyone will force the issue\n> > over his veto. But it would be nice to be able to do a pgindent run;\n> > there's a lot of new code in this release.\n>\n> I hope I didn't \"veto\" it. I just wanted to mention my reasons, and\n> look for other people to vote too. I have Vince, Peter, and Tom who\n> want 8-space tabs and 4-space indents. Because the old standard was\n> voted on by many more people, I need to hear additional votes to change\n> our standard.\n\n Who uses an editor that cannot distinguish between tabstop\n and shiftwidth? And which editors are these - are they useful\n for programming at all?\n\n Anyway, I vote for 8-space tabs and 4-space indents too. My\n .exrc set's up 4-space tabs actually, and it's a real mess\n when editing non-PG sources.\n\n> Jan, can we run a pgindent on the current sources with the current tab\n> size unchanged? I don't think that would affect you very much.\n> However, I can wait until most of your code is committed. I don't\n> normally run pgindent until just before the final release date.\n\n You can do anything you want soon. I intend only to put the\n #ifdef'd out calls to the toaster into heapam.c, and create a\n new tuptoaster.c in the same location, again all code\n #ifdef'd out. From then on, I can work CVS based without any\n interference.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Tue, 21 Dec 1999 00:17:28 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Tuple toaster (was: Re: LONG varsize - how to go on)"
},
{
"msg_contents": "> Bruce Momjian wrote:\n> \n> > I think Vadim had a single entry point that he could control in that\n> > way. Not sure Jan has such an entry point. If the stuff goes all over\n> > the place, #ifdef can be hard to read as you are coding.\n> \n> Sure, there will be some more entry points this time. But as\n> far as I see up to now, not too many in the beginning. And\n> for storing values, they're all located in heapam.c.\n\nGood.\n\n> \n> Who uses an editor that cannot distinguish between tabstop\n> and shiftwidth? And which editors are these - are they useful\n> for programming at all?\n> \n> Anyway, I vote for 8-space tabs and 4-space indents too. My\n> .exrc set's up 4-space tabs actually, and it's a real mess\n> when editing non-PG sources.\n\nOK, that tips the scales in favor of 8-char tabs. My micro-emacs can't\nhandle different indent and tab sizes, but that is an old non-X-based\neditor. I then checked Crisp, my new X editor, and I can't see how to\nthat either.\n\nHowever, I don't do that much coding, so if people want to go for 8-byte\ntabs and 4-byte indent, we can do that.\n\nAny objections on for that?\n\n> You can do anything you want soon. I intend only to put the\n> #ifdef'd out calls to the toaster into heapam.c, and create a\n> new tuptoaster.c in the same location, again all code\n> #ifdef'd out. From then on, I can work CVS based without any\n> interference.\n\nLet me know.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 20 Dec 1999 21:12:27 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Tuple toaster (was: Re: LONG varsize - how to go on)"
}
] |
[
{
"msg_contents": "\nHi,\n\nIf I compile current source, gcc (2.95.2) return interesting error for \npgsql/describe.c.\n\ngcc command line:\n\nmake[1]: Leaving directory /home/PG_DEVEL/pgsql.change/src/interfaces/libpq'\ngcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall\n-Wmissing-prototypes -DMULTIBYTE=LATIN2 -c -o describe.o describe.c\n\n\nThe gcc return error for next lines:\n\n------\n strcpy(buf,\n \"SELECT pg_database.datname as \\\"Database\\\",\\n\"\n \" pg_user.usename as \\\"Owner\\\"\"\n#ifdef MULTIBYTE\n \",\\n pg_database.encoding as \\\"Encoding\\\"\"\n#endif\n );\n-------\n\nIf I instead strcpy() write sprintf(buf, ..) all is right. \n \nWhat is bad, my gcc or previous source code? (IMHO is Peter's code right and\ngcc is a little mazy).\n\nFull error dump:\n\nmake -C ../../interfaces/libpq libpq.a\nmake[1]: Entering directory `/home/PG_DEVEL/pgsql.change/src/interfaces/libpq'\nmake[1]: `libpq.a' is up to date.\nmake[1]: Leaving directory `/home/PG_DEVEL/pgsql.change/src/interfaces/libpq'\ngcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall -Wmissing-prototypes -DMULTIBYTE=LATIN2 -c -o describe.o describe.c\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c:324: warning: preprocessing directive not recognized within macro arg\ndescribe.c: In function `listAllDbs':\ndescribe.c:321: undefined or invalid # directive\ndescribe.c:323: undefined or invalid # directive\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `#'\ndescribe.c:324: parse error before `:'\nmake: *** [describe.o] Error 1\n\n\n----------------------------------------------------------------------\nKarel Zak <[email protected]> http://home.zf.jcu.cz/~zakkr/\n\nDocs: http://docs.linux.cz (big docs archive)\t\nKim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)\nFTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)\n-----------------------------------------------------------------------\n\n",
"msg_date": "Fri, 17 Dec 1999 15:11:22 +0100 (CET)",
"msg_from": "Karel Zak - Zakkr <[email protected]>",
"msg_from_op": true,
"msg_subject": "psql vs. gcc"
},
{
"msg_contents": "> If I compile current source, gcc (2.95.2) return interesting error for\n> pgsql/describe.c.\n> The gcc return error for next lines:\n> strcpy(buf,\n> \"SELECT pg_database.datname as \\\"Database\\\",\\n\"\n> \" pg_user.usename as \\\"Owner\\\"\"\n> #ifdef MULTIBYTE\n> \",\\n pg_database.encoding as \\\"Encoding\\\"\"\n> #endif\n> );\n\nI'm sure we would accept a patch that changed this into a\n\n strcpy()\n #ifdef MULTIBYTE\n strcat()\n #endif\n\nsequence rather than this monolithic line.\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Fri, 17 Dec 1999 14:45:00 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] psql vs. gcc"
},
{
"msg_contents": "Karel Zak - Zakkr <[email protected]> writes:\n> strcpy(buf,\n> \"SELECT pg_database.datname as \\\"Database\\\",\\n\"\n> \" pg_user.usename as \\\"Owner\\\"\"\n> #ifdef MULTIBYTE\n> \",\\n pg_database.encoding as \\\"Encoding\\\"\"\n> #endif\n> );\n \n> What is bad, my gcc or previous source code? (IMHO is Peter's code right and\n> gcc is a little mazy).\n\nAfter looking at my C reference, I believe gcc is following the ANSI C\nspec and Peter's code is broken. According to the book I'm looking at,\nconcatenation of adjacent string literals is specified to happen while\nforming preprocessing tokens, which obviously must occur *before*\npreprocessor directives are evaluated. (#if throws away preprocessing\ntokens, not raw characters...) So when MULTIBYTE is defined, an\nANSI-compliant compiler will see a syntax error in the above.\n\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n\nLooks like there are a few other problems here too...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 17 Dec 1999 12:24:01 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] psql vs. gcc "
},
{
"msg_contents": "I accidentally rejected the proper fix for this yesterday because there\nwas no description about what it was supposed to fix. Let me see if I\ncan get it now.\n\n\n> > If I compile current source, gcc (2.95.2) return interesting error for\n> > pgsql/describe.c.\n> > The gcc return error for next lines:\n> > strcpy(buf,\n> > \"SELECT pg_database.datname as \\\"Database\\\",\\n\"\n> > \" pg_user.usename as \\\"Owner\\\"\"\n> > #ifdef MULTIBYTE\n> > \",\\n pg_database.encoding as \\\"Encoding\\\"\"\n> > #endif\n> > );\n> \n> I'm sure we would accept a patch that changed this into a\n> \n> strcpy()\n> #ifdef MULTIBYTE\n> strcat()\n> #endif\n> \n> sequence rather than this monolithic line.\n> \n> - Thomas\n> \n> -- \n> Thomas Lockhart\t\t\t\[email protected]\n> South Pasadena, California\n> \n> ************\n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 12:43:33 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] psql vs. gcc"
},
{
"msg_contents": "OK, I have applied a patch to use strcat in the case of MULTIBYTE to add\nthe needed extra line.\n\n\n> \n> Hi,\n> \n> If I compile current source, gcc (2.95.2) return interesting error for \n> pgsql/describe.c.\n> \n> gcc command line:\n> \n> make[1]: Leaving directory /home/PG_DEVEL/pgsql.change/src/interfaces/libpq'\n> gcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall\n> -Wmissing-prototypes -DMULTIBYTE=LATIN2 -c -o describe.o describe.c\n> \n> \n> The gcc return error for next lines:\n> \n> ------\n> strcpy(buf,\n> \"SELECT pg_database.datname as \\\"Database\\\",\\n\"\n> \" pg_user.usename as \\\"Owner\\\"\"\n> #ifdef MULTIBYTE\n> \",\\n pg_database.encoding as \\\"Encoding\\\"\"\n> #endif\n> );\n> -------\n> \n> If I instead strcpy() write sprintf(buf, ..) all is right. \n> \n> What is bad, my gcc or previous source code? (IMHO is Peter's code right and\n> gcc is a little mazy).\n> \n> Full error dump:\n> \n> make -C ../../interfaces/libpq libpq.a\n> make[1]: Entering directory `/home/PG_DEVEL/pgsql.change/src/interfaces/libpq'\n> make[1]: `libpq.a' is up to date.\n> make[1]: Leaving directory `/home/PG_DEVEL/pgsql.change/src/interfaces/libpq'\n> gcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall -Wmissing-prototypes -DMULTIBYTE=LATIN2 -c -o describe.o describe.c\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c:324: warning: preprocessing directive not recognized within macro arg\n> describe.c: In function `listAllDbs':\n> describe.c:321: undefined or invalid # directive\n> describe.c:323: undefined or invalid # directive\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `#'\n> describe.c:324: parse error before `:'\n> make: *** [describe.o] Error 1\n> \n> \n> ----------------------------------------------------------------------\n> Karel Zak <[email protected]> http://home.zf.jcu.cz/~zakkr/\n> \n> Docs: http://docs.linux.cz (big docs archive)\t\n> Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)\n> FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)\n> -----------------------------------------------------------------------\n> \n> \n> ************\n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 12:59:14 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] psql vs. gcc"
},
{
"msg_contents": "On 1999-12-17, Tom Lane mentioned:\n\n> After looking at my C reference, I believe gcc is following the ANSI C\n> spec and Peter's code is broken. According to the book I'm looking at,\n> concatenation of adjacent string literals is specified to happen while\n> forming preprocessing tokens, which obviously must occur *before*\n> preprocessor directives are evaluated. (#if throws away preprocessing\n> tokens, not raw characters...) So when MULTIBYTE is defined, an\n> ANSI-compliant compiler will see a syntax error in the above.\n\nI usually compile all code with both gcc 2.8.1 and egcs 2.91.66 and make\nit -Wall -W proof. So I must consider that an omission in those compilers.\nThanks for pointing it out.\n\n> > describe.c:324: warning: preprocessing directive not recognized within macro arg\n> \n> Looks like there are a few other problems here too...\n\nThe problem sounds more like strcpy is a macro now. Great. More macros.\nJust what I need. :)\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n",
"msg_date": "Sat, 18 Dec 1999 14:06:28 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] psql vs. gcc "
}
] |
[
{
"msg_contents": "Hi,\n\n Peter Eisentraut changed initdb.sh with a patch, applied by\n Bruce into revision 1.66. CVS log shows\n\n> This is my -- hopefully sufficiently portable -- attempt at cleaning out\n> initdb. No more obscure dependencies on environment variables or paths.\n> It\n> now finds the templates and the right postgres itself (with cmd line\n> options as fallback). It also no longer depends on $USER (su safe), and\n> doesn't advertise that --username allows you to install the db as a\n> different user, since that doesn't work anyway. Also, recovery and\n> cleanup\n> on all errors. Consistent options, clearer documentation.\n\n Peter, the backslash escapes to the newlines in CREATE\n TABLE/CREATE RULE where there for a good reason. Even if a\n shell might accept multiline strings in echo, the interactive\n backend interface doesn't.\n\n They are missing in your CREATE VIEW replacements. Now, all\n the views (pg_user, ...) aren't created.\n\n Please fix 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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Fri, 17 Dec 1999 16:37:49 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "INITDB doesn't create views"
}
] |
[
{
"msg_contents": "On 1999-12-17, Karel Zak - Zakkr mentioned:\n\n> Note: current postgresql \"scripts-system\" is small hell, in all scripts is\n\nHey, I just went through great lengths in writing those ... :)\n\n> simular options..etc, all depend on psql and if psql is changed we must\n\nSimilar options was one of the points. Do you want different options in\neach one? Also, since I just rewrote psql as well, the scripts and psql\nare very well tuned, and I think no one plans on changing psql that much\nin the next few months that the scripts would be broken.\n\n> rewrite all scripts ...etc. (And shell is terrible tool.) What write _one_\n\nBut it's a portable tool.\n\n> tool (in C) instead current scripts, which load SQL query from prepared\n\nThen you must keep the files around, find them, big mess. (See initdb\nchange.) Also since they are shell scripts it is transparent to people\nwhat's going on, and that was also the point, since some folks thought\nthey did some magic, but they really only execute SQL statements.\n\n> files? If nobody work on this I can make it. \n\nI don't see the necessity. The scripts have worked for many people many\nyears.\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n",
"msg_date": "Fri, 17 Dec 1999 16:45:10 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": true,
"msg_subject": "Shell scripts (Re: [PATCHES] initdb new&improved)"
}
] |
[
{
"msg_contents": "Peter,\n\n current sources tell\n\ngcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall -Wmissing-prototypes -g -c tab-complete.c -o tab-complete.o\ntab-complete.c: In function `initialize_readline':\ntab-complete.c:100: `rl_filename_quoting_function' undeclared (first use in this function)\ntab-complete.c:100: (Each undeclared identifier is reported only once\ntab-complete.c:100: for each function it appears in.)\ntab-complete.c:102: `rl_filename_quote_characters' undeclared (first use in this function)\ntab-complete.c:107: `rl_completion_query_items' undeclared (first use in this function)\ntab-complete.c: In function `psql_completion':\ntab-complete.c:206: `rl_completion_append_character' undeclared (first use in this function)\ntab-complete.c:262: warning: implicit declaration of function `snprintf'\ntab-complete.c: In function `quote_file_name':\ntab-complete.c:790: `SINGLE_MATCH' undeclared (first use in this function)\ntab-complete.c:786: warning: `length' might be used uninitialized in this function\nmake[2]: *** [tab-complete.o] Error 1\n\n Is it somthing missing here or a source error?\n\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Fri, 17 Dec 1999 17:39:17 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "psql compile errors"
},
{
"msg_contents": "On 1999-12-17, Jan Wieck mentioned:\n\n> gcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall -Wmissing-prototypes -g -c tab-complete.c -o tab-complete.o\n> tab-complete.c: In function `initialize_readline':\n> tab-complete.c:100: `rl_filename_quoting_function' undeclared (first use in this function)\n> tab-complete.c:100: (Each undeclared identifier is reported only once\n> tab-complete.c:100: for each function it appears in.)\n> tab-complete.c:102: `rl_filename_quote_characters' undeclared (first use in this function)\n> tab-complete.c:107: `rl_completion_query_items' undeclared (first use in this function)\n> tab-complete.c: In function `psql_completion':\n> tab-complete.c:206: `rl_completion_append_character' undeclared (first use in this function)\n\nIf these are indeed all the errors, then I would like to know what version\nof readline it is you're using. There is no constant or macro defined for\nthat AFAICS, so you might have to infer that from a package name or other\nsources. Mine goes by the name of 2.2.1. Note that this is not the same as\nthe version number on the libreadline shared library, where mine says 3.0.\n\n> tab-complete.c:262: warning: implicit declaration of function `snprintf'\n\nThat looks a little odd, since that prototype is declared in c.h, which is\nincluded in tab-complete.c, conditional on config.h macros, which is also\nincluded in tab-complete.c (before c.h), so maybe a configure problem?\n\n> tab-complete.c: In function `quote_file_name':\n> tab-complete.c:790: `SINGLE_MATCH' undeclared (first use in this function)\n> tab-complete.c:786: warning: `length' might be used uninitialized in this function\n\nHUH???\n\n[...]\nchar * quote_file_name(char *text, int match_type, char * quote_pointer)\n{\n char *s;\n size_t length;\n \n (void)quote_pointer; /* not used */\n \n length = strlen(text) + ( match_type==SINGLE_MATCH ? 3 : 2 );\n s = xmalloc(length);\n[...]\n\nLooks like a brain-dead compiler to me.\n\n> make[2]: *** [tab-complete.o] Error 1\n\nAll psql code should compile with -Wall -W with precisely this message:\ncommon.c: In function `handle_sigint':\ncommon.c:316: warning: unused parameter `postgres_signal_arg'\n\nEverything else is a problem which will get fixed.\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n",
"msg_date": "Sat, 18 Dec 1999 14:06:47 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] psql compile errors"
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> If these are indeed all the errors, then I would like to know what version\n> of readline it is you're using. There is no constant or macro defined for\n> that AFAICS, so you might have to infer that from a package name or other\n> sources. Mine goes by the name of 2.2.1. Note that this is not the same as\n> the version number on the libreadline shared library, where mine says 3.0.\n\nHmm. I recall that I used to have an ancient copy of libreadline\n(2.something) but awhile ago (between 6.4 and 6.5, I think) someone\nchanged psql in a way that rendered it incompatible with that version.\nRather than arguing, I just upgraded to the current libreadline 4.0.\nHave you restored compatibility with the old readline version? That'd\nbe nice, I guess, but it's probably more important to be sure psql still\nworks with the current readline...\n\n>> tab-complete.c:262: warning: implicit declaration of function `snprintf'\n\n> That looks a little odd, since that prototype is declared in c.h, which is\n> included in tab-complete.c, conditional on config.h macros, which is also\n> included in tab-complete.c (before c.h), so maybe a configure problem?\n\nI've run into this myself (for vsnprintf not snprintf but I bet the\nproblem is the same). c.h provides a declaration of these routines if\nHAVE_SNPRINTF etc are not set. But the configure script sets\nHAVE_SNPRINTF on the basis of a link check that tests whether such\nfunctions actually exist in libc. There are some braindead platforms\nthat provide library functions but don't offer a declaration for them\nanywhere. I see this with vsnprintf on HPUX 10.20, and I'll bet\nsnprintf is that way on other platforms. What's needed is for configure\nto test separately for the existence of the function and whether the\nsystem header files provide a prototype :-(.\n\n>> tab-complete.c: In function `quote_file_name':\n>> tab-complete.c:790: `SINGLE_MATCH' undeclared (first use in this function)\n>> tab-complete.c:786: warning: `length' might be used uninitialized in this function\n\n> HUH???\n\nYup, Jan's running a different libreadline than you are.\n\nAFAICS there's no compile-time symbol identifying the libreadline\nversion, which is a dumb choice for a library that keeps adding new API.\nPerhaps more configure checks are needed to distinguish which\nlibreadline we have, or at least to act like readline is not present\nat all if it's not at least version X.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 18 Dec 1999 12:46:42 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] psql compile errors "
},
{
"msg_contents": "On 1999-12-18, Tom Lane mentioned:\n\n> Yup, Jan's running a different libreadline than you are.\n\nIt looks like they changed the API quite a bit between 2.* and 4.0 (which\nmight also explain why there was no 3.*). I'll make sure that this gets\nfixed before this thing goes out the door. Right now please work around.\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n",
"msg_date": "Mon, 20 Dec 1999 01:18:58 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] psql compile errors "
}
] |
[
{
"msg_contents": "Where are we on psql/sql_help.h? Is it supposed to be in the\ncvs tree, or is it generated as part of the tarball generation?\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 17:51:08 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "psql/sql_help.h"
},
{
"msg_contents": "It's not supposed to be in cvs; it's supposed to be handled just like\ngram.c.\n\nIf you are wondering why cvs update complains about an unexpected file,\nit's cause we need to add a .cvsignore control file to the psql\ndirectory...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 17 Dec 1999 18:08:03 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] psql/sql_help.h "
},
{
"msg_contents": "> It's not supposed to be in cvs; it's supposed to be handled just like\n> gram.c.\n> \n> If you are wondering why cvs update complains about an unexpected file,\n> it's cause we need to add a .cvsignore control file to the psql\n> directory...\n\nThat's what I was wondering. Doing it now.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 19:28:57 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] psql/sql_help.h"
}
] |
[
{
"msg_contents": "[email protected] (Jan Wieck)\n>\n>Bruce Momjian wrote:\n>\n>> > [email protected] (Jan Wieck)\n>> > >Bruce Momjian wrote:\n>> > >\n>> > >> > NOTICE: LockRelease: locktable lookup failed, no lock\n>> > >> > (Otherwise the tests all passed.)\n>>\n>> Has anyone used CVS -D date to backtrack to the date it first started?\n>\n> It also spit out a \"Buffer leak\" message once for me today.\n> Did not appear again. But be warned.\n>\n\nHi,\n\nI reduced the tests to just 2 parallel, varchar and text.\n(These 2 did seem to fail regularly)\n\nHere's the results.\n\n=============== Removing old ./tmp_check directory ... ================\n=============== Create ./tmp_check directory ================\n=============== Installing new build into ./tmp_check ================\n=============== Initializing check database instance ================\n=============== Starting regression postmaster ================\nRegression postmaster is running - PID=28405 PGPORT=65432\n=============== Creating regression database... ================\nCREATE DATABASE\n=============== Installing PL/pgSQL... ================\n=============== Running regression queries... ================\nparallel group1 (2 tests) ...\n text varchar \n test varchar ... ok\n test text ... FAILED\n=============== Terminating regression postmaster ================\nACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILES run_check.out\nAND regress.out\n\nTo run the optional big test(s) too, type 'make bigcheck'\nThese big tests can take over an hour to complete\nThese actually are: numeric_big\n\n** So only \"text\" failed, here's the differences.\n\nbash-2.03$ ./checkresults \n====== text ======\n0a1,2\n> NOTICE: LockRelease: locktable lookup failed, no lock\n> NOTICE: LockRelease: locktable lookup failed, no lock\n\n** Two notices.\n\nbash-2.03$ cat tmp_check/log/postmaster.log\nDEBUG: Data Base System is starting up at Fri Dec 17 22:40:10 1999\nDEBUG: Data Base System was shutdowned at Fri Dec 17 22:40:09 1999\nDEBUG: CheckPoint record at (0, 776)\nDEBUG: Redo record at (0, 776); Undo record at (0, 0)\nDEBUG: NextTransactionId: 15907; NextOid: 0\nDEBUG: Invalid NextTransactionId/NextOid\nDEBUG: Data Base System is in production state at Fri Dec 17 22:40:10 1999\nNOTICE: LockRelease: locktable lookup failed, no lock\nNOTICE: LockRelease: locktable lookup failed, no lock\nSmart Shutdown request at Fri Dec 17 22:40:24 1999\nDEBUG: Data Base System is shutting down at Fri Dec 17 22:40:24 1999\nDEBUG: Data Base System is shutdowned at Fri Dec 17 22:40:24 1999\nbash-2.03$\n\nNothing unusual in the postmaster log. (except the notices)\n\n** Look at the \"text.sql\" tests though, there's hardly enough\n** scope for a couple of lock problems!!\n\n\n-- *************testing built-in type text ****************\n\nSELECT 'this is a text string'::text = 'this is a text string'::text AS true;\n\nSELECT 'this is a text string'::text = 'this is a text strin'::text AS false;\n\nCREATE TABLE TEXT_TBL (f1 text);\n\nINSERT INTO TEXT_TBL VALUES ('doh!');\nINSERT INTO TEXT_TBL VALUES ('hi de ho neighbor');\n\nSELECT '' AS two, * FROM TEXT_TBL;\n\n** Now here's the odd thing, the notices are lines 1 and 2 in the\n** results output file, apparently before the backend has done\n** any real work.\n\nNOTICE: LockRelease: locktable lookup failed, no lock\nNOTICE: LockRelease: locktable lookup failed, no lock\nQUERY: SELECT 'this is a text string'::text = 'this is a text string'::text AS t\nrue;\ntrue\n----\nt\n(1 row)\n\n\n** Maybe this is buffering? I don't know.\n\n** I don't think I have the skills to find the problem but hope\n** this may give someone a useful lead.\n\nKeith.\n\n",
"msg_date": "Fri, 17 Dec 1999 23:13:55 +0000 (GMT)",
"msg_from": "Keith Parks <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock"
},
{
"msg_contents": "> \n> [email protected] (Jan Wieck)\n> >\n> >Bruce Momjian wrote:\n> >\n> >> > [email protected] (Jan Wieck)\n> >> > >Bruce Momjian wrote:\n> >> > >\n> >> > >> > NOTICE: LockRelease: locktable lookup failed, no lock\n> >> > >> > (Otherwise the tests all passed.)\n> >>\n> >> Has anyone used CVS -D date to backtrack to the date it first started?\n> >\n> > It also spit out a \"Buffer leak\" message once for me today.\n> > Did not appear again. But be warned.\n> >\n> \n> Hi,\n> \n> I reduced the tests to just 2 parallel, varchar and text.\n> (These 2 did seem to fail regularly)\n> \n> Here's the results.\n> \n> =============== Removing old ./tmp_check directory ... ================\n> =============== Create ./tmp_check directory ================\n> =============== Installing new build into ./tmp_check ================\n> =============== Initializing check database instance ================\n> =============== Starting regression postmaster ================\n> Regression postmaster is running - PID=28405 PGPORT=65432\n> =============== Creating regression database... ================\n> CREATE DATABASE\n> =============== Installing PL/pgSQL... ================\n> =============== Running regression queries... ================\n> parallel group1 (2 tests) ...\n> text varchar \n> test varchar ... ok\n> test text ... FAILED\n> =============== Terminating regression postmaster ================\n> ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILES run_check.out\n> AND regress.out\n> \n> To run the optional big test(s) too, type 'make bigcheck'\n> These big tests can take over an hour to complete\n> These actually are: numeric_big\n> \n> ** So only \"text\" failed, here's the differences.\n> \n> bash-2.03$ ./checkresults \n> ====== text ======\n> 0a1,2\n> > NOTICE: LockRelease: locktable lookup failed, no lock\n> > NOTICE: LockRelease: locktable lookup failed, no lock\n> \n> ** Two notices.\n> \n> bash-2.03$ cat tmp_check/log/postmaster.log\n> DEBUG: Data Base System is starting up at Fri Dec 17 22:40:10 1999\n> DEBUG: Data Base System was shutdowned at Fri Dec 17 22:40:09 1999\n> DEBUG: CheckPoint record at (0, 776)\n> DEBUG: Redo record at (0, 776); Undo record at (0, 0)\n> DEBUG: NextTransactionId: 15907; NextOid: 0\n> DEBUG: Invalid NextTransactionId/NextOid\n> DEBUG: Data Base System is in production state at Fri Dec 17 22:40:10 1999\n> NOTICE: LockRelease: locktable lookup failed, no lock\n> NOTICE: LockRelease: locktable lookup failed, no lock\n> Smart Shutdown request at Fri Dec 17 22:40:24 1999\n> DEBUG: Data Base System is shutting down at Fri Dec 17 22:40:24 1999\n> DEBUG: Data Base System is shutdowned at Fri Dec 17 22:40:24 1999\n> bash-2.03$\n> \n> Nothing unusual in the postmaster log. (except the notices)\n> \n> ** Look at the \"text.sql\" tests though, there's hardly enough\n> ** scope for a couple of lock problems!!\n> \n> \n> -- *************testing built-in type text ****************\n> \n> SELECT 'this is a text string'::text = 'this is a text string'::text AS true;\n> \n> SELECT 'this is a text string'::text = 'this is a text strin'::text AS false;\n> \n> CREATE TABLE TEXT_TBL (f1 text);\n> \n> INSERT INTO TEXT_TBL VALUES ('doh!');\n> INSERT INTO TEXT_TBL VALUES ('hi de ho neighbor');\n> \n> SELECT '' AS two, * FROM TEXT_TBL;\n> \n> ** Now here's the odd thing, the notices are lines 1 and 2 in the\n> ** results output file, apparently before the backend has done\n> ** any real work.\n> \n> NOTICE: LockRelease: locktable lookup failed, no lock\n> NOTICE: LockRelease: locktable lookup failed, no lock\n> QUERY: SELECT 'this is a text string'::text = 'this is a text string'::text AS t\n> rue;\n> true\n> ----\n> t\n> (1 row)\n> \n> \n> ** Maybe this is buffering? I don't know.\n> \n> ** I don't think I have the skills to find the problem but hope\n> ** this may give someone a useful lead.\n> \n> Keith.\n> \n> \n> \n\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#========================================= [email protected] (Jan Wieck) #\n\n",
"msg_date": "Sat, 18 Dec 1999 00:37:19 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock"
},
{
"msg_contents": "Keith Parks wrote:\n\n> Hi,\n>\n> I reduced the tests to just 2 parallel, varchar and text.\n> (These 2 did seem to fail regularly)\n\n That's interesting! So it's something likely to be\n reproduceable. Very good.\n\n But anyway - is it an older or a new bug? I'll try to use the\n parallel test on a 6.5.* release the next days - maybe it\n tells us something more.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Sat, 18 Dec 1999 00:41:31 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock"
}
] |
[
{
"msg_contents": "Go to http://www.PostgreSQL.ORG/mhonarc/pgsql-sql/ and try searching.\nI got zero hits on \"numeric\", or \"decimal\", or \"postgres\". Something\nis definitely wrong with it.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 17 Dec 1999 18:18:08 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Mail list archive search busted?"
},
{
"msg_contents": "\nOn 17-Dec-99 Tom Lane wrote:\n> Go to http://www.PostgreSQL.ORG/mhonarc/pgsql-sql/ and try searching.\n> I got zero hits on \"numeric\", or \"decimal\", or \"postgres\". Something\n> is definitely wrong with it.\n\nYou're right. I thought Marc mentioned it here - it was a bit hectic\nearlier in the week. We're replacing the search with UdmSearch 'cuze\nthe one we have is broke. The odd part is sometimes you can wait for\na bit and try again and it'll happily give you results. Imagine my\nsurprise when I got 0 hits on \"scrappy\" one time and was bombarded by\nresults ten minutes later!\n\nAnyway it looks like I have most of the query problems straightened out\nand am now working on the last of the config stuff. In the mean time,\nI know it's not exactly convenient, you can always go to the directory\non hub and grep. An no, I'm not being a smartass - I had to do it last\nweek.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n",
"msg_date": "Fri, 17 Dec 1999 20:19:08 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: [HACKERS] Mail list archive search busted?"
}
] |
[
{
"msg_contents": "When you do an EXPLAIN VERBOSE, two different representations of the\nquery plan are produced. The client sees something like this:\n\nregression=> explain verbose select sum(f1) from int4_tbl;\nNOTICE: QUERY DUMP:\n\n{ AGG :cost 1.165 :size 5 :width 4 :state <> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname \"sum\" :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { AGGREG :aggname sum :basetype 23 :aggtype 23 :target { VAR :varno 0 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1} :usenulls false }}) :qpqual <> :lefttree { SEQSCAN :cost 1.165 :size 5 :width 4 :state <> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname \"<>\" :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1}}) :qpqual <> :lefttree <> :righttree <> :extprm () :locprm () :initplan <> :nprm 0 :scanrelid 1 } :righttree <> :extprm () :locprm () :initplan <> :nprm 0 }\n\nbut in the postmaster log we format it like this:\n\nNOTICE: QUERY PLAN:\n\nAggregate (cost=1.16 rows=5 width=4)\n -> Seq Scan on int4_tbl (cost=1.16 rows=5 width=4)\n\n{ AGG \n :cost 1.165 \n :size 5 \n :width 4 \n :state <> \n :qptargetlist (\n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 1 \n :restype 23 \n :restypmod -1 \n :resname \"sum\" \n :reskey 0 \n :reskeyop 0 \n :ressortgroupref 0 \n :resjunk false \n }\n \n :expr \n { AGGREG \n :aggname sum \n :basetype 23 \n :aggtype 23 \n :target \n { VAR \n :varno 0 \n :varattno 1 \n :vartype 23 \n :vartypmod -1 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 1\n }\n \n :usenulls false \n }\n }\n )\n \n :qpqual <> \n :lefttree \n { SEQSCAN \n :cost 1.165 \n :size 5 \n :width 4 \n :state <> \n :qptargetlist (\n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 1 \n :restype 23 \n :restypmod -1 \n :resname \"<>\" \n :reskey 0 \n :reskeyop 0 \n :ressortgroupref 0 \n :resjunk false \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 1 \n :vartype 23 \n :vartypmod -1 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 1\n }\n }\n )\n \n :qpqual <> \n :lefttree <> \n :righttree <> \n :extprm ()\n \n :locprm ()\n \n :initplan <> \n :nprm 0 \n :scanrelid 1 \n }\n \n :righttree <> \n :extprm ()\n \n :locprm ()\n \n :initplan <> \n :nprm 0 \n }\n\nDoes anyone think that the first form has any conceivable use? I would\nlike to get rid of it and deliver the prettyprinted format to both log\nand client. I think it may have been done this way because old versions\nof the backend didn't cope very gracefully with sending long NOTICE\nmessages to the client, but that constraint is history...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 17 Dec 1999 18:34:25 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Anyone for prettyprinted EXPLAIN VERBOSE?"
},
{
"msg_contents": "\nI remember Jan saying he liked the compressed one.\n\n\n> When you do an EXPLAIN VERBOSE, two different representations of the\n> query plan are produced. The client sees something like this:\n> \n> regression=> explain verbose select sum(f1) from int4_tbl;\n> NOTICE: QUERY DUMP:\n> \n> { AGG :cost 1.165 :size 5 :width 4 :state <> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname \"sum\" :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { AGGREG :aggname sum :basetype 23 :aggtype 23 :target { VAR :varno 0 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1} :usenulls false }}) :qpqual <> :lefttree { SEQSCAN :cost 1.165 :size 5 :width 4 :state <> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname \"<>\" :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1}}) :qpqual <> :lefttree <> :righttree <> :extprm () :locprm () :initplan <> :nprm 0 :scanrelid 1 } :righttree <> :extprm () :locprm () :initplan <> :nprm 0 }\n> \n> but in the postmaster log we format it like this:\n> \n> NOTICE: QUERY PLAN:\n> \n> Aggregate (cost=1.16 rows=5 width=4)\n> -> Seq Scan on int4_tbl (cost=1.16 rows=5 width=4)\n> \n> { AGG \n> :cost 1.165 \n> :size 5 \n> :width 4 \n> :state <> \n> :qptargetlist (\n> { TARGETENTRY \n> :resdom \n> { RESDOM \n> :resno 1 \n> :restype 23 \n> :restypmod -1 \n> :resname \"sum\" \n> :reskey 0 \n> :reskeyop 0 \n> :ressortgroupref 0 \n> :resjunk false \n> }\n> \n> :expr \n> { AGGREG \n> :aggname sum \n> :basetype 23 \n> :aggtype 23 \n> :target \n> { VAR \n> :varno 0 \n> :varattno 1 \n> :vartype 23 \n> :vartypmod -1 \n> :varlevelsup 0 \n> :varnoold 1 \n> :varoattno 1\n> }\n> \n> :usenulls false \n> }\n> }\n> )\n> \n> :qpqual <> \n> :lefttree \n> { SEQSCAN \n> :cost 1.165 \n> :size 5 \n> :width 4 \n> :state <> \n> :qptargetlist (\n> { TARGETENTRY \n> :resdom \n> { RESDOM \n> :resno 1 \n> :restype 23 \n> :restypmod -1 \n> :resname \"<>\" \n> :reskey 0 \n> :reskeyop 0 \n> :ressortgroupref 0 \n> :resjunk false \n> }\n> \n> :expr \n> { VAR \n> :varno 1 \n> :varattno 1 \n> :vartype 23 \n> :vartypmod -1 \n> :varlevelsup 0 \n> :varnoold 1 \n> :varoattno 1\n> }\n> }\n> )\n> \n> :qpqual <> \n> :lefttree <> \n> :righttree <> \n> :extprm ()\n> \n> :locprm ()\n> \n> :initplan <> \n> :nprm 0 \n> :scanrelid 1 \n> }\n> \n> :righttree <> \n> :extprm ()\n> \n> :locprm ()\n> \n> :initplan <> \n> :nprm 0 \n> }\n> \n> Does anyone think that the first form has any conceivable use? I would\n> like to get rid of it and deliver the prettyprinted format to both log\n> and client. I think it may have been done this way because old versions\n> of the backend didn't cope very gracefully with sending long NOTICE\n> messages to the client, but that constraint is history...\n> \n> \t\t\tregards, tom lane\n> \n> ************\n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 19:33:20 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?"
},
{
"msg_contents": "Bruce Momjian wrote:\n\n> I remember Jan saying he liked the compressed one.\n\n Change it if you want to.\n\n The reason why I prefer the nodeToString() format is bacause\n (even if it might look like garbage to someone) for me it's\n the only way to LOOK if the right node went from the parsed\n state into the rewritten state. Or if an OLD/NEW got\n rewritten correctly into the scan relation's/TLE's one.\n That's impossible if having the prettyprint only, because for\n non-trivial trees the output occurs hundreds (if not\n thousands) of lines later, especially if multi-action rules\n or subselects get involved. Not to tell about recursive and\n conditional rules getting applied (note that conditional\n instead rules put out two trees, one with the negated rule\n qual and the original action, one with the original rules\n qual and action). To compare in such a case, if anything was\n done well, really requires to look at rewriter input AND\n output.\n\n I have a scrollback buffer of 2000 lines on my XTerm icon,\n and it already happened that I wasn't able to scroll back to\n the wanted location WHILE USING COMPRESSED FORMAT ONLY!\n\n But if we get our hands on the parsetree overhaul, I can\n insert my own \"printf(...nodeToString())\" statements into the\n places, where I really need to look at. That's usually\n another place, than these messages are coming from.\n\n I'm only in doubt about if anyone at all DOES use the pretty\n printed version for anything. I assume I'm not too bad in\n reading printed parsetrees, but whenever the pretty printed\n tree exceeds some hundreds of lines, I'm totally lost and am\n unable to find the location I'm looking for (what I easily do\n when looking at the compressed format). I allways wondered\n why the pretty print was implemented at all.\n\n Who really USES the explanative format to debug things on\n non-trivial queries?\n\n Since Tom is asking, I assume at least he's the one who does.\n But then again, he must be able to see his target station\n expressed in some Expr-, Oper- and Func- nodes while pushing\n the buttons to get an underground-ticket. So who else does\n like the pretty printed version better for non-esthetical\n reasons?\n\n\nJan\n\n>\n>\n> > When you do an EXPLAIN VERBOSE, two different representations of the\n> > query plan are produced. The client sees something like this:\n> >\n> > regression=> explain verbose select sum(f1) from int4_tbl;\n> > NOTICE: QUERY DUMP:\n> >\n> > { AGG :cost 1.165 :size 5 :width 4 :state <> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname \"sum\" :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { AGGREG :aggname sum :basetype 23 :aggtype 23 :target { VAR :varno 0 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1} :usenulls false }}) :qpqual <> :lefttree { SEQSCAN :cost 1.165 :size 5 :width 4 :state <> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname \"<>\" :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1}}) :qpqual <> :lefttree <> :righttree <> :extprm () :locprm () :initplan <> :nprm 0 :scanrelid 1 } :righttree <> :extprm () :locprm () :initplan <> :nprm 0 }\n> >\n> > but in the postmaster log we format it like this:\n> >\n> > NOTICE: QUERY PLAN:\n> >\n> > Aggregate (cost=1.16 rows=5 width=4)\n> > -> Seq Scan on int4_tbl (cost=1.16 rows=5 width=4)\n> >\n> > { AGG\n> > :cost 1.165\n> > :size 5\n> > :width 4\n> > :state <>\n> > :qptargetlist (\n> > { TARGETENTRY\n> > :resdom\n> > { RESDOM\n> > :resno 1\n> >\n> > [...]\n> >\n> > :righttree <>\n> > :extprm ()\n> >\n> > :locprm ()\n> >\n> > :initplan <>\n> > :nprm 0\n> > }\n> >\n> > Does anyone think that the first form has any conceivable use? I would\n> > like to get rid of it and deliver the prettyprinted format to both log\n> > and client. I think it may have been done this way because old versions\n> > of the backend didn't cope very gracefully with sending long NOTICE\n> > messages to the client, but that constraint is history...\n\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Sat, 18 Dec 1999 02:47:20 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?"
},
{
"msg_contents": "> Who really USES the explanative format to debug things on\n> non-trivial queries?\n> \n> Since Tom is asking, I assume at least he's the one who does.\n> But then again, he must be able to see his target station\n> expressed in some Expr-, Oper- and Func- nodes while pushing\n> the buttons to get an underground-ticket. So who else does\n> like the pretty printed version better for non-esthetical\n> reasons?\n> \n\nI prefer pretty-print. I view it in the server log files, and go node\nby node until I find the problem.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 20:59:28 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?"
},
{
"msg_contents": "At 02:47 AM 12/18/99 +0100, Jan Wieck wrote:\n\n> Since Tom is asking, I assume at least he's the one who does.\n> But then again, he must be able to see his target station\n> expressed in some Expr-, Oper- and Func- nodes while pushing\n> the buttons to get an underground-ticket. So who else does\n> like the pretty printed version better for non-esthetical\n> reasons?\n\nWell, it's a lot more readable for newcomers who are interested in\nlearning how their queries are being turned into plans. Such newcomers\nmight become helpful people as time goes on and as they have time in\ntheir life to become contributors...\n\nIt probably wouldn't be that hard to add a \"jan\" command that would\ndo a non-pretty-printed explain verbose for those who want it, would\nit?\n\nAs far as X limitations on storing lines, for debugging clearly you\nwant to be able to dump stuff into files regardless of pretty or\n\"ugly\" formatting...it wouldn't be difficult to modify psql to dump\nexplanations into a file directly, would it?\n\nDumping thousands of lines of either ugly or pretty plan dumps onto\na terminal is ... well ... terminal. You shouldn't have to do that.\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Fri, 17 Dec 1999 19:39:40 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?"
},
{
"msg_contents": "[email protected] (Jan Wieck) writes:\n> I'm only in doubt about if anyone at all DOES use the pretty\n> printed version for anything. I assume I'm not too bad in\n> reading printed parsetrees, but whenever the pretty printed\n> tree exceeds some hundreds of lines, I'm totally lost and am\n> unable to find the location I'm looking for (what I easily do\n> when looking at the compressed format). I allways wondered\n> why the pretty print was implemented at all.\n\nTo each his own poison, I guess. Reverse the above one hundred eighty\ndegrees, and it's my opinions ;-). But if you like the compressed\nlayout better, sure, we can keep supporting it. How about we implement\na SET VARIABLE control to select compact or pretty-printed mode, but\nstill send the same format to both postmaster log and client? My main\ngripe is there's no way at present to see the pretty-printed mode\nwithout going to the postmaster log, which might not be readily\navailable to ordinary users.\n\n(Actually, it's not clear to me why the postmaster log should get\nthese entries at all; for the most part it's just waste of log\nspace to send EXPLAIN outputs to the log...)\n\n> So who else does like the pretty printed version better for\n> non-esthetical reasons?\n\nUh, esthetics is everything in this case, isn't it? Either you\nfind the format pleasing/readable, or not.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 18 Dec 1999 00:30:04 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE? "
},
{
"msg_contents": "EXPLAIN VERBOSE COMPRESSED\n\nOn 1999-12-17, Bruce Momjian mentioned:\n\n> I remember Jan saying he liked the compressed one.\n> \n> > When you do an EXPLAIN VERBOSE, two different representations of the\n> > query plan are produced. The client sees something like this:\n\n> > Does anyone think that the first form has any conceivable use? I would\n\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n\n",
"msg_date": "Sat, 18 Dec 1999 14:06:56 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?"
},
{
"msg_contents": "On 1999-12-18, Tom Lane mentioned:\n\n> (Actually, it's not clear to me why the postmaster log should get\n> these entries at all; for the most part it's just waste of log\n> space to send EXPLAIN outputs to the log...)\n\nMaybe it shouldn't be a notice in the first place?\n\nActually, something unrelated (must have been the notices popping up in\nthe regression tests) led me to the idea of redirecting notice output into\nthe regular query output channel in psql, which would make it subject to\nthe pager if you have one set up. That would help those complaining about\n100s of lines coming down their terminal. On my todo list.\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n",
"msg_date": "Sat, 18 Dec 1999 17:13:11 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE? "
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> Actually, something unrelated (must have been the notices popping up in\n> the regression tests) led me to the idea of redirecting notice output into\n> the regular query output channel in psql, which would make it subject to\n> the pager if you have one set up. That would help those complaining about\n> 100s of lines coming down their terminal. On my todo list.\n\nThis may be a bad idea. There are many people who use psql in shell\nscripts, and for them it is critical that non-data messages like NOTICEs\nget sent to stderr, *not* mixed in with query results on stdout.\n\nIf you can arrange to page stderr output, cool...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 18 Dec 1999 16:57:27 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE? "
},
{
"msg_contents": "On 1999-12-18, Tom Lane mentioned:\n\n> If you can arrange to page stderr output, cool...\n\nI had that experience already, but the two pagers (one for stdin, one for\nstderr) didn't get along so well ... ;) I guess if you want this\nfunctionality you could start psql with 2>1 or whatever it was.\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n",
"msg_date": "Mon, 20 Dec 1999 01:18:52 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE? "
}
] |
[
{
"msg_contents": "At Fri, 17 Dec 1999 01:24 Tom Lane wrote:\n >> About ctags: is no one using Linux and ctags on the Postgres sources? Am I\n >> the first one to find this bug?\n >\n >Apparently you're a little new to the world of portable software.\n >I don't use ctags myself, being an Emacs man rather than a vi'er,\n >but a few minutes' research yielded the following results:\n >\n >GNU ctags (from Emacs 19.34 distribution): -a, -d, -t, -f accepted.\n >\n >HPUX ctags (which claims to be based on the original UCB code and\n >compliant to XPG4 standard): -a, -t, but no -d nor -f.\n >\n >SunOS 4.1: same as HPUX.\n >\n >RedHat 4.2 Linux: comes with something called \"Exuberant Ctags, Version\n >1.5\" which accepts all four (apparently this is NOT the same code as the\n >GNU distribution).\n >\n >\n >Whatever Linux you're running: evidently only -a and -f.\n >\n >\n >I don't know which variant of ctags you're running, but it's definitely\n >odd man out as far as not accepting -t goes. I'd certainly want to use\n >- -d (index #defines) anywhere it was accepted, too. Other side of the\n >coin is that -a is the only one of these switches that works on all the\n >ctags versions I was able to lay my hands on in five minutes plus yours.\n >That should give you some pause about asserting that if -a -f is the\n >right incantation for the version you have, then it must be the right\n >thing for everybody.\n\nThis is the version I'm using\n\nExuberant Ctags 3.2.2, by Darren Hiebert <[email protected]>\n\nUsage: ctags [options] [file(s)]\n\n -a Append the tags to an existing tag file.\n -B Use backward searching patterns (?...?).\n -e Output tag file for use with Emacs.\n -f <name>\n Output tags to the specified file (default is \"tags\"; or \"TAGS\"\n if -e is specified). If specified as \"-\", tags are written to\n standard output.\n -F Use forward searching patterns (/.../) (default).\n -h <list>\n Specifies a list of file extensions used for headers.\n The default list is \".h.H.hh.hpp.hxx.h++\".\n -i <types>\n Nearly equivalent to --c-types=<types>.\n -I <list | file>\n A list of tokens to be specially handled is read from either the\n command line or the specified file.\n -L <file>\n A list of source file names are read from the specified file.\n If specified as \"-\", then standard input is read.\n -n Equivalent to --excmd=number.\n -N Equivalent to --excmd=pattern.\n -o Alternative for -f.\n -p <path>\n Default path to use for all (relative path) filenames.\n -R Equivalent to --recurse=yes.\n -u Equivalent to --sort=no.\n -V Enable verbose messages describing actions on each source file.\n -x Print a tabular cross reference file to standard output.\n --append=[yes|no]\n Indicates whether tags should be appended to existing tag file\n (default=no).\n --c-types=types\n Specifies a list of C/C++ language tag types to include in the\n output file. \"Types\" is a group of one-letter flags designating\n types of tags to either include or exclude from the output. Each\n letter or group of letters may be preceded by either '+' (default,\n if omitted) to add it to those already included, or '-' to exclude\n it from the output. In the absence of any preceding '+' or '-'\n sign, only those types listed in \"types\" will be included in the\n output. Tags for the following language contructs are supported\n (types are enabled by default except as noted):\n c classes\n d macro definitions\n e enumerators (values inside an enumeration)\n f function definitions\n g enumeration names\n m class, struct, and union members\n n namespaces\n p function prototypes [off]\n s structure names\n t typedefs\n u union names\n v variable definitions\n x external variable declarations [off]\n In addition, the following modifiers are accepted:\n A record the access of members into the tag file [off]\n C include extra, class-qualified tag entries for members [off]\n --etags-include=file\n Include reference to 'file' in Emacs-style tag file (requires -e).\n --excmd=number|pattern|mix\n Uses the specified type of EX command to locate tags (default=mix).\n --eiffel-types=types\n Specifies a list of Eiffel language tag types to be included in the\n output. See --c-types for the definition of the format of \"types\".\n Tags for the following Eiffel language contructs are supported\n (types are enabled by default except as noted):\n c classes\n f features\n l local entities [off]\n --file-scope=[yes|no]\n Indicates whether tags scoped only for a single file (e.g. \"static\"\n tags) should be included in the output (default=yes).\n --file-tags=[yes|no]\n Indicates whether tags should be generated for source file names\n (default=no).\n --format=level\n Forces output of specified tag file format (default=2).\n --fortran-types=types\n Specifies a list of Fortran language tag types to be included in the\n output. See --c-types for the definition of the format of \"types\".\n Tags for the following Fortran language contructs are supported\n (all are enabled by default):\n b block data\n c common blocks\n e entry points\n f functions\n i interfaces\n l labels\n m modules\n m namelists\n p programs\n s subroutines\n t derived types\n --help\n Prints this option summary.\n --if0=[yes|no]\n Indicates whether code within #if 0 conditional branches should\n be examined for tags (default=no).\n --java-types=types\n Specifies a list of Java language tag types to be included in the\n output. See --c-types for the definition of the format of \"types\".\n Tags for the following Java language contructs are supported (all\n are enabled by default):\n c classes\n f fields\n i interfaces\n m methods\n p packages\n In addition, the following modifiers are accepted:\n A record the access of fields into the tag file [off]\n C include extra, class-qualified tag entries for fields [off]\n --kind-long=[yes|no]\n Indicates whether verbose tag descriptions are placed into tag file\n (default=no).\n --lang=[c|c++|eiffel|fortran|java]\n Forces specified language, disabling automatic selection.\n --langmap=map(s)\n Overrides the default mapping of language to source file extension.\n --line-directives=[yes|no]\n Indicates whether #line directives should be processed (default=no).\n --links=[yes|no]\n Indicates whether symbolic links should be followed (default=yes).\n --recurse=[yes|no]\n Recurse into directories supplied on command line (default=no).\n --sort=[yes|no]\n Indicates whether tags should be sorted (default=yes).\n --totals=[yes|no]\n Prints statistics about source and tag files (default=no).\n --version\n Prints a version identifier to standard output.\n\nSo, it's strange that my version doesn't have the -d and -t options any \nlonger (What's -t for?), unlike the 1.5 version in RH4.2.\n\n >Bottom line here is that what we probably really need is a configurable\n >makefile macro for the ctags switches. (In fact, what I'd personally\n >like is another macro to determine whether we're using ctags or etags in\n >the first place ;-).) But short of that, I'd definitely lean towards\n >the GNU definition as being the most widespread code. I'm pretty\n >surprised that your Linux distribution (which one is it?) seems to\n >contain a non-GNU-compatible ctags.\n\nI run SuSE 6.2.\n\n\nCheers,\n\nJeroen\n",
"msg_date": "Sat, 18 Dec 1999 02:51:25 +0100",
"msg_from": "Jeroen van Vianen <[email protected]>",
"msg_from_op": true,
"msg_subject": "ctags problem"
}
] |
[
{
"msg_contents": "While updating my local copy to current sources and running initdb I got a \nSIGSEGV at bootstrap.c:465 while adding template1 to pg_database.\n\nThis is because RelationBuildDesc in relcache.c returns a NULL at line 766. \nThe comments above this line say:\n\nfind the tuple in pg_class corresponding to the given relation id\nif no such tuple exists, return NULL\n\n(the relation is pg_database)\n\nThere seems to be some kind of error in the order in which the database is \nbootstrapped and the system tables are created and filled.\n\nAny ideas?\n\n\nCheers,\n\nJeroen\n\n",
"msg_date": "Sat, 18 Dec 1999 02:59:17 +0100",
"msg_from": "Jeroen van Vianen <[email protected]>",
"msg_from_op": true,
"msg_subject": "SIGSEGV in initdb"
},
{
"msg_contents": "> While updating my local copy to current sources and running initdb I got a \n> SIGSEGV at bootstrap.c:465 while adding template1 to pg_database.\n> \n> This is because RelationBuildDesc in relcache.c returns a NULL at line 766. \n> The comments above this line say:\n> \n> find the tuple in pg_class corresponding to the given relation id\n> if no such tuple exists, return NULL\n> \n> (the relation is pg_database)\n> \n> There seems to be some kind of error in the order in which the database is \n> bootstrapped and the system tables are created and filled.\n\nYes, initdb is totally messed up right now. Peter, please...\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Dec 1999 21:41:22 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] SIGSEGV in initdb"
}
] |
[
{
"msg_contents": "\n\"Hiroshi Inoue\" <[email protected]>\n>> \n>> [email protected] (Jan Wieck)\n>> >Bruce Momjian wrote:\n>> >\n>> >> > Keith Parks <[email protected]> writes:\n>> >> > > Since the new parallel regression tests I've always had a few\n>> >> > > lock NOTICE messages like the following.\n>> >> >\n>> >> > Interesting --- I had not run the parallel test for a while,\n>> >> > but I tried it just now and got half a dozen of these:\n>> >> > NOTICE: LockRelease: locktable lookup failed, no lock\n>> >> > (Otherwise the tests all passed.)\n>> >> >\n>> >> > Something's been broken fairly recently. Does anyone have an\n>> >> > idea what changed?\n>> >>\n>> >> Good question. I can't imagine what it would be. We didn't do much,\n>> >> and parallel regression is not that old.\n>> >\n>> >\n>> > Also, I used it after another dozen times without. Now I see\n>> > them too. So I assume it was a recent change that introduced\n>> > the problem.\n>> \n>> I'm not sure it's that recent, I think I've had 1 or 2 such errors\n>> ever since I've been running the \"runcheck\".\n>>\n>\n>It seems that conflicts of the initialization of some backends cause\n>above NOTICE messages.\n>Those backends would use the same XIDTAGs for the same relations\n>in case of LockAcquire()/LockRelease() because xids of those backends\n>are'nt set before starting the first command. When one of the backend\n>call LockReleaseAll(),it would release all together.\n>\n>If we set pid member of XIDTAG to the pid of each backend\n>,we are able to distinguish XIDTAGs.\n>But there may be some reasons that the member is used only for\n>userlock.\n\nI've just run a full set of tests and you're right, all the\nNOTICE:'s are in the init phase, before any queries are run.\n\nI hope this makes it easier for someone to fix ;-)\n\nKeith.\n\n",
"msg_date": "Sat, 18 Dec 1999 06:07:31 +0000 (GMT)",
"msg_from": "Keith Parks <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock"
}
] |
[
{
"msg_contents": "Hello everyone,\n\nPerhaps I'm a little late in answering your helpfull mail but I've been\nvery busy, therefore, I'll tell the story from today, saturday 17th of\ndecember.\n\nI first removed RedHat 6.1 and installed 6.0 again. Then I performed an\nupdate to RedHat 6.1 and happily for me everything worked fine!!\n\nThan I removed everything, installed RedHat 6.1 from scratch, and I did\nhave the same wrong sort order, we knew.\nBut as you suggested renaming the file /etc/sysconfig/i18n and restarting the\nsystem gave the exact sort order and everything looks fine now. \nStill one question: can I be sure this program we rename is of no use\nsomewhere else\nin the system ? If so, just what does it ?!\n\n\nSecond thing, many many thanks to everybody who helped me solving the problem!\nThanks!!\n\nFrans\n\n\n",
"msg_date": "Sat, 18 Dec 1999 18:34:41 +0100",
"msg_from": "Frans Van Elsacker <[email protected]>",
"msg_from_op": true,
"msg_subject": ""
},
{
"msg_contents": "Frans,\n\nI supposed you wrote about postgres with locale support ?\nIf so, I'd recommend you to test LC_ALL env. variable.\nRedhat 6.1 by default set is as en_US, at least in my setup\nand I spend 30 minutes to figure out why I had the same problem\nyou described ( in my case I tried koi8-r ). \nWhen I set LC_ALL=koi8-r everything work fine.\n\n\tRegards,\n\n\t\tOleg\n\nOn Sat, 18 Dec 1999, Frans Van Elsacker wrote:\n\n> Date: Sat, 18 Dec 1999 18:34:41 +0100\n> From: Frans Van Elsacker <[email protected]>\n> To: [email protected]\n> Subject: [HACKERS] Cc: [email protected]\n> \n> Hello everyone,\n> \n> Perhaps I'm a little late in answering your helpfull mail but I've been\n> very busy, therefore, I'll tell the story from today, saturday 17th of\n> december.\n> \n> I first removed RedHat 6.1 and installed 6.0 again. Then I performed an\n> update to RedHat 6.1 and happily for me everything worked fine!!\n> \n> Than I removed everything, installed RedHat 6.1 from scratch, and I did\n> have the same wrong sort order, we knew.\n> But as you suggested renaming the file /etc/sysconfig/i18n and restarting the\n> system gave the exact sort order and everything looks fine now. \n> Still one question: can I be sure this program we rename is of no use\n> somewhere else\n> in the system ? If so, just what does it ?!\n> \n> \n> Second thing, many many thanks to everybody who helped me solving the problem!\n> Thanks!!\n> \n> Frans\n> \n> \n> \n> ************\n> \n\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: [email protected], http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n",
"msg_date": "Sun, 19 Dec 1999 00:36:28 +0300 (MSK)",
"msg_from": "Oleg Bartunov <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Cc: [email protected]"
},
{
"msg_contents": "Oleg Bartunov wrote:\n \n> Frans,\n \n> I supposed you wrote about postgres with locale support ?\n> If so, I'd recommend you to test LC_ALL env. variable.\n> Redhat 6.1 by default set is as en_US, at least in my setup\n> and I spend 30 minutes to figure out why I had the same problem\n> you described ( in my case I tried koi8-r ).\n> When I set LC_ALL=koi8-r everything work fine.\n\nThe /etc/sysconfig/i18n scriptlet is a three-liner:\nLANGUAGE=en_US\nLC_ALL=en_US\nLINGUAS=en_US\n\nThis script apparently is set up during the installation of RedHat -- it\ndoes not belong to any installed RPM. I am going to find out what these\nenvvars should be set to for 'normal' operation (where the definition of\n'normal' varies. There is little to no documentation on this\nRedHat-ism.\n\nI have also noted that the LC_ALL variable alters the collation even\nwhen PostgreSQL is built WITHOUT --enable-locale -- on RedHat 6.1 the\nlocale support seems to be embedded into the glibc installation.\n\nAgain, little to no documentation that I have yet found. Oh well. Time\nto do some reading.\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Mon, 20 Dec 1999 12:11:04 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Cc: [email protected]"
},
{
"msg_contents": "Oleg Bartunov wrote:\n \n> Frans,\n \n> I supposed you wrote about postgres with locale support ?\n> If so, I'd recommend you to test LC_ALL env. variable.\n> Redhat 6.1 by default set is as en_US, at least in my setup\n> and I spend 30 minutes to figure out why I had the same problem\n> you described ( in my case I tried koi8-r ).\n> When I set LC_ALL=koi8-r everything work fine.\n\nThe /etc/sysconfig/i18n scriptlet is a three-liner:\nLANGUAGE=en_US\nLC_ALL=en_US\nLINGUAS=en_US\n\nThis script apparently is set up during the installation of RedHat -- it\ndoes not belong to any installed RPM. I am going to find out what these\nenvvars should be set to for 'normal' operation (where the definition of\n'normal' varies. There is little to no documentation on this\nRedHat-ism.\n\nI have also noted that the LC_ALL variable alters the collation even\nwhen PostgreSQL is built WITHOUT --enable-locale -- on RedHat 6.1 the\nlocale support seems to be embedded into the glibc installation.\n\nAgain, little to no documentation that I have yet found. Oh well. Time\nto do some reading.\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Mon, 20 Dec 1999 13:28:39 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Cc: [email protected]"
}
] |
[
{
"msg_contents": "> [Charset ISO-8859-1 unsupported, filtering to ASCII...]\n> > I was looking at this\n> > \n> > * Allow LOCK TABLE tab1, tab2, tab3 so all tables locked in unison\n> > \n> > but I'm not sure if my solution is really what was wanted, because it\n> > doesn't actually guarantee an all-or-nothing lock, it just locks each\n> > table in order. Thus it's more like a syntax simplification and reduces\n> > overhead.\n> > \n> \n> It took a few minutes, but I remember the use for this. If you are\n> going to hang waiting to lock tab3, you don't want to lock tab1 and tab2\n> while you are waiting for tab3 lock. The user wanted all tables to lock\n> in one operation without holding locks while waiting to complete all\n> locking.\n> \n> Can you do the locks, and if one fails, not hang, but unlock the\n> previous tables, go lock/hang on the failure, and go back and lock the\n> others? Seems it would have to be some kind of lock/fail/unlock/wait\n> loop.\n\n[CC to hackers]\n\nLet me add to this. One problem is that my description would sometimes\nlock the tables in different orders, and that is a recipe for deadlock.\n\nIf you have to release earlier locks to wait on a later lock, once you\nget the later lock, you must release it and then start from the\nbeginning, locking them in order again. If you don't, the system could\nreport a deadlock at random times, which would be very bad.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 18 Dec 1999 15:26:15 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [PATCHES] Lock"
},
{
"msg_contents": " > > * Allow LOCK TABLE tab1, tab2, tab3 so all tables locked in unison\n\n Let me add to this. One problem is that my description would sometimes\n lock the tables in different orders, and that is a recipe for deadlock.\n\n If you have to release earlier locks to wait on a later lock, once you\n get the later lock, you must release it and then start from the\n beginning, locking them in order again. If you don't, the system could\n report a deadlock at random times, which would be very bad.\n\nI'll add something, too. :) I think this derived from a suggestion I\nmade long ago. My idea was that when multiple tables need locking, a\ndeadlock can occur in the process of doing them one at a time. My\nsuggested solution was based on an analogy with the way ethernet\npackets work.\n\n- go through the list locking tables along the way.\n\n- if a lock cannot be obtained within some time, release some (all?) locks,\n and try again after some random time.\n\n- keep trying (and releasing as needed) until some other timeout\n passes, and then punt.\n\nMy thought was that if colliding locks are occuring, some sequence of\nrelinquishing locks (not necessarily all of them with each trial),\nwaiting, and reasserting them should work around the collisions.\nIntroducing random components to this might reduce the overall waiting\ntime, but I suppose a careful analysis of this needs to be done.\nPerhaps just releasing all of the locks, waiting a random time, and\ntrying again is enough.\n\nSomehow there has to be a mechanism for atomically asserting locks on\nmore than one table.\n\nCheers,\nBrook\n",
"msg_date": "Sat, 18 Dec 1999 16:14:50 -0700 (MST)",
"msg_from": "Brook Milligan <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: [PATCHES] Lock"
},
{
"msg_contents": "Brook Milligan <[email protected]> writes:\n> Somehow there has to be a mechanism for atomically asserting locks on\n> more than one table.\n\n(scratches head reflectively...) y'know, thirty years ago there were\na bunch of smart people writing PhD theses about this type of issue.\nI've got to think it's been a solved problem for a long time. Seems\nlike someone should go spend a long afternoon in a university library\nand dig up the answer.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 19 Dec 1999 02:27:56 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: [PATCHES] Lock "
}
] |
[
{
"msg_contents": "\"Hiroshi Inoue\" <[email protected]>\n\n>> \n>> \"Hiroshi Inoue\" <[email protected]> writes:\n>> > It seems that conflicts of the initialization of some backends cause\n>> > above NOTICE messages.\n>> > Those backends would use the same XIDTAGs for the same relations\n>> > in case of LockAcquire()/LockRelease() because xids of those backends\n>> > are'nt set before starting the first command. When one of the backend\n>> > call LockReleaseAll(),it would release all together.\n>> \n>> Oooh, that would nicely explain Keith's observation that it seems to\n>> happen at backend startup. I guess we need to select an initial XID\n>> earlier during startup than we now do?\n>>\n>\n>I'm not sure it's possible or not.\n>If startup sequence in InitPostgres() is changed,we may hardly\n>find the place to start transaction during backend startup.\n>\n>Seems the unique place we could call StartTransacationCommand()\n>during backend startup is between InitCatalogCahe() and InitUserId()\n>in InitPostgres() now.\n>I tried the following patch and it seems work at least now.\n\n <snip>\nHiroshi\n \nI concur, after application of this patch I've not had a single\nlock NOTICE: error in the regression tests.\n\nGood work.\n\nThanks,\nKeith.\n\n",
"msg_date": "Sun, 19 Dec 1999 10:45:11 +0000 (GMT)",
"msg_from": "Keith Parks <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock "
},
{
"msg_contents": "> -----Original Message-----\n> From: Keith Parks [mailto:[email protected]]\n> Sent: Sunday, December 19, 1999 7:45 PM\n> To: [email protected]; [email protected]\n>\n> \"Hiroshi Inoue\" <[email protected]>\n>\n> >>\n> >> \"Hiroshi Inoue\" <[email protected]> writes:\n> >> > It seems that conflicts of the initialization of some backends cause\n> >> > above NOTICE messages.\n> >> > Those backends would use the same XIDTAGs for the same relations\n> >> > in case of LockAcquire()/LockRelease() because xids of those backends\n> >> > are'nt set before starting the first command. When one of the backend\n> >> > call LockReleaseAll(),it would release all together.\n> >>\n> >> Oooh, that would nicely explain Keith's observation that it seems to\n> >> happen at backend startup. I guess we need to select an initial XID\n> >> earlier during startup than we now do?\n> >>\n> >\n> >I'm not sure it's possible or not.\n> >If startup sequence in InitPostgres() is changed,we may hardly\n> >find the place to start transaction during backend startup.\n> >\n> >Seems the unique place we could call StartTransacationCommand()\n> >during backend startup is between InitCatalogCahe() and InitUserId()\n> >in InitPostgres() now.\n> >I tried the following patch and it seems work at least now.\n>\n> <snip>\n> Hiroshi\n>\n> I concur, after application of this patch I've not had a single\n> lock NOTICE: error in the regression tests.\n>\n\nThanks.\n\nI'm not sure my patch has no problem.\nMay I dare to commit it to current tree ?\n\nRegards.\n\nHiroshi Inoue\[email protected]\n\n",
"msg_date": "Mon, 20 Dec 1999 11:24:51 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock "
},
{
"msg_contents": "> > >Seems the unique place we could call StartTransacationCommand()\n> > >during backend startup is between InitCatalogCahe() and InitUserId()\n> > >in InitPostgres() now.\n> > >I tried the following patch and it seems work at least now.\n> >\n> > <snip>\n> > Hiroshi\n> >\n> > I concur, after application of this patch I've not had a single\n> > lock NOTICE: error in the regression tests.\n> >\n> \n> Thanks.\n> \n> I'm not sure my patch has no problem.\n> May I dare to commit it to current tree ?\n\nCommit it. If it produces other problems, at least we will know where\nto look.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sun, 19 Dec 1999 21:35:37 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock"
}
] |
[
{
"msg_contents": "Well, the good news is that I understand this problem, and in fact fixed\nit in current sources several months ago. The bad news is that the fix\nis part of some rather extensive planner revisions, and I don't think\nit's going to be safe/practical to back-patch it into REL6_5.\n\nIt's possible to duplicate the bug in 6.5.* with this test case:\n\ncreate table t1 (f1 int, f2 int);\ncreate index t1i on t1 (f1,f2);\ncreate table t2 (f1 int, f2 int);\ncreate index t2i on t2 (f1,f2);\ncreate table t3 (f1 int, f2 int);\ncreate index t3i on t3 (f1,f2);\n\nselect t1.f1 from t1,t2,t3 where\nt1.f1=1 and t2.f1=1 and t3.f1=1 and\nt1.f2=t2.f2 and t1.f2=t3.f2 and t2.f2=t3.f2;\nERROR: ExecInitIndexScan: both left and right op's are rel-vars\n\nThe generated query plan is\n\nNested Loop (cost=6.05 rows=1 width=16)\n -> Nested Loop (cost=4.05 rows=1 width=12)\n -> Index Scan using t3i on t3 (cost=2.05 rows=1 width=4)\n -> Index Scan using t1i on t1 (cost=2.00 rows=1 width=8)\n -> Index Scan using t2i on t2 (cost=2.00 rows=1 width=4)\n\nand the source of the problem is that in the innermost indexscan on t1,\nthe planner is trying to use the WHERE clause \"t1.f2=t2.f2\" as an index\nqualification. But it can't do that because in this query plan, t2\nhasn't been joined to t1 yet. (It should have used \"t1.f2=t3.f2\"\ninstead; the value of t3.f2 is available since t3 is the outer side of\nthe nestloop join, meaning that in any one scan of t1, a fixed tuple\nfrom t3 is being considered.)\n\nThe reason it makes this mistake is an ill-chosen data structure for\nrepresenting which WHERE clauses require which sets of outer relations\nin order to be used as indexquals on the inside of a nestloop. In 6.5,\nthat info was attached to the first WHERE clause in the list of clauses\nthat might possibly be used with the index --- which in this example is\nthe t1.f1=1 clause. Trouble is, that clause can *also* be used in\njoining t1 to t3, and there's only one of it, which means its\nouter-join-relation field gets overwritten with the info for the join\nconsidered last. So by the time we actually get around to generating\nthe plan, the clause list is marked as \"OK to use in joining t1 to t3\".\nOops.\n\nI have fixed this in current sources by removing the field in question\nfrom RestrictInfo nodes and storing the information in separate lists.\nBut it's a pretty major change and I don't want to try to back-patch it.\n\nI would suggest, instead, that you work around the problem until 7.0\ncomes out. I think you could do this by removing your two-column\nindexes in favor of single-column indexes, or even just switching the\norder of the indexes (in the above test case, no bug is seen if the\nindexes are declared on (f2,f1)). However switching the order would be\na bit fragile since it'd depend on which fields you compare to constants\nand which ones you use as join keys in your queries. If that doesn't\nwork, a brute-force solution is to run your application with environment\nvariable PGOPTIONS=\"-fn\" (forbid nestloop joins), which discourages the\nplanner from considering nestloop joins at all. The bug will not arise\nif a merge or hash join plan is used.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 19 Dec 1999 15:03:44 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] \"ExecInitIndexScan: both left and right...\" meaning? "
},
{
"msg_contents": "Tom Lane wrote:\n\n> I would suggest, instead, that you work around the problem until 7.0\n> comes out. I think you could do this by removing your two-column\n> indexes in favor of single-column indexes, or even just switching the\n> order of the indexes (in the above test case, no bug is seen if the\n> indexes are declared on (f2,f1)). However switching the order would be\n> a bit fragile since it'd depend on which fields you compare to constants\n> and which ones you use as join keys in your queries. If that doesn't\n> work, a brute-force solution is to run your application with environment\n> variable PGOPTIONS=\"-fn\" (forbid nestloop joins), which discourages the\n> planner from considering nestloop joins at all. The bug will not arise\n> if a merge or hash join plan is used.\n\nFirst off, let me express appreciation for your investigation and\nexplanation. My humble thanks.\n\nRe workarounds, I have removed all *unnecessary* multi-column indices.\nThat still leaves me with 48 multi-column indices for primary keys and\nuniqueness. I think I must have those to avoid duplicate key problems,\netc.\n\nAgreed, the index column order switching is fragile and will likely bite me\nlater. So that leaves the \"-fn\" option. I will experiment with that.\n\nAre there any known consequences of forbidding nestloop joins? Performance\nhits? Functionality hits?\n\nCheers,\nEd Loehr\n\n\n",
"msg_date": "Sun, 19 Dec 1999 15:20:56 -0600",
"msg_from": "Ed Loehr <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] \"ExecInitIndexScan: both left and right...\" meaning?"
},
{
"msg_contents": "Ed Loehr wrote:\n\n> Are there any known consequences of forbidding nestloop joins? Performance\n> hits? Functionality hits?\n\nOK, I pulled out my old RDBMS text. Here are my current assumptions re join\nstrategies:\n\n1) The only Pgsql alternative join strategies to nested-loop joins are merge\njoin and hash join.\n\n2) Merge join only makes sense if the data is physically ordered by the join\nkeys, and there is almost always a natural entropy away from physical sort\norder.\n\nTherefore, it generally makes sense to use only hash join.\n\nAre my assumptions correct? Reasonable conclusion?\n\nCan I configure psql to use only hash joins?\n\nCheers,\nEd Loehr\n\n\n\n",
"msg_date": "Sun, 19 Dec 1999 16:03:17 -0600",
"msg_from": "Ed Loehr <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] \"ExecInitIndexScan: both left and right...\" meaning?"
},
{
"msg_contents": "Ed Loehr <[email protected]> writes:\n> Re workarounds, I have removed all *unnecessary* multi-column indices.\n> That still leaves me with 48 multi-column indices for primary keys and\n> uniqueness. I think I must have those to avoid duplicate key problems,\n> etc.\n\nYes, if you are using UNIQUE indexes to enforce uniqueness of primary\nkeys, then you don't have a lot of choice but to leave them in place.\nSo, if you still see the problem with only those multicolumn indexes\nremaining, then PGOPTIONS=\"-fn\" is your best recourse.\n\n> Are there any known consequences of forbidding nestloop joins? Performance\n> hits? Functionality hits?\n\nYou probably will see a performance hit, since the optimizer wouldn't be\npicking the nestloop in the first place if it didn't think it was the\ncheapest alternative. (Of course, whether its estimate is *right* is\nanother story...) Hopefully it won't be a large hit. The worst aspect\nof using PGOPTIONS for this is that it'll affect all your queries not\njust the ones where this trouble occurs; so on some simpler queries you\nmight see a noticeable slowdown. You will definitely want to remember\nto take out the workaround once you are off 6.5.\n\nA more significant potential problem is that the optimizer will use\nnestloop anyway if it can't find a usable merge or hash join method.\nI think that that won't be a problem for the datatypes you are using.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 19 Dec 1999 17:20:03 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] \"ExecInitIndexScan: both left and right...\" meaning? "
},
{
"msg_contents": "Ed Loehr <[email protected]> writes:\n> 1) The only Pgsql alternative join strategies to nested-loop joins are merge\n> join and hash join.\n\nCorrect...\n\n> 2) Merge join only makes sense if the data is physically ordered by the join\n> keys, and there is almost always a natural entropy away from physical sort\n> order.\n> Therefore, it generally makes sense to use only hash join.\n\nNot so. A merge join can be built atop either ordered-index-scans of\nthe inputs, or explicitly sorted input. Postgres' cost estimates are\ndone for both of these cases; if the optimizer thinks that merge join\nis cheapest then it probably is.\n\n> Can I configure psql to use only hash joins?\n\nYou could try PGOPTIONS=\"-fn -fm\" to forbid both nestloop and merge\njoins, but I wouldn't really recommend it. You'll be taking enough\nof a performance hit from not using nestloop when it's cheapest;\ndisabling mergejoin as well doesn't seem like a good idea. Really\nthese options are intended as optimizer debugging aids, not as settings\nthat users should keep in place for long periods of time.\n\nFor the record, the other switches in this family are\n\n\t-fh\tforbid hashjoin\n\t-fs\tforbid sequential scan\n\t-fi\tforbid indexed scan\n\nNote that -fs/-fi are for individual scans and thus don't compete\nwith -fn/-fm/-fh for join methods. Also, -fs and -fn are not 100%\nlockouts, since the optimizer will use those methods anyway if it\nhas no other choice (eg, -fs is ineffective if there's no index to\ndo an indexscan with).\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 19 Dec 1999 17:32:34 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] \"ExecInitIndexScan: both left and right...\" meaning? "
},
{
"msg_contents": "I'm seeing an old showstopper bug in a new form in 6.5.2:\n\n ExecInitIndexScan: both left and right op's are rel-vars\n\n[I also sorely wish the error message identified the offending part\nof the WHERE clause.]\n\nI'm running with PGOPTIONS=\"-fn\" (the previously assumed\nbrute force prevention), and have partially verified there are no\nnested loops occurring (output & details below). Vacuum analyze\nno longer helps as it once did.\n\nThis was presumed fixed in the coming 7.0, but the latest\nmanifestation suggests the problem may not be fully understood.\nMore below...\n\nFor the sordid history, see\n\n http://www.deja.com/qs.xp?QRY=ExecInitIndexScan&OP=dnquery.xp&showsort=date\n\nor search Udm for ExecIndexInitScan.\n\nHere's context on where we last left it...\n\nTom Lane wrote:\n\n> [...long explanation of bug and solution deleted...]\n> I have fixed this in current sources by removing the field in question\n> from RestrictInfo nodes and storing the information in separate lists.\n> But it's a pretty major change and I don't want to try to back-patch it.\n>\n> I would suggest, instead, that you work around the problem until 7.0\n> comes out. I think you could do this by removing your two-column\n> indexes in favor of single-column indexes, or even just switching the\n> order of the indexes... However switching the order would be\n> a bit fragile since it'd depend on which fields you compare to constants\n> and which ones you use as join keys in your queries. If that doesn't\n> work, a brute-force solution is to run your application with environment\n> variable PGOPTIONS=\"-fn\" (forbid nestloop joins), which discourages the\n> planner from considering nestloop joins at all. The bug will not arise\n> if a merge or hash join plan is used.\n\nIt appears the -fn flag is not preventing the bug.\n\nOne detail seems odd (and different from the nested-loop manifestation):\nwhen the offending \"rather large\" SELECT query is run via Apache/\nmod_perl/DBI/DBD::Pg, the error occurs, but when I cut and paste the\nquery from the logs into psql, it does not trigger the error (it also does not\nyield any results).\n\nI'm including the offending query and explain output below...\n\nCheers,\nEd Loehr\n\nSELECT sum( cet.default_budget_per_unit *\n cahrn.hr_count *\n cahrn.duration ) AS \"amount\"\nFROM contract_activity_hr_need cahrn,\n contract_expense_type cet,\n contract_activity_type_expense_type catet,\n contract_activity_type cat, activity pa\nWHERE cet.contract_id = 1\n AND catet.contract_id = 1\n AND cahrn.contract_id = 1\n AND pa.contract_id = 1\n AND cat.contract_id = 1\n AND cet.expense_unit_id = 3\n AND pa.activity_state_id <> 5\n AND pa.activity_state_id <> 4\n AND (pa.billable = 0 OR cahrn.billable = 0)\n AND pa.activity_type_id = cat.activity_type_id\n AND catet.expense_type_id = cet.expense_type_id\n AND catet.activity_type_id = cat.activity_type_id\n AND cahrn.contract_activity_type_id = cat.id;\n\n\n20000109.02:13:48.783 [13865] NOTICE: QUERY PLAN:\n\nAggregate (cost=28.61 rows=6608 width=52)\n -> Hash Join (cost=28.61 rows=6608 width=52)\n -> Hash Join (cost=14.74 rows=1 width=44)\n -> Seq Scan on contract_activity_hr_need cahrn (cost=2.02 rows=3\n width=16)\n -> Hash (cost=11.58 rows=1 width=28)\n -> Merge Join (cost=11.58 rows=1 width=28)\n -> Seq Scan (cost=9.34 rows=1 width=20)\n -> Sort (cost=9.34 rows=1 width=20)\n -> Hash Join (cost=8.34 rows=1 width=20)\n -> Index Scan using contract_activi\nty_type_exp_pkey on contract_activity_type_expense_ catet (cost=3.87 rows=38 wi\ndth=8)\n -> Hash (cost=2.18 rows=1 width=12\n)\n -> Index Scan using contract_\nexpense_type_pkey on contract_expense_type cet (cost=2.18 rows=1 width=12)\n -> Index Scan using contract_activity_type_pkey on co\nntract_activity_type cat (cost=2.12 rows=3 width=8)\n -> Hash (cost=13.84 rows=0 width=8)\n -> Index Scan using activity_cid on activity pa (cost=13.84 rows\n=0 width=8)\n\n\n",
"msg_date": "Sun, 09 Jan 2000 02:34:25 -0600",
"msg_from": "Ed Loehr <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] \"ExecInitIndexScan: both left and right...\" meaning?"
}
] |
[
{
"msg_contents": "On 1999-12-18, Bruce Momjian mentioned:\n\n> > * Allow LOCK TABLE tab1, tab2, tab3 so all tables locked in unison\n\n> It took a few minutes, but I remember the use for this. If you are\n> going to hang waiting to lock tab3, you don't want to lock tab1 and tab2\n> while you are waiting for tab3 lock. The user wanted all tables to lock\n> in one operation without holding locks while waiting to complete all\n> locking.\n> \n> Can you do the locks, and if one fails, not hang, but unlock the\n> previous tables, go lock/hang on the failure, and go back and lock the\n> others? Seems it would have to be some kind of lock/fail/unlock/wait\n> loop.\n\nThat's what I suspected. But of course LockRelation() doesn't return\nanything based on whether it succeeded, it just hangs, so it'll take a\nlittle more work. Next year ...\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n",
"msg_date": "Mon, 20 Dec 1999 01:18:29 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [PATCHES] Lock"
},
{
"msg_contents": "[Charset ISO-8859-1 unsupported, filtering to ASCII...]\n> On 1999-12-18, Bruce Momjian mentioned:\n> \n> > > * Allow LOCK TABLE tab1, tab2, tab3 so all tables locked in unison\n> \n> > It took a few minutes, but I remember the use for this. If you are\n> > going to hang waiting to lock tab3, you don't want to lock tab1 and tab2\n> > while you are waiting for tab3 lock. The user wanted all tables to lock\n> > in one operation without holding locks while waiting to complete all\n> > locking.\n> > \n> > Can you do the locks, and if one fails, not hang, but unlock the\n> > previous tables, go lock/hang on the failure, and go back and lock the\n> > others? Seems it would have to be some kind of lock/fail/unlock/wait\n> > loop.\n> \n> That's what I suspected. But of course LockRelation() doesn't return\n> anything based on whether it succeeded, it just hangs, so it'll take a\n> little more work. Next year ...\n\nYep, I figured it would be weird to get working.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sun, 19 Dec 1999 21:15:28 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: [PATCHES] Lock"
},
{
"msg_contents": ">> That's what I suspected. But of course LockRelation() doesn't return\n>> anything based on whether it succeeded, it just hangs, so it'll take a\n>> little more work. Next year ...\n\nI think this would actually have to be implemented inside the lock\nmanager in order to make it work right.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 19 Dec 1999 22:13:06 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: [PATCHES] Lock "
}
] |
[
{
"msg_contents": "> Date: Sunday, December 19, 1999 @ 20:31:26\n> Author: tgl\n> \n> Update of /usr/local/cvsroot/pgsql/src/interfaces/libpgeasy\n> from hub.org:/home/tmp/cvs-serv86291\n> \n> Modified Files:\n> \tlibpgeasy.c \n> \n> ----------------------------- Log Message -----------------------------\n> \n> Clean up some minor gcc warnings. I'm not touching the\n> major one, though, which is the truly ugly stores into libpq private\n> storage. Can't you find a better way to do this?\n\nYes, very ugly. I need some way to store my state information _inside_\nthe Result structure. Any ideas?\n\nOr is this going to be another one of those, \"Hey, who put the LIKE\nindexing in gram.y... Oh, it was you Momjian... Well, no, I can't\nthink of a better way right now...\" Two years pass until someone\nimproves it. :-)\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sun, 19 Dec 1999 21:34:32 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [COMMITTERS] pgsql/src/interfaces/libpgeasy (libpgeasy.c)"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n>> Clean up some minor gcc warnings. I'm not touching the\n>> major one, though, which is the truly ugly stores into libpq private\n>> storage. Can't you find a better way to do this?\n\n> Yes, very ugly. I need some way to store my state information _inside_\n> the Result structure. Any ideas?\n\nOne possibility is to add an application-defined field, say of void*\ntype, to PGconn and PGresult, plus set/get access functions for them.\nThis'd be a fairly general-purpose feature; I've seen it done in other\nlibraries that export objects of this sort.\n\nOn the other hand, if libpq did have such a feature, it'd be nice if\nlibpgeasy didn't commandeer it but left it open for the application\nto use. So maybe we need something else for libpgeasy.\n\nSince libpgeasy is new in the (core) distribution for this release,\nperhaps it is not too late to consider an API change? If get_result,\nset_result and friends returned a pointer to a two-element struct\n(PGresult* and tuplenumber) instead of a raw PGresult*, the problem\nwould go away. More or less anyway ... I'm not quite sure where it'd\nbe OK to free() such a struct ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 20 Dec 1999 10:47:19 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: [COMMITTERS] pgsql/src/interfaces/libpgeasy\n\t(libpgeasy.c)"
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> >> Clean up some minor gcc warnings. I'm not touching the\n> >> major one, though, which is the truly ugly stores into libpq private\n> >> storage. Can't you find a better way to do this?\n> \n> > Yes, very ugly. I need some way to store my state information _inside_\n> > the Result structure. Any ideas?\n> \n> One possibility is to add an application-defined field, say of void*\n> type, to PGconn and PGresult, plus set/get access functions for them.\n> This'd be a fairly general-purpose feature; I've seen it done in other\n> libraries that export objects of this sort.\n> \n> On the other hand, if libpq did have such a feature, it'd be nice if\n> libpgeasy didn't commandeer it but left it open for the application\n> to use. So maybe we need something else for libpgeasy.\n> \n> Since libpgeasy is new in the (core) distribution for this release,\n> perhaps it is not too late to consider an API change? If get_result,\n> set_result and friends returned a pointer to a two-element struct\n> (PGresult* and tuplenumber) instead of a raw PGresult*, the problem\n> would go away. More or less anyway ... I'm not quite sure where it'd\n> be OK to free() such a struct ...\n\nI hear you. pgeasy was just an attempt to make C programming in\nPostgreSQL easier. I am not sure how much it will get used, but it\nseemed valuable, and a number of people were using it when it was in\ncontrib.\n\nI figure the storage of the tuple at the end of the status field is\nharmless enough.\n\nDo people have any comments on it? I am willing to move it back into\ncontrib.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 20 Dec 1999 13:14:51 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Re: [COMMITTERS] pgsql/src/interfaces/libpgeasy\n\t(libpgeasy.c)"
}
] |
[
{
"msg_contents": "> Seasons Greetings Bruce,\n> \n> Sorry to bother you but do you know of anyone working on replication \n> with PostgreSQL? I saw in the past, pgsnap (PG Snapshot) but I don't \n> know if anyone's working on replication these days. There was a \n> thread in the past and I sent them messages but haven't replied yet. \n> So I'm hoping you would know of someone or point me in the right \n> direction.\n\nWe need major work in this area, or at least a plan and an FAQ item.\n\nWe are getting major questions on this, and I don't know enough even to\nmake an FAQ item telling people their options.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 20 Dec 1999 10:08:14 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: QUESTION: Replication"
},
{
"msg_contents": "Bruce Momjian wrote:\n> We need major work in this area, or at least a plan and an FAQ item.\n> We are getting major questions on this, and I don't know enough even to\n> make an FAQ item telling people their options.\n\nMy 2 cents, or 2 �ren since I'm a Swede, on this:\n\nIt is pretty simple to build a replication with pg_dump, transfer,\nempty replic and reload.\nBut if we want \"live replicas\" we better base our efforts on a\nmechanism using WAL-logs to rollforward the replicas.\n\nregards, \n-----------------\nG�ran Thyni\nOn quiet nights you can hear Windows NT reboot!\n",
"msg_date": "Mon, 20 Dec 1999 21:29:06 +0100",
"msg_from": "Goran Thyni <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: QUESTION: Replication"
},
{
"msg_contents": "One issue that needs to be handled with replication is the synchronization of\nserial/sequence values, especially when these are used as primary/foreign\nkeys. Here's part of how I've seen this handled, for what it's worth to\nanyone who might work on this. I'm sure there are better solutions, but its\nfood for thought.\n\nThere was the notion of a 'primary' db server and any number of 'secondary' db\nservers. Replication would occur on the 'secondaries' by serially\nhot-streaming a log of all successful state-changing queries (creates, drops,\ninserts, updates, and deletes) to a replayer on each downstream 2ndary\nserver. The replayers would then re-execute those queries on that server.\n\nQ: How would you keep track of where in the replay log you were if a server\nwent down, etc.? A: Each secondary dbserver had a table with a single record\nthat noted the filename and offset of the log it was currently processing.\nThe replayer would read the logs and update this table as it processed the\nlog.\n\nQ: How were serials/sequences kept in sync? A: A special INSERT command was\ncreated called 'SINSERT' (as in \"Serial INSERT\"). When the primary db server\nsaw this, it knew to log the query with the explicit value of the primary's\nsequence/serial rather than allow the downstream secondaries to autogenerate\nit.\n\nQ: Did the databases ever get out of sync? A: Yes, occasionally. It was\nnot bulletproof. If things got way out of sync, a backup copy was put out on\nall servers (with some data loss, which was acceptable).\n\nQ: How did it handle transaction effects, serialization level, etc.? A: The\ndb had no transactions, so it didn't handle this at all. This is the hard\npart of the problem in my view.\n\n\nCheers,\nEd Loehr\n\n\n",
"msg_date": "Tue, 21 Dec 1999 17:40:36 -0600",
"msg_from": "Ed Loehr <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: QUESTION: Replication"
},
{
"msg_contents": "Hello Goran,\n\n> > We need major work in this area, or at least a plan and an FAQ item.\n> > We are getting major questions on this, and I don't know enough even to\n> > make an FAQ item telling people their options.\n\n> It is pretty simple to build a replication with pg_dump, transfer,\n> empty replic and reload.\n\nSimple process for simple replication. This would not work optimally \nfor replication through the WAN (or Internet) since it does not do \ndifferential replication (and therefore transfering dumps isn't \ngood enough). Then one has to worry about the integrity of the \nreplicated data. Then we need to answer the n-way question (any db \nserver may be a source for the replication).\n\nRegards,\n\nNeil D. Quiogue\nSTO - dotPH, Inc.\n\n \"Nothing great was ever achieved without enthusiasm.\"\n - Ralph Waldo Emerson\n",
"msg_date": "Wed, 22 Dec 1999 06:52:14 +0000",
"msg_from": "\"neil d. quiogue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: QUESTION: Replication"
}
] |
[
{
"msg_contents": "New Catia 5 r 4 and other appz!!!\nCATIA 5 R4\nCIMATRON IT v10.6 final rise\nMICROSTATION.SE. v5.07.01.22 final cracked rise\nSOLID VIEW pro v 3.52\nIGES WORKS v.5.0 cracked rise\nCATIA V 5R2 SERVICE PACK 4-LND\nICEM Surf Release 3.0.2\nMOLDFLOW.CORP.MOLDFLOW.DYNAMIC.SERIES.V9.5.FINAL.CRACKED-RiSE (C)\nNastran v70.5.5 (c) Msc\nPads PowerPCB v3.0 licensed\nSolid Edge Version 7.0\nSolid Edge 7.0 Timer fix\nSolidworks 99 Servicepack For WinNT 271 to 292 (c) Solidworks\nSOLIDWORKS 99 207 TO 313 9X UPDATE WITH CRACK\nSOLIDWORKS 99 207 TO 313 WINNT UPDATE WITH CRACK\nSOLIDWORKS 99 250 TO 313 9X UPDATE WITH CRACK\nSOLIDWORKS 99 250 TO 313 WINNT UPDATE WITH CRACK\nSW99_207 TO 292 UPDATE_WIN98\nMOLDFLOW VER. 9.5\nMATHCAD 2000\nPATRAN v8.5\nAdams v9.1\nSolidWorks 99 NEW!!! Under NT and Win9x - new version MOST POWERFUL CAD of a\npackage(packet)For any tasks.\nAnd lots of others.\nIf you are interested please let me know at following e-mails:\[email protected]\[email protected]\n NORMAN\nIf you lost me please send a fax message to:\nFax: +442076917580 (UK)\nFax: +493069088166 (Germany)\nFax: +18883572558 (USA)\nFax: + 61294750241 (Sydney)\nNorman Tel: +370 8977935\nICQ:40497748\n\n\n\n\n\n\n",
"msg_date": "Mon, 20 Dec 1999 17:31:26 +0200",
"msg_from": "\"NormanD\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "New Catia 5 r 4 and other appz!!!"
}
] |
[
{
"msg_contents": "Bruce Momjian <[email protected]>\n>\n>> > > 'insert ( data data data )' bootstrap commands are containing gaps. On \nthe\n>> > > other hand, this was one of the key things that were supposed to be\n>> > > improved because relying on $USER was not su-safe. Maybe $UID would work,\n>> > > since initdb isn't supposed to be setuid anyway.\n>> > \n>> > Again, a bash-ism. Let's face, it, the postgres binary is going to\n>> > croak on root anyway, so we are just doing an extra check in initdb.\n>> \n>> But the point was to initialize to superuser id in Postgres as that\n>> number, but we might as well start them out at 0, like it is now.\n>\n>I am now using:\n>\n>\tPOSTGRES_SUPERUSERID=\"`id -u 2>/dev/null || echo 0`\"\n>\n>Let's see how portable that is?\n\nOOps,\n\n\"id -u\" is a no-no on Solaris unless /usr/xpg4/bin is before /bin in\nyour path so we default to a userid of 0.\n\nAnd in miscinit we assert that UserID must not equal 0 which\ncauses an Abort().\n\nbash-2.03$ bin/postgres -O template1\nDEBUG: Data Base System is starting up at Mon Dec 20 15:52:59 1999\nDEBUG: Data Base System was shutdowned at Mon Dec 20 15:52:52 1999\nDEBUG: CheckPoint record at (0, 152)\nDEBUG: Redo record at (0, 152); Undo record at (0, 0)\nDEBUG: NextTransactionId: 4621; NextOid: 0\nDEBUG: Invalid NextTransactionId/NextOid\nDEBUG: Data Base System is in production state at Mon Dec 20 15:52:59 1999\n\nPOSTGRES backend interactive interface \n$Revision: 1.137 $ $Date: 1999/11/16 06:13:35 $\n\nbackend> CREATE VIEW pg_user AS SELECT usename, usesysid, usecreatedb, usetrace, \nusesuper, usecatupd, '****\n****'::text as passwd, valuntil FROM pg_shadow\nTRAP: Failed Assertion(\"!(((bool) ((UserId) != 0))):\", File: \"miscinit.c\", Line: \n433)\n\n!(((bool) ((UserId) != 0))) (0) [No such file or directory]\nAbort (core dumped)\nbash-2.03$\n\n\nUnless I'm out of step with CVS.\n\nKeith.\n\n",
"msg_date": "Mon, 20 Dec 1999 16:32:31 +0000 (GMT)",
"msg_from": "Keith Parks <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Re: initdb.sh fixed7"
},
{
"msg_contents": "> >I am now using:\n> >\n> >\tPOSTGRES_SUPERUSERID=\"`id -u 2>/dev/null || echo 0`\"\n> >\n> >Let's see how portable that is?\n> \n> OOps,\n> \n> \"id -u\" is a no-no on Solaris unless /usr/xpg4/bin is before /bin in\n> your path so we default to a userid of 0.\n> \n> And in miscinit we assert that UserID must not equal 0 which\n> causes an Abort().\n> \n> bash-2.03$ bin/postgres -O template1\n> DEBUG: Data Base System is starting up at Mon Dec 20 15:52:59 1999\n> DEBUG: Data Base System was shutdowned at Mon Dec 20 15:52:52 1999\n> DEBUG: CheckPoint record at (0, 152)\n> DEBUG: Redo record at (0, 152); Undo record at (0, 0)\n> DEBUG: NextTransactionId: 4621; NextOid: 0\n> DEBUG: Invalid NextTransactionId/NextOid\n> DEBUG: Data Base System is in production state at Mon Dec 20 15:52:59 1999\n> \n> POSTGRES backend interactive interface \n> $Revision: 1.137 $ $Date: 1999/11/16 06:13:35 $\n> \n> backend> CREATE VIEW pg_user AS SELECT usename, usesysid, usecreatedb, usetrace, \n> usesuper, usecatupd, '****\n> ****'::text as passwd, valuntil FROM pg_shadow\n> TRAP: Failed Assertion(\"!(((bool) ((UserId) != 0))):\", File: \"miscinit.c\", Line: \n> 433)\n> \n> !(((bool) ((UserId) != 0))) (0) [No such file or directory]\n> Abort (core dumped)\n> bash-2.03$\n\nOh, this is bad news. I see what you are saying. In 6.5.*, we had\npg_id, which was used to do this. We still have pg_id, but I assume the\nattempt was to remove reliance ont that in the new initdb.sh. Right\nPeter?\n\nIf so, can you suggest a solution under Solaris for getting the user id\nvalue?\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 20 Dec 1999 13:20:39 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: initdb.sh fixed7"
}
] |
[
{
"msg_contents": "Ok, thanks to Oliver and others, I think I may have a handle on which\nheader files to include in the postgresql-devel RPM for the ability to\ncompile backend modules.\n\nSo, I'm going to put these headers under /usr/include/pgsql/backend.\n\nAny objections or comments?\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Mon, 20 Dec 1999 14:37:33 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": true,
"msg_subject": "SPI Headers -- RPM distribution"
},
{
"msg_contents": ">\n> Ok, thanks to Oliver and others, I think I may have a handle on which\n> header files to include in the postgresql-devel RPM for the ability to\n> compile backend modules.\n>\n> So, I'm going to put these headers under /usr/include/pgsql/backend.\n>\n> Any objections or comments?\n\n I'm not totally sure, but IIRC the dependency list was the\n one of spi.c, no?\n\n If so, it's IMHO wrong. A user written module doesn't need\n anything, spi.c needs (especially the parts included by\n spi_priv.h). SPI hides many internals by making the prepared\n plan an opaque object (void *).\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Mon, 20 Dec 1999 20:47:19 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] SPI Headers -- RPM distribution"
},
{
"msg_contents": " I'm not totally sure, but IIRC the dependency list was the\n one of spi.c, no?\n\nI've had problems just including spi.h and trigger.h, actually.\n\nCheers,\nBrook\n",
"msg_date": "Mon, 20 Dec 1999 13:41:12 -0700 (MST)",
"msg_from": "Brook Milligan <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] SPI Headers -- RPM distribution"
},
{
"msg_contents": ">\n> I'm not totally sure, but IIRC the dependency list was the\n> one of spi.c, no?\n>\n> I've had problems just including spi.h and trigger.h, actually.\n\n This is from gcc -M for contrib/spi/autoinc.c:\n\n src/backend/fmgr.h\n src/include/access/attnum.h\n src/include/access/funcindex.h\n src/include/access/heapam.h\n src/include/access/htup.h\n src/include/access/relscan.h\n src/include/access/sdir.h\n src/include/access/skey.h\n src/include/access/strat.h\n src/include/access/transam.h\n src/include/access/tupdesc.h\n src/include/access/tupmacs.h\n src/include/access/xact.h\n src/include/c.h\n src/include/catalog/pg_am.h\n src/include/catalog/pg_attribute.h\n src/include/catalog/pg_class.h\n src/include/catalog/pg_language.h\n src/include/catalog/pg_proc.h\n src/include/catalog/pg_type.h\n src/include/commands/trigger.h\n src/include/config.h\n src/include/executor/execdefs.h\n src/include/executor/execdesc.h\n src/include/executor/executor.h\n src/include/executor/hashjoin.h\n src/include/executor/spi.h\n src/include/executor/tuptable.h\n src/include/lib/fstack.h\n src/include/nodes/execnodes.h\n src/include/nodes/memnodes.h\n src/include/nodes/nodes.h\n src/include/nodes/params.h\n src/include/nodes/parsenodes.h\n src/include/nodes/pg_list.h\n src/include/nodes/plannodes.h\n src/include/nodes/primnodes.h\n src/include/nodes/relation.h\n src/include/os.h\n src/include/parser/parse_node.h\n src/include/postgres.h\n src/include/postgres_ext.h\n src/include/rewrite/prs2lock.h\n src/include/storage/block.h\n src/include/storage/buf.h\n src/include/storage/buf_internals.h\n src/include/storage/buffile.h\n src/include/storage/bufmgr.h\n src/include/storage/bufpage.h\n src/include/storage/fd.h\n src/include/storage/ipc.h\n src/include/storage/item.h\n src/include/storage/itemid.h\n src/include/storage/itemptr.h\n src/include/storage/lmgr.h\n src/include/storage/lock.h\n src/include/storage/off.h\n src/include/storage/page.h\n src/include/storage/shmem.h\n src/include/storage/spin.h\n src/include/tcop/dest.h\n src/include/tcop/pquery.h\n src/include/tcop/tcopprot.h\n src/include/tcop/utility.h\n src/include/utils/array.h\n src/include/utils/builtins.h\n src/include/utils/datetime.h\n src/include/utils/datum.h\n src/include/utils/dt.h\n src/include/utils/elog.h\n src/include/utils/fcache.h\n src/include/utils/geo_decls.h\n src/include/utils/hsearch.h\n src/include/utils/inet.h\n src/include/utils/int8.h\n src/include/utils/lztext.h\n src/include/utils/mcxt.h\n src/include/utils/memutils.h\n src/include/utils/nabstime.h\n src/include/utils/numeric.h\n src/include/utils/palloc.h\n src/include/utils/pg_lzcompress.h\n src/include/utils/portal.h\n src/include/utils/rel.h\n src/include/utils/syscache.h\n src/include/utils/tqual.h\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Mon, 20 Dec 1999 22:19:13 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] SPI Headers -- RPM distribution"
},
{
"msg_contents": "Jan Wieck wrote:\n> > Ok, thanks to Oliver and others, I think I may have a handle on which\n> > header files to include in the postgresql-devel RPM for the ability to\n> > compile backend modules.\n\n> I'm not totally sure, but IIRC the dependency list was the\n> one of spi.c, no?\n \n> If so, it's IMHO wrong. A user written module doesn't need\n> anything, spi.c needs (especially the parts included by\n> spi_priv.h). SPI hides many internals by making the prepared\n> plan an opaque object (void *).\n\nAs is probably obvious from my posting, I have never built an SPI module\n-- however, I do want to make the RPM's SPI-friendly. Oliver posted the\nlist of includes that he ships in the Debian packages -- I am digesting\nthat list now, comparing with a list of the files in the distribution\ntarball.\n\nWhile including the entire source tree is a last resort, it should be\npossible to allow SPI programming without the whole 28MB unbuilt source\ntree. According to the documentation, all an SPI module needs is to\n#include executor/spi.h. \n\nWell, spi.h needs (all includes after full expansion via /usr/lib/cpp\n-I../../include -I../../backend -M spi.h, stripping the system header\nfiles, stripping the ../../, reformatting to one header per line, and\nsorting):\n(paths relative to PG-SOURCE-TREE/src/)\n\n backend/fmgr.h\n include/access/attnum.h \n include/access/funcindex.h\n include/access/heapam.h \n include/access/htup.h \n include/access/ibit.h\n include/access/itup.h \n include/access/relscan.h\n include/access/sdir.h \n include/access/skey.h \n include/access/strat.h\n include/access/transam.h \n include/access/tupdesc.h\n include/access/tupmacs.h\n include/access/xact.h\n include/c.h \n include/catalog/catname.h\n include/catalog/pg_am.h\n include/catalog/pg_attribute.h \n include/catalog/pg_class.h \n include/catalog/pg_index.h\n include/catalog/pg_language.h\n include/catalog/pg_proc.h\n include/catalog/pg_type.h\n include/config.h\n include/executor/execdefs.h\n include/executor/execdesc.h\n include/executor/executor.h \n include/executor/hashjoin.h\n include/executor/tuptable.h \n include/lib/fstack.h\n include/nodes/execnodes.h\n include/nodes/memnodes.h \n include/nodes/nodes.h \n include/nodes/params.h\n include/nodes/parsenodes.h \n include/nodes/pg_list.h\n include/nodes/plannodes.h \n include/nodes/primnodes.h\n include/nodes/relation.h\n include/os.h\n include/parser/parse_node.h\n include/parser/parse_type.h \n include/postgres.h\n include/postgres_ext.h \n include/rewrite/prs2lock.h\n include/storage/block.h\n include/storage/buf.h \n include/storage/buf_internals.h\n include/storage/bufmgr.h\n include/storage/bufpage.h\n include/storage/fd.h \n include/storage/ipc.h \n include/storage/item.h\n include/storage/itemid.h \n include/storage/itemptr.h \n include/storage/lmgr.h \n include/storage/lock.h\n include/storage/off.h\n include/storage/page.h\n include/storage/shmem.h \n include/storage/sinvaladt.h\n include/storage/spin.h\n include/tcop/dest.h \n include/tcop/pquery.h \n include/tcop/tcopprot.h \n include/tcop/utility.h\n include/utils/array.h \n include/utils/builtins.h\n include/utils/datetime.h \n include/utils/datum.h \n include/utils/dt.h\n include/utils/elog.h \n include/utils/fcache.h \n include/utils/geo_decls.h\n include/utils/hsearch.h \n include/utils/inet.h \n include/utils/int8.h\n include/utils/mcxt.h \n include/utils/memutils.h \n include/utils/nabstime.h\n include/utils/numeric.h \n include/utils/palloc.h\n include/utils/portal.h \n include/utils/rel.h \n include/utils/syscache.h\n include/utils/tqual.h \n(87 header files)\n\nWell, analyzing spi.c the same way, it needs only 90 headers -- diff\ntells me that the ONLY additional headers needed by spi.c that are not\nneeded by spi.h are spi.h (duh), spi_priv.h, and printtup.h.\n\nTo reiterate my thought -- a full source tree should not be necessary to\ndo meaningful work on PostgreSQL -- that's the whole reason for\nexistence of the binary distributions. I am going to incorporate the\nabove listed headers in the postgresql-devel RPM -- I am not at all sure\nwhere I need to put them, however. The PostgreSQL include directory\nunder the RPM installation is /usr/include/pgsql (not my choice, but\nwould be hard to retroactively change) -- maybe put these files under\nthat in either backend, or SPI??\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Mon, 20 Dec 1999 16:46:50 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] SPI Headers -- RPM distribution"
},
{
"msg_contents": "Lamar Owen <[email protected]> writes:\n> So, I'm going to put these headers under /usr/include/pgsql/backend.\n\nSome of these headers already are exported. The right thing is to\nexport the rest in parallel, not throw in an extra level of directory.\nThe path from /usr/include/pgsql should be the same as the path from\n.../src/include in the source tree.\n\nThe only real problem with doing that is with fmgr.h, which for reasons\nthat I don't fathom isn't in src/include at all. Seems to me it would\nbe a good idea to have fmgr.h (and I guess parse.h too) put into\nsrc/include, and then we could get rid of -I../backend from the switches\nused for backend compilations.\n\nA good longer-term project would be to reduce the number of headers that\nwe need to export. 80 include files to compile spi.h? Ugh.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 21 Dec 1999 00:07:07 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] SPI Headers -- RPM distribution "
},
{
"msg_contents": "Tom Lane wrote:\n \n> Lamar Owen <[email protected]> writes:\n> > So, I'm going to put these headers under /usr/include/pgsql/backend.\n> \n> Some of these headers already are exported. The right thing is to\n> export the rest in parallel, not throw in an extra level of directory.\n> The path from /usr/include/pgsql should be the same as the path from\n> .../src/include in the source tree.\n\nGood point.\n\n> The only real problem with doing that is with fmgr.h, which for reasons\n> that I don't fathom isn't in src/include at all. Seems to me it would\n> be a good idea to have fmgr.h (and I guess parse.h too) put into\n> src/include, and then we could get rid of -I../backend from the switches\n> used for backend compilations.\n\nAlso, I have noticed that some headers are #included with <>, while\nothers are included with \"\". Now, I understand that system headers\nshould be included with <>, but I'm seeing PostgreSQL headers wrapped\nwith <>. This makes the cpp -M variants a little confusing -- while\ntracing down the header dependencies, I started using cpp -MM, which\nonly follows user headers and not system headers -- but it doesn't get\nall of the headers.\n\nAnd that fmgr.h thingy -- ewww. I'm sure there is a reason somewhere\nthat it is in backend, but it escapes me as to why. \n\n> A good longer-term project would be to reduce the number of headers that\n> we need to export. 80 include files to compile spi.h? Ugh.\n\nAfter reading Jan's message about the list of dependencies for spi.c\ncontaining more than the dependencies for a user SPI module, I was\nprepared to see alot less headers -- and was quite disappointed to see\n87 headers show up.\n\nMy goal is to provide the minimum required to build things for the\nbackend for those who want to do so, without requiring them to install a\nsource tarball and relearn where all of the files are located. Like I\nsaid, if I have to provide a complete source tarball to do some things,\nI will -- I just would rather not. If someone wants the source to\nstudy, they can install the src.rpm and play to their hearts' content --\nand they can then rebuild the whole package in a manner consistent with\nthe standard RPM installation with a single command, and not have to\nrelearn anything.\n\nSo, taking your suggestion, I'm going to add all these required headers\nto the RPM package as part of the postgresql-devel RPM. Since RPM's\ndatabase handles the aspect of what files belong to what package, it is\nredundant to place these SPI includes in a separate place -- and then\ndevelopers only need to properly set the location of the PostgreSQL\ninclude tree once (/usr/include/pgsql).\n\nI will try to fully document these changes -- and am building this RPM\nas a beta RPM until such time as it is verified to work for those\ndeveloping SPI modules under the RPM installation.\n\nThanks Tom.\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Tue, 21 Dec 1999 10:40:18 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] SPI Headers -- RPM distribution"
},
{
"msg_contents": "Lamar Owen <[email protected]> writes:\n> Also, I have noticed that some headers are #included with <>, while\n> others are included with \"\". Now, I understand that system headers\n> should be included with <>, but I'm seeing PostgreSQL headers wrapped\n> with <>. This makes the cpp -M variants a little confusing -- while\n> tracing down the header dependencies, I started using cpp -MM, which\n> only follows user headers and not system headers -- but it doesn't get\n> all of the headers.\n\nBruce has done a nice job of cleaning that up in current sources, but\nyes, 6.5.* and older releases were mighty inconsistent about header\ninclusions.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 21 Dec 1999 10:47:16 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] SPI Headers -- RPM distribution "
}
] |
[
{
"msg_contents": "Bruce Momjian <[email protected]>\n>\n>Oh, this is bad news. I see what you are saying. In 6.5.*, we had\n>pg_id, which was used to do this. We still have pg_id, but I assume the\n>attempt was to remove reliance ont that in the new initdb.sh. Right\n>Peter?\n>\n>If so, can you suggest a solution under Solaris for getting the user id\n>value?\n\n\nI wonder if pg_id was the result of a similar portability\ndiscussion/problem some years ago ;-)\n\nI'd vote for keeping pg_id, if then we are free'd from all the\nportability issues. (getpwent() is portable?)\n\n\nKeith\n\n",
"msg_date": "Mon, 20 Dec 1999 20:57:14 +0000 (GMT)",
"msg_from": "Keith Parks <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Re: initdb.sh fixed7"
},
{
"msg_contents": "pg_id converts from username to uid, we need the other way.\n\nOn Mon, 20 Dec 1999, Keith Parks wrote:\n\n> Bruce Momjian <[email protected]>\n> >\n> >Oh, this is bad news. I see what you are saying. In 6.5.*, we had\n> >pg_id, which was used to do this. We still have pg_id, but I assume the\n> >attempt was to remove reliance ont that in the new initdb.sh. Right\n> >Peter?\n> >\n> >If so, can you suggest a solution under Solaris for getting the user id\n> >value?\n> \n> \n> I wonder if pg_id was the result of a similar portability\n> discussion/problem some years ago ;-)\n> \n> I'd vote for keeping pg_id, if then we are free'd from all the\n> portability issues. (getpwent() is portable?)\n> \n> \n> Keith\n> \n> \n\n-- \nPeter Eisentraut Sernanders vaeg 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n",
"msg_date": "Fri, 24 Dec 1999 22:35:57 +0100 (MET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: initdb.sh fixed7"
}
] |
[
{
"msg_contents": "Well,\n\n AFAIK we had a consensus on making \"try to compress\n attributes before moving off\" a runtime, per column\n configuration option. And that's what I'm after.\n\n This might interfere with the LZTEXT data type as is. Since\n this new data type isn't released yet, I'll have to remove it\n again before freeze. The compressor/decompressor will become\n part of the toaster.\n\n Needs to revert the changes to pg_rewrite too, so the next\n release will NOT gain any bigger rules. But to release it and\n later fight problems that I already see, only to enable\n bigger rules right now, is IMHO the wrong decision.\n\n Any complaints?\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Tue, 21 Dec 1999 00:37:02 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "LONG vs. Toaster"
},
{
"msg_contents": "> Well,\n> \n> AFAIK we had a consensus on making \"try to compress\n> attributes before moving off\" a runtime, per column\n> configuration option. And that's what I'm after.\n> \n> This might interfere with the LZTEXT data type as is. Since\n> this new data type isn't released yet, I'll have to remove it\n> again before freeze. The compressor/decompressor will become\n> part of the toaster.\n> \n> Needs to revert the changes to pg_rewrite too, so the next\n> release will NOT gain any bigger rules. But to release it and\n> later fight problems that I already see, only to enable\n> bigger rules right now, is IMHO the wrong decision.\n\nAgreed. There are over five weeks left. Let's see what happens as we\nget closer.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 20 Dec 1999 21:14:14 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG vs. Toaster"
},
{
"msg_contents": ">> This might interfere with the LZTEXT data type as is. Since\n>> this new data type isn't released yet, I'll have to remove it\n>> again before freeze. The compressor/decompressor will become\n>> part of the toaster.\n>> \n>> Needs to revert the changes to pg_rewrite too, so the next\n>> release will NOT gain any bigger rules. But to release it and\n>> later fight problems that I already see, only to enable\n>> bigger rules right now, is IMHO the wrong decision.\n\n> Agreed.\n\nYes. I thought that LZTEXT was redundant as soon as we agreed that\ncompression could be part of the out-of-line storage mechanism.\nBetter to pull it now than have to support it long after it has\nno purpose. We can struggle along with limited-length rules for\na little bit longer.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 20 Dec 1999 23:57:34 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LONG vs. Toaster "
}
] |
[
{
"msg_contents": "Sorry, can't resist :-)\n\n Any time I see such a name for a piece of software, I'm\n trying to figure out what the single characters could stand\n for. Thus I'm looking for a good interpretation of TOAST. So\n far I have\n\n Tuple\n Outgrown\n Attribute\n Storage\n Technique\n\n It somehow reflects what the toaster should do for us.\n\n Well, outgrown could be replaced by obscure, off-beat, off-\n side, omnipotent, outcast and many more. Omnipotent is my\n second choice.\n\n Some other ideas?\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Tue, 21 Dec 1999 01:36:09 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "T-O-A-S-T meaning"
},
{
"msg_contents": "> Sorry, can't resist :-)\n> \n> Any time I see such a name for a piece of software, I'm\n> trying to figure out what the single characters could stand\n> for. Thus I'm looking for a good interpretation of TOAST. So\n> far I have\n> \n> Tuple\n> Outgrown\n> Attribute\n> Storage\n> Technique\n\n Tuple Overflow Attribute Storage Technique\n\nI thought \"slicer\" would be more natural.\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 20 Dec 1999 21:09:10 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] T-O-A-S-T meaning"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n>> Thus I'm looking for a good interpretation of TOAST. So\n>> far I have\n>> \n>> Tuple\n>> Outgrown\n>> Attribute\n>> Storage\n>> Technique\n\n> Tuple Overflow Attribute Storage Technique\n\nThe Outsized-Attribute Storage Technique ?\n\n> I thought \"slicer\" would be more natural.\n\nOnly if you can provide an acronym...\n\nI have a project slogan, if Jan wants one:\n\n\"TOAST --- the best thing since sliced bread!\"\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 20 Dec 1999 23:53:42 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] T-O-A-S-T meaning "
},
{
"msg_contents": "> The Outsized-Attribute Storage Technique ?\n> \n> > I thought \"slicer\" would be more natural.\n> \n> Only if you can provide an acronym...\n> \n> I have a project slogan, if Jan wants one:\n> \n> \"TOAST --- the best thing since sliced bread!\"\n\nNice.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Tue, 21 Dec 1999 00:48:25 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] T-O-A-S-T meaning"
},
{
"msg_contents": "On Tue, 21 Dec 1999, Bruce Momjian wrote:\n\n> > The Outsized-Attribute Storage Technique ?\n> > \n> > > I thought \"slicer\" would be more natural.\n> > \n> > Only if you can provide an acronym...\n> > \n> > I have a project slogan, if Jan wants one:\n> > \n> > \"TOAST --- the best thing since sliced bread!\"\n> \n> Nice.\n\nAnd don't forget the theme song by Haywood Banks.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n\n",
"msg_date": "Tue, 21 Dec 1999 06:27:12 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] T-O-A-S-T meaning"
},
{
"msg_contents": "> > The Outsized-Attribute Storage Technique ?\n> >\n> > \"TOAST --- the best thing since sliced bread!\"\n>\n> Nice.\n\n What can I say - LOL!\n\n And I don't think that \"slicer\" fit's like that. It'll not\n only slice 'em, it can squeeze them into the master tuple\n too.\n\n High cross-bar (is that the right wording?) though, but I\n like it.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Tue, 21 Dec 1999 16:23:50 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] T-O-A-S-T meaning"
},
{
"msg_contents": "> On Tue, 21 Dec 1999, Bruce Momjian wrote:\n> \n> > > The Outsized-Attribute Storage Technique ?\n> > > \n> > > > I thought \"slicer\" would be more natural.\n> > > \n> > > Only if you can provide an acronym...\n> > > \n> > > I have a project slogan, if Jan wants one:\n> > > \n> > > \"TOAST --- the best thing since sliced bread!\"\n> > \n> > Nice.\n> \n> And don't forget the theme song by Haywood Banks.\n\nCan I have a title? Maybe I can find an MP3 of it.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Tue, 21 Dec 1999 11:59:12 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] T-O-A-S-T meaning"
},
{
"msg_contents": "On Tue, 21 Dec 1999, Bruce Momjian wrote:\n\n> > On Tue, 21 Dec 1999, Bruce Momjian wrote:\n> > \n> > > > The Outsized-Attribute Storage Technique ?\n> > > > \n> > > > > I thought \"slicer\" would be more natural.\n> > > > \n> > > > Only if you can provide an acronym...\n> > > > \n> > > > I have a project slogan, if Jan wants one:\n> > > > \n> > > > \"TOAST --- the best thing since sliced bread!\"\n> > > \n> > > Nice.\n> > \n> > And don't forget the theme song by Haywood Banks.\n> \n> Can I have a title? Maybe I can find an MP3 of it.\n> \n> \n\nYep. Toast. He's got a website: www.haywoodbanks.com \n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n\n",
"msg_date": "Tue, 21 Dec 1999 12:02:56 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] T-O-A-S-T meaning"
},
{
"msg_contents": "> The Outsized-Attribute Storage Technique ?\n\nThe Oversized-Attribute Storage Technique??\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Wed, 22 Dec 1999 17:16:10 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] T-O-A-S-T meaning"
}
] |
[
{
"msg_contents": "\n> > Bruce doesn't want to do that, and I doubt anyone will \n> force the issue\n> > over his veto. But it would be nice to be able to do a \n> pgindent run;\n> > there's a lot of new code in this release.\n> \n> I hope I didn't \"veto\" it. I just wanted to mention my reasons, and\n> look for other people to vote too. I have Vince, Peter, and Tom who\n> want 8-space tabs and 4-space indents. Because the old standard was\n> voted on by many more people, I need to hear additional votes \n> to change\n> our standard.\n\nI think the idea at that time was also, that with a tab only setup people\ncan \nlook at the code with 2 space, 3 space and 4 space indents, whatever suits \nthem best.\n\nI like the current setup. Our company uses the same.\n\nMost Programmers editors (and vi) can handle the 4 space tabs perfectly.\nThe pager less handles them also.\n\nAndreas\n",
"msg_date": "Tue, 21 Dec 1999 10:04:15 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: [HACKERS] LONG varsize - how to go on (pgindent)"
},
{
"msg_contents": "On Tue, 21 Dec 1999, Zeugswetter Andreas SB wrote:\n\n> \n> > > Bruce doesn't want to do that, and I doubt anyone will \n> > force the issue\n> > > over his veto. But it would be nice to be able to do a \n> > pgindent run;\n> > > there's a lot of new code in this release.\n> > \n> > I hope I didn't \"veto\" it. I just wanted to mention my reasons, and\n> > look for other people to vote too. I have Vince, Peter, and Tom who\n> > want 8-space tabs and 4-space indents. Because the old standard was\n> > voted on by many more people, I need to hear additional votes \n> > to change\n> > our standard.\n\nWhoa. Wait. Timeout! If I ever said I liked 8 space anythings I musta\nmistyped, been half asleep, not paying attention or something. I'm \nflexible, the only thing I want is a noticable indent and tab; I don't\nreally care if it's anywhere between one and four, but eight is too many.\nActually the only comment I remember making is that I always preferred\nblocks like this:\n\n if( ) {\n\t// do something\n }\n\nwhich I guess isn't very popular. I did, however, utilize the xemacs\nindent thing that Tom Lane posted here a couple weeks ago. Thanks Tom!\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n\n",
"msg_date": "Tue, 21 Dec 1999 07:13:46 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)"
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n> I think the idea at that time was also, that with a tab only setup\n> people can look at the code with 2 space, 3 space and 4 space indents,\n> whatever suits them best.\n\nNot really. If the code still looked OK at different tab widths, people\nwouldn't be complaining. A fairly typical example is\n\n if (root->query_pathkeys == NIL ||\n pathkeys_contained_in(root->query_pathkeys,\n final_rel->cheapestpath->pathkeys))\n {\n root->query_pathkeys = final_rel->cheapestpath->pathkeys;\n\nwhich is really\n\n<tb>if (root->query_pathkeys == NIL ||\n<tb><tb>pathkeys_contained_in(root->query_pathkeys,\n<tb><tb><tb><tb><tb><tb><tb> final_rel->cheapestpath->pathkeys))\n<tb>{\n<tb><tb>root->query_pathkeys = final_rel->cheapestpath->pathkeys;\n\nso at 8-space tab expansion it looks like\n\n if (root->query_pathkeys == NIL ||\n pathkeys_contained_in(root->query_pathkeys,\n final_rel->cheapestpath->pathkeys))\n {\n root->query_pathkeys = final_rel->cheapestpath->pathkeys;\n\nand in fact at any tab spacing other than 4, it will look bizarre.\n\nThings get even worse for declarations and comments in the right margin:\n\ntypedef struct Unique\n{\n Plan plan; /* noname node flattened out */\n Oid nonameid;\n int keycount;\n char *uniqueAttr; /* NULL if all attrs, or unique attribute\n * name */\n AttrNumber uniqueAttrNum; /* attribute number of attribute to select\n * distinct on */\n UniqueState *uniquestate;\n} Unique;\n\nis really\n\ntypedef struct Unique\n{\n<tb>Plan<tb><tb>plan;<tb><tb><tb>/* noname node flattened out */\n<tb>Oid<tb><tb><tb>nonameid;\n<tb>int<tb><tb><tb>keycount;\n<tb>char<tb> *uniqueAttr;<tb><tb>/* NULL if all attrs, or unique attribute\n<tb><tb><tb><tb><tb><tb><tb><tb> * name */\n<tb>AttrNumber<tb>uniqueAttrNum;<tb>/* attribute number of attribute to select\n<tb><tb><tb><tb><tb><tb><tb><tb> * distinct on */\n<tb>UniqueState *uniquestate;\n} Unique;\n\nso at 8-space tabs it looks like\n\ntypedef struct Unique\n{\n Plan plan; /* noname node flattened out */\n Oid nonameid;\n int keycount;\n char *uniqueAttr; /* NULL if all attrs, or unique attribute\n * name */\n AttrNumber uniqueAttrNum; /* attribute number of attribute to select\n * distinct on */\n UniqueState *uniquestate;\n} Unique;\n\nand again, it's not going to look right at any tab width except 4.\n\n> Most Programmers editors (and vi) can handle the 4 space tabs perfectly.\n\nAnyone who can't persuade his editor to show tabs as 4 spaces isn't\ngoing to be contributing to Postgres, because he's not going to find\nthe code readable. So it's not surprising that the population of this\nlist considers it a non-problem; natural selection has eliminated the\npeople who might complain. But I'd like to get rid of that barrier\nto new contributors. How many potential contributors have we lost\nbecause they took one look at the code and decided it was too ugly\neven to think of working with?\n\nIf changing the tabs is too radical, it'd at least be a good idea to add\na section to the Developers' FAQ explaining how to set up all the common\neditors for Postgres. I can contribute a recipe for Emacs, but I have\nno idea how to do it for vi or anything else...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 21 Dec 1999 10:36:40 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: [HACKERS] LONG varsize - how to go on (pgindent) "
},
{
"msg_contents": "> If changing the tabs is too radical, it'd at least be a good idea to add\n> a section to the Developers' FAQ explaining how to set up all the common\n> editors for Postgres. I can contribute a recipe for Emacs, but I have\n> no idea how to do it for vi or anything else...\n\n In ~/.exrc you need:\n\n set tabstop=4\n set sw=4\n\n That's all. But I like 8-spaced tabs anyway. It's a very old\n de-facto standard (I think CP/M already treated TAB this\n way), so having something different is definitely what Tom\n said - a reason for potential contributors NOT do contribute.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Tue, 21 Dec 1999 17:30:00 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)"
},
{
"msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> \n> > > Bruce doesn't want to do that, and I doubt anyone will \n> > force the issue\n> > > over his veto. But it would be nice to be able to do a \n> > pgindent run;\n> > > there's a lot of new code in this release.\n> > \n> > I hope I didn't \"veto\" it. I just wanted to mention my reasons, and\n> > look for other people to vote too. I have Vince, Peter, and Tom who\n> > want 8-space tabs and 4-space indents. Because the old standard was\n> > voted on by many more people, I need to hear additional votes \n> > to change\n> > our standard.\n> \n> I think the idea at that time was also, that with a tab only setup people\n> can \n> look at the code with 2 space, 3 space and 4 space indents, whatever suits \n> them best.\n> \n> I like the current setup. Our company uses the same.\n> \n> Most Programmers editors (and vi) can handle the 4 space tabs perfectly.\n> The pager less handles them also.\n\nWow, that's something I never thought of. By using only tabs, they can\nbe configured as any size in the editor. Good point.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Tue, 21 Dec 1999 11:57:04 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)"
},
{
"msg_contents": "> > > I hope I didn't \"veto\" it. I just wanted to mention my reasons, and\n> > > look for other people to vote too. I have Vince, Peter, and Tom who\n> > > want 8-space tabs and 4-space indents. Because the old standard was\n> > > voted on by many more people, I need to hear additional votes \n> > > to change\n> > > our standard.\n> \n> Whoa. Wait. Timeout! If I ever said I liked 8 space anythings I musta\n> mistyped, been half asleep, not paying attention or something. I'm \n> flexible, the only thing I want is a noticable indent and tab; I don't\n> really care if it's anywhere between one and four, but eight is too many.\n> Actually the only comment I remember making is that I always preferred\n> blocks like this:\n> \n> if( ) {\n> \t// do something\n> }\n> \n> which I guess isn't very popular. I did, however, utilize the xemacs\n> indent thing that Tom Lane posted here a couple weeks ago. Thanks Tom!\n\nOK, now we have two items on the floor. One is 8 vs. 4 space tabs, and\nthe other is different bracketing as illustrated above.\n\nI have only Vince on the new bracketing. Let's see if others vote for\nnew bracketing too.\n\nI have Tom Lane, Jan, and Peter voting for 8-space tabs, and myself and\nAndreas voting for 4-space tabs. I think we all agree on 4-space\nindenting.\n\nAny more votes? I see there is more discussion on this in my mailbox.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Tue, 21 Dec 1999 12:07:55 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)"
},
{
"msg_contents": "> OK, now we have two items on the floor. One is 8 vs. 4 space tabs, and\n> the other is different bracketing as illustrated above.\n> \n> I have only Vince on the new bracketing. Let's see if others vote for\n> new bracketing too.\n> \n> I have Tom Lane, Jan, and Peter voting for 8-space tabs, and myself and\n> Andreas voting for 4-space tabs. I think we all agree on 4-space\n> indenting.\n> \n> Any more votes? I see there is more discussion on this in my mailbox.\n\nWhile we are waiting for votes, I have added the needed sections to the\ndevelopers FAQ on the web site and on the main tree. This certain\nshould have been done earlier.\n\nIf we don't get enough votes to change the tab size to 8, maybe we can\nadd the /* Local variables */ line to the bottom of all the C files. \nThat would make Emacs users happy. Of course, that only does Emacs.\nWe could throw .exrc files in the directories for vi users, usually as\none file and symlinks to the main file.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Tue, 21 Dec 1999 12:36:10 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)"
},
{
"msg_contents": "Tom Lane wrote:\n> \n> Zeugswetter Andreas SB <[email protected]> writes:\n> > I think the idea at that time was also, that with a tab only setup\n> > people can look at the code with 2 space, 3 space and 4 space indents,\n> > whatever suits them best.\n> \n> Not really. If the code still looked OK at different tab widths, people\n> wouldn't be complaining. A fairly typical example is\n> \n> if (root->query_pathkeys == NIL ||\n> pathkeys_contained_in(root->query_pathkeys,\n> final_rel->cheapestpath->pathkeys))\n> {\n> root->query_pathkeys = final_rel->cheapestpath->pathkeys;\n> \n> which is really\n> \n> <tb>if (root->query_pathkeys == NIL ||\n> <tb><tb>pathkeys_contained_in(root->query_pathkeys,\n> <tb><tb><tb><tb><tb><tb><tb> final_rel->cheapestpath->pathkeys))\n> <tb>{\n> <tb><tb>root->query_pathkeys = final_rel->cheapestpath->pathkeys;\n\nSo we either need ident that understands C syntax and formats the \nabove as \n\n<tb>if (root->query_pathkeys == NIL ||\n<tb><tb>pathkeys_contained_in(root->query_pathkeys,\n<tb><tb> final_rel->cheapestpath->pathkeys))\n<tb>{\n<tb><tb>root->query_pathkeys = final_rel->cheapestpath->pathkeys;\n\nor just use spaces for indentation\n\nI transferred all my coding to spaces-only after starting with python \nabout 5-6 years ago, as in python the whitespace is meaningful to parser \ntoo and not only to human reader.\nPython has even a special script for detecting space/tab combinations \nthat can potentially break things.\n\nAnd it would be easy for someone who desparately needs tabs in his code\nto run a much-simpler-than-indent script on the spaces only source to get \nwhat we have currently (and another script to put the spaces back before \nsubmitting patches)\n\n-------------------\nHannu\n",
"msg_date": "Wed, 22 Dec 1999 10:07:40 +0200",
"msg_from": "Hannu Krosing <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)"
},
{
"msg_contents": "> OK, now we have two items on the floor. One is 8 vs. 4 space tabs, and\n> the other is different bracketing as illustrated above.\n> \n> I have only Vince on the new bracketing. Let's see if others vote for\n> new bracketing too.\n> \n> I have Tom Lane, Jan, and Peter voting for 8-space tabs, and myself and\n> Andreas voting for 4-space tabs. I think we all agree on 4-space\n> indenting.\n> \n> Any more votes? I see there is more discussion on this in my mailbox.\n\nOK, I have 3 for 8-space tabs, 2 for 4-space tabs, and 1 for no tabs.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 22 Dec 1999 13:05:42 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)"
}
] |
[
{
"msg_contents": "\n> a section to the Developers' FAQ explaining how to set up all \n> the common\n> editors for Postgres. I can contribute a recipe for Emacs, but I have\n> no idea how to do it for vi or anything else...\n\nvi:\n\t:set ts=4\nmore:\n\tmore -x4\nless:\n\tless -x4\n\nI guess that comment is not so helpful :-(\n\nAndreas\n",
"msg_date": "Tue, 21 Dec 1999 17:16:27 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] LONG varsize - how to go on (pgindent) "
}
] |
[
{
"msg_contents": "\"Hiroshi Inoue\" <[email protected]>\n>> >I'm not sure it's possible or not.\n>> >If startup sequence in InitPostgres() is changed,we may hardly\n>> >find the place to start transaction during backend startup.\n>> >\n>> >Seems the unique place we could call StartTransacationCommand()\n>> >during backend startup is between InitCatalogCahe() and InitUserId()\n>> >in InitPostgres() now.\n>> >I tried the following patch and it seems work at least now.\n>>\n>> <snip>\n>> Hiroshi\n>>\n>> I concur, after application of this patch I've not had a single\n>> lock NOTICE: error in the regression tests.\n>>\n>\n>Thanks.\n>\n>I'm not sure my patch has no problem.\n>May I dare to commit it to current tree ?\n>\n\nI've not seen any problems so-far.\n\nCan you commit your patch for wider testing?\n\nKeith.\n\n",
"msg_date": "Tue, 21 Dec 1999 20:25:05 +0000 (GMT)",
"msg_from": "Keith Parks <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock "
},
{
"msg_contents": "> -----Original Message-----\n> From: Keith Parks [mailto:[email protected]]\n> \n> \"Hiroshi Inoue\" <[email protected]>\n> >> >I'm not sure it's possible or not.\n> >> >If startup sequence in InitPostgres() is changed,we may hardly\n> >> >find the place to start transaction during backend startup.\n> >> >\n> >> >Seems the unique place we could call StartTransacationCommand()\n> >> >during backend startup is between InitCatalogCahe() and InitUserId()\n> >> >in InitPostgres() now.\n> >> >I tried the following patch and it seems work at least now.\n> >>\n> >> <snip>\n> >> Hiroshi\n> >>\n> >> I concur, after application of this patch I've not had a single\n> >> lock NOTICE: error in the regression tests.\n> >>\n> >\n> >Thanks.\n> >\n> >I'm not sure my patch has no problem.\n> >May I dare to commit it to current tree ?\n> >\n> \n> I've not seen any problems so-far.\n> \n> Can you commit your patch for wider testing?\n>\n\nOK,I have commited the patch to current tree now.\nI had no time to do it yesterday,sorry.\n\nRegards.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Wed, 22 Dec 1999 09:19:31 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock "
}
] |
[
{
"msg_contents": "Hi,\n\n I have additional information on the update_pg_pwd()\n discussion, whether AFTER ROW triggers should return\n HeapTuple or void. The return value of AFTER ROW triggers\n isn't void - definitely.\n\n The trigger manager tries to pfree() the returned pointer, if\n it's neither NULL, nor one of the tuples he sent down to the\n trigger (trigtuple and newtuple).\n\n Thus, ANY trigger must at least return (HeapTuple)NULL.\n\n Fix is committed.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Tue, 21 Dec 1999 23:31:40 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "update_pg_pwd and AR triggers"
}
] |
[
{
"msg_contents": "I have committed changes to pg_ctl.\n\n1) postmaster.opts.default is being copied from\nsrc/bin/pg_ctl/postmaster.opts.default.sample in the installation\nprocedure.\n\n2) postmaster.opts.default is now installed by initdb.\n\n3) The path to postmaster is determined in the runtime rather than\nwhile creating pg_ctl script. That is a similar way to initdb\n(actually codes stolen from it).\n--\nTatsuo Ishii\n",
"msg_date": "Wed, 22 Dec 1999 13:31:04 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": true,
"msg_subject": "pg_ctl updated"
}
] |
[
{
"msg_contents": "Hi,\n\n I thought it would be good to have our WEB-site telling some\n more details about TODO items, that are actually under\n development.\n\n Therefore I created a subdirectory \"projects\", placed an\n initial \"index.html\" and a \"devel-toast.html\" there (along\n with an image and Heywood's TOAST song). They aren't added to\n CVS yet, since I don't know if ya'll want this stuff and/or\n others will add more project pages. But at least I think\n it's a possible way to find co-developers who don't listen to\n our mailing lists.\n\n Of course, the mp3 song will disappear soon, it's just that\n some (Bruce at least) wanted to hear it and that's the\n easiest way to provide.\n\n Vince: If this kind of stuff should be added, a link from the\n \"Helping Us\" page would be fine. Maybe one from the \"Lates\n News\" too, because one looking for upcoming features probably\n visits this instead.\n\n Comments, suggestions?\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Wed, 22 Dec 1999 15:52:54 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "TOAST project page"
},
{
"msg_contents": "On Wed, 22 Dec 1999, Jan Wieck wrote:\n\n> Hi,\n> \n> I thought it would be good to have our WEB-site telling some\n> more details about TODO items, that are actually under\n> development.\n> \n> Therefore I created a subdirectory \"projects\", placed an\n> initial \"index.html\" and a \"devel-toast.html\" there (along\n> with an image and Heywood's TOAST song). They aren't added to\n> CVS yet, since I don't know if ya'll want this stuff and/or\n> others will add more project pages. But at least I think\n> it's a possible way to find co-developers who don't listen to\n> our mailing lists.\n> \n> Of course, the mp3 song will disappear soon, it's just that\n> some (Bruce at least) wanted to hear it and that's the\n> easiest way to provide.\n> \n> Vince: If this kind of stuff should be added, a link from the\n> \"Helping Us\" page would be fine. Maybe one from the \"Lates\n> News\" too, because one looking for upcoming features probably\n> visits this instead.\n> \n> Comments, suggestions?\n\nGreat idea. It's now on the Helping Us page, in the announcements and \nthe news. Go ahead and commit it to CVS.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n\n",
"msg_date": "Wed, 22 Dec 1999 10:42:19 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] TOAST project page"
}
] |
[
{
"msg_contents": "OK, I have 3 for 8-space tabs, 2 for 4-space tabs, and 1 for no tabs.\n\nAll want 4-space indenting. One wants braces on if () line.\n\nAnyone want the sources converted to another language. :-)\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 22 Dec 1999 13:07:45 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "tab size"
}
] |
[
{
"msg_contents": "Hi All,\n\nI had seen the answer for my question before, but hacker's E-mail search\nisn't finding any word.\n\nI'm using PgSQL 6.5.2 with RHLinux 6.0.\n\nHow can I use non-group columns in a select with aggregate functions ? To\nme, the following query makes sense.\n\nteste=> create table people(pp_id int2 primary key, pp_name text);\nNOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'people_pkey'\nfor table 'people'\nCREATE\nteste=> create table workpgsql(wp_people int2, wp_date date, hoursofwork\nint2);\nCREATE\nteste=> insert into people values (1,'ME');\nINSERT 226808 1\nteste=> insert into people values (2,'YOU');\nINSERT 226809 1\nteste=> insert into workpgsql values (1,'01/01/2000',5);\nINSERT 226810 1\nteste=> insert into workpgsql values (1,'01/01/2000',4);\nINSERT 226811 1\nteste=> insert into workpgsql values (2,'01/01/2000',6);\nINSERT 226812 1\nteste=> insert into workpgsql values (2,'01/01/2000',6);\nINSERT 226813 1\nteste=> select pp_name,wp_date,sum(hoursofwork) from people,workpgsql\nteste-> where pp_id=wp_people\nteste-> group by wp_people,wp_date;\nERROR: Illegal use of aggregates or non-group column in target list\n\nIf anybody knows how to rebuild this query to work, thanks in advance.\n\nThanks,\n\nRicardo Coelho.\n\n",
"msg_date": "Wed, 22 Dec 1999 16:56:16 -0200",
"msg_from": "\"Ricardo Coelho\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Non-group columns with aggregate functions"
},
{
"msg_contents": "Ricardo Coelho wrote:\n\n> How can I use non-group columns in a select with aggregate functions ? To\n> me, the following query makes sense.\n>\n> teste=> create table people(pp_id int2 primary key, pp_name text);\n> NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'people_pkey'\n> for table 'people'\n> CREATE\n> teste=> create table workpgsql(wp_people int2, wp_date date, hoursofwork\n> int2);\n> CREATE\n> teste=> insert into people values (1,'ME');\n> INSERT 226808 1\n> teste=> insert into people values (2,'YOU');\n> INSERT 226809 1\n> teste=> insert into workpgsql values (1,'01/01/2000',5);\n> INSERT 226810 1\n> teste=> insert into workpgsql values (1,'01/01/2000',4);\n> INSERT 226811 1\n> teste=> insert into workpgsql values (2,'01/01/2000',6);\n> INSERT 226812 1\n> teste=> insert into workpgsql values (2,'01/01/2000',6);\n> INSERT 226813 1\n> teste=> select pp_name,wp_date,sum(hoursofwork) from people,workpgsql\n> teste-> where pp_id=wp_people\n> teste-> group by wp_people,wp_date;\n> ERROR: Illegal use of aggregates or non-group column in target list\n>\n> If anybody knows how to rebuild this query to work, thanks in advance.\n\nNon-aggregated columns must appear in the group by clause.\n\nselect pp_name, wp_date, sum(hoursofwork)\nfrom people, workpgsql\nwhere pp_id=wp_people\ngroup by pp_name,wp_date;\n\nCheers.\nEd Loehr\n\n",
"msg_date": "Wed, 22 Dec 1999 14:21:21 -0600",
"msg_from": "Ed Loehr <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Non-group columns with aggregate functions"
},
{
"msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> Hi All,\n> \n> I had seen the answer for my question before, but hacker's E-mail search\n> isn't finding any word.\n> \n> I'm using PgSQL 6.5.2 with RHLinux 6.0.\n> \n> How can I use non-group columns in a select with aggregate functions ? To\n> me, the following query makes sense.\n> \n> teste=> create table people(pp_id int2 primary key, pp_name text);\n> NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'people_pkey'\n> for table 'people'\n> CREATE\n> teste=> create table workpgsql(wp_people int2, wp_date date, hoursofwork\n> int2);\n> CREATE\n> teste=> insert into people values (1,'ME');\n> INSERT 226808 1\n> teste=> insert into people values (2,'YOU');\n> INSERT 226809 1\n> teste=> insert into workpgsql values (1,'01/01/2000',5);\n> INSERT 226810 1\n> teste=> insert into workpgsql values (1,'01/01/2000',4);\n> INSERT 226811 1\n> teste=> insert into workpgsql values (2,'01/01/2000',6);\n> INSERT 226812 1\n> teste=> insert into workpgsql values (2,'01/01/2000',6);\n> INSERT 226813 1\n> teste=> select pp_name,wp_date,sum(hoursofwork) from people,workpgsql\n> teste-> where pp_id=wp_people\n> teste-> group by wp_people,wp_date;\n> ERROR: Illegal use of aggregates or non-group column in target list\n> \n> If anybody knows how to rebuild this query to work, thanks in advance.\n\nNew 7.0 error message will be:\n\nERROR: Attribute people.pp_name must be GROUPed or used in an aggregate function \n\nCause is that you group by wp_people, not pp_name.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 22 Dec 1999 15:21:37 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Non-group columns with aggregate functions"
},
{
"msg_contents": "Ed,\n\nThe query works now. Thanks.\n\nThanks everybody.\n\n----- Original Message -----\nFrom: Ed Loehr <[email protected]>\nTo: Ricardo Coelho <[email protected]>\nCc: <[email protected]>\nSent: Wednesday, December 22, 1999 6:21 PM\nSubject: Re: [HACKERS] Non-group columns with aggregate functions\n\n\n> Ricardo Coelho wrote:\n>\n> > How can I use non-group columns in a select with aggregate functions ?\nTo\n> > me, the following query makes sense.\n> >\n> > teste=> create table people(pp_id int2 primary key, pp_name text);\n> > NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index\n'people_pkey'\n> > for table 'people'\n> > CREATE\n> > teste=> create table workpgsql(wp_people int2, wp_date date, hoursofwork\n> > int2);\n> > CREATE\n> > teste=> insert into people values (1,'ME');\n> > INSERT 226808 1\n> > teste=> insert into people values (2,'YOU');\n> > INSERT 226809 1\n> > teste=> insert into workpgsql values (1,'01/01/2000',5);\n> > INSERT 226810 1\n> > teste=> insert into workpgsql values (1,'01/01/2000',4);\n> > INSERT 226811 1\n> > teste=> insert into workpgsql values (2,'01/01/2000',6);\n> > INSERT 226812 1\n> > teste=> insert into workpgsql values (2,'01/01/2000',6);\n> > INSERT 226813 1\n> > teste=> select pp_name,wp_date,sum(hoursofwork) from people,workpgsql\n> > teste-> where pp_id=wp_people\n> > teste-> group by wp_people,wp_date;\n> > ERROR: Illegal use of aggregates or non-group column in target list\n> >\n> > If anybody knows how to rebuild this query to work, thanks in advance.\n>\n> Non-aggregated columns must appear in the group by clause.\n>\n> select pp_name, wp_date, sum(hoursofwork)\n> from people, workpgsql\n> where pp_id=wp_people\n> group by pp_name,wp_date;\n>\n> Cheers.\n> Ed Loehr\n>\n>\n> ************\n\n",
"msg_date": "Wed, 22 Dec 1999 18:48:56 -0200",
"msg_from": "\"Ricardo Coelho\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Non-group columns with aggregate functions"
}
] |
[
{
"msg_contents": "\"Ricardo Coelho\" <[email protected]>\n>\n>How can I use non-group columns in a select with aggregate functions ? To\n>me, the following query makes sense.\n>\n\n<snip>\n\n>teste=> select pp_name,wp_date,sum(hoursofwork) from people,workpgsql\n>teste-> where pp_id=wp_people\n>teste-> group by wp_people,wp_date;\n>ERROR: Illegal use of aggregates or non-group column in target list\n>\n>If anybody knows how to rebuild this query to work, thanks in advance.\n>\n\nMaybe one of these?\n\npostgres=# select pp_name,wp_date,sum(hoursofwork) from people,workpgsql where \npp_id=wp_people group by pp_name,wp_date;\n pp_name | wp_date | sum \n---------+------------+-----\n ME | 01-01-2000 | 9\n YOU | 01-01-2000 | 12\n(2 rows)\n\npostgres=# select wp_people,wp_date,sum(hoursofwork) from people,workpgsql where \npp_id=wp_people group by wp_people,wp_date;\n wp_people | wp_date | sum \n-----------+------------+-----\n 1 | 01-01-2000 | 9\n 2 | 01-01-2000 | 12\n(2 rows)\n\n\nKeith.\n\n",
"msg_date": "Wed, 22 Dec 1999 20:55:13 +0000 (GMT)",
"msg_from": "Keith Parks <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Non-group columns with aggregate functions"
}
] |
[
{
"msg_contents": "\n Hi,\n\n I try concatenate text via standard '||' oprerator, but result is\ninteresting: \n\nPgSQL 6.5.3/7.0:\n~~~~~~~~~~~~~~~\ntest=> select * from x;\na |b\n---+---\nAAA|BBB\nxxx|\n(2 rows)\n\ntest=> select a || b from x;\n?column?\n--------\nAAABBB\n <-------------- empty !\n(2 rows)\n\n\nOracle8:\n~~~~~~~~\nSVRMGR> select * from x;\nA B\n-------------------------------- --------------------------------\nAAA BBB\nxxx\n2 rows selected.\nSVRMGR> select a || b from x;\nA||B\n----------------------------------------------------------------\nAAABBB\nxxx <---------------- not empty !\n2 rows selected.\n\n\n\n I fistly think that problem is in the textcat() routine, but PgSQL ignore \nall functions's results if any argument (column) is empty. Example:\n\ntext *\nxxx(text *t1, text *t2)\n{\n text *result;\n\n result = (text *) palloc(10 + VARHDRSZ);\n strcpy(VARDATA(result), \"happy\");\n VARSIZE(result) = 5 + VARHDRSZ;\n elog(NOTICE, \"RETURN: %s\", VARDATA(result));\n\n return result;\t /* always return 'happy' */\n}\n \n \ntest=> select * from x;\na |b\n---+---\nAAA|BBB\nxxx|\n(2 rows)\n\ntest=> select xxx(a, b) from x;\nNOTICE: RETURN: happy\nNOTICE: RETURN: happy\nxxx\n----\nhappy\n <--------- empty ?!\n(2 rows)\n\n\nWhy is it empty? I believe that is not feature :-)\n\n\t\t\t\t\t\tKarel\n\nPS. sorry, if this is old point, mail-list archive seacher (htdig) \n not work...\n\n----------------------------------------------------------------------\nKarel Zak <[email protected]> http://home.zf.jcu.cz/~zakkr/\n\nDocs: http://docs.linux.cz (big docs archive)\t\nKim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)\nFTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)\n-----------------------------------------------------------------------\n\n",
"msg_date": "Thu, 23 Dec 1999 16:20:23 +0100 (CET)",
"msg_from": "Karel Zak - Zakkr <[email protected]>",
"msg_from_op": true,
"msg_subject": "empty concatenate"
},
{
"msg_contents": "> \n> NULL's can not be concatenated, but '' can. Looks fine to me:\n> \n> ---------------------------------------------------------------------------\n> \n> \ttest=> create table ff (x text, y text);\n> \tinsCREATE\n> \ttest=> insert into ff values ('a','');\n> \tINSERT 19082 1\n> \ttest=> insert into ff values ('b',null);\n> \tINSERT 19083 1\n> \ttest=> select x || y from ff;\n> \t ?column? \n> \t----------\n> \t a\n> \t \n> \t(2 rows)\n\n\nWell, but why PgSQL ignore function result if any argument is NULL. IMHO is\nfunction's problem what return, and PgSQL must use this result. \n\nHow can user write / use function which response on NULL (as IFNULL())?\n\n\t\t\t\t\t\t\tKarel\n\n",
"msg_date": "Thu, 23 Dec 1999 16:55:55 +0100 (CET)",
"msg_from": "Karel Zak - Zakkr <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] empty concatenate"
},
{
"msg_contents": "> \n> Hi,\n> \n> I try concatenate text via standard '||' oprerator, but result is\n> interesting: \n> \n> PgSQL 6.5.3/7.0:\n> ~~~~~~~~~~~~~~~\n> test=> select * from x;\n> a |b\n> ---+---\n> AAA|BBB\n> xxx|\n> (2 rows)\n> \n> test=> select a || b from x;\n> ?column?\n> --------\n> AAABBB\n> <-------------- empty !\n> (2 rows)\n\nNULL's can not be concatenated, but '' can. Looks fine to me:\n\n---------------------------------------------------------------------------\n\n\ttest=> create table ff (x text, y text);\n\tinsCREATE\n\ttest=> insert into ff values ('a','');\n\tINSERT 19082 1\n\ttest=> insert into ff values ('b',null);\n\tINSERT 19083 1\n\ttest=> select x || y from ff;\n\t ?column? \n\t----------\n\t a\n\t \n\t(2 rows)\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 23 Dec 1999 10:56:20 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] empty concatenate"
},
{
"msg_contents": "I think this is a known bug.\nYou can try the standard COALESCE function as in:\n\nselect coalesce(a,'')||coalesce(b,'') from test;\n?column?\n--------\nAAAABBBB\nxxxx\n(2 rows)\n\nJose'\n\nKarel Zak - Zakkr wrote:\n> \n> Hi,\n> \n> I try concatenate text via standard '||' oprerator, but result is\n> interesting:\n> \n> PgSQL 6.5.3/7.0:\n> ~~~~~~~~~~~~~~~\n> test=> select * from x;\n> a |b\n> ---+---\n> AAA|BBB\n> xxx|\n> (2 rows)\n> \n> test=> select a || b from x;\n> ?column?\n> --------\n> AAABBB\n> <-------------- empty !\n> (2 rows)\n> \n> Oracle8:\n> ~~~~~~~~\n> SVRMGR> select * from x;\n> A B\n> -------------------------------- --------------------------------\n> AAA BBB\n> xxx\n> 2 rows selected.\n> SVRMGR> select a || b from x;\n> A||B\n> ----------------------------------------------------------------\n> AAABBB\n> xxx <---------------- not empty !\n> 2 rows selected.\n> \n> I fistly think that problem is in the textcat() routine, but PgSQL ignore\n> all functions's results if any argument (column) is empty. Example:\n> \n> text *\n> xxx(text *t1, text *t2)\n> {\n> text *result;\n> \n> result = (text *) palloc(10 + VARHDRSZ);\n> strcpy(VARDATA(result), \"happy\");\n> VARSIZE(result) = 5 + VARHDRSZ;\n> elog(NOTICE, \"RETURN: %s\", VARDATA(result));\n> \n> return result; /* always return 'happy' */\n> }\n> \n> \n> test=> select * from x;\n> a |b\n> ---+---\n> AAA|BBB\n> xxx|\n> (2 rows)\n> \n> test=> select xxx(a, b) from x;\n> NOTICE: RETURN: happy\n> NOTICE: RETURN: happy\n> xxx\n> ----\n> happy\n> <--------- empty ?!\n> (2 rows)\n> \n> Why is it empty? I believe that is not feature :-)\n> \n> Karel\n> \n> PS. sorry, if this is old point, mail-list archive seacher (htdig)\n> not work...\n> \n> ----------------------------------------------------------------------\n> Karel Zak <[email protected]> http://home.zf.jcu.cz/~zakkr/\n> \n> Docs: http://docs.linux.cz (big docs archive)\n> Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)\n> FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)\n> -----------------------------------------------------------------------\n> \n> ************\n",
"msg_date": "Thu, 23 Dec 1999 17:38:34 +0100",
"msg_from": "Jose Soares <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] empty concatenate"
},
{
"msg_contents": "\n>\n>Well, but why PgSQL ignore function result if any argument is NULL. IMHO is\n>function's problem what return, and PgSQL must use this result. \nI believe this is a known issue that's being looked at right now.\n\nHowever, in this case PostgreSQL seems to be correct. \n2) If <concatenation> is specified, then let S1 and S2 be the re-\n sult of the <character value expression> and <character factor>,\n respectively.\n Case:\n a) If either S1 or S2 is the null value, then the result of the\n <concatenation> is the null value.\n\n>How can user write / use function which response on NULL (as IFNULL())?\nWell, for now, you probably want to use coalesce around any input that\nmight be null. I believe coalesce returns the first non-null parameter,\nso coalesce(<column>, '') will return either the column's value (if not\nNULL) or the empty string which can then be used for concatenation.\n\nStephan\n\n",
"msg_date": "Thu, 23 Dec 1999 11:58:13 -0500",
"msg_from": "[email protected]",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] empty concatenate "
},
{
"msg_contents": "\n> \n> >\n> >Well, but why PgSQL ignore function result if any argument is NULL. IMHO is\n> >function's problem what return, and PgSQL must use this result. \n> I believe this is a known issue that's being looked at right now.\n\n I not agree with this concept:-). \n\n(My problem is not write query, I know SQL and coalesce()...etc. I want \ngood understand current implementation.)\n\n! Why is textcat() (and other) function called if result from this \nfunction is ignored, it is bad spending (my CPU is not boredom). See \nmy 'C' example in my first letter... \n\n\t\t\t\t\t\tKarel\n\n",
"msg_date": "Thu, 23 Dec 1999 18:01:33 +0100 (CET)",
"msg_from": "Karel Zak - Zakkr <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] empty concatenate "
},
{
"msg_contents": "[email protected] writes:\n>> Well, but why PgSQL ignore function result if any argument is NULL. IMHO is\n>> function's problem what return, and PgSQL must use this result. \n>\n> I believe this is a known issue that's being looked at right now.\n\nCurrent plans are to fix it in the release-after-next (7.1).\n\nAs you say, the behavior is correct for standard SQL operators; the\nonly real problem is that user-written operators might want to return\nnon-null results for null inputs, and we can't handle that right now.\n\nApplying COALESCE before calling the operator will get the job done\nin some cases, but it clutters your queries...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 23 Dec 1999 12:35:43 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] empty concatenate "
},
{
"msg_contents": "Thus spake Karel Zak - Zakkr\n> I not agree with this concept:-). \n\nYou are not alone.\n\n> (My problem is not write query, I know SQL and coalesce()...etc. I want \n> good understand current implementation.)\n> \n> ! Why is textcat() (and other) function called if result from this \n> function is ignored, it is bad spending (my CPU is not boredom). See \n> my 'C' example in my first letter... \n\nThis is the issue no matter which side of the debate you are on. I\nthink everyone agrees that either the function should not be called\nor else the result should be used if it is. CPU is a terrible thing\nto waste.\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": "Thu, 23 Dec 1999 12:47:22 -0500 (EST)",
"msg_from": "\"D'Arcy\" \"J.M.\" Cain <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] empty concatenate"
},
{
"msg_contents": "\"D'Arcy\" \"J.M.\" Cain <[email protected]> writes:\n>> ! Why is textcat() (and other) function called if result from this \n>> function is ignored, it is bad spending (my CPU is not boredom). See \n>> my 'C' example in my first letter... \n\n> This is the issue no matter which side of the debate you are on.\n\n\"Debate\"? There's no debate --- everybody agrees that the current\nfmgr interface doesn't handle NULLs reasonably. It's just a matter\nof finding time to fix it. It's a fairly large project, given the\namount of code that needs to be touched.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 23 Dec 1999 19:44:20 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] empty concatenate "
},
{
"msg_contents": "Thus spake Tom Lane\n> \"D'Arcy\" \"J.M.\" Cain <[email protected]> writes:\n> >> ! Why is textcat() (and other) function called if result from this \n> >> function is ignored, it is bad spending (my CPU is not boredom). See \n> >> my 'C' example in my first letter... \n> \n> > This is the issue no matter which side of the debate you are on.\n> \n> \"Debate\"? There's no debate --- everybody agrees that the current\n> fmgr interface doesn't handle NULLs reasonably. It's just a matter\n> of finding time to fix it. It's a fairly large project, given the\n> amount of code that needs to be touched.\n\nWell, it may have been a lopsided (and friendly) debate but there was\ndefinitely two sides. The one (which I assume you mean as the one\nthat \"everyone\" accepts says to stick to SQL conformance and fix it\nso that the functions are just never called. The other said to have\nthe functions called then use the value returned so that each function\ncould decide what to do with NULLs.\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": "Thu, 23 Dec 1999 21:29:08 -0500 (EST)",
"msg_from": "\"D'Arcy\" \"J.M.\" Cain <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] empty concatenate"
}
] |
[
{
"msg_contents": "Ok, got a minor problem here in RPM building. It was requested that\nwhen I build locale-enabled RPM's, that I also enable multibyte\nsupport. The suggestion was then made to use --with-mb=SQL_ASCII -- and\nthe README.mb for 6.5.3 supports that.\n\nHOWEVER, --with-mb=SQL_ASCII throws a configure error -- SQL_ASCII is\nnot valid for this switch, or something like that. \n\nSo, my question is: unless someone here who is an autoconf wizard\nsuggests otherwise, I'm going to patch configure to allow the SQL_ASCII\nswitch (I _know_ that the real fix lies in patching configure.in -- I'm\njust wanting to get the RPM out the door without having to learn how to\nrun autoconf first -- unless that would be preferable). Are there any\nother things I need to patch other than the list of allowed encodings in\norder to use --with-mb=SQL_ASCII??\n\nI'd love to get the 6.5.3-3 RPMs out the door today if possible.\n\nThis RPM set includes a few bugfixes as well as the headers necessary to\nbuild SPI modules.\n\nTIA\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Thu, 23 Dec 1999 10:59:50 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": true,
"msg_subject": "--with-mb=SQL_ASCII for 6.5.3 RPMs."
},
{
"msg_contents": "Lamar Owen <[email protected]> writes:\n> (I _know_ that the real fix lies in patching configure.in -- I'm\n> just wanting to get the RPM out the door without having to learn how to\n> run autoconf first -- unless that would be preferable).\n\n1. Install autoconf (get it from any GNU archive). Be sure you have\nversion 2.13 to ensure you get the same results as the rest of us.\nInstall is no harder than \"configure; make; make install\". You do need\nto have GNU m4, but if you are on a Linux box you probably already do.\nTry \"m4 --version\" to check.\n\n2. type \"autoconf\" in the pgsql/src directory.\n\nCan't get much easier. Changing configure.in is a LOT easier than\npatching the output, IMHO...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 23 Dec 1999 12:46:07 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] --with-mb=SQL_ASCII for 6.5.3 RPMs. "
},
{
"msg_contents": "Tom Lane wrote:\n> \n> Lamar Owen <[email protected]> writes:\n> > (I _know_ that the real fix lies in patching configure.in -- I'm\n> > just wanting to get the RPM out the door without having to learn how to\n> > run autoconf first -- unless that would be preferable).\n> \n> 1. Install autoconf (get it from any GNU archive). Be sure you have\n> version 2.13 to ensure you get the same results as the rest of us.\n> Install is no harder than \"configure; make; make install\". You do need\n> to have GNU m4, but if you are on a Linux box you probably already do.\n> Try \"m4 --version\" to check.\n> \n> 2. type \"autoconf\" in the pgsql/src directory.\n> \n> Can't get much easier. Changing configure.in is a LOT easier than\n> patching the output, IMHO...\n\nWell, I actually have to do both, in the RPM scheme of things. I did as\nyou suggested (RedHat 6.1 ships autoconf 2.13 -- installing is a simple\n'rpm -i autoconf-2.13-5.i386.rpm'). Popped configure.in into vi, made\nthe change, ran autoconf, generated the resulting patchset (the RPM\nphilosophy is that a source RPM contains everything necessary to rebuild\nall the binary RPMs -- using pristine sources plus whatever scripts,\npatches, and extra programs are necessary to make it build binaries that\nwill run. The control file that determines how to do all of this is\ncalled a 'spec' file -- the postgresql spec file is one of the more\ncomplex ones due to the large differences in file locations vis-a-vis\nthe pristine source install.), built a test RPM set, and am editing the\nREADME now to reflect the successful changes. \n\nI should release in a couple of hours, once I have all four sets of\nbinaries built (RH 6.1, RH 6.1 non-locale, RH5.2, RH 5.2 non-locale).\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Thu, 23 Dec 1999 13:31:58 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] --with-mb=SQL_ASCII for 6.5.3 RPMs."
}
] |
[
{
"msg_contents": "Does anyone know when support for foreign keys will be implemented?\n\n",
"msg_date": "Thu, 23 Dec 1999 16:02:35 GMT",
"msg_from": "[email protected] (Robert Badaracco)",
"msg_from_op": true,
"msg_subject": "Foreign Key support"
}
] |
[
{
"msg_contents": "During an delete I'd like to reference a foreign key and cascade the deletion\nacross the referenced table or tables. When will this be supported or is\nthere any work around?\n\nThanks\n",
"msg_date": "Thu, 23 Dec 1999 16:05:29 GMT",
"msg_from": "[email protected] (Robert Badaracco)",
"msg_from_op": true,
"msg_subject": "Cascade on delete"
}
] |
[
{
"msg_contents": "Is libpg a shared library? Can I write a client program say on a FreeBSD\nbox that links to this library and calls a remote Postgres db server running\non a Linux box?\n\n",
"msg_date": "Thu, 23 Dec 1999 16:08:07 GMT",
"msg_from": "[email protected] (Robert Badaracco)",
"msg_from_op": true,
"msg_subject": "libpg and remote access"
}
] |
[
{
"msg_contents": "Hi,\n\n Something in my pg_proc table got corrupted and when trying to\nvacuum it, vacuum would create thousands of index files in the database\ndirectory. It would just go into an endless loop and all it seems to do\nis create files. Anybody else seen this before? I've tried everything\nand am now in the process of dumping all the data out table by table and\nrebuilding the database from scratch. Any ideas what I can do to avoid\nthis or any idea how this could have happened? I'm running 6.5.2 on\nDigital Unix 4.0F.\n\nCheers,\n\nAdriaan\n\n",
"msg_date": "Thu, 23 Dec 1999 19:53:27 +0200",
"msg_from": "Adriaan Joubert <[email protected]>",
"msg_from_op": true,
"msg_subject": "Index corruption"
},
{
"msg_contents": "Were other queries occurring during your vacuum? There have been reports\nin these mailing lists that concurrent queries cause vacuum failures...\n\nCheers,\nEd Loehr\n\nAdriaan Joubert wrote:\n\n> Hi,\n>\n> Something in my pg_proc table got corrupted and when trying to\n> vacuum it, vacuum would create thousands of index files in the database\n> directory. It would just go into an endless loop and all it seems to do\n> is create files. Anybody else seen this before? I've tried everything\n> and am now in the process of dumping all the data out table by table and\n> rebuilding the database from scratch. Any ideas what I can do to avoid\n> this or any idea how this could have happened? I'm running 6.5.2 on\n> Digital Unix 4.0F.\n>\n> Cheers,\n>\n> Adriaan\n>\n> ************\n\n",
"msg_date": "Thu, 23 Dec 1999 12:45:56 -0600",
"msg_from": "Ed Loehr <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "Adriaan Joubert <[email protected]> writes:\n> Something in my pg_proc table got corrupted and when trying to\n> vacuum it, vacuum would create thousands of index files in the database\n> directory. It would just go into an endless loop and all it seems to do\n> is create files. Anybody else seen this before?\n\nNo, that's a new one AFAIK. I don't suppose you saved the state of your\nDB before rebuilding it? I'd like to try to reproduce the problem...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 23 Dec 1999 19:51:59 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index corruption "
},
{
"msg_contents": "> No, that's a new one AFAIK. I don't suppose you saved the state of your\n> DB before rebuilding it? I'd like to try to reproduce the problem...\n\nNo, sorry. I got increasing desperate as this was a production system and I\nwas under a bit of pressure to get it back up. A day earlier I had had a\ncomplaint about the number of tuples in the index being incorrect. At the\nthird attempt I managed to run vacuum over it without the backend crashing\nand the it seemed to behave well. Next morning I ran vacuum again and then I\nended up with the endless file-creation loop. Oh yes, to get it to vacuum\nI had to delete all my functions (pg_proc) and then reload them. I know that\nall my procedures are small enough not to break the 8K limit, as I used to\nhave trouble with that. I tried the same trick, i.e. dropping and reloading\nmy functions, but no luck. As most of what they do is to enforce referential\nintegrity, Jan's foreign key stuff may solve a large part of the problem!\n\nI had the system logging with debug level 3 and there was nothing in the\nlogs. Did anything get fixed in this area between 6.5.2 and 6.5.3? I.e.\nshould I upgrade? I'd rather not just at the moment.\n\nMerry Christmas!\n\nAdriaan\n\n\n\n",
"msg_date": "Sat, 25 Dec 1999 14:59:38 +0200",
"msg_from": "Adriaan Joubert <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "> I had the system logging with debug level 3 and there was nothing in the\n> logs. Did anything get fixed in this area between 6.5.2 and 6.5.3? I.e.\n> should I upgrade? I'd rather not just at the moment.\n\nNo:\n\t\n\tRelease 6.5.3\n\t\n\tThis is basically a cleanup release for 6.5.2. We have added a new\n\tpgaccess\n\tthat was missing in 6.5.2, and installed an NT-specific fix.\n\t\n\tMigration to v6.5.3\n\t\n\tA dump/restore is not required for those running 6.5.*.\n\t\n\tDetailed Change List\n\t\n\tUpdated version of pgaccess 0.98\n\tNT-specific patch\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 25 Dec 1999 10:13:33 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "Adriaan Joubert wrote:\n\n> Something in my pg_proc table got corrupted and when trying to\n> vacuum it, vacuum would create thousands of index files in the database\n> directory. It would just go into an endless loop and all it seems to do\n> is create files. Anybody else seen this before? I've tried everything\n> and am now in the process of dumping all the data out table by table and\n> rebuilding the database from scratch. Any ideas what I can do to avoid\n> this or any idea how this could have happened? I'm running 6.5.2 on\n> Digital Unix 4.0F.\n\nOK, I've got the same problem again. I upgraded to 6.5.3 just in case there\nwas something different, and\nit makes no difference. Thousands of pg_proc_prosrc_index..<id> files and\nvacuum just seems to be in and endless loop. I really need to get this\npinned down. Any ideas where I could start looking?\n\nIn the logs I only get this\nNOTICE: --Relation pg_proc--\nNOTICE: Pages 30: Changed 0, Reapped 5, Empty 0, New 0; Tup 1074: Vac 25,\nKeep/VTL 0/0, Crash 0, UnUsed 2, MinLen 145, MaxLen 3013; Re-using:\nFree/Avail. Space 30108/30108; EndEmpty/Avail. Pages 0/5. Elapsed 0/0 sec.\n\nso the relation pg_proc did not even change!\n\nI'd really appreciate any help on this one -- I'm getting an awful lot of\nstick for this.\n\nAdriaan\n\n\n",
"msg_date": "Wed, 29 Dec 1999 15:09:26 +0200",
"msg_from": "Adriaan Joubert <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "Further to my problem: I've run the vacuum in a backend under the debugger and\nat least figured out in which\nloop the zillions of files are created. It is in md.c. In the stack trace\nbelow, you can see that blockno has got a totally stupid value and in the loop\nin lines 1049-1063 in md.c (v 6.5.3. sources) it opens zillions of files. If\nanybody knows where this comes from I'd appreciate it. In the meantime I'll\ntry to dig a bit further.\n\nCheers,\n\nAdriaan\n\n\n>0 0x12012d8d4 in _mdfd_getseg(reln=0x1402488c0, blkno=745239393) \"md.c\":1051\n\n#1 0x12012c7a8 in mdread(reln=0x1402488c0, blocknum=745239393,\nbuffer=0x14012ec70=\"\\334\") \"md.c\":414\n#2 0x12012ddfc in smgrread(which=0, reln=0x1402488c0, blocknum=745239393,\nbuffer=0x14012ec70=\"\\334\") \"smgr.c\":226\n#3 0x12011b724 in ReadBufferWithBufferLock(reln=0x1402488c0,\nblockNum=745239393, bufferLockHeld='\\000') \"bufmgr.c\":302\n#4 0x12011b4c0 in ReadBuffer(reln=0x1402488c0, blockNum=745239393)\n\"bufmgr.c\":180\n#5 0x120063ce8 in _bt_getbuf(rel=0x1402488c0, blkno=745239393, access=1)\n\"nbtpage.c\":304\n#6 0x120069950 in _bt_step(scan=0x14025ca68, bufP=0x11fffb6c8,\ndir=ForwardScanDirection) \"nbtsearch.c\":1131\n#7 0x12006867c in _bt_next(scan=0x14025ca68, dir=ForwardScanDirection)\n\"nbtsearch.c\":706\n#8 0x120065140 in btgettuple(scan=0x14025ca68, dir=ForwardScanDirection)\n\"nbtree.c\":390\n#9 0x12017f238 in fmgr_c(finfo=0x11fffb780, values=0x11fffb7a8,\nisNull=0x11fffb778=\"\") \"fmgr.c\":135\n#10 0x12017f81c in fmgr(procedureId=330) \"fmgr.c\":336\n#11 0x120057fa0 in index_getnext(scan=0x14025ca68,\ndirection=ForwardScanDirection) \"indexam.c\":316\n#12 0x120091714 in vc_vaconeind(vpl=0x11fffba38, indrel=0x1402488c0,\nnum_tuples=1074, keep_tuples=0) \"vacuum.c\":2015\n#13 0x12008d874 in vc_vacone(relid=1255, analyze='\\000', va_cols=0x0)\n\"vacuum.c\":532\n#14 0x12008cb80 in vc_vacuum(VacRelP=0x11fffbae8, analyze='\\000', va_cols=0x0)\n\"vacuum.c\":267\n#15 0x12008c974 in vacuum(vacrel=0x14025b060=\"\", verbose='\\001',\nanalyze='\\000', va_spec=0x0) \"vacuum.c\":150\n#16 0x120133b08 in ProcessUtility(parsetree=0x14025b080, dest=Debug)\n\"utility.c\":638\n#17 0x120130060 in pg_exec_query_dest(query_string=0x11fffbcc0=\"vacuum verbose\npg_proc;\\n\", dest=Debug, aclOverride='\\000') \"postgres.c\":727\n#18 0x12012fea8 in pg_exec_query(query_string=0x11fffbcc0=\"vacuum verbose\npg_proc;\\n\") \"postgres.c\":656\n#19 0x120131980 in PostgresMain(argc=2, argv=0x11ffffd08, real_argc=2,\nreal_argv=0x11ffffd08) \"postgres.c\":1647\n#20 0x1200be424 in main(argc=2, argv=0x11ffffd08) \"main.c\":103\n#21 0x12003fb28 in __start(0xb3f, 0x0, 0x2, 0x0, 0x0, 0x1402cc040) in postgres\n\n\n\n",
"msg_date": "Wed, 29 Dec 1999 16:02:00 +0200",
"msg_from": "Adriaan Joubert <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "> Further to my problem: I've run the vacuum in a backend under the debugger and\n> at least figured out in which\n> loop the zillions of files are created. It is in md.c. In the stack trace\n> below, you can see that blockno has got a totally stupid value and in the loop\n> in lines 1049-1063 in md.c (v 6.5.3. sources) it opens zillions of files. If\n> anybody knows where this comes from I'd appreciate it. In the meantime I'll\n> try to dig a bit further.\n\nWere you the person I told to use pg_upgrade and re-initdb your\ndatabase? If not, I would recommend that as the fix. You may need to\nre-enable pg_upgrade by editing the script.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 29 Dec 1999 09:07:25 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "Hi,\n\nI've dug around a bit more and things seem to be going wrong in\naccess/nbtree/nbtsearch.c. I've printed out everything that seemed even remotely\nrelevant and I'm hoping that somebody can tell me what is going on here. Is this\njust a corruption of the index? I know dropping and re-creating a system index\nis not allowed, but is there some way that I could disable that check and\nrecreate the index?\n\nRegards,\n\nAdriaan\n\nin _bt_step at line 1131\n\n(ladebug) p *opaque\nstruct BTPageOpaqueData {\n btpo_prev = 1949202277;\n btpo_next = 745239393;\n btpo_parent = 779576686;\n btpo_flags = 25705;\n}\n(ladebug) p page\n0x1400fac70=\"\\024\"\n\n(ladebug) p *rel\nstruct RelationData {\n rd_fd = 14;\n rd_nblocks = 0;\n rd_refcnt = 1;\n rd_myxactonly = '\\000';\n rd_isnailed = '\\000';\n rd_isnoname = '\\000';\n rd_nonameunlinked = '\\000';\n rd_am = 0x14024a000;\n rd_rel = 0x1402486d0;\n rd_id = 17030;\n lockInfo = 0x14024e430=\"\\206B\";\n rd_att = 0x1401d3df0;\n rd_rules = 0x0;\n rd_istrat = 0x14024a410;\n rd_support = 0x140249fe0;\n trigdesc = 0x0;\n}\n\n(ladebug) p *(rel->rd_am)\nstruct FormData_pg_am {\n amname = union nameData {\n data = \"btree\";\n alignmentDummy = 1701999714;\n };\n amowner = 2001;\n amkind = 'o';\n amstrategies = 5;\n amsupport = 1;\n amgettuple = 330;\n aminsert = 331;\n amdelete = 332;\n amgetattr = 0;\n amsetlock = 0;\n amsettid = 0;\n amfreetuple = 0;\n ambeginscan = 333;\n amrescan = 334;\n amendscan = 335;\n ammarkpos = 336;\n amrestrpos = 337;\n amopen = 0;\n amclose = 0;\n ambuild = 338;\n amcreate = 0;\n amdestroy = 0;\n}\n\n(ladebug) p *(rel->rd_rel)\nstruct FormData_pg_class {\n relname = union nameData {\n data = \"pg_proc_prosrc_index\";\n alignmentDummy = 1885300592;\n };\n reltype = 0;\n relowner = 2001;\n relam = 403;\n relpages = 22;\n reltuples = 1073;\n relhasindex = '\\000';\n relisshared = '\\000';\n relkind = 'i';\n relnatts = 1;\n relchecks = 0;\n reltriggers = 0;\n relukeys = 0;\n relfkeys = 0;\n relrefs = 0;\n relhaspkey = '\\000';\n relhasrules = '\\000';\n relacl = [0] = 0;\n}\n\n\n(ladebug) p *(rel->rd_att->attrs[0]) [ Only one attribute ]\nstruct FormData_pg_attribute {\n attrelid = 17030;\n attname = union nameData {\n data = \"prosrc\";\n alignmentDummy = 1936683632;\n };\n atttypid = 25;\n attdisbursion = 0;\n attlen = -1;\n attnum = 1;\n attnelems = 0;\n attcacheoff = -1;\n atttypmod = -1;\n attbyval = '\\000';\n attisset = '\\000';\n attalign = 'i';\n attnotnull = '\\000';\n atthasdef = '\\000';\n}\n\n\n",
"msg_date": "Wed, 29 Dec 1999 16:42:45 +0200",
"msg_from": "Adriaan Joubert <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "> Were you the person I told to use pg_upgrade and re-initdb your\n> database? If not, I would recommend that as the fix. You may need to\n> re-enable pg_upgrade by editing the script.\n\nNope, but I've tried this now and it fails miserably for me. I had to edit the file\ncreated by pg_dump quote heavily as I have user-defined types and they required\nsome initialisation before they could be used in the definition of indexes. Anyway,\nI managed to work around that, and pg_upgrade claimed that everything had finished\nsuccessfully. But, although the datafiles were in the right place and the right\nsize all the tables were empty. So some system tables were evidently not\ninitialised correctly. I tried this both with 6.5.2 and 6.5.3, but no luck either\nway.\n\nAny other suggestions would be very welcome.\n\nRegards,\n\nAdriaan\n\n",
"msg_date": "Wed, 29 Dec 1999 17:46:55 +0200",
"msg_from": "Adriaan Joubert <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "pg_proc_prosrc_index is the problem, eh? I'll bet a nickel that you're\nseeing still another manifestation of btree's problems with oversized\nindex entries. (See recent thread 'Error \"vacuum pg_proc\"'.)\n\nCheck to see if you have any functions whose definitions exceed 2700\nbytes, eg with\n\tselect proname from pg_proc where length(prosrc) > 2700;\nIf so, you need to rewrite them to be smaller, perhaps by breaking\nthem into multiple functions.\n\n7.0 should fix this problem, but it's a real hazard in 6.5.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 29 Dec 1999 11:01:36 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index corruption "
},
{
"msg_contents": "> > Were you the person I told to use pg_upgrade and re-initdb\n> your > database? If not, I would recommend that as the fix.\n> You may need to > re-enable pg_upgrade by editing the script.\n> \n> Nope, but I've tried this now and it fails miserably for me. I\n> had to edit the file created by pg_dump quote heavily as I have\n> user-defined types and they required some initialisation before\n> they could be used in the definition of indexes. Anyway, I\n> managed to work around that, and pg_upgrade claimed that everything\n> had finished successfully. But, although the datafiles were in\n> the right place and the right size all the tables were empty.\n> So some system tables were evidently not initialised correctly.\n> I tried this both with 6.5.2 and 6.5.3, but no luck either way.\n\nAll I can say is someone did this recently for a system index problem\nand it worked.\n\n--\n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 29 Dec 1999 14:07:32 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "> pg_proc_prosrc_index is the problem, eh? I'll bet a nickel that you're\n> seeing still another manifestation of btree's problems with oversized\n> index entries. (See recent thread 'Error \"vacuum pg_proc\"'.)\n> \n> Check to see if you have any functions whose definitions exceed 2700\n> bytes, eg with\n> \tselect proname from pg_proc where length(prosrc) > 2700;\n> If so, you need to rewrite them to be smaller, perhaps by breaking\n> them into multiple functions.\n> \n> 7.0 should fix this problem, but it's a real hazard in 6.5.\n\nWow, do we need that 7.0 release!\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 29 Dec 1999 14:09:00 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "Tom Lane wrote:\n\n> pg_proc_prosrc_index is the problem, eh? I'll bet a nickel that you're\n> seeing still another manifestation of btree's problems with oversized\n> index entries. (See recent thread 'Error \"vacuum pg_proc\"'.)\n>\n> Check to see if you have any functions whose definitions exceed 2700\n> bytes, eg with\n> select proname from pg_proc where length(prosrc) > 2700;\n> If so, you need to rewrite them to be smaller, perhaps by breaking\n> them into multiple functions.\n\nYep, I've got two of those. I saw the message about lengths in indexes,\nbut howcome this is relevant for procedures? I thought it would only be an\nindex on name and a pointer into pg_proc? Just asking because I want to\nunderstand how this works.\n\nI'll rewrite them and see whether that fixes it. Thanks a lot for the\nhelp!\n\nAdriaan\n\n",
"msg_date": "Wed, 29 Dec 1999 23:00:08 +0200",
"msg_from": "Adriaan Joubert <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "Adriaan Joubert <[email protected]> writes:\n>> Check to see if you have any functions whose definitions exceed 2700\n>> bytes, eg with\n>> select proname from pg_proc where length(prosrc) > 2700;\n>> If so, you need to rewrite them to be smaller, perhaps by breaking\n>> them into multiple functions.\n\n> Yep, I've got two of those.\n\nBingo ...\n\n> I saw the message about lengths in indexes,\n> but howcome this is relevant for procedures?\n\nIn 6.5 (and before), there's an index on the prosrc field of pg_proc,\nie, the definition of the procedure. There's not any real good reason\nto have such an index, so we've removed it for 7.0 ... but in 6.5 it's\nthere and it creates problems if you have long procedure definitions :-(\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 29 Dec 1999 16:59:04 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index corruption "
},
{
"msg_contents": "> OK, I've got the same problem again. I upgraded to 6.5.3 just in case there\n> was something different, and\n> it makes no difference. Thousands of pg_proc_prosrc_index..<id> files and\n> vacuum just seems to be in and endless loop. I really need to get this\n> pinned down. Any ideas where I could start looking?\n\n I made the patch below against 6.5.2 (you aren't the first\n who had trouble with it). Hopefully it will apply on 6.5.3\n too, haven't checked. It removes the prosrc index. Due to\n the catalog changes you need to dump (BEFORE), reinstall,\n initdb and reload.\n\n Should we eventually put it somewhere on the FTP server and\n have a pointer in the FAQ?\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#========================================= [email protected] (Jan Wieck) #\n\n\nbegin 644 remove_prosrc_idx_6.5.2.diff.gz\nM'XL(\"!^I1S@\"`W)E;6]V95]P<F]S<F-?:61X7S8N-2XR+F1I9F8`U5A[;YM6\nM%/^;?HK35)K`PPT8OZM.BF+<><N2S,ZV5E5E$;A.4&UP`6_QHGSWG7,N$+#!\nM:;6IVZS(IN>>QSWO'_7\\Q0*:;@1QY+X,(__F^-IQ/XK`.W:=Q%F&-\\=^X(D[\nM/[AYZ1+/@>-GC4;C<]0HX\\B'D7`!+#!;0\\,<6@:8@\\'@6;/9?,+&CJS91G$I\nMVRA_^#)M2^\\8P/\\$4$Z2)/*O-XDXWZPFI%%':DZ<BJ7O,?GA%=+=6R=2`*!Q\nM[JS$?'TS7T>A.\\>+^*Z(WZ.&7=H'>`WWET@0WB82))7:>`Y*3KY(31`U)\\XB\nM]X#=9+L6NW:+-+9[A82\"20`B7!STQUTZ<;RKN$1DS:=$*:BF%&%8VP/`I^9_\nM+*S_BPA6%:K5,W1KT,M*E<+J>R)V49YK?QZN11\"I^W'0Z&9*LEDO!?*>RG[A\nMD[%(W-LK.E!OA;/&/#B)'P8ZL&(=XH]BJX.%\"IJ`?XJTXR[#6*C,DI]$(ME$\nM`;`1HCU(.OY]CXK9!#[OE?/,=0(U,POE.R3B+H$&Y1FY-92^)T/9N?2=3\"FD\nMY$>Q':%C?./WY@>FYY:5_%H%=CM(HNTD\\!/?6?I_\"O4;%C4^Z,3#'\\RC>NTG\nML=G5P+@SR@=4O)C.:Q%I8):/IN(F=U2#\\?S*?GME_USBN0S](!'1&Y'@K3<K\nM-?/R,=*',IM%C[G_1F)-K@PNI(K$X@DULM4=Z%:O+5O9>W(3I*U9LPCRT\\-[\nM(&?[\\C50)VH:0V-0OP5,R]1-JRN;BW1+0B^?8`HTCOG77X#Z/$XB=[7FM.6]\nMIL,;^]R>3DYG]M7YR4^VIC'__;-OX86_\\,0\"\\&`V'T_>VB,^45`<7>`Z?\\WE\nM[@>JI,F652BW>#033N3>SK;QJ>/>\"IG6R^G%;'JJ2[:LKBK**C6@Z35N]W6S\nM;17='B\"AX+:R7D1\"%#6E5Z,XY!TVB7_%+O)4O&_JME(8\"<WODKF'^:'?T/=>\nM443$,A;XBWP\"TZ;:T^G%5(>C91A^1)\\7801Y<.%Z\"W&XB5P!@1!>#`O_#M0?\nMG$`[TJ0NG*0+MOI`W_1UH%(WB;^,L5XPE,?Q-N:'G7*M9JFNV6K>BL*UJ@OW\nM\\^2[PY957[V6U=&MCIFC&\"5<+&*1A`MU'$8K&HRT=B+Q1^0G6*?B]_FGC;/4\nM9/6<_W)VQD\\J3<;Q)G`U(-H#3ZS'O9H-$:YU13EN@*Q!:@P:;>D4O)=S[B0H\nM[&E9/>D$-'9_^4=:J[XXZ=`A[0S)MS<+F5SPH'+5/+\"?]Q=K$3E)&/'6+;D%\nMZ-7IV<G('E^]N[2SEC?UM)-Y'E*LVT;=//0#=[GQQ#XLO>6LUQ^7JZN>KZ*R\nMNN7*^GS9WM`Z@(Q;IM[*X08T8!:N!.`<\\VEIAD',79JB&,#UC9ER,DC'$A2]\nM%RP@((4^Q)`A'T6Q$*'M,!1Q'3'L:2BB,D5I[3.4T%45`]T!*3F+R9&3WJ9S\nM[]_QMO5UO*V<('V]W<YRG6FH`.AP5/2;G^ALSC5V5)#=P]W`HNQP>%`@QZV/\nM`O@5$*`.G.@Q)\"3>W!?/^AU*XM@7^R:+\\)U0V5$6\\,H+EM!_B1V_^'I[(CQ@\nM=BW(C!5,\\%3!^%NR^JK2TV_I_7Z6'ES\"`A=KOGSW8WT(5B,/K]:)QYN\\7EGN\nMZP%M&?P`^>HCX;J<I(A$6D`)BZ7-!CY2\"&-&K?5FO_S5H-*-8FZ?\"@<EL2X<\nMI:P?4B3]3U+V:F7EU[RGM6%OI<JH1OJFWN_6UXAIM'33Z!?>#T<V[K*I/9^<\nMC^RWZE[WI5.,B+\")<4'`=4)8#QF`F,)UK+$?U7IJFK).:\\H.+(.J>:%S?7\"I\nMY\"2DD+*8KM#/[M\"LOT/>V0<,(P_7S*-+55Z56S]51\\0OC,[^3*C3E3+E,='2\nM3)N&@:GL/(4Q)'3,06,98>P>5N.+7:X*=-&O1A=/27:&^/94BRTZ`[W;V]TW\nM;Z87].*$\\Z1EE<FS=[/)\",GM`GEJ_S:=7-E2HM4I+%>)2TE-MT!]Q'5XT\"L<\nMG)V<7Y!VI=67E8$@L+GSX0VO*/C>MW$38)?I-7F([T$!`H.5[&%Z/1$>(P4'\nIF99+2$*@_V/(WMU4C>-(WG<SK/%/>U_RLUOI9^\\K^/D76W26Z346````\n`\nend\n",
"msg_date": "Wed, 29 Dec 1999 23:25:57 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "> I made the patch below against 6.5.2 (you aren't the first\n> who had trouble with it). Hopefully it will apply on 6.5.3\n> too, haven't checked. It removes the prosrc index. Due to\n> the catalog changes you need to dump (BEFORE), reinstall,\n> initdb and reload.\n\nGreat! Thanks a lot, I'll rebuild it all and get it back up. A real life-saver -- I was\ngetting quite a bit of flak and Oracle was coming up in conversations ;-(. Now I can at\nleast show them that Postgres response to problems beats anything other db's can offer ;-)\n\n> Should we eventually put it somewhere on the FTP server and\n> have a pointer in the FAQ?\n\nYep, I think so. It is not obvious that this should be a problem (I certainly didn't\nexpect an index on the procedure source) and it causes severe problems.\n\nThanks a lot, Jan!\n\nAdriaan\n\n",
"msg_date": "Thu, 30 Dec 1999 01:10:14 +0200",
"msg_from": "Adriaan Joubert <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "Tom Lane wrote:\n\n> pg_proc_prosrc_index is the problem, eh? I'll bet a nickel that you're\n> seeing still another manifestation of btree's problems with oversized\n> index entries. (See recent thread 'Error \"vacuum pg_proc\"'.)\n>\n> [...]\n>\n> 7.0 should fix this problem, but it's a real hazard in 6.5.\n\n I already posted a patch that removes pg_proc_prosrc_index\n from 6.5.2. This one is definitely not fixable by anything\n else (except changing all functions to <2700).\n\n Anyway, I still think that a new implementation of reindexdb\n would be good. Some of the system indices can cause big, big\n trouble, if they get corrupted. If you would ever be faced\n with a corrupted pg_class_... index, you won't be able to\n dump any more, because the backend will fail to startup at\n all.\n\n I analyzed the problem of recreating system catalog indices\n some weeks ago, and ISTM that during bootstrap operation, ALL\n tuples are visible.\n\n I hacked in a \"drop index\" for the bootstrap parser, and on a\n freshly created DB some hand-made BKI script ran smooth and\n recreated all the indices well. But it failed on the\n regression DB, bacause it bombed out with duplicate errors.\n First I was a little puzzled about it, because I allways\n thought that only vacuum removes index tuples. So it could\n only be the main tuples visibility that prevents from dup\n errors between vacuum times.\n\n Thus, IMHO there should be another command added to the\n bootstrap parser. This would recreate ALL existing indices\n (system and user ones), but tell the visibility code somehow\n to ignore deleted tuples. I don't have the time to do it now,\n so at least I'd like to have a TODO item for it.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Thu, 30 Dec 1999 00:27:16 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "Tom Lane wrote:\n\n> Adriaan Joubert <[email protected]> writes:\n>\n> > I saw the message about lengths in indexes,\n> > but howcome this is relevant for procedures?\n>\n> In 6.5 (and before), there's an index on the prosrc field of pg_proc,\n> ie, the definition of the procedure. There's not any real good reason\n> to have such an index, so we've removed it for 7.0 ... but in 6.5 it's\n> there and it creates problems if you have long procedure definitions :-(\n\n The usage of it is only #ifdef'd out!\n\n It's a very old standing FEATURE, that doesn't work anyhow.\n It has to do with tuple set's, and as far as I read the code\n in question, the (no longer supported either) nested dot\n notation looked for a 'sql' language function returning a set\n of tuples and created that on the fly. Therefore, it checked\n by the required functions source text if it exists.\n\n IIRC the #ifdef is somewhat like SETS_FIXED.\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#========================================= [email protected] (Jan Wieck) #\n\n\n",
"msg_date": "Thu, 30 Dec 1999 00:52:22 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "> -----Original Message-----\n> From: [email protected]\n> [mailto:[email protected]]On Behalf Of Jan Wieck\n> \n> Anyway, I still think that a new implementation of reindexdb\n> would be good. Some of the system indices can cause big, big\n> trouble, if they get corrupted. If you would ever be faced\n> with a corrupted pg_class_... index, you won't be able to\n> dump any more, because the backend will fail to startup at\n> all.\n> \n> I analyzed the problem of recreating system catalog indices\n> some weeks ago, and ISTM that during bootstrap operation, ALL\n> tuples are visible.\n> \n> I hacked in a \"drop index\" for the bootstrap parser, and on a\n> freshly created DB some hand-made BKI script ran smooth and\n> recreated all the indices well. But it failed on the\n> regression DB, bacause it bombed out with duplicate errors.\n> First I was a little puzzled about it, because I allways\n> thought that only vacuum removes index tuples. So it could\n> only be the main tuples visibility that prevents from dup\n> errors between vacuum times.\n> \n> Thus, IMHO there should be another command added to the\n> bootstrap parser. This would recreate ALL existing indices\n> (system and user ones), but tell the visibility code somehow\n> to ignore deleted tuples. I don't have the time to do it now,\n> so at least I'd like to have a TODO item for it.\n>\n\nI may be able to implement reindex command unless you have\nthe time to do it.\n\nDifferent from your suggestion,I would implement it in a non-bootstrap\nstandalone postgres with the new option by which PostgreSQL ignores\nsystem indexes. \n\nComments ?\n\nRegards.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Wed, 5 Jan 2000 16:42:27 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: [HACKERS] Index corruption"
},
{
"msg_contents": "> I may be able to implement reindex command unless you have\n> the time to do it.\n>\n> Different from your suggestion,I would implement it in a non-bootstrap\n> standalone postgres with the new option by which PostgreSQL ignores\n> system indexes.\n>\n> Comments ?\n\nThat would be really useful. BTW, I've been running the patched database\nfora little while now and all my problems seem to have gone away. Thanks\na lot to all of you!\n\nAdriaan\n\n",
"msg_date": "Wed, 05 Jan 2000 10:13:13 +0200",
"msg_from": "Adriaan Joubert <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Index corruption"
},
{
"msg_contents": "Hiroshi Inoue wrote:\n\n> > -----Original Message-----\n> > From: [email protected]\n> > [mailto:[email protected]]On Behalf Of Jan Wieck\n>\n> > Thus, IMHO there should be another command added to the\n> > bootstrap parser. This would recreate ALL existing indices\n> > (system and user ones), but tell the visibility code somehow\n> > to ignore deleted tuples. I don't have the time to do it now,\n> > so at least I'd like to have a TODO item for it.\n> >\n>\n> I may be able to implement reindex command unless you have\n> the time to do it.\n>\n> Different from your suggestion,I would implement it in a non-bootstrap\n> standalone postgres with the new option by which PostgreSQL ignores\n> system indexes.\n\n Sounds good to me.\n\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#========================================= [email protected] (Jan Wieck) #\n\n\n\n",
"msg_date": "Wed, 05 Jan 2000 15:34:14 +0100",
"msg_from": "Jan Wieck <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index corruption"
}
] |
[
{
"msg_contents": "OK I have:\n\t\n\t8-space tabs:\tTom Lane, Peter, Vince, Massimo\n\t4-space tabs: Bruce, Andreas\n\t\n\topen bracket on if () line -\n\tyes:\tMassimo, Peter\n\tno:\tBruce\n\n\nMore votes?\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 23 Dec 1999 16:40:36 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Source code format votes"
},
{
"msg_contents": "\nOn 23-Dec-99 Bruce Momjian wrote:\n> OK I have:\n> \n> 8-space tabs: Tom Lane, Peter, Vince, Massimo\n> 4-space tabs: Bruce, Andreas\n> \n> open bracket on if () line -\n> yes: Massimo, Peter\n> no: Bruce\n> \n> \n> More votes?\n\nCorrection. I don't want 8 space anythings. Move me to 4 please.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n 128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n",
"msg_date": "Thu, 23 Dec 1999 16:57:24 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: [HACKERS] Source code format votes"
},
{
"msg_contents": "> \n> On 23-Dec-99 Bruce Momjian wrote:\n> > OK I have:\n> > \n> > 8-space tabs: Tom Lane, Peter, Massimo\n> > 4-space tabs: Bruce, Andreas, Vince, Vadim\n> > \n> > open bracket on if () line -\n> > yes: Massimo, Peter\n> > no: Bruce, Vadim\n\nOK, sorry Vince. I was confused. Here is the updated tally. We can\nkeep voting until I run pgindent for 7.0.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 23 Dec 1999 17:10:51 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "\nOn 23-Dec-99 Bruce Momjian wrote:\n>> \n>> On 23-Dec-99 Bruce Momjian wrote:\n>> > OK I have:\n>> > \n>> > 8-space tabs: Tom Lane, Peter, Massimo\n>> > 4-space tabs: Bruce, Andreas, Vince, Vadim\n>> > \n>> > open bracket on if () line -\n>> > yes: Massimo, Peter\n>> > no: Bruce, Vadim\n> \n> OK, sorry Vince. I was confused. Here is the updated tally. We can\n> keep voting until I run pgindent for 7.0.\n\nI just realized I'm not counted on the YES vote for the bracket. Can\nyou add me in there?\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n 128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n",
"msg_date": "Thu, 23 Dec 1999 17:53:46 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "OK you have:\n\t\n\t8-space tabs:\tTom Lane, Peter, Vince, Massimo, Jan\n\t4-space tabs: Bruce, Andreas\n\n\topen bracket on if () line -\n\tyes:\tMassimo, Peter\n\tno:\tBruce, Jan\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#========================================= [email protected] (Jan Wieck) #\n\n",
"msg_date": "Fri, 24 Dec 1999 00:13:37 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> \topen bracket on if () line -\n> \tyes:\tMassimo, Peter\n> \tno:\tBruce\n\n> More votes?\n\nNo on that one. I actually prefer \"if () {\" myself, but not enough\nto think that we should engage in wholesale reformatting of the source.\nOur existing layout convention is not broken (unlike the tab situation ;-))\nso don't fix it.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 23 Dec 1999 19:49:25 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes "
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> > \topen bracket on if () line -\n> > \tyes:\tMassimo, Peter\n> > \tno:\tBruce\n> \n> > More votes?\n> \n> No on that one. I actually prefer \"if () {\" myself, but not enough\n> to think that we should engage in wholesale reformatting of the source.\n> Our existing layout convention is not broken (unlike the tab situation ;-))\n> so don't fix it.\n\npgindent can be changed very easily to fix that if you prefer. The\nchange is no extra work. Let me put you down for yes on that.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 23 Dec 1999 21:12:41 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "\nAdded.\n\n> OK you have:\n> \t\n> \t8-space tabs:\tTom Lane, Peter, Vince, Massimo, Jan\n> \t4-space tabs: Bruce, Andreas\n> \n> \topen bracket on if () line -\n> \tyes:\tMassimo, Peter\n> \tno:\tBruce, Jan\n> \n> Jan\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> #========================================= [email protected] (Jan Wieck) #\n> \n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 23 Dec 1999 22:55:57 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "On Thu, 23 Dec 1999, Bruce Momjian wrote:\n\n> OK I have:\n> \t\n> \t8-space tabs:\tTom Lane, Peter, Vince, Massimo\n\n(I'm still for 4 space indent though.)\n\n> \t4-space tabs: Bruce, Andreas\n> \t\n> \topen bracket on if () line -\n> \tyes:\tMassimo, Peter\n> \tno:\tBruce\n\nI really don't mind this too much. I'm getting used to it.\n\n> \n> \n> More votes?\n> \n> \n\n-- \nPeter Eisentraut Sernanders vaeg 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n",
"msg_date": "Fri, 24 Dec 1999 22:40:50 +0100 (MET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "> On Thu, 23 Dec 1999, Bruce Momjian wrote:\n> \n> > OK I have:\n> > \t\n> > \t8-space tabs:\tTom Lane, Peter, Vince, Massimo\n> \n> (I'm still for 4 space indent though.)\n\nYes, everyone seems to like the current indent value.\n\n> \n> > \t4-space tabs: Bruce, Andreas\n> > \t\n> > \topen bracket on if () line -\n> > \tyes:\tMassimo, Peter\n> > \tno:\tBruce\n> \n> I really don't mind this too much. I'm getting used to it.\n\nLet me know if anyone wants their vote changed.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 24 Dec 1999 17:03:56 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Source code format votes"
}
] |
[
{
"msg_contents": "This is quoted mail from Vadim.\n\n> Bruce Momjian wrote:\n> > \n> > OK I have:\n> > \n> > 8-space tabs: Tom Lane, Peter, Vince, Massimo\n> > 4-space tabs: Bruce, Andreas\n> ^^^^^^^^^^^^^\n> + me\n\nYea. I am so glad you were able to vote. I was getting clobbered.\nWe still may lose, but now we have a chance. :-)\n\n> \n> > \n> > open bracket on if () line -\n> > yes: Massimo, Peter\n> > no: Bruce\n> ^^^\n> + me\n\nCC'ed to hackers list for all to see, so they don't think I am making\nthis up.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 23 Dec 1999 16:55:57 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "Been busy and missed this discussion. Is it too late to vote?\n\n> > > 8-space tabs: Tom Lane, Peter, Vince, Massimo\n> > > 4-space tabs: Bruce, Andreas\n> > ^^^^^^^^^^^^^\n> > + me\n\nAnd me for 4 space tabs.\n\n> > > open bracket on if () line -\n> > > yes: Massimo, Peter\n> > > no: Bruce\n> > ^^^\n> > + me\n\nMe for next line too. It just seems so easy to see the blocks when the\nbrackets line up _and_ are on a line by themselves.\n\nWas there a vote for brackets around 1 line statements? If so I vote no.\n\n> CC'ed to hackers list for all to see, so they don't think I am making\n> this up.\n\nNo one would ever believe that of you, Bruce.\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": "Thu, 23 Dec 1999 17:58:57 -0500 (EST)",
"msg_from": "\"D'Arcy\" \"J.M.\" Cain <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "> Me for next line too. It just seems so easy to see the blocks when the\n> brackets line up _and_ are on a line by themselves.\n\nI agree, but many don't, hence the vote.\n\n> \n> Was there a vote for brackets around 1 line statements? If so I vote no.\n\nNo one has mentioned that, and I have removed most of them.\n\n> \n> > CC'ed to hackers list for all to see, so they don't think I am making\n> > this up.\n> \n> No one would ever believe that of you, Bruce.\n\nI want to make sure the voting remains unbiased, even though I am\ntallying the votes.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 23 Dec 1999 22:55:23 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Source code format votest"
}
] |
[
{
"msg_contents": "Announcing PostgreSQL 6.5.3-3 and 6.5.3-3nl RPMs.\n\nThese RPMs are once again primarily bug fix RPMs, with the following additions:\n\n* The header files necessary to build SPI applications are now included in the\n/usr/include/pgsql tree in the appropriate places. To build an SPI program,\n#include \"spi.h\" and use -I/usr/include/pgsql. \n\n* The libpq++.H header (note the capital H...) was left out of previous\npackages. \n\n* The locale enabled RPMs now also have MultiByte enabled, and set to a default\nof SQL_ASCII. \n\n* The locale enabled RPMS include /usr/bin/pg_encoding, to set the MultiByte\nencoding.\n\nRPMs available for immediate download from\nhttp://www.ramifordistat.net/postgres -- for bulk download, use 'wget -m\nhttp://www.ramifordistat.net/postgres'.\n\nChangelog from 6.5-1 to 6.5.3-3:\n* Thu Dec 23 1999 Lamar Owen <[email protected]>\n- 6.5.3-3 and 6.5.3-3nl RPMs.\n- --with-mb=SQL_ASCII enabled.\n\n* Wed Dec 22 1999 Lamar Owen <[email protected]>\n- SPI headers in -devel\n- Fixed libpq++.H funniness -- fully corrected in CURRENT\n\n* Fri Nov 26 1999 Lamar Owen <[email protected]>\n- Corrected security problem of /var/lib/pgsql being mode 755.\n- /usr/lib/pgsql/backup permissions also a potential hole, though not \n-- as serious as the /var/lib/pgsql hole \n- Removed PostgreSQL-HOWTO until further notice. This HOWTO is worse \n-- than having no documentation at all in its present form. When it is \n-- corrected for accuracy and conciseness, it will be reinstated. \n- Documentation updates in README.rpm \n- Corrected some misinformation in /etc/rc.d/init.d/postgresql \n\n* Fri Nov 05 1999 Lamar Owen <[email protected]> \n- Add ARMV41 support, thanks to Mark Knox <[email protected]> \n- Add patches for ARMV41 \n-- adds a 'linux_arm' template - Removed Excludearch for armv41 \n\n* Thu Nov 04 1999 Lamar Owen <[email protected]> \n- Release 6.5.3-1 \n- ODBC odbcinst.ini in /usr/lib/pgsql (postgresql-odbc) \n- ALPHA patchset unmodified from 6.5.2 \n-- tested by Ryan Kirkpatrick \n- Documentation changes and additions in README.rpm \n\n* Mon Nov 01 1999 Lamar Owen <[email protected]> \n- Initial pre-6.5.3 build \n-- 6.5.3-0.1 \n-- built from REL6_5_PATCHES CVS checkout \n- pgaccess no longer a separate source file \n-- 6.5.3 has pgaccess 0.98 fully \n-- integrated \n- fixed up patches \n-- pgaccess patch, gram.y patch, and src/interfaces/Makefile \n-- perl5 -> perl patch mainlined. \n\n* Sat Sep 25 1999 Dale Lovelace <[email protected]> \n- Fix init script \n- fix README.rpm \n\n* Sat Sep 25 1999 Jeff Johnson <[email protected]> \n- Red Hat 6.1 release candidate. \n\n* Fri Sep 24 1999 Jeff Johnson <[email protected]> \n- apply arithmetic operator patch to gram.y. \n\n* Wed Sep 22 1999 Jeff Johnson <[email protected]> \n- merge postgresql-6.5.2-0.2lo changes. \n- Note: the postgresql description refers to postgresql-data but that can't be\nchanged until after 6.1 ships. \n\n* Tue Sep 21 1999 Jeff Johnson <[email protected]> \n- merge postgresql-6.5.1-0.7lo changes. Thanks Lamar!\n- use uid = 40 for user postgres (will affect new installs only). \n- postgresql-server needs prereq on /usr/sbin/useradd. \n\n* Mon Sep 20 1999 Lamar Owen <[email protected]> \n- 6.5.2-0.2lo \n- Upgrade to 6.5.2 \n- Add some versioning to the init script \n-- source is postgresql.init.VERSION \n- Added some intelligence to init script \n- Cleaned up the migration script packaging \n-- now in a tarball \n- Consolidated some patches \n- Added the JDK 1.2 JDBC jar to the existing JDK1.1 jar. \n\n* Sat Sep 18 1999 Lamar Owen <[email protected]> \n- 0.7lo - First stab at integrating modified versions of the Debian migration scripts. \n-- Courtesy Oliver Elphick, Debian package maintainer, PostgreSQL Global \n-- Development Group. \n- /usr/lib/pgsql/backup/pg_dumpall_new \n-- a modifed pg_dumpall used in the \n-- migration \n-- modified to work with the older executables. \n- /usr/bin/postgresql_dump \n-- the migration script.\n- Upgrade strategy: \n--1.) %pre for main package saves old package's executables \n--2.) the postgresql init script in -server detects PGDATA existence \n-- and version, notifies user if upgrade is necessary \n--3.) Rather than fully automating upgrade, the tools are provided: \n-- a.) /usr/bin/postgresql-dump \n-- b.) /usr/lib/pgsql/backup/pg_dumpall_new \n-- c.) The executables backed up by %pre in /usr/lib/pgsql/backup \n--4.) Documentation on RPM differences and upgrades in README.rpm \n--5.) A fully automatic upgrade can be facilitated by some more code \n-- in /etc/rc.d/init.d/postgresql, if desired. \n- added documentation for rpm setup, and upgrade (README.rpm) \n- added newer man pages from Thomas Lockhart \n- Put the PL's in the right place \n-- /usr/lib/pgsql, not /usr/lib. My error. \n- Added Requires: postgresql = %{version} for all sub packages.\n- Need to reorganize sources in next release, as the current number of source \n-- files is a little large. \n\n* Tue Sep 07 1999 Cristian Gafton <[email protected]> \n- upgraded pgaccess to the latest 0.98 stable version \n- fix braindead pgaccess installation and add pgaccess dosucmenattaion to\nthe package containing pgaccess rather than main package \n- add missing templates tp the /usr/lib/pgsql directory \n- added back the PostgreSQL howto (I wish people will STOP removing\ndocumentation from this package!) \n- get rid of the perl handling overkill \n- \"chkconfig --del\" should be done in the server package, not the main\npackage \n- make server packeg own only /etc/rc.d/init.d/postgresql, not the whole\n/etc/rc.d (doh!) \n- don't ship OS2 executable client as documenatation... \n- if we have a -tcl subpackage, make sure that other packages don't need tcl\nanymore by moving tcl-dependent binaries in the -tcl package... [pltcl.so] \n- if we are using /sbin/chkconfig we don't need the /etc/rc.d/rc?.d symlinks \n\n* Sat Sep 4 1999 Jeff Johnson <[email protected]> \n- use _arch not (unknown!) buildarch macro (#4913). \n\n* Fri Aug 20 1999 Jeff Johnson <[email protected]> \n- obsolete postgres-clients (not conflicts). \n\n* Thu Aug 19 1999 Jeff Johnson <[email protected]> \n- add to Red Hat 6.1. \n\n* Wed Aug 11 1999 Lamar Owen <[email protected]> \n- Release 3lo \n- Picked up pgaccess README. \n- Built patch set for rpm versus tarball idiosyncrasies: \n-- munged some paths in the regression tests (_OBJWD_), trigger functions \n-- munged USER for regression tests. \n-- Added perl and python examples \n-- required patching the shebang to drop \n-- local in /usr/local/bin \n- Changed rc.d level from S99 to S75, as there are a few server daemons that \n-- might actually need to load AFTER pgsql \n-- AOLserver is an example. \n- config.guess included in server package by default \n-- used by regress tests. \n- Preliminary test subpackage, containing entire src/test tree. \n- Prebuild of binaries in the test subpackage. \n- Added pgaccess-0.97 beta as /usr/bin/pgaccess97 for testing \n- Removed the DATABASE-HOWTO; it was SO old, and the newer release of it \n-- is a stock part of the RedHat HOWTOS package. \n- Put in the RIGHT postgresql.init ('/etc/rc.d/init.d/postgresql') \n- Noted that the perl client is operational. \n\n* Fri Aug 6 1999 Lamar Owen <[email protected]> \n- Release 2lo \n- Added alpha patches courtesy Ryan Kirkpatrick and Uncle George \n- Renamed lamar owen series of RPMS with release of #lo \n- Put Ramifordistat as vendor and URL for lamar owen RPM series, until non-beta \n-- release coordinated with PGDG. \n\n* Mon Jul 19 1999 Lamar Owen <[email protected]> \n- Correct some file misappropriations: \n-- /usr/lib/pgsql was in wrong package \n-- createlang, destroylang, and vacuumdb now in main package \n-- ipcclean now in server subpackage \n-- The static libraries are now in the devel subpackage \n-- /usr/lib/plpgsql.so and /usr/lib/pltcl.so now in server \n- Cleaned up some historical artifacts for readability \n-- left references to these artifacts in the changelog \n\n* Sat Jun 19 1999 Thomas Lockhart <[email protected]> \n- deprecate clients rpm, and define a server rpm for the backend \n- version 6.5 \n- updated pgaccess to version 0.96 \n- build ODBC interface library \n- split tcl and ODBC packages into separate binary rpms\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Thu, 23 Dec 1999 22:49:17 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": true,
"msg_subject": "Announcing PostgreSQL 6.5.3-3 and 6.5.3-3nl RPMs."
}
] |
[
{
"msg_contents": "Current tally:\n\n 8-space tabs: Tom Lane, Peter, Massimo, Jan\n 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n \n open bracket on if () line -\n yes: Massimo, Peter, Vince, Tom Lane\n no: Bruce, Vadim, D'Arcy, Jan\n\nMan, both votes look very close.\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 23 Dec 1999 22:59:04 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Source code format votes"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> Man, both votes look very close.\n\nIf there's not a clear consensus to change, I think we have to stick\nwith what we have. (Sigh.)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 24 Dec 1999 00:09:58 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes "
},
{
"msg_contents": "\n\nBruce Momjian wrote:\n\n> Current tally:\n>\n> 8-space tabs: Tom Lane, Peter, Massimo, Jan\n> 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n>\n\nAdd me for 8-space tabs.\n\n> open bracket on if () line -\n> yes: Massimo, Peter, Vince, Tom Lane\n> no: Bruce, Vadim, D'Arcy, Jan\n\nno:(current style ?)\n\nRegards.\n\nHiroshi Inoue\[email protected]\n\n\n",
"msg_date": "Fri, 24 Dec 1999 14:20:53 +0900",
"msg_from": "Hiroshi Inoue <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "On Thu, Dec 23, 1999 at 10:59:04PM -0500, Bruce Momjian wrote:\n> Current tally:\n> \n> 8-space tabs: Tom Lane, Peter, Massimo, Jan\n\nCount me in on 8.\n\n> 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n> \n> open bracket on if () line -\n> yes: Massimo, Peter, Vince, Tom Lane\n> no: Bruce, Vadim, D'Arcy, Jan\n\nI have no problems with both. But if I have to choose I say: no.\n\nMichael\n-- \nMichael Meskes | Go SF 49ers!\nTh.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!\nTel.: (+49) 2431/72651 | Use Debian GNU/Linux!\nEmail: [email protected] | Use PostgreSQL!\n",
"msg_date": "Fri, 24 Dec 1999 10:52:37 +0100",
"msg_from": "Michael Meskes <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> > Man, both votes look very close.\n> \n> If there's not a clear consensus to change, I think we have to stick\n> with what we have. (Sigh.)\n\nDon't give up now, Tom. With today's votes, you are winning.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 24 Dec 1999 11:13:39 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Source code format votes"
}
] |
[
{
"msg_contents": " I've been thinking of taking a shot at implementing replication between\ndistributed servers. What I'm looking for at this point are gaping holes in\nmy reasoning/plans/etc. I had planned on doing this in Python but if that\nproves to be troublesome (from a performance standpoint) then I will code\nthe thing in C. Though to be honest I'm not expecting that much trouble...\n\n What I'm *not* talking about here is running distributed queries\n\n Here's the replication system in a nutshell.\n\n 1) Using a configuration file format yet to be determined, define values\nwhich denote: 1) the databases to replicate, 2) the tables to be replicated\n[possibly, primary key information as well], and 3) the servers to be\nincluded in the 'conversation.' This configuration file be a database on a\nPostgreSQL server or a standard text file. Other information in this\n\n 2) Programatically add a column to represent the last time a row was\nupdated. This column will be named pgr_time or some other long column name\nwhich won't be easily confused with user columns. If I read the\ndocumentation correctly all dates and times are stored as Zulu (GT) time\ncorrect? This should take care of time zones and the like. Further\ndirection (or a 'hey dummy, read this page') would be helpful here.\n\n 3) Programatically create plpgsql triggers to update the PGR_TIME field\non all inserts, updates. These triggers will call a plpgsql function to\nupdate the field. The naming scheme will be\n<table_name>_replicate_update_function and\n<table_name>_replicate_update_trigger.\n\n 4) This program will be a stand-alone application which can be fired off\nvia cron or whatever scheduling application is used at the local site.\n\n 5) If you run the applet from the command line a GUI will pop up\nallowing you to change replication settings or whatever. Running the applet\nwith any commandline will start the replication process. Further\ncommandline processing can take place to only replicate with one server or\nshow the status of the last or current replication attempts.\n\n Replication, using this scheme anyway, is a simple matter of comparing a\nfew dates: 1) Give me a list of all rows which changed from the last\nreplication time. Using these rows, build a list of rows on the local\nserver and start comparing dates stored in the remote/local PGR_TIME field.\nDepending on how the rows compare to each other, update the local or remote\ntables.\n\n Some kind of strategy will have to be developed to determine the depth\nof the replication in the row itself. Do I do full row replication or do I\ndo fine grained (column level) replication? I'd prefer column level but\nI'll probably start at row level with a \"most current date/time stamp wins\"\nstrategy as it's the easiest to get going.\n\n I can see some serious performance problems as tables get huge (we're\ntalking a ton of network chit-chat here). How much is acceptable?\n\n I have a problem with #2 and #3 from the standpoint that I don't like\ntools \"automagically\" carressing my data if I can help it. That's when the\ntesting comes into play. On the flip side, a feature will have to be put in\nplace to clean up a replica (remove all replication functions/fields/etc)\nfrom a database.\n\n I havn't talked about security yet either... Do I write code to handle\nthe system catalogs as well? Or do I just stick to pushing data around?\n\n Any \"you're insane, why don't you just run home to momma\" comments?\n\n\n\n Damond\n\n\n\n",
"msg_date": "Fri, 24 Dec 1999 01:22:29 -0500",
"msg_from": "\"Damond Walker\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Replication"
}
] |
[
{
"msg_contents": "I'd prefer 8-space tabs, mainly because I have to set emacs to 4-space\nevery time I enter a source file :-)\n\nPeter\n\n-- \nPeter Mount\nEnterprise Support\nMaidstone Borough Council\nAny views stated are my own, and not those of Maidstone Borough Council.\n\n\n\n-----Original Message-----\nFrom: Bruce Momjian [mailto:[email protected]]\nSent: Thursday, December 23, 1999 9:41 PM\nTo: PostgreSQL-development\nSubject: [HACKERS] Source code format votes\n\n\nOK I have:\n\t\n\t8-space tabs:\tTom Lane, Peter, Vince, Massimo\n\t4-space tabs: Bruce, Andreas\n\t\n\topen bracket on if () line -\n\tyes:\tMassimo, Peter\n\tno:\tBruce\n\n\nMore votes?\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania\n19026\n\n************\n",
"msg_date": "Fri, 24 Dec 1999 08:56:08 -0000",
"msg_from": "Peter Mount <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] Source code format votes"
},
{
"msg_contents": "Peter Mount <[email protected]> writes:\n> I'd prefer 8-space tabs, mainly because I have to set emacs to 4-space\n> every time I enter a source file :-)\n\nNot if you know how to configure Emacs properly ;-)\n\nYou need to put two things in your ~/.emacs. First you need a\nsuitable mode-setting command, for which I use\n\n; Cmd to set tab stops &etc for working with PostgreSQL code\n(defun pgsql-c-mode ()\n \"Set PostgreSQL C indenting conventions in current buffer.\"\n (interactive)\n (c-mode)\t\t\t\t; make sure major mode is right\n (setq tab-width 4)\t\t\t; adjust to nonstandard tab width\n (c-set-style \"bsd\")\t\t\t; indent conventions are BSD\n (c-set-offset 'case-label '+)\t\t; except we indent case labels\n)\n\nNow the above can be invoked by hand, but Peter E. showed me the\nfollowing trick for having it called automatically: add entries to your\nauto-mode-alist that match both the start and end of the pathname,\nso that pgsql-c-mode is automatically called for C files living in a\nparticular region of your filesystem. Mine looks like\n\n(setq auto-mode-alist\n (cons '(\"\\\\`/home/postgres/.*\\\\.[chyl]\\\\'\" . pgsql-c-mode)\n\t (cons '(\"\\\\`/home/tgl/pgsql/.*\\\\.[chyl]\\\\'\" . pgsql-c-mode)\n\t\t auto-mode-alist)))\n\nThis has the effect of setting Pgsql mode automatically for any .c, .h,\n.y, or .l file underneath either /home/postgres/ or /home/tgl/pgsql/.\nAdjust to taste and never think about tabs again.\n\nBTW, Bruce suggested adding Local-variables settings to all the source\nfiles to push Emacs into making the right settings, but I much prefer\ndoing it as above. Local-variables is an insecure feature if you ask\nme; I keep it disabled.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 24 Dec 1999 10:06:36 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes "
},
{
"msg_contents": "Current vote totals:\n\n(7)\t8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter M.,\n\t\t\tMichael\n(5)\t4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n\n \n\topen bracket on if () line -\n(5)\tyes: Massimo, Peter, Vince, Tom Lane, Peter M.\n(6)\tno: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 24 Dec 1999 11:24:06 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "> Peter Mount <[email protected]> writes:\n> > I'd prefer 8-space tabs, mainly because I have to set emacs to 4-space\n> > every time I enter a source file :-)\n> \n> Not if you know how to configure Emacs properly ;-)\n> \n> You need to put two things in your ~/.emacs. First you need a\n> suitable mode-setting command, for which I use\n> \n> ; Cmd to set tab stops &etc for working with PostgreSQL code\n> (defun pgsql-c-mode ()\n> \"Set PostgreSQL C indenting conventions in current buffer.\"\n> (interactive)\n> (c-mode)\t\t\t\t; make sure major mode is right\n> (setq tab-width 4)\t\t\t; adjust to nonstandard tab width\n> (c-set-style \"bsd\")\t\t\t; indent conventions are BSD\n> (c-set-offset 'case-label '+)\t\t; except we indent case labels\n> )\n> \n> Now the above can be invoked by hand, but Peter E. showed me the\n> following trick for having it called automatically: add entries to your\n> auto-mode-alist that match both the start and end of the pathname,\n> so that pgsql-c-mode is automatically called for C files living in a\n> particular region of your filesystem. Mine looks like\n> \n> (setq auto-mode-alist\n> (cons '(\"\\\\`/home/postgres/.*\\\\.[chyl]\\\\'\" . pgsql-c-mode)\n> \t (cons '(\"\\\\`/home/tgl/pgsql/.*\\\\.[chyl]\\\\'\" . pgsql-c-mode)\n> \t\t auto-mode-alist)))\n> \n\nDevelopers FAQ updated with this macro.\n\n> This has the effect of setting Pgsql mode automatically for any .c, .h,\n> .y, or .l file underneath either /home/postgres/ or /home/tgl/pgsql/.\n> Adjust to taste and never think about tabs again.\n> \n> BTW, Bruce suggested adding Local-variables settings to all the source\n> files to push Emacs into making the right settings, but I much prefer\n> doing it as above. Local-variables is an insecure feature if you ask\n> me; I keep it disabled.\n\nOK. I just know some developers added them on their own, so it\ncertainly is an issue for them.\n\nAlso, is there a way to add a dot-file in a directory to control default\nformatting, but still allow the main .emacs to be read? .exrc is used\nfor vi and it controls formatting for all files edited in that\ndirectory.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 24 Dec 1999 11:43:19 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "D'Arcy,\n\n your signature fits here very well, I think...\n\nOn Fri, 24 Dec 1999, Bruce Momjian wrote:\n> Current vote totals:\n> \n> (7)\t8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter M.,\n> \t\t\tMichael\n> (5)\t4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n> \n> \n> \topen bracket on if () line -\n> (5)\tyes: Massimo, Peter, Vince, Tom Lane, Peter M.\n> (6)\tno: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.\n\nOleg.\n---- \n Oleg Broytmann http://members.xoom.com/phd2/ [email protected]\n Programmers don't die, they just GOSUB without RETURN.\n\n",
"msg_date": "Fri, 24 Dec 1999 16:56:03 +0000 (GMT)",
"msg_from": "Oleg Broytmann <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n>> BTW, Bruce suggested adding Local-variables settings to all the source\n>> files to push Emacs into making the right settings, but I much prefer\n>> doing it as above. Local-variables is an insecure feature if you ask\n>> me; I keep it disabled.\n\n> OK. I just know some developers added them on their own, so it\n> certainly is an issue for them.\n\nYes, I notice Thomas has all of the .sgml files set up with\nLocal-variables settings. I think that adding a pgsql-sgml-mode\nalong the same lines as I just illustrated would be a much better\nway of handling it.\n\n> Also, is there a way to add a dot-file in a directory to control default\n> formatting, but still allow the main .emacs to be read?\n\nI don't think so. If there were, it'd have the same kinds of security\nrisks as Local-variables has (visit someone else's file, auto-execute\nsomeone else's code ... not cool).\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 24 Dec 1999 12:21:30 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes "
},
{
"msg_contents": "\nOn 24-Dec-99 Tom Lane wrote:\n> Bruce Momjian <[email protected]> writes:\n>>> BTW, Bruce suggested adding Local-variables settings to all the source\n>>> files to push Emacs into making the right settings, but I much prefer\n>>> doing it as above. Local-variables is an insecure feature if you ask\n>>> me; I keep it disabled.\n> \n>> OK. I just know some developers added them on their own, so it\n>> certainly is an issue for them.\n> \n> Yes, I notice Thomas has all of the .sgml files set up with\n> Local-variables settings. I think that adding a pgsql-sgml-mode\n> along the same lines as I just illustrated would be a much better\n> way of handling it.\n\nUmm.. That might've been me. I reformatted all the sgml files last\nyear and added the missing close tags. I seem to recall having some\nproblems with saving files and my preferences - too new to xemacs at\nthe time.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n 128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n",
"msg_date": "Fri, 24 Dec 1999 12:52:17 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "> >> OK. I just know some developers added them on their own, so it\n> >> certainly is an issue for them.\n> > Yes, I notice Thomas has all of the .sgml files set up with\n> > Local-variables settings. I think that adding a pgsql-sgml-mode\n> > along the same lines as I just illustrated would be a much better\n> > way of handling it.\n\nYeah, probably. So far it hasn't been a problem for the large number\nof sgml doc writers (note heavy sarcasm ;)\n\n> Umm.. That might've been me. I reformatted all the sgml files last\n> year and added the missing close tags. I seem to recall having some\n> problems with saving files and my preferences - too new to xemacs at\n> the time.\n\nNope, they've been there from the beginning...\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Fri, 24 Dec 1999 19:05:46 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes"
},
{
"msg_contents": "\nI'm indifferent on the tabs, but like seeing the open bracket on the if\nand else lines ...\n\nif {\n} else {\n}\n\n\nMarc G. Fournier [email protected]\nSystems Administrator @ hub.org \nscrappy@{postgresql|isc}.org ICQ#7615664\n\nOn Fri, 24 Dec 1999, Bruce Momjian wrote:\n\n> Current vote totals:\n> \n> (7)\t8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter M.,\n> \t\t\tMichael\n> (5)\t4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n> \n> \n> \topen bracket on if () line -\n> (5)\tyes: Massimo, Peter, Vince, Tom Lane, Peter M.\n> (6)\tno: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.\n> \n> \n> -- \n> Bruce Momjian | http://www.op.net/~candle\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n> \n> ************\n> \n> \n\n",
"msg_date": "Fri, 24 Dec 1999 21:15:12 -0500 (EST)",
"msg_from": "\"Marc G. Fournier\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votes"
}
] |
[
{
"msg_contents": "Yes for the open-bracket on if() on line.\n\nAlso, remember that for Java, // marks the begining of an inline\ncomment, terminating at the end-of-line.\n\n-----Original Message-----\nFrom: Bruce Momjian [mailto:[email protected]]\nSent: Friday, December 24, 1999 3:59 AM\nTo: PostgreSQL-development\nSubject: [HACKERS] Source code format votes\n\n\nCurrent tally:\n\n 8-space tabs: Tom Lane, Peter, Massimo, Jan\n 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n \n open bracket on if () line -\n yes: Massimo, Peter, Vince, Tom Lane\n no: Bruce, Vadim, D'Arcy, Jan\n\nMan, both votes look very close.\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania\n19026\n\n************\n",
"msg_date": "Fri, 24 Dec 1999 09:31:21 -0000",
"msg_from": "Peter Mount <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] Source code format votes"
}
] |
[
{
"msg_contents": "Java's ok with them removed from 1 line statements, but perl requires\nthe brackets.\n\nPeter\n\n-----Original Message-----\nFrom: Bruce Momjian [mailto:[email protected]]\nSent: Friday, December 24, 1999 3:55 AM\nTo: D'Arcy J.M. Cain\nCc: [email protected]; [email protected]\nSubject: Re: [HACKERS] Source code format votest\n\n\n> Me for next line too. It just seems so easy to see the blocks when\nthe\n> brackets line up _and_ are on a line by themselves.\n\nI agree, but many don't, hence the vote.\n\n> \n> Was there a vote for brackets around 1 line statements? If so I vote\nno.\n\nNo one has mentioned that, and I have removed most of them.\n\n> \n> > CC'ed to hackers list for all to see, so they don't think I am\nmaking\n> > this up.\n> \n> No one would ever believe that of you, Bruce.\n\nI want to make sure the voting remains unbiased, even though I am\ntallying the votes.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania\n19026\n\n************\n",
"msg_date": "Fri, 24 Dec 1999 09:32:45 -0000",
"msg_from": "Peter Mount <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] Source code format votest"
},
{
"msg_contents": "> Java's ok with them removed from 1 line statements, but perl requires\n> the brackets.\n\nAs does tcl. Fortunately, pgindent doesn't touch those files.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 24 Dec 1999 11:18:42 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format votest"
}
] |
[
{
"msg_contents": "Hi,\n\nI know that time travel is not supported any more\nbut has anyone written a tool that lets you extract \nold tuples from a table file ?\n\nWe have a customer who demanded the ability to permanently \ndelete records and who now wants them back.\n\nThey have not run vacuum on their tables, so the data \nshould still be there.\n\nSo, has anyone written such tool or should I roll my own ?\n\n----------------\nHannu\n",
"msg_date": "Fri, 24 Dec 1999 11:56:19 +0200",
"msg_from": "Hannu Krosing <[email protected]>",
"msg_from_op": true,
"msg_subject": "Is there a tool to get at old/deleted tuples ?"
}
] |
[
{
"msg_contents": " Hi,\n\n I got this error vacuuming pg_proc:\n\nERROR: _bt_endpoint: leftmost page (20) has not leftmost flag\n\n It's postgresql 6.5.3 (Linux).\n\n []'s\n\nMateus Cordeiro Inssa\n---------------------\nLinux User: 76186 Kernel: 2.3.34\nICQ (Licq): 15243895\n---------------------\[email protected]\[email protected]\n\nFri Dec 24 09:55:14 EDT 1999\n",
"msg_date": "Fri, 24 Dec 1999 09:55:15 -0200 (EDT)",
"msg_from": "Mateus Cordeiro Inssa <[email protected]>",
"msg_from_op": true,
"msg_subject": "Error \"vacuum pg_proc\""
},
{
"msg_contents": "Mateus Cordeiro Inssa <[email protected]> writes:\n> I got this error vacuuming pg_proc:\n> ERROR: _bt_endpoint: leftmost page (20) has not leftmost flag\n\nHmm, I wonder if this could be yet another manifestation of the problems\nthat btree indexes have with oversized key values. Do you have any\nprocedures with long definitions? \"Long\" in this context means over\nabout 4K. If you're not sure, try\n\tselect proname from pg_proc where length(prosrc) > 4000;\n\nIf you do, try breaking them up into smaller procedures. You might have\nto dump and rebuild the database to get rid of the corruption in\npg_proc's index, though.\n\nThe reason this is an issue is that btree wants to be able to store at\nleast two index tuples per disk page, so it has problems with indexing\nvalues over half-a-page-less-overhead. I'm not sure exactly what the\ncritical size is, but it is somewhere around 4000 bytes. And pg_proc\nhas an index on the prosrc field.\n\nThe prosrc index is actually completely unnecessary, so we've removed\nit for 7.0. Work is in progress to fix the tuple-size problem as well,\nbut that will probably take longer.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 24 Dec 1999 10:52:50 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Error \"vacuum pg_proc\" "
},
{
"msg_contents": "I wrote:\n> Mateus Cordeiro Inssa <[email protected]> writes:\n>> I got this error vacuuming pg_proc:\n>> ERROR: _bt_endpoint: leftmost page (20) has not leftmost flag\n\n> Hmm, I wonder if this could be yet another manifestation of the problems\n> that btree indexes have with oversized key values. Do you have any\n> procedures with long definitions? \"Long\" in this context means over\n> about 4K.\n\nI spent some more time looking into this, and found out that actually\nthe safe upper limit for btree index entries is not ~ BLCKSZ/2, but\n~ BLCKSZ/3. btree needs to be able to insert two items on every page,\nbut it *also* keeps an extra item (the \"high key\") on non-rightmost\npages. So if any item exceeds one-third the available space, you run\na risk of failure depending on what page it ends up on and what else\nis on that same page.\n\nIt turns out that for an index on a single text column, the maximum\nsafe text length is 2700 bytes. So the correct check for dangerous\nprocedure definitions in 6.5.* is\n\n\tselect proname from pg_proc where length(prosrc) > 2700;\n\nI have committed a check for dangerously long index entries into both\ncurrent sources and REL6_5 branch. The patch is attached if you want to\nadd it to your installation right away. Note that this only defends\nagainst oversize new entries; if you've already got oversize index\nentries, you still have trouble waiting to happen...\n\n\t\t\tregards, tom lane\n\n*** src/backend/access/nbtree/nbtinsert.c.orig\tWed Sep 1 13:54:00 1999\n--- src/backend/access/nbtree/nbtinsert.c\tSun Dec 26 15:44:15 1999\n***************\n*** 268,273 ****\n--- 268,285 ----\n \t\t\t\t\t\t\t\t\t\t * consistent */\n \n \t/*\n+ \t * Check whether the item can fit on a btree page at all.\n+ \t * (Eventually, we ought to try to apply TOAST methods if not.)\n+ \t * We actually need to be able to fit three items on every page,\n+ \t * so restrict any one item to 1/3 the per-page available space.\n+ \t * Note that at this point, itemsz doesn't include the ItemId.\n+ \t */\n+ \tif (itemsz > (PageGetPageSize(page)-sizeof(PageHeaderData)-MAXALIGN(sizeof(BTPageOpaqueData)))/3 - sizeof(ItemIdData))\n+ \t\telog(ERROR, \"btree: index item size %d exceeds maximum %d\",\n+ \t\t\t itemsz,\n+ \t\t\t (PageGetPageSize(page)-sizeof(PageHeaderData)-MAXALIGN(sizeof(BTPageOpaqueData)))/3 - sizeof(ItemIdData));\n+ \n+ \t/*\n \t * If we have to insert item on the leftmost page which is the first\n \t * page in the chain of duplicates then: 1. if scankey == hikey (i.e.\n \t * - new duplicate item) then insert it here; 2. if scankey < hikey\n",
"msg_date": "Sun, 26 Dec 1999 16:20:49 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Error \"vacuum pg_proc\" "
},
{
"msg_contents": "> I spent some more time looking into this, and found out that actually\n> the safe upper limit for btree index entries is not ~ BLCKSZ/2, but\n> ~ BLCKSZ/3. btree needs to be able to insert two items on every page,\n> but it *also* keeps an extra item (the \"high key\") on non-rightmost\n> pages. So if any item exceeds one-third the available space, you run\n> a risk of failure depending on what page it ends up on and what else\n> is on that same page.\n> \n> It turns out that for an index on a single text column, the maximum\n> safe text length is 2700 bytes. So the correct check for dangerous\n> procedure definitions in 6.5.* is\n\nThis is another argument to try and get long tuples into 7.0.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sun, 26 Dec 1999 21:19:48 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Error \"vacuum pg_proc\""
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n>> It turns out that for an index on a single text column, the maximum\n>> safe text length is 2700 bytes.\n\n> This is another argument to try and get long tuples into 7.0.\n\nI think Jan might have enough on his plate already without trying to\nTOAST the index code along with the plain-table code. But if he can\nget it done, great!\n\nOne thing this does bring up is that the maximum safe tuple length is\ndependent on the index or table type. The toaster's API had better\nbe designed accordingly...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 26 Dec 1999 22:22:56 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Error \"vacuum pg_proc\" "
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> >> It turns out that for an index on a single text column, the maximum\n> >> safe text length is 2700 bytes.\n> \n> > This is another argument to try and get long tuples into 7.0.\n> \n> I think Jan might have enough on his plate already without trying to\n> TOAST the index code along with the plain-table code. But if he can\n> get it done, great!\n> \n> One thing this does bring up is that the maximum safe tuple length is\n> dependent on the index or table type. The toaster's API had better\n> be designed accordingly...\n\nIn talking to Jan, the index code will make use of the toast entries\nautomatically. He said the heap_insert will do any toasting, and after\nthat the tuple already has any toast pointers, and that gets inserted\ninto the index.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sun, 26 Dec 1999 22:36:19 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Error \"vacuum pg_proc\""
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n>> One thing this does bring up is that the maximum safe tuple length is\n>> dependent on the index or table type. The toaster's API had better\n>> be designed accordingly...\n\n> In talking to Jan, the index code will make use of the toast entries\n> automatically. He said the heap_insert will do any toasting, and after\n> that the tuple already has any toast pointers, and that gets inserted\n> into the index.\n\nIf that's his plan, then it's broken by design. Toasting a complete\ntuple cannot be the basis for toasting index entries related to the\ntuple, because (a) the index entries will typically use only some of the\nfields appearing in the tuple; (b) index entries have different length\nlimits than tuples do; (c) indexes might be created after the original\ntable is. Heck, index *types* might be created after the original table\nis. If index toasting is dependent on toasting of the main table, the\nonly way it can work is to toast every varlena attribute down to a\nprechosen maximum length that Jan hopes will satisfy every index type,\nnow or hereafter --- no matter whether the column in question has or\never will have an index of any type.\n\nAnd that'll still crash and burn for multicolumn indexes.\n\nI thought the plan was to toast indexes independently of the main\ntable, ie, an index would have its own toast-table and its own\nstorage of oversize attributes --- where the *index* decides what\nis oversize, not the main table.\n\nIf main tables and indexes point at the same toast-table entries,\nI think VACUUM will become rather an interesting problem, too...\nalthough maybe that could be worked around if VACUUM destroys indexes\nand rebuilds them from scratch.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 26 Dec 1999 23:14:25 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Error \"vacuum pg_proc\" "
},
{
"msg_contents": "I wrote:\n> And that'll still crash and burn for multicolumn indexes.\n\nNot to mention functional indexes, which typically store values that\ndon't appear in the referenced tuple at all.\n\nBasically, indexes have to have their own toasters. There's no other\nway.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 26 Dec 1999 23:19:23 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Error \"vacuum pg_proc\" "
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> >> One thing this does bring up is that the maximum safe tuple length is\n> >> dependent on the index or table type. The toaster's API had better\n> >> be designed accordingly...\n> \n> > In talking to Jan, the index code will make use of the toast entries\n> > automatically. He said the heap_insert will do any toasting, and after\n> > that the tuple already has any toast pointers, and that gets inserted\n> > into the index.\n> \n> If that's his plan, then it's broken by design. Toasting a complete\n> tuple cannot be the basis for toasting index entries related to the\n> tuple, because (a) the index entries will typically use only some of the\n> fields appearing in the tuple; (b) index entries have different length\n> limits than tuples do; (c) indexes might be created after the original\n\nYes, I see your point. This could be quite complicated. He is\ntargeting BLKSZ and indexes are BLKSZ/3. He could toast any single\nattribute of size >= BLKSZ/3, but as you mentioned multi-column\nindexes would be a problem. I wonder if he could create the TOAST\nentries and modify the heap tuple during index creation?\n\nWow, this clearly is going to be messy. Maybe he is going to have to\nhave a separate TOAST table for the index. If he got fancy, he could\nuse the heap TOAST table as needed, and have a secondary index TOAST for\ncases the tuple needs further TOASTS for indexes.\n\nIt shows we haven't thought through all this yet.\n\n\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 27 Dec 1999 00:05:55 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Error \"vacuum pg_proc\""
},
{
"msg_contents": "Tom Lane writes:\n > Mateus Cordeiro Inssa <[email protected]> writes:\n > > I got this error vacuuming pg_proc:\n > > ERROR: _bt_endpoint: leftmost page (20) has not leftmost flag\n > \n > Hmm, I wonder if this could be yet another manifestation of the problems\n > that btree indexes have with oversized key values. Do you have any\n > procedures with long definitions? \"Long\" in this context means over\n > about 4K. If you're not sure, try\n > \tselect proname from pg_proc where length(prosrc) > 4000;\n\n Yes, I have some functions from 3k to 5k.\n\n > If you do, try breaking them up into smaller procedures. You might have\n > to dump and rebuild the database to get rid of the corruption in\n > pg_proc's index, though.\n\n Ok.\n\n > The prosrc index is actually completely unnecessary, so we've removed\n > it for 7.0. Work is in progress to fix the tuple-size problem as well,\n > but that will probably take longer.\n\n Oh, I would ask why there was this index. I had problems with it\nsince version 6.4.\n\n I'd like to suggest the creation of a new command: ALTER FUNCTION. I \nuse pltcl to program in the server, so, no need for checking the\nfunction code. The problems with pg_proc always occurred to me when\nchanging functions: DROP/CREATE. This command would do just an update on\nprosrc field (that doesn't have index anymore).\n\n []'s\n\nMateus Cordeiro Inssa\n---------------------\nLinux User: 76186 Kernel: 2.3.34\nICQ (Licq): 15243895\n---------------------\[email protected]\[email protected]\n\nMon Dec 27 11:15:41 EDT 1999\n.\n",
"msg_date": "Mon, 27 Dec 1999 11:15:43 -0200 (EDT)",
"msg_from": "Mateus Cordeiro Inssa <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Error \"vacuum pg_proc\" "
},
{
"msg_contents": "Tom Lane wrote:\n\n> I wrote:\n> > And that'll still crash and burn for multicolumn indexes.\n>\n> Not to mention functional indexes, which typically store values that\n> don't appear in the referenced tuple at all.\n>\n> Basically, indexes have to have their own toasters. There's no other\n> way.\n\n You're right.\n\n I think it's best to delay index toasting until we have some\n experience with normal, main tuple attribute toasting. It'd be\n nice if the solution had covered huge values to be indexed\n automatically (what it doesn't any more). But I think most\n people can live with a database, that cannot index huge\n values, but is capable to store and retrieve them for now.\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#========================================= [email protected] (Jan Wieck) #\n\n\n\n",
"msg_date": "Mon, 03 Jan 2000 19:25:06 +0100",
"msg_from": "Jan Wieck <[email protected]>",
"msg_from_op": false,
"msg_subject": "Index toasting (was: Re: [HACKERS] Error \"vacuum pg_proc\")"
},
{
"msg_contents": "At 07:25 PM 1/3/00 +0100, Jan Wieck wrote:\n\n> I think it's best to delay index toasting until we have some\n> experience with normal, main tuple attribute toasting. It'd be\n> nice if the solution had covered huge values to be indexed\n> automatically (what it doesn't any more). But I think most\n> people can live with a database, that cannot index huge\n> values, but is capable to store and retrieve them for now.\n\n>From my personal POV, I would certainly agree with this. The stuff\nI'm working on is probably pretty typical, using an integer key to\nidentify rows which contain large chunks of text, photographs, etc.\nI'm perfectly happy not being able to index the big chunks, and\nsuspect a large percentage of users would feel the same.\n\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Mon, 03 Jan 2000 16:51:42 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Index toasting (was: Re: [HACKERS] Error \"vacuum pg_proc\")"
}
] |
[
{
"msg_contents": "I've been toying with the idea of implementing database replication for the last few days. The system I'm proposing will be a seperate program which can be run on any machine and will most likely be implemented in Python. What I'm looking for at this point are gaping holes in my thinking/logic/etc. Here's what I'm thinking... 1) I want to make this program an additional layer over PostgreSQL. I really don't want to hack server code if I can get away with it. At this point I don't feel I need to.2) The replication system will need to add at least one field to each table in each database that needs to be replicated. This field will be a date/time stamp which identifies the \"last update\" of the record. This field will be called PGR_TIME for lack of a better name. Because this field will be used from within programs and triggers it can be longer so as to not mistake it for a user field.3) For each table to be replicated the replication system will programatically add one plpgsql function and trigger to modify the PGR_TIME field on both UPDATEs and INSERTs. The name of this function and trigger will be along the lines of <table_name>_replication_update_trigger and <table_name>_replication_update_function. The function is a simple two-line chunk of code to set the field PGR_TIME equal to NOW. The trigger is called before each insert/update. When looking at the Docs I see that times are stored in Zulu (GT) time. Because of this I don't have to worry about time zones and the like. I need direction on this part (such as \"hey dummy, look at page N of file X.\").4) At this point we have tables which can, at a basic level, tell the replication system when they were last updated.5) The replication system will have a database of its own to record the last replication event, hold configuration, logs, etc. I'd prefer to store the configuration in a PostgreSQL table but it could just as easily be stored in a text file on the filesystem somewhere.6) To handle replication I basically check the local \"last replication time\" and compare it against the remote PGR_TIME fields. If the remote PGR_TIME is greater than the last replication time then change the local copy of the database, otherwise, change the remote end of the database. At this point I don't have a way to know WHICH field changed between the two replicas so either I do ROW level replication or I check each field. I check PGR_TIME to determine which field is the most current. Some fine tuning of this process will have to occur no doubt.7) The commandline utility, fired off by something like cron, could run several times during the day -- command line parameters can be implemented to say PUSH ALL CHANGES TO SERVER A, or PULL ALL CHANGES FROM SERVER B. Questions/Concerns:1) How far do I go with this? Do I start manhandling the system catalogs (pg_* tables)?2) As to #2 and #3 above, I really don't like tools automagically changing my tables but at this point I don't see a way around it. I guess this is where the testing comes into play.3) Security: the replication app will have to have pretty good rights to the database so it can add the nessecary functions and triggers, modify table schema, etc. So, any \"you're insane and should run home to momma\" comments? Damond",
"msg_date": "Fri, 24 Dec 1999 10:27:59 -0500",
"msg_from": "[email protected]",
"msg_from_op": true,
"msg_subject": "database replication"
},
{
"msg_contents": "[email protected] wrote:\n\n> 6) To handle replication I basically check the local \"last\n> replication time\" and compare it against the remote PGR_TIME\n> fields. If the remote PGR_TIME is greater than the last replication\n> time then change the local copy of the database, otherwise, change\n> the remote end of the database. At this point I don't have a way to\n> know WHICH field changed between the two replicas so either I do ROW\n> level replication or I check each field. I check PGR_TIME to\n> determine which field is the most current. Some fine tuning of this\n> process will have to occur no doubt.\n\nInteresting idea. I can see how this might sync up two databases\nsomehow. For true replication, however, I would always want every\nreplicated database to be, at the very least, internally consistent\n(i.e., referential integrity), even if it was a little behind on\nprocessing transactions. In this method, its not clear how\nconsistency is every achieved/guaranteed at any point in time if the\ninput stream of changes is continuous. If the input stream ceased,\nthen I can see how this approach might eventually catch up and totally\nresync everything, but it looks *very* computationally expensive.\n\nBut I might have missed something. How would internal consistency be\nmaintained?\n\n\n> 7) The commandline utility, fired off by something like cron, could\n> run several times during the day -- command line parameters can be\n> implemented to say PUSH ALL CHANGES TO SERVER A, or PULL ALL CHANGES\n> FROM SERVER B.\n\nMy two cents is that, while I can see this kind of database syncing as\nvaluable, this is not the kind of \"replication\" I had in mind. This\nmay already possible by simply copying the database. What replication\nmeans to me is a live, continuously streaming sequence of updates from\none database to another where the replicated database is always\ninternally consistent, available for read-only queries, and never \"too\nfar\" out of sync with the source/primary database.\n\nWhat does replication mean to others?\n\nCheers,\nEd Loehr\n\n\n",
"msg_date": "Fri, 24 Dec 1999 18:22:05 -0600",
"msg_from": "Ed Loehr <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] database replication"
},
{
"msg_contents": ">\n> Interesting idea. I can see how this might sync up two databases\n> somehow. For true replication, however, I would always want every\n> replicated database to be, at the very least, internally consistent\n> (i.e., referential integrity), even if it was a little behind on\n> processing transactions. In this method, its not clear how\n> consistency is every achieved/guaranteed at any point in time if the\n> input stream of changes is continuous. If the input stream ceased,\n> then I can see how this approach might eventually catch up and totally\n> resync everything, but it looks *very* computationally expensive.\n>\n\n What's the typical unit of work for the database? Are we talking about\nupdate transactions which span the entire DB? Or are we talking about\nupdating maybe 1% or less of the database everyday? I'd think it would be\nmore towards the latter than the former. So, yes, this process would be\ncomputationally expensive but how many records would actually have to be\nsent back and forth?\n\n> But I might have missed something. How would internal consistency be\n> maintained?\n>\n\n Updates that occur at site A will be moved to site B and vice versa.\nConsistency would be maintained. The only problem that I can see right off\nthe bat would be what if site A and site B made changes to a row and then\nsite C was brought into the picture? Which one wins?\n\n Someone *has* to win when it comes to this type of thing. You really\nDON'T want to start merging row changes...\n\n>\n> My two cents is that, while I can see this kind of database syncing as\n> valuable, this is not the kind of \"replication\" I had in mind. This\n> may already possible by simply copying the database. What replication\n> means to me is a live, continuously streaming sequence of updates from\n> one database to another where the replicated database is always\n> internally consistent, available for read-only queries, and never \"too\n> far\" out of sync with the source/primary database.\n>\n\n Sounds like you're talking about distributed transactions to me. That's\nan entirely different subject all-together. What you describe can be done\nby copying a database...but as you say, this would only work in a read-only\nsituation.\n\n\n Damond\n\n",
"msg_date": "Fri, 24 Dec 1999 22:07:55 -0800",
"msg_from": "\"Damond Walker\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] database replication"
},
{
"msg_contents": "On Fri, 24 Dec 1999 [email protected] wrote:\n\n> I've been toying with the idea of implementing database replication\n> for the last few days.\n\n\tI too have been thinking about this some over the last year or\ntwo, just trying to find a quick and easy way to do it. I am not so\ninterested in replication, as in synchronization, as in between a desktop\nmachine and a laptop, so I can keep the databases on each in sync with\neach other. For this sort of purpose, both the local and remote databases\nwould be \"idle\" at the time of syncing.\n\n> 2) The replication system will need to add at least one field to each\n> table in each database that needs to be replicated. This field will be\n> a date/time stamp which identifies the \"last update\" of the record. \n> This field will be called PGR_TIME for lack of a better name. \n> Because this field will be used from within programs and triggers it\n> can be longer so as to not mistake it for a user field.\n\n\tHow about a single, seperate table with the fields of 'database',\n'tablename', 'oid', 'last_changed', that would store the same data as your\nPGR_TIME field. It would be seperated from the actually data tables, and\ntherefore would be totally transparent to any database interface\napplications. The 'oid' field would hold each row's OID, a nice, unique\nidentification number for the row, while the other fields would tell which\ntable and database the oid is in. Then this table can be compared with the\nthis table on a remote machine to quickly find updates and changes, then\neach differences can be dealt with in turn.\n\n> 3) For each table to be replicated the replication system will\n> programatically add one plpgsql function and trigger to modify the\n> PGR_TIME field on both UPDATEs and INSERTs. The name of this function\n> and trigger will be along the lines of\n> <table_name>_replication_update_trigger and\n> <table_name>_replication_update_function. The function is a simple\n> two-line chunk of code to set the field PGR_TIME equal to NOW. The\n> trigger is called before each insert/update. When looking at the Docs\n> I see that times are stored in Zulu (GT) time. Because of this I\n> don't have to worry about time zones and the like. I need direction\n> on this part (such as \"hey dummy, look at page N of file X.\").\n\n\tI like this idea, better than any I have come up with yet. Though,\nhow are you going to handle DELETEs? \n\n> 6) To handle replication I basically check the local \"last replication\n> time\" and compare it against the remote PGR_TIME fields. If the\n> remote PGR_TIME is greater than the last replication time then change\n> the local copy of the database, otherwise, change the remote end of\n> the database. At this point I don't have a way to know WHICH field\n> changed between the two replicas so either I do ROW level replication\n> or I check each field. I check PGR_TIME to determine which field is\n> the most current. Some fine tuning of this process will have to occur\n> no doubt.\n\n\tYea, this is indeed the sticky part, and would indeed require some\nfine-tunning. Basically, the way I see it, is if the two timestamps for a\nsingle row do not match (or even if the row and therefore timestamp is\nmissing on one side or the other altogether):\n\tlocal ts > remote ts => Local row is exported to remote.\n\tremote ts > local ts => Remote row is exported to local.\n\tlocal ts > last sync time && no remote ts => \n\t\tLocal row is inserted on remote.\n\tlocal ts < last sync time && no remote ts =>\n\t\tLocal row is deleted.\n\tremote ts > last sync time && no local ts =>\n\t\tRemote row is inserted on local.\n\tremote ts < last sync time && no local ts =>\n\t\tRemote row is deleted.\nwhere the synchronization process is running on the local machine. By\nexported, I mean the local values are sent to the remote machine, and the\nrow on that remote machine is updated to the local values. How does this\nsound?\n\n> 7) The commandline utility, fired off by something like cron, could\n> run several times during the day -- command line parameters can be\n> implemented to say PUSH ALL CHANGES TO SERVER A, or PULL ALL CHANGES\n> FROM SERVER B.\n\n\tOr run manually for my purposes. Also, maybe follow it\nwith a vacuum run on both sides for all databases, as this is going to\npotenitally cause lots of table changes that could stand with a cleanup. \n\n> 1) How far do I go with this? Do I start manhandling the system catalogs (pg_* tables)?\n\n\tInitially, I would just stick to user table data... If you have\nchanges in triggers and other meta-data/executable code, you are going to\nwant to make syncs of that stuff manually anyway. At least I would want\nto.\n\n> 2) As to #2 and #3 above, I really don't like tools automagically\n> changing my tables but at this point I don't see a way around it. I\n> guess this is where the testing comes into play.\n\n\tHence the reason for the seperate table with just a row's\nidentification and last update time. Only modifications to the synced\ndatabase is the update trigger, which should be pretty harmless.\n\n> 3) Security: the replication app will have to have pretty good rights\n> to the database so it can add the nessecary functions and triggers,\n> modify table schema, etc.\n\n\tJust run the sync program as the postgres super user, and there\nare no problems. :)\n\n> So, any \"you're insane and should run home to momma\" comments?\n\n\tNo, not at all. Though it probably should be remaned from\nreplication to synchronization. The former is usually associated with a\ncontinuous stream of updates between the local and remote databases, so\nthey are almost always in sync, and have a queuing ability if their\nconnection is loss for span of time as well. Very complex and difficult to\nimplement, and would require hacking server code. :( Something only Sybase\nand Oracle have (as far as I know), and from what I have seen of Sybase's\nreplication server support (dated by 5yrs) it was a pain to setup and get\nrunning correctly.\n\tThe latter, synchronization, is much more managable, and can still\nbe useful, especially when you have a large database you want in two\nplaces, mainly for read only purposes at one end or the other, but don't\nwant to waste the time/bandwidth to move and load the entire database each\ntime it changes on one end or the other. Same idea as mirroring software\nfor FTP sites, just transfers the changes, and nothing more.\n\tI also like the idea of using Python. I have been using it\nrecently for some database interfaces (to PostgreSQL of course :), and it\nis a very nice language to work with. Some worries about performance of\nthe program though, as python is only an interpreted lanuage, and I have\nyet to really be impressed with the speed of execution of my database\ninterfaces yet.\n\tAnyway, it sound like a good project, and finally one where I\nactually have a clue of what is going on, and the skills to help. So, if\nyou are interested in pursing this project, I would be more than glad to\nhelp. TTYL.\n\n---------------------------------------------------------------------------\n| \"For to me to live is Christ, and to die is gain.\" |\n| --- Philippians 1:21 (KJV) |\n---------------------------------------------------------------------------\n| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |\n---------------------------------------------------------------------------\n\n\n",
"msg_date": "Sat, 25 Dec 1999 15:25:47 -0700 (MST)",
"msg_from": "Ryan Kirkpatrick <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] database replication"
},
{
"msg_contents": "Hi Guys,\n\nNow for one of my REALLY rare posts.\nHaving done a little bit of distributed data systems, I figured I'd\npitch in a couple cents worth.\n\n> 2) The replication system will need to add at least one field to each \n> table in each database that needs to be re plicated. This \n> field will be a date/time stamp which identifies the " last \n> update" of the record. This field will be called PGR_TIME \n> for la ck of a better name. Because this field will be used \n> from within programs and triggers it can be longer so as to not \n> mistake it for a user field.\n\nI just started reading this thread, but I figured I'd throw in a couple\nsuggestions for distributed data control (a few idioms I've had to\ndeal with b4):\n\t- Never use time (not reliable from system to system). Use\n\t a version number of some sort that can stay consistent across\n\t all replicas\n\n\t This way, if a system's time is or goes out of wack, it doesn't\n\t cause your database to disintegrate, and it's easier to track\n\t conflicts (see below. If using time, the algorithm gets\n\t nightmarish)\n\n\t- On an insert, set to version 1\n\n\t- On an update, version++\n\n\t- On a delete, mark deleted, and add a delete stub somewhere for the\n\t replicator process to deal with in sync'ing the databases.\n\n\t- If two records have the same version but different data, there's\n\t a conflict. A few choices:\n\t \t1. Pick one as the correct one (yuck!! invisible data loss)\n\t\t2. Store both copies, pick one as current, and alert \n\t\t database owner of the conflict, so they can deal with\n\t\t it \"manually.\"\n\t\t3. If possible, some conflicts can be merged. If a disjoint\n\t\t set of fields were changed in each instance, these changes\n\t\t may both be applied and the record merged. (Problem:\n\t\t takes a lot more space. Requires a version number for\n\t\t every field, or persistent storage of some old records.\n\t\t However, this might help the \"which fields changed\" issue\n\t\t you were talking about in #6)\n\n\t- A unique id across all systems should exist (or something that\n\t effectively simulates a unique id. Maybe a composition of the\n\t originating oid (from the insert) and the originating database\n\t (oid of the database's record?) might do it. Store this as\n\t an extra field in every record. \n\t \n\t (Two extra fieldss so far: 'unique id' and 'version')\n\nI do like your approach: triggers and a separate process. (Maintainable!! :)\n\nAnyway, just figured I'd throw in a few suggestions,\nDuane\n",
"msg_date": "Thu, 30 Dec 1999 10:30:58 +0000 (AST)",
"msg_from": "Duane Currie <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] database replication"
}
] |
[
{
"msg_contents": "<html>\n\n\n\n<head>\n\n<title></title>\n\n<style>\n\n<!--a{ text-decoration: none; color: rgb(255,255,254) }\n\na:hover{ color: rgb(0,0,0); text-decoration: underline }\n\n-->\n\n</style>\n\n</head>\n\n\n\n<body bgcolor=\"#7CB4DC\" topmargin=\"0\" leftmargin=\"0\">\n\n<div align=\"center\"><center>\n\n\n\n<table border=\"0\" cellPadding=\"4\" cellSpacing=\"0\" width=\"100%\">\n\n <tr>\n\n <td width=\"100%\"><span style=\"font-size: 9pt\"><font color=\"#FFFFFF\"><p align=\"center\"></font></span><font\n\n color=\"#FFFF00\"><big><strong>千禧之年大奉送 双喜临门到王朝</strong></big></font></td>\n\n </tr>\n\n <tr>\n\n <td width=\"100%\"><hr size=\"1\" color=\"#FFFF00\">\n\n </td>\n\n </tr>\n\n <tr>\n\n <td width=\"100%\"><font color=\"#FFFFFF\"><span style=\"font-size: 9pt\"> \n\n 在这千禧之年来临之际,王朝集团推出“千禧之年大奉送,双喜临门到王朝”活动,意与广大网友共庆千年之喜。</span></font><p><span\n\n style=\"font-size: 9pt\"><font color=\"#FFFFFF\"> </font><font color=\"#FFFF00\"><strong>一喜:</strong></font><font\n\n color=\"#FFFFFF\">从即日起至2000年2月6日零点,我们将为您提供</font><font\n\n color=\"#FFFF00\"><strong><em><big>800元/两</big></em></strong></font><font\n\n color=\"#FFFFFF\">年的域名注服务,另外我们将为您提供</font><font\n\n color=\"#FFFF00\"><em><strong><big>700元/年</big></strong></em></font><font\n\n color=\"#FFFFFF\">的30M虚拟空间服务。</font></span></p>\n\n <p><span style=\"font-size: 9pt\"><font color=\"#FFFFFF\"> </font><font\n\n color=\"#FFFF00\"><strong>二喜:</strong></font><font color=\"#FFFFFF\">凡通过王朝集团注册国际顶级域名一个或是租虚拟空间一年的朋友,将获得由王朝集团独立开发的<a\n\n href=\"http://www.wd-g.com/product/longtalk/index.html\"><font\n\n color=\"#FFFF00\">畅谈(LongTalk)</font></a>软件及注册号码一个。</font></span></p>\n\n <p><span style=\"font-size: 9pt\"><font color=\"#FFFFFF\"> 伴随2000年的到来,早一天参加本活动,多一重优惠。</font></span></p>\n\n <p><span style=\"font-size: 9pt\"><font color=\"#FFFFFF\"> \n\n 世纪之交,享受世纪优惠!<a href=\"http://www.wd-g.com/plan/huodong.html\"><font color=\"#FFFF00\">怎么样,心动吗?还不快快行动!!!你只需填写见个表单就可以了。</font></a></font></span></td>\n\n </tr>\n\n <tr>\n\n <td width=\"100%\"><hr size=\"1\" color=\"#FFFF00\">\n\n </td>\n\n </tr>\n\n <tr>\n\n <td width=\"100%\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n\n <tr>\n\n <td width=\"100%\"><table border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" width=\"100%\">\n\n <tr>\n\n <td colSpan=\"2\" width=\"100%\"><font color=\"#0000FF\"><span style=\"FONT-SIZE: 9pt\"><font\n\n lang=\"ZH-CN\">国内地址</font><font face=\"Arial\"><small>:</small></font><font\n\n lang=\"ZH-CN\"> 中国成都</font>高新区高棚大道5号创新中心一楼( 610041)<br>\n\n <font lang=\"ZH-CN\">联系电话</font>: </span><small>028-5179008;5159761;5150525</small><span\n\n style=\"FONT-SIZE: 9pt\"> </span></font></td>\n\n </tr>\n\n <tr>\n\n <td width=\"50%\"><font color=\"#0000FF\"><span style=\"FONT-SIZE: 9pt\"><font lang=\"ZH-CN\">传真</font>: \n\n <font face=\"Arial\">028-5178108</font><font lang=\"ZH-CN\"> </font></span></font></td>\n\n <td width=\"50%\"><font color=\"#0000FF\"><span style=\"FONT-SIZE: 9pt\"><font lang=\"ZH-CN\">电子邮</font>件<font\n\n face=\"Arial\">: <a href=\"mailto:[email protected]\">[email protected]</a></font></span></font></td>\n\n </tr>\n\n</TBODY>\n\n </table>\n\n </td>\n\n </tr>\n\n </table>\n\n </td>\n\n </tr>\n\n</TBODY>\n\n</table>\n\n</center></div>\n\n</body>\n\n</html>\n\n\n\n\n\n\n\n\n\n\n\n千禧之年大奉送 双喜临门到王朝\n\n\n\n\n\n\n \n\n 在这千禧之年来临之际,王朝集团推出“千禧之年大奉送,双喜临门到王朝”活动,意与广大网友共庆千年之喜。 一喜:从即日起至2000年2月6日零点,我们将为您提供800元/两年的域名注服务,另外我们将为您提供700元/年的30M虚拟空间服务。\n 二喜:凡通过王朝集团注册国际顶级域名一个或是租虚拟空间一年的朋友,将获得由王朝集团独立开发的畅谈(LongTalk)软件及注册号码一个。\n 伴随2000年的到来,早一天参加本活动,多一重优惠。\n \n\n 世纪之交,享受世纪优惠!怎么样,心动吗?还不快快行动!!!你只需填写见个表单就可以了。\n\n\n\n\n\n\n\n\n\n\n国内地址: 中国成都高新区高棚大道5号创新中心一楼( 610041)\n联系电话: 028-5179008;5159761;5150525 \n\n\n传真: \n\n 028-5178108 \n电子邮件: [email protected]",
"msg_date": "Sat, 25 Dec 1999 11:17:58 +0800 (CST)",
"msg_from": "<[email protected]>",
"msg_from_op": true,
"msg_subject": "���������������������������� ������������������������������"
}
] |
[
{
"msg_contents": "I'm using access to connect to the PostgreSQL server running on a linux thru\npostgresODBC driver.\n\nI can link the table and can read the data in the table but\nI can't update it?! I can not add a record. What am I\ndoing wrong?\n\nThe user login has only the create db privilege and without\nthe superuser privilege.\n\nPlease help!\n\nKevin.\n\n\n\n",
"msg_date": "Sun, 26 Dec 1999 01:22:28 GMT",
"msg_from": "\"Kevin Lam\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "question about MS Access connect to Postgresql 6.5.2-1"
},
{
"msg_contents": "There are is a Read-Only option in postgresODBC driver properties... checked\nby default :-]\nI have seen it in Advanced Options form of Connection dialog during creation\nof new data source\nin MS Query.\nI hope it will help you a little bit.\nDmitry\n\n\"Kevin Lam\" <[email protected]> wrote in message\nnews:[email protected]...\n> I'm using access to connect to the PostgreSQL server running on a linux\nthru\n> postgresODBC driver.\n>\n> I can link the table and can read the data in the table but\n> I can't update it?! I can not add a record. What am I\n> doing wrong?\n>\n> The user login has only the create db privilege and without\n> the superuser privilege.\n>\n> Please help!\n>\n> Kevin.\n>\n>\n>\n\n\n",
"msg_date": "Mon, 27 Dec 1999 06:34:49 GMT",
"msg_from": "\"Dmitry\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: question about MS Access connect to Postgresql 6.5.2-1"
},
{
"msg_contents": "\n\"Micheal H.\" <[email protected]> wrote in message\nnews:[email protected]...\n> I found the read only option, unchecked it and still have the problem\n> updating or adding records...Postgresql-6.3.2 and Access97\n\nIt's working fine to me now. The one of the drawback of\ncreating database in Access97 and upsize (right term? ) to\npostgres will remove your primary for some unknown\nreason. So, my best bet is creating those tables by using\npostgres and then link the table over. This works for me.\n\nAnyone are using PhP for Windows for the web scripting\ntools?\n\nKevin.\n\n\n\n\n",
"msg_date": "Thu, 13 Jan 2000 09:37:48 GMT",
"msg_from": "\"Kevin Lam\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: question about MS Access connect to Postgresql 6.5.2-1"
}
] |
[
{
"msg_contents": "The new psql automatically tries to reconnect if the backend disconnects\nunexpectedly. This feature strikes me as ill-conceived; furthermore\nit appears to be buggy.\n\nIt's ill-conceived because:\n(1) under WAL, following a backend crash the postmaster is going to be\nspending a few seconds reinitializing; an immediate reconnect attempt\nis almost guaranteed to fail.\n(2) if I'm running an SQL script, I think it's extremely foolhardy\nto press on with executing the script as though nothing had happened.\nA backend crash is not an event to be lightly ignored.\n\nIt's buggy because: it doesn't work reliably. While poking at the\nbackend's problems with oversize btree index entries, I saw psql claim\nit had successfully reconnected, and then go into a catatonic state.\nIt wouldn't give me a new command prompt (not even with ^C), wouldn't\nexit with ^D, and had to be killed from another shell window.\n\nThis behavior doesn't seem to happen for every crash, but I'm not\nreally interested in trying to debug it. I think the \"feature\"\nought to be ripped out.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 25 Dec 1999 20:35:31 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "dubious improvement in new psql"
},
{
"msg_contents": "On Sat, 25 Dec 1999, Tom Lane wrote:\n\n> The new psql automatically tries to reconnect if the backend disconnects\n> unexpectedly. This feature strikes me as ill-conceived; furthermore\n> it appears to be buggy.\n> \n> It's ill-conceived because:\n> (1) under WAL, following a backend crash the postmaster is going to be\n> spending a few seconds reinitializing; an immediate reconnect attempt\n> is almost guaranteed to fail.\n\nGood point.\n\n> (2) if I'm running an SQL script, I think it's extremely foolhardy\n> to press on with executing the script as though nothing had happened.\n> A backend crash is not an event to be lightly ignored.\n\nIt only does the reconnect thing if it's used interactively.\n\nI suppose leaving psql in an unconnected state (which does exist) would be\na better solution. I'll investigate the behaviour you observed below after\nI get back from my vacation.\n\n> \n> It's buggy because: it doesn't work reliably. While poking at the\n> backend's problems with oversize btree index entries, I saw psql claim\n> it had successfully reconnected, and then go into a catatonic state.\n> It wouldn't give me a new command prompt (not even with ^C), wouldn't\n> exit with ^D, and had to be killed from another shell window.\n> \n> This behavior doesn't seem to happen for every crash, but I'm not\n> really interested in trying to debug it. I think the \"feature\"\n> ought to be ripped out.\n> \n> \t\t\tregards, tom lane\n> \n> ************\n> \n> \n\n-- \nPeter Eisentraut Sernanders vaeg 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n",
"msg_date": "Tue, 28 Dec 1999 23:14:17 +0100 (MET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] dubious improvement in new psql"
},
{
"msg_contents": "At 11:14 PM 12/28/99 +0100, Peter Eisentraut wrote:\n>On Sat, 25 Dec 1999, Tom Lane wrote:\n>\n>> The new psql automatically tries to reconnect if the backend disconnects\n>> unexpectedly. This feature strikes me as ill-conceived; furthermore\n>> it appears to be buggy.\n>> \n>> It's ill-conceived because:\n>> (1) under WAL, following a backend crash the postmaster is going to be\n>> spending a few seconds reinitializing; an immediate reconnect attempt\n>> is almost guaranteed to fail.\n>\n>Good point.\n>\n>> (2) if I'm running an SQL script, I think it's extremely foolhardy\n>> to press on with executing the script as though nothing had happened.\n>> A backend crash is not an event to be lightly ignored.\n>\n>It only does the reconnect thing if it's used interactively.\n\nThis raises a question, then. What should drivers for (say) web\nservers that are expected to stay up 24/7 do if reconnecting to a\nbroken db connection can't be made reliable?\n\nI've currently rewritten the AOLserver driver to do just that, and\nit's working fine with 6.5.3. The AOLserver driver for Oracle most\ncertainly can reconnect to a broken connection - to tell folks that\nthis can't be done with the WAL version of Postgres will simply\nreinforce those of my friends who laugh at me for trying to use\nPostgres instead of simply biting the bullet and buying an Oracle\nlicense...\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Sat, 01 Jan 2000 10:44:36 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] dubious improvement in new psql"
},
{
"msg_contents": "Don Baccus <[email protected]> writes:\n> The AOLserver driver for Oracle most\n> certainly can reconnect to a broken connection - to tell folks that\n> this can't be done with the WAL version of Postgres\n\nI said no such thing!\n\nYou certainly *can* reconnect, although under WAL it will take a delay\n(or better, a retry loop).\n\nHowever, I think reconnection has to be integrated into the\napplication's logic at a level where you can have some idea of what\nneeds to be redone after reconnecting. That's why I objected to having\npsql do it. If psql's only going to do it interactively then I guess\nit's safe enough, though.\n\nQuestion for discussion: when the WAL postmaster is running a database\nstart or restart, perhaps it should simply delay processing of new\nconnection requests until the DB is ready, instead of rejecting them\nimmediately? That would eliminate the need for retry loops in\napplications, and thereby avoid wasted retry processing on both sides.\nOn the other hand, I can see where an unexpected multi-second delay to\nconnect might be bad news, too. Comments?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 01 Jan 2000 13:48:36 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] dubious improvement in new psql "
},
{
"msg_contents": "Tom Lane wrote:\n\n> Question for discussion: when the WAL postmaster is running a database\n> start or restart, perhaps it should simply delay processing of new\n> connection requests until the DB is ready, instead of rejecting them\n> immediately? That would eliminate the need for retry loops in\n> applications, and thereby avoid wasted retry processing on both sides.\n> On the other hand, I can see where an unexpected multi-second delay to\n> connect might be bad news, too. Comments?\n\nSuggestion: Make the delay/reconnect optional with configurable\nparameters for how many times to retry, how long to retry, etc.\n\nI have an Apache mod-perl app already doing this reconnect logic, and I'm\nvery glad my app has control over those parameters.\n\nCheers,\nEd Loehr\n\n\n\n",
"msg_date": "Sat, 01 Jan 2000 13:05:18 -0600",
"msg_from": "Ed Loehr <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] dubious improvement in new psql"
},
{
"msg_contents": "At 01:48 PM 1/1/00 -0500, Tom Lane wrote:\n\n>I said no such thing!\n>\n>You certainly *can* reconnect, although under WAL it will take a delay\n>(or better, a retry loop).\n>\n>However, I think reconnection has to be integrated into the\n>application's logic at a level where you can have some idea of what\n>needs to be redone after reconnecting. That's why I objected to having\n>psql do it. If psql's only going to do it interactively then I guess\n>it's safe enough, though.\n\nOK, my misunderstanding. I couldn't understand why psql in interactive\nmode should be a problem and took your comments in a more general context.\n\n>\n>Question for discussion: when the WAL postmaster is running a database\n>start or restart, perhaps it should simply delay processing of new\n>connection requests until the DB is ready, instead of rejecting them\n>immediately? That would eliminate the need for retry loops in\n>applications, and thereby avoid wasted retry processing on both sides.\n>On the other hand, I can see where an unexpected multi-second delay to\n>connect might be bad news, too. Comments?\n\nI've been thinking about this one, actually...\n\nPerhaps letting the caller decide in some manner? In my driver environment\nI'm not really supposed to call sleep or the like and a busy-wait for the\nconnection(s) to be rebuilt probably isn't the best thing to do, since the\npostmaster is going to be hard at work straightening out things with the\nWAL.\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Sat, 01 Jan 2000 19:09:38 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] dubious improvement in new psql "
},
{
"msg_contents": "Okay, I looked at the code again and I can't see anything wrong\nconceptually. It follows libpq semantics which I remember to have grabbed\nfrom the documentation:\n\n\tresults = PQexec(pset->db, query);\n\n\t/* do something with result */\n\n\tif (PQstatus(pset->db) == CONNECTION_BAD)\n\t{\n\t\tfputs(\"The connection to the server was lost. Attempting reset: \", stderr);\n\t\tPQreset(pset->db);\n\t\tif (PQstatus(pset->db) == CONNECTION_BAD)\n\t\t{\n\t\t\tfputs(\"Failed.\\n\", stderr);\n\t\t\tPQfinish(pset->db);\n\t\t\tPQclear(results);\n\t\t\tpset->db = NULL;\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\tfputs(\"Succeeded.\\n\", stderr);\n\t}\n\n\nIf you can still reproduce this somehow, I'd like to know where it hangs\nand/or what the output was.\n\n\nOn 1999-12-25, Tom Lane mentioned:\n\n> The new psql automatically tries to reconnect if the backend disconnects\n> unexpectedly. This feature strikes me as ill-conceived; furthermore\n> it appears to be buggy.\n> \n> It's ill-conceived because:\n> (1) under WAL, following a backend crash the postmaster is going to be\n> spending a few seconds reinitializing; an immediate reconnect attempt\n> is almost guaranteed to fail.\n\nThen rip out PQreset. It's not psql's job to make these kinds of\ndecisions.\n\n> (2) if I'm running an SQL script, I think it's extremely foolhardy\n> to press on with executing the script as though nothing had happened.\n> A backend crash is not an event to be lightly ignored.\n\nThen rip out PQreset. To quote from the docs:\n\n\"This function will close the connection to the backend and attempt to\nreestablish a new connection to the same postmaster, using all the same\nparameters previously used. This may be useful for error recovery if a\nworking connection is lost.\"\n\nI don't know all the possible ways a backend can go down, but one of them\nmight be a short network failure. In that case attempting a reset might be\nthe reasonable thing to do. Again, this should be addressed at the libpq\nlevel.\n\n> \n> It's buggy because: it doesn't work reliably. While poking at the\n> backend's problems with oversize btree index entries, I saw psql claim\n> it had successfully reconnected, and then go into a catatonic state.\n\nLook at the above code; seems like a libpq problem.\n\n> It wouldn't give me a new command prompt (not even with ^C), wouldn't\n> exit with ^D, and had to be killed from another shell window.\n> \n> This behavior doesn't seem to happen for every crash, but I'm not\n> really interested in trying to debug it. I think the \"feature\"\n\nI am. :)\n\n> ought to be ripped out.\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n\n",
"msg_date": "Wed, 12 Jan 2000 20:38:20 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] dubious improvement in new psql"
}
] |
[
{
"msg_contents": ">\n> I too have been thinking about this some over the last year or\n>two, just trying to find a quick and easy way to do it. I am not so\n>interested in replication, as in synchronization, as in between a desktop\n>machine and a laptop, so I can keep the databases on each in sync with\n>each other. For this sort of purpose, both the local and remote databases\n>would be \"idle\" at the time of syncing.\n>\n\n I don't think it would matter if the databases are idle or not to be\nhonest with you. At any single point in time when you replicate I'd figure\nthat the database would be in a consistent state. So, you should be able to\nreplicate (or sync) a remote database that is in use. After all, you're\ngetting a snapshot of the database as it stands at 8:45 PM. At 8:46 PM it\nmay be totally different...but the next time syncing takes place those\nchanges would appear in your local copy.\n\n The one problem you may run into is if the remote host is running a\nlarge batch process. It's very likely that you will get 50% of their\nchanges when you replicate...but then again, that's why you can schedule the\nevent to work around such things.\n\n> How about a single, seperate table with the fields of 'database',\n>'tablename', 'oid', 'last_changed', that would store the same data as your\n>PGR_TIME field. It would be seperated from the actually data tables, and\n>therefore would be totally transparent to any database interface\n>applications. The 'oid' field would hold each row's OID, a nice, unique\n>identification number for the row, while the other fields would tell which\n>table and database the oid is in. Then this table can be compared with the\n>this table on a remote machine to quickly find updates and changes, then\n>each differences can be dealt with in turn.\n>\n\n The problem with OID's is that they are unique at the local level but if\nyou try and use them between servers you can run into overlap. Also, if a\ndatabase is under heavy use this table could quickly become VERY large. Add\nindexes to this table to help performance and you're taking up even more\ndisk space.\n\n Using the PGR_TIME field with an index will allow us to find rows which\nhave changed VERY quickly. All we need to do now is somehow programatically\nfind the primary key for a table so the person setting up replication (or\nsyncing) doesn't have to have an indepth knowledge of the schema in order to\nsetup a syncing schedule.\n\n>\n> I like this idea, better than any I have come up with yet. Though,\n>how are you going to handle DELETEs?\n>\n\n Oops...how about defining a trigger for this? With deletion I guess we\nwould have to move a flag into another table saying we deleted record 'X'\nwith this primary key from this table.\n\n>\n> Yea, this is indeed the sticky part, and would indeed require some\n>fine-tunning. Basically, the way I see it, is if the two timestamps for a\n>single row do not match (or even if the row and therefore timestamp is\n>missing on one side or the other altogether):\n> local ts > remote ts => Local row is exported to remote.\n> remote ts > local ts => Remote row is exported to local.\n> local ts > last sync time && no remote ts =>\n> Local row is inserted on remote.\n> local ts < last sync time && no remote ts =>\n> Local row is deleted.\n> remote ts > last sync time && no local ts =>\n> Remote row is inserted on local.\n> remote ts < last sync time && no local ts =>\n> Remote row is deleted.\n>where the synchronization process is running on the local machine. By\n>exported, I mean the local values are sent to the remote machine, and the\n>row on that remote machine is updated to the local values. How does this\n>sound?\n>\n\n The replication part will be the most complex...that much is for\ncertain...\n\n I've been writing systems in Lotus Notes/Domino for the last year or so\nand I've grown quite spoiled with what it can do in regards to replication.\nIt's not real-time but you have to gear your applications to this type of\nthing (it's possible to create documents, fire off email to notify people of\nchanges and have the email arrive before the replicated documents do).\nReplicating large Notes/Domino databases takes quite a while....I don't see\nany kind of replication or syncing running in a blink of an eye.\n\n Having said that, a good algo will have to be written to cut down on\nnetwork traffic and to keep database conversations down to a minimum. This\nwill be appreciated by people with low bandwidth connections I'm sure\n(dial-ups, fractional T1's, etc).\n\n> Or run manually for my purposes. Also, maybe follow it\n>with a vacuum run on both sides for all databases, as this is going to\n>potenitally cause lots of table changes that could stand with a cleanup.\n>\n\n What would a vacuum do to a system being used by many people?\n\n> No, not at all. Though it probably should be remaned from\n>replication to synchronization. The former is usually associated with a\n>continuous stream of updates between the local and remote databases, so\n>they are almost always in sync, and have a queuing ability if their\n>connection is loss for span of time as well. Very complex and difficult to\n>implement, and would require hacking server code. :( Something only Sybase\n>and Oracle have (as far as I know), and from what I have seen of Sybase's\n>replication server support (dated by 5yrs) it was a pain to setup and get\n>running correctly.\n\n It could probably be named either way...but the one thing I really don't\nwant to do is start hacking server code. The PostgreSQL people have enough\nto do without worrying about trying to meld anything I've done to their\nserver. :)\n\n Besides, I like the idea of having it operate as a stand-alone product.\nThe only PostgreSQL feature we would require would be triggers and\nplpgsql...what was the earliest version of PostgreSQL that supported\nplpgsql? Even then I don't see the triggers being that complex to boot.\n\n> I also like the idea of using Python. I have been using it\n>recently for some database interfaces (to PostgreSQL of course :), and it\n>is a very nice language to work with. Some worries about performance of\n>the program though, as python is only an interpreted lanuage, and I have\n>yet to really be impressed with the speed of execution of my database\n>interfaces yet.\n\n The only thing we'd need for Python is the Python extensions for\nPostgreSQL...which in turn requires libpq and that's about it. So, it\nshould be able to run on any platform supported by Python and libpq. Using\nTK for the interface components will require NT people to get additional\nsoftware from the 'net. At least it did with older version of Windows\nPython. Unix folks should be happy....assuming they have X running on the\nmachine doing the replication or syncing. Even then I wrote a curses based\nPython interface awhile back which allows buttons, progress bars, input\nfields, etc (I called it tinter and it's available at\nhttp://iximd.com/~dwalker). It's a simple interface and could probably be\ncleaned up a bit but it works. :)\n\n> Anyway, it sound like a good project, and finally one where I\n>actually have a clue of what is going on, and the skills to help. So, if\n>you are interested in pursing this project, I would be more than glad to\n>help. TTYL.\n>\n\n\n That would be a Good Thing. Have webspace somewhere? If I can get\npermission from the \"powers that be\" at the office I could host a website on\nour (Domino) webserver.\n\n Damond\n\n",
"msg_date": "Sun, 26 Dec 1999 10:10:41 -0500",
"msg_from": "\"Damond Walker\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] database replication"
},
{
"msg_contents": "On Sun, 26 Dec 1999, Damond Walker wrote:\n\n> > How about a single, seperate table with the fields of 'database',\n> >'tablename', 'oid', 'last_changed', that would store the same data as your\n> >PGR_TIME field. It would be seperated from the actually data tables, and\n...\n> The problem with OID's is that they are unique at the local level but if\n> you try and use them between servers you can run into overlap. \n\n\tYea, forgot about that point, but became dead obvious once you\nmentioned it. Boy, I feel stupid now. :)\n\n> Using the PGR_TIME field with an index will allow us to find rows which\n> have changed VERY quickly. All we need to do now is somehow programatically\n> find the primary key for a table so the person setting up replication (or\n> syncing) doesn't have to have an indepth knowledge of the schema in order to\n> setup a syncing schedule.\n\n\tHmm... Yea, maybe look to see which field(s) has a primary, unique\nindex on it? Then use those field(s) as a primary key. Just require that\nany table to be synchronized to have some set of fields that uniquely\nidentify each row. Either that, or add another field to each table with\nour own, cross system consistent, identification system. Don't know which\nwould be more efficient and easier to work with.\n\tThe former could potentially get sticky if it takes a lots of\nfields to generate a unique key value, but has the smallest effect on the\ntable to be synced. The latter could be difficult to keep straight between\nsystems (local vs. remote), and would require a trigger on inserts to\ngenerate a new, unique id number, that does not exist locally or\nremotely (nasty issue there), but would remove the uniqueness\nrequirement.\n\n> Oops...how about defining a trigger for this? With deletion I guess we\n> would have to move a flag into another table saying we deleted record 'X'\n> with this primary key from this table.\n\n\tOr, according to my logic below, if a row is missing on one side\nor the other, then just compare the remaining row's timestamp to the last\nsynchronization time (stored in a seperate table/db elsewhere). The\nresults of the comparsion and the state of row existences tell one if the\nrow was inserted or deleted since the last sync, and what should be done\nto perform the sync.\n\n> > Yea, this is indeed the sticky part, and would indeed require some\n> >fine-tunning. Basically, the way I see it, is if the two timestamps for a\n> >single row do not match (or even if the row and therefore timestamp is\n> >missing on one side or the other altogether):\n> > local ts > remote ts => Local row is exported to remote.\n> > remote ts > local ts => Remote row is exported to local.\n> > local ts > last sync time && no remote ts =>\n> > Local row is inserted on remote.\n> > local ts < last sync time && no remote ts =>\n> > Local row is deleted.\n> > remote ts > last sync time && no local ts =>\n> > Remote row is inserted on local.\n> > remote ts < last sync time && no local ts =>\n> > Remote row is deleted.\n> >where the synchronization process is running on the local machine. By\n> >exported, I mean the local values are sent to the remote machine, and the\n> >row on that remote machine is updated to the local values. How does this\n> >sound?\n\n> Having said that, a good algo will have to be written to cut down on\n> network traffic and to keep database conversations down to a minimum. This\n> will be appreciated by people with low bandwidth connections I'm sure\n> (dial-ups, fractional T1's, etc).\n\n\tOf course! In reflection, the assigned identification number I\nmentioned above might be the best then, instead of having to transfer the\nentire set of key fields back and forth.\n\n> What would a vacuum do to a system being used by many people?\n\n\tProbably lock them out of tables while they are vacuumed... Maybe\nnot really required in the end, possibly optional?\n\n> It could probably be named either way...but the one thing I really don't\n> want to do is start hacking server code. The PostgreSQL people have enough\n> to do without worrying about trying to meld anything I've done to their\n> server. :)\n\n\tYea, they probably would appreciate that. They already have enough\non thier plate for 7.x as it is! :)\n\n> Besides, I like the idea of having it operate as a stand-alone product.\n> The only PostgreSQL feature we would require would be triggers and\n> plpgsql...what was the earliest version of PostgreSQL that supported\n> plpgsql? Even then I don't see the triggers being that complex to boot.\n\n\tNo, provided that we don't do the identification number idea\n(which the more I think about it, probably will not work). As for what\nversion support plpgsql, I don't know, one of the more hard-core pgsql\nhackers can probably tell us that.\n\n> The only thing we'd need for Python is the Python extensions for\n> PostgreSQL...which in turn requires libpq and that's about it. So, it\n> should be able to run on any platform supported by Python and libpq. \n\n\tOf course. If it ran on NT as well as Linux/Unix, that would be\neven better. :)\n\n> Unix folks should be happy....assuming they have X running on the\n> machine doing the replication or syncing. Even then I wrote a curses\n> based Python interface awhile back which allows buttons, progress\n> bars, input fields, etc (I called it tinter and it's available at\n> http://iximd.com/~dwalker). It's a simple interface and could\n> probably be cleaned up a bit but it works. :)\n\n\tWhy would we want any type of GUI (X11 or curses) for this sync\nprogram. I imagine just a command line program with a few options (local\nmachine, remote machine, db name, etc...), and nothing else.\n\tThough I will take a look at your curses interface, as I have been\nwanting to make a curses interface to a few db interfaces I have, in a\nsimple as manner as possible.\n\n> That would be a Good Thing. Have webspace somewhere? If I can get\n> permission from the \"powers that be\" at the office I could host a website on\n> our (Domino) webserver.\n\n\tYea, I got my own web server (www.rkirkpat.net) with 1GB+ of disk\nspace available, sitting on a decent speed DSL. Even can setup of a\nvirtual server if we want (i.e. pgsync.rkirkpat.net :). CVS repository,\nemail lists, etc... possible with some effort (and time). \n\tSo, where should we start? TTYL.\n\n\tPS. The current pages on my web site are very out of date at the\nmoment (save for the pgsql information). I hope to have updated ones up\nwithin the week. \n\n---------------------------------------------------------------------------\n| \"For to me to live is Christ, and to die is gain.\" |\n| --- Philippians 1:21 (KJV) |\n---------------------------------------------------------------------------\n| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |\n---------------------------------------------------------------------------\n\n",
"msg_date": "Sun, 26 Dec 1999 18:05:02 -0700 (MST)",
"msg_from": "Ryan Kirkpatrick <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] database replication"
},
{
"msg_contents": "Ryan Kirkpatrick wrote:\n> \n> On Sun, 26 Dec 1999, Damond Walker wrote:\n> \n> > > How about a single, seperate table with the fields of 'database',\n> > >'tablename', 'oid', 'last_changed', that would store the same data as your\n> > >PGR_TIME field. It would be seperated from the actually data tables, and\n> ...\n> > The problem with OID's is that they are unique at the local level but if\n> > you try and use them between servers you can run into overlap.\n\nThe same is unfortunately true of any local primary key in a replicated\nsystem.\n\nMariposa solved this by making the oid 8-byte, of which first four are the\nsite id \nand remaining four are the oid as we have it now.\n\nThis has the added benefit of being able to determine which site created the\nrecord.\n\n> > Oops...how about defining a trigger for this? With deletion I guess we\n> > would have to move a flag into another table saying we deleted record 'X'\n> > with this primary key from this table.\n> \n> Or, according to my logic below, if a row is missing on one side\n> or the other, then just compare the remaining row's timestamp to the last\n> synchronization time (stored in a seperate table/db elsewhere). The\n> results of the comparsion and the state of row existences tell one if the\n> row was inserted or deleted since the last sync, and what should be done\n> to perform the sync.\n\nIt's very difficult to find a _missing_ row quickly. It will allways be\nsomewhat \nexpensive.\n\nPerhaps the easiest way would be to re-introduce time-travel. then a deleted\nrow\nwould just be an ordinary row with its valid_to timestamp set to past.\n\nprobably a set of (valid_from,valid_to,site_id,local_row_id) would be\nsufficient to \npinpoint the record both in time and space.\n\nBeing able to do it would require some improvement in postgres inheritance.\nAt least rules, triggers, indexes, constraints and defaults should be\ninheriteable.\n\n> No, provided that we don't do the identification number idea\n> (which the more I think about it, probably will not work). As for what\n> version support plpgsql, I don't know, one of the more hard-core pgsql\n> hackers can probably tell us that.\n\nAsk Jan Wiek, he did it :)\n\n> > The only thing we'd need for Python is the Python extensions for\n> > PostgreSQL...which in turn requires libpq and that's about it. So, it\n> > should be able to run on any platform supported by Python and libpq.\n> \n> Of course. If it ran on NT as well as Linux/Unix, that would be\n> even better. :)\n\nNT kas both Python and libpq but unfortunately no PyGreSQL. If someone takes \nthe time to make it compile it would be appreciated :)\n\nIf you feel you like pure python protocol hacking, I can dig up my python \nmodule that was able to do simple queries for version 6.2\n \n------------------\nHannu\n",
"msg_date": "Mon, 27 Dec 1999 11:10:00 +0200",
"msg_from": "Hannu Krosing <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] database replication"
}
] |
[
{
"msg_contents": "Hi, all\n\nI finally got around to schlepping through pg_dump, to finish what I started\nabout three months (or more) ago. Attached is a gzipped diff file to apply\nin the bin/pg_dump directory. This should remove all string length\ndependencies, except one, which I'm working on. It has been through some\nrudimentary unit testing, but that's about it, so if any of you would give\nit a more strenuous run-through, I'd be grateful for the feedback.\n\nCheers...\n\nMikeA",
"msg_date": "Sun, 26 Dec 1999 22:29:19 +0200",
"msg_from": "\"Ansley, Michael\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Unlimited query length - the final chapter (aka pg_dump)"
},
{
"msg_contents": "\nApplied.\n\n> \n> Hi, all\n> \n> I finally got around to schlepping through pg_dump, to finish what I started\n> about three months (or more) ago. Attached is a gzipped diff file to apply\n> in the bin/pg_dump directory. This should remove all string length\n> dependencies, except one, which I'm working on. It has been through some\n> rudimentary unit testing, but that's about it, so if any of you would give\n> it a more strenuous run-through, I'd be grateful for the feedback.\n> \n> Cheers...\n> \n> MikeA\n> \n> \n\n[Attachment, skipping...]\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 27 Dec 1999 10:42:30 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Unlimited query length - the final chapter (aka\n pg_dump)"
}
] |
[
{
"msg_contents": "Hi, again,\n\nMerry Christmas to those of you who celebrate it, and if you're reading this\nwithin three days of Christmas, then you're as sorry an excuse for a human\nbeing as I am ;-)\n\nAnyway, the point of this mail is to say that I have altered the explain\ncode slightly, so that it dumps the results of the explain into a table. I\nfind that a lot more convenient for two reasons: a) it's persistent, b) it's\naccessible, no matter what interface you're using. Poor old Dave Page has\nbeen racking his brain trying to figure out how to get a plan to pgAdmin (if\nhe hasn't already), and I even proposed supplying a server-side library that\nwould trap the output, and send that contents back through a stored\nprocedure, or something. Anyway, with the current way that I have coded it,\nin addition to the plan output using elog, it gets dumped into a table, the\nrows of which can the be selected. There are a couple of issues that I\nwould like to resolve.\n\na) This is a useful format, but are there enough interested people to\nwarrant continuing?\nb) If so, should the output table be a system table?\nc) If not, then how does the explain decide what to do if the table doesn't\nexist?\nd) And if the table does exist, then should it elog the plan?\ne) The plan id is output using elog. How would I ensure that this gets back\nto any arbitrary client. If I understand right, elogs don't go to ODBC, and\npossibly other, clients.\n\n\nI'm sure there are other things that I will remember, but that's all for\nnow.\n\nMikeA\n\n",
"msg_date": "Sun, 26 Dec 1999 22:43:48 +0200",
"msg_from": "\"Ansley, Michael\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Explain plan output"
},
{
"msg_contents": "\"Ansley, Michael\" <[email protected]> writes:\n> Anyway, the point of this mail is to say that I have altered the explain\n> code slightly, so that it dumps the results of the explain into a\n> table.\n\nWhat do you mean by that, exactly? You can't expect to fit long explain\noutputs into a single table row, so I suppose it's one row per line.\nHow are the rows identified? What's the expected declaration of the\ntable?\n\n> I find that a lot more convenient\n\nIt strikes me as a lot less convenient for the sorts of things I use\nexplain for. But I wouldn't object if it were an optional feature:\n\n\tEXPLAIN [ VERBOSE ] [ INTO <table> ] <query>\n\nwhich would also solve your problem of figuring out which table to write\nto.\n\n> e) The plan id is output using elog. How would I ensure that this gets back\n> to any arbitrary client. If I understand right, elogs don't go to ODBC, and\n> possibly other, clients.\n\nWhat's a \"plan id\", and is it actually necessary?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 27 Dec 1999 10:51:05 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Explain plan output "
}
] |
[
{
"msg_contents": "Hi, all,\n\nThis is the patch for the final bit. Sorry that it's separate.\n\nCheers...\n\n\nMikeA",
"msg_date": "Sun, 26 Dec 1999 23:04:34 +0200",
"msg_from": "\"Ansley, Michael\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Unlimited query length - The final chapter (part II)"
},
{
"msg_contents": "\nApplied.\n\n> \n> Hi, all,\n> \n> This is the patch for the final bit. Sorry that it's separate.\n> \n> Cheers...\n> \n> \n> MikeA\n> \n\n[Attachment, skipping...]\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 27 Dec 1999 10:44:59 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [PATCHES] Unlimited query length - The final chapter (part II)"
}
] |
[
{
"msg_contents": "Here is a patch that would enhance the efficiency in that skip strings\nwhich have been already checked. The patch was made by Kazuko\nNakagawa. Michael, can you comment on this?\n\n*** ecpglib.c.orig\tWed Dec 22 13:13:21 1999\n--- ecpglib.c\tWed Dec 22 13:37:32 1999\n***************\n*** 398,403 ****\n--- 398,404 ----\n \tPGresult *results;\n \tPGnotify *notify;\n \tstruct variable *var;\n+ \tint\thostvarl = 0;\n \n \tcopiedquery = ecpg_strdup(stmt->command, stmt->lineno);\n \n***************\n*** 569,575 ****\n \t\t\treturn false;\n \n \t\tstrcpy(newcopy, copiedquery);\n! \t\tif ((p = next_insert(newcopy)) == NULL)\n \t\t{\n \n \t\t\t/*\n--- 570,576 ----\n \t\t\treturn false;\n \n \t\tstrcpy(newcopy, copiedquery);\n! \t\tif ((p = next_insert(newcopy+hostvarl)) == NULL)\n \t\t{\n \n \t\t\t/*\n***************\n*** 582,587 ****\n--- 583,589 ----\n \t\telse\n \t\t{\n \t\t\tstrcpy(p, tobeinserted);\n+ \t\t\thostvarl = strlen(newcopy);\n \n \t\t\t/*\n \t\t\t * The strange thing in the second argument is the rest of the\n\n",
"msg_date": "Mon, 27 Dec 1999 16:49:19 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": true,
"msg_subject": "ecpg enhance patch"
},
{
"msg_contents": "On Mon, Dec 27, 1999 at 04:49:19PM +0900, Tatsuo Ishii wrote:\n> Here is a patch that would enhance the efficiency in that skip strings\n> which have been already checked. The patch was made by Kazuko\n> Nakagawa. Michael, can you comment on this?\n\nThe problem is that the current system allows insertions of placeholders\nwhich are later replaced by values. After applying this patch this will no\nlonger work. But with some changes we might get almost the same result.\n\nAfter the p = next_insert(...) p-newcopy characters are already clean. This\nshould be used. I just noticed that there is a ugly hack in there anyway,\nnamely the string length calculation via substraction of two pointers. I\nwonder if this works with multibyte strings.\n\nMichael\n-- \nMichael Meskes | Go SF 49ers!\nTh.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!\nTel.: (+49) 2431/72651 | Use Debian GNU/Linux!\nEmail: [email protected] | Use PostgreSQL!\n",
"msg_date": "Mon, 27 Dec 1999 15:52:24 +0100",
"msg_from": "Michael Meskes <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] ecpg enhance patch"
},
{
"msg_contents": "> On Mon, Dec 27, 1999 at 04:49:19PM +0900, Tatsuo Ishii wrote:\n> > Here is a patch that would enhance the efficiency in that skip strings\n> > which have been already checked. The patch was made by Kazuko\n> > Nakagawa. Michael, can you comment on this?\n> \n> The problem is that the current system allows insertions of placeholders\n> which are later replaced by values. After applying this patch this will no\n> longer work. But with some changes we might get almost the same result.\n> \n> After the p = next_insert(...) p-newcopy characters are already clean. This\n> should be used. I just noticed that there is a ugly hack in there anyway,\n> namely the string length calculation via substraction of two pointers. I\n\nThank you for your comment. I'll foward it to the author of the patch.\n\n> wonder if this works with multibyte strings.\n\nShould be no problem.\n--\nTatsuo Ishii\n",
"msg_date": "Tue, 28 Dec 1999 11:35:32 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] ecpg enhance patch"
},
{
"msg_contents": "Can I get a comment on this? It has not been applied. It appears to\napply to an older release. New new file name is\ninterfaces/ecpg/lib/execute.c.\n\n\n\n> Here is a patch that would enhance the efficiency in that skip strings\n> which have been already checked. The patch was made by Kazuko\n> Nakagawa. Michael, can you comment on this?\n> \n> *** ecpglib.c.orig\tWed Dec 22 13:13:21 1999\n> --- ecpglib.c\tWed Dec 22 13:37:32 1999\n> ***************\n> *** 398,403 ****\n> --- 398,404 ----\n> \tPGresult *results;\n> \tPGnotify *notify;\n> \tstruct variable *var;\n> + \tint\thostvarl = 0;\n> \n> \tcopiedquery = ecpg_strdup(stmt->command, stmt->lineno);\n> \n> ***************\n> *** 569,575 ****\n> \t\t\treturn false;\n> \n> \t\tstrcpy(newcopy, copiedquery);\n> ! \t\tif ((p = next_insert(newcopy)) == NULL)\n> \t\t{\n> \n> \t\t\t/*\n> --- 570,576 ----\n> \t\t\treturn false;\n> \n> \t\tstrcpy(newcopy, copiedquery);\n> ! \t\tif ((p = next_insert(newcopy+hostvarl)) == NULL)\n> \t\t{\n> \n> \t\t\t/*\n> ***************\n> *** 582,587 ****\n> --- 583,589 ----\n> \t\telse\n> \t\t{\n> \t\t\tstrcpy(p, tobeinserted);\n> + \t\t\thostvarl = strlen(newcopy);\n> \n> \t\t\t/*\n> \t\t\t * The strange thing in the second argument is the rest of the\n> \n> \n> ************\n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 1 Jun 2000 18:03:17 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: ecpg enhance patch"
},
{
"msg_contents": "On Thu, Jun 01, 2000 at 06:03:17PM -0400, Bruce Momjian wrote:\n> Can I get a comment on this? It has not been applied. It appears to\n> apply to an older release. New new file name is\n> interfaces/ecpg/lib/execute.c.\n\nHmm, I'm not sure but I've seen this before. I think there was a reason for\nnot including it, wasn't there?\n\nBut then I fail to remember what we discussed back then.\n\nMichael\n-- \nMichael Meskes\[email protected]\nGo SF 49ers! Go Rhein Fire!\nUse Debian GNU/Linux! Use PostgreSQL!\n",
"msg_date": "Fri, 2 Jun 2000 10:38:31 +0200",
"msg_from": "Michael Meskes <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: ecpg enhance patch"
},
{
"msg_contents": "> On Thu, Jun 01, 2000 at 06:03:17PM -0400, Bruce Momjian wrote:\n> > Can I get a comment on this? It has not been applied. It appears to\n> > apply to an older release. New new file name is\n> > interfaces/ecpg/lib/execute.c.\n> \n> Hmm, I'm not sure but I've seen this before. I think there was a reason for\n> not including it, wasn't there?\n> \n> But then I fail to remember what we discussed back then.\n\nWell, if someone shot it down, I usually delete the email. Please\nreview it and tell us if it makes any sense. Seems like some kind of\noptimization.\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 2 Jun 2000 11:09:50 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: ecpg enhance patch"
},
{
"msg_contents": "\nBruce Momjian <[email protected]> wrote:\n\n> Can I get a comment on this? It has not been applied. It appears to\n> apply to an older release. New new file name is\n> interfaces/ecpg/lib/execute.c.\n\nThe following patch could solve the next error cases in 6.5.3-ecpglib.\n\ncase 1.\n strcpy(str, \"T''EST'TEST\");\n exec sql insert into ecpg_test values ( 11, :str, 'kobe' ) ;\n \n error(-201)(Too many arguments line 1025.\n\ncase 2. \n str( str, \"T'''?'ESTTEST\");\n exec sql insert into ecpg_test values ( 11, :str, 'kobe' ) ;\n\n error(-202)(Too few arguments line 1024.) \n\n\nHowever, these problems seems to be solved in 7.0-ecpglib.\n\n\n> > Here is a patch that would enhance the efficiency in that skip strings\n> > which have been already checked. The patch was made by Kazuko\n> > Nakagawa. Michael, can you comment on this?\n> > \n> > *** ecpglib.c.orig\tWed Dec 22 13:13:21 1999\n> > --- ecpglib.c\tWed Dec 22 13:37:32 1999\n> > ***************\n> > *** 398,403 ****\n> > --- 398,404 ----\n> > \tPGresult *results;\n> > \tPGnotify *notify;\n> > \tstruct variable *var;\n> > + \tint\thostvarl = 0;\n> > \n> > \tcopiedquery = ecpg_strdup(stmt->command, stmt->lineno);\n> > \n> > ***************\n> > *** 569,575 ****\n> > \t\t\treturn false;\n> > \n> > \t\tstrcpy(newcopy, copiedquery);\n> > ! \t\tif ((p = next_insert(newcopy)) == NULL)\n> > \t\t{\n> > \n> > \t\t\t/*\n> > --- 570,576 ----\n> > \t\t\treturn false;\n> > \n> > \t\tstrcpy(newcopy, copiedquery);\n> > ! \t\tif ((p = next_insert(newcopy+hostvarl)) == NULL)\n> > \t\t{\n> > \n> > \t\t\t/*\n> > ***************\n> > *** 582,587 ****\n> > --- 583,589 ----\n> > \t\telse\n> > \t\t{\n> > \t\t\tstrcpy(p, tobeinserted);\n> > + \t\t\thostvarl = strlen(newcopy);\n> > \n> > \t\t\t/*\n> > \t\t\t * The strange thing in the second argument is the rest of the\n> > \n> > \n> > ************\n\n\n--\nRegards,\nSAKAIDA Masaaki -- Osaka, Japan\n\n\n",
"msg_date": "Sat, 03 Jun 2000 11:22:19 +0900",
"msg_from": "SAKAIDA Masaaki <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: ecpg enhance patch"
},
{
"msg_contents": "On Sat, Jun 03, 2000 at 11:22:19AM +0900, SAKAIDA Masaaki wrote:\n> The following patch could solve the next error cases in 6.5.3-ecpglib.\n> \n> case 1.\n> strcpy(str, \"T''EST'TEST\");\n> exec sql insert into ecpg_test values ( 11, :str, 'kobe' ) ;\n> \n> error(-201)(Too many arguments line 1025.\n> \n> case 2. \n> str( str, \"T'''?'ESTTEST\");\n> exec sql insert into ecpg_test values ( 11, :str, 'kobe' ) ;\n> \n> error(-202)(Too few arguments line 1024.) \n> \n> \n> However, these problems seems to be solved in 7.0-ecpglib.\n\nSo that means the patch is not needed anymore?\n\nMichael\n-- \nMichael Meskes\[email protected]\nGo SF 49ers! Go Rhein Fire!\nUse Debian GNU/Linux! Use PostgreSQL!\n",
"msg_date": "Sat, 3 Jun 2000 20:57:45 +0200",
"msg_from": "Michael Meskes <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: ecpg enhance patch"
},
{
"msg_contents": "\nMichael Meskes <[email protected]> wrote:\n\n> On Sat, Jun 03, 2000 at 11:22:19AM +0900, SAKAIDA Masaaki wrote:\n> > The following patch could solve the next error cases in 6.5.3-ecpglib.\n> > \n> > case 1.\n> > strcpy(str, \"T''EST'TEST\");\n> > exec sql insert into ecpg_test values ( 11, :str, 'kobe' ) ;\n> > \n> > error(-201)(Too many arguments line 1025.\n> > \n> > case 2. \n> > str( str, \"T'''?'ESTTEST\");\n> > exec sql insert into ecpg_test values ( 11, :str, 'kobe' ) ;\n> > \n> > error(-202)(Too few arguments line 1024.) \n> > \n> > \n> > However, these problems seems to be solved in 7.0-ecpglib.\n> \n> So that means the patch is not needed anymore?\n\nIn the meaning of bug-fix, the patch is not needed. Because you \nhave already modified \"next_insert()\" in 7.0-ecpglib. However \nin the meaning of speed-up, the patch will be needed.\n--\nRegards,\nSAKAIDA Masaaki -- Osaka, Japan\n\n\n*** postgresql-7.0.1/src/interfaces/ecpg/lib/execute.c.orig\tTue Jun\n6 15:02:34 2000\n--- postgresql-7.0.1/src/interfaces/ecpg/lib/execute.c\tTue Jun 6 15:02:05 2000\n***************\n*** 278,283 ****\n--- 278,284 ----\n \t\tchar\t *tobeinserted = NULL;\n \t\tchar\t *p;\n \t\tchar\t\tbuff[20];\n+ \t\tint\t\thostvarl = 0;\n \n \t\t/*\n \t\t * Some special treatment is needed for records since we want\n***************\n*** 559,565 ****\n \t\t\treturn false;\n \n \t\tstrcpy(newcopy, copiedquery);\n! \t\tif ((p = next_insert(newcopy)) == NULL)\n \t\t{\n \n \t\t\t/*\n--- 560,566 ----\n \t\t\treturn false;\n \n \t\tstrcpy(newcopy, copiedquery);\n! \t\tif ((p = next_insert(newcopy + hostvarl)) == NULL)\n \t\t{\n \n \t\t\t/*\n***************\n*** 572,577 ****\n--- 573,579 ----\n \t\telse\n \t\t{\n \t\t\tstrcpy(p, tobeinserted);\n+ \t\t\thostvarl = strlen(newcopy);\n \n \t\t\t/*\n \t\t\t * The strange thing in the second argument is the rest of the\n\n\n\n",
"msg_date": "Tue, 06 Jun 2000 16:24:11 +0900",
"msg_from": "SAKAIDA Masaaki <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: ecpg enhance patch"
},
{
"msg_contents": "I have committed this patch. It offers a speed up to ecpg.\n\n\n> \n> Michael Meskes <[email protected]> wrote:\n> \n> > On Sat, Jun 03, 2000 at 11:22:19AM +0900, SAKAIDA Masaaki wrote:\n> > > The following patch could solve the next error cases in 6.5.3-ecpglib.\n> > > \n> > > case 1.\n> > > strcpy(str, \"T''EST'TEST\");\n> > > exec sql insert into ecpg_test values ( 11, :str, 'kobe' ) ;\n> > > \n> > > error(-201)(Too many arguments line 1025.\n> > > \n> > > case 2. \n> > > str( str, \"T'''?'ESTTEST\");\n> > > exec sql insert into ecpg_test values ( 11, :str, 'kobe' ) ;\n> > > \n> > > error(-202)(Too few arguments line 1024.) \n> > > \n> > > \n> > > However, these problems seems to be solved in 7.0-ecpglib.\n> > \n> > So that means the patch is not needed anymore?\n> \n> In the meaning of bug-fix, the patch is not needed. Because you \n> have already modified \"next_insert()\" in 7.0-ecpglib. However \n> in the meaning of speed-up, the patch will be needed.\n> --\n> Regards,\n> SAKAIDA Masaaki -- Osaka, Japan\n> \n> \n> *** postgresql-7.0.1/src/interfaces/ecpg/lib/execute.c.orig\tTue Jun\n> 6 15:02:34 2000\n> --- postgresql-7.0.1/src/interfaces/ecpg/lib/execute.c\tTue Jun 6 15:02:05 2000\n> ***************\n> *** 278,283 ****\n> --- 278,284 ----\n> \t\tchar\t *tobeinserted = NULL;\n> \t\tchar\t *p;\n> \t\tchar\t\tbuff[20];\n> + \t\tint\t\thostvarl = 0;\n> \n> \t\t/*\n> \t\t * Some special treatment is needed for records since we want\n> ***************\n> *** 559,565 ****\n> \t\t\treturn false;\n> \n> \t\tstrcpy(newcopy, copiedquery);\n> ! \t\tif ((p = next_insert(newcopy)) == NULL)\n> \t\t{\n> \n> \t\t\t/*\n> --- 560,566 ----\n> \t\t\treturn false;\n> \n> \t\tstrcpy(newcopy, copiedquery);\n> ! \t\tif ((p = next_insert(newcopy + hostvarl)) == NULL)\n> \t\t{\n> \n> \t\t\t/*\n> ***************\n> *** 572,577 ****\n> --- 573,579 ----\n> \t\telse\n> \t\t{\n> \t\t\tstrcpy(p, tobeinserted);\n> + \t\t\thostvarl = strlen(newcopy);\n> \n> \t\t\t/*\n> \t\t\t * The strange thing in the second argument is the rest of the\n> \n> \n> \n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 2 Oct 2000 12:00:46 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: ecpg enhance patch"
},
{
"msg_contents": "On Mon, Oct 02, 2000 at 12:00:46PM -0400, Bruce Momjian wrote:\n> I have committed this patch. It offers a speed up to ecpg.\n\nThanks. I haven't found the time to do it so far. But since I wanted to this\nis good news. :-)\n\nMichael\n-- \nMichael Meskes\[email protected]\nGo SF 49ers! Go Rhein Fire!\nUse Debian GNU/Linux! Use PostgreSQL!\n",
"msg_date": "Wed, 4 Oct 2000 11:48:52 -0700",
"msg_from": "Michael Meskes <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: ecpg enhance patch"
}
] |
[
{
"msg_contents": "\n> > It turns out that for an index on a single text column, the maximum\n> > safe text length is 2700 bytes. So the correct check for dangerous\n> > procedure definitions in 6.5.* is\n> \n> This is another argument to try and get long tuples into 7.0.\n\nThe limit of 2700 is btree specific, and imho a more than actually \nreasonable limit for a btree key.\nAnybody wanting an index on a larger key would usually be \nbetter off with different indexing methods, like a functional\nbtree, hash, or text index.\n\nAndreas\n",
"msg_date": "Mon, 27 Dec 1999 10:40:51 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: [HACKERS] Error \"vacuum pg_proc\""
}
] |
[
{
"msg_contents": "Before anyone starts implementing any database replication, I'd strongly\nsuggest doing some research, first:\n\nhttp://sybooks.sybase.com:80/onlinebooks/group-rs/rsg1150e/rs_admin/@Generic__BookView;cs=default;ts=default\n\n(I'd even more strongly suggest implementing database replication in a \nproduction environment, first, but that might be unduly burdensome.)\n\n\t-Michael Robinson\n",
"msg_date": "Mon, 27 Dec 1999 19:35:52 +0800 (CST)",
"msg_from": "Michael Robinson <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] database replication"
},
{
"msg_contents": "hi..\n\n> Before anyone starts implementing any database replication, I'd strongly\n> suggest doing some research, first:\n> \n> http://sybooks.sybase.com:80/onlinebooks/group-rs/rsg1150e/rs_admin/@Generic__BookView;cs=default;ts=default\n\ngood idea, but perhaps sybase isn't the best study case.. here's some extremely\ndetailed online coverage of Oracle 8i's replication, from the oracle online\nlibrary:\n\nhttp://bach.towson.edu/oracledocs/DOC/server803/A54651_01/toc.htm\n\n-- \nAaron J. Seigo\nSys Admin\n",
"msg_date": "Mon, 27 Dec 1999 11:23:19 -0700",
"msg_from": "\"Aaron J. Seigo\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] database replication"
}
] |
[
{
"msg_contents": "I have posted another patch for pg_dump to the patches list. There was a\npotential problem with the pqexpbuffer which I have removed as far as\npossible (the bug, not pqexpbuffer).\n\nMikeA\n",
"msg_date": "Mon, 27 Dec 1999 15:12:02 +0200",
"msg_from": "\"Ansley, Michael\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "pg_dump update"
}
] |
[
{
"msg_contents": "Greetings,\n\nDoes pg open its logfile every time it writes or does it open the file and\nhold it open as long as the postmaster is running? Do I have to stop the\npostmaster to rotate the logfile out or can I just move or delete it at any\ntime and pg will create a new logfile the next time it writes?\n\nThank you,\nMatthew\n",
"msg_date": "Mon, 27 Dec 1999 08:29:05 -0500",
"msg_from": "Matthew Hagerty <[email protected]>",
"msg_from_op": true,
"msg_subject": "Logfile rotation"
},
{
"msg_contents": "Matthew Hagerty <[email protected]> writes:\n> Does pg open its logfile every time it writes or does it open the file and\n> hold it open as long as the postmaster is running?\n\nIf you do the usual\n\tpostmaster >logfile 2>&1\nthen the logfile is actually opened by the shell before the postmaster\never starts; the postmaster has no way to close and re-open it. So,\nno, you can't rotate the logfile transparently in that scenario.\n\nI believe there's a compile-time option to use syslog instead, which\nprobably works better for this (assuming you have syslog).\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 27 Dec 1999 11:14:09 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Logfile rotation "
}
] |
[
{
"msg_contents": ">> >\tnot use cache - hmm.. but I like fast routines (my current\n>> >\tto_char() implementation is faster (20-50%) than current \n>> >\tdate_part()).\n>> \n>> While fast routines are nice indeed, isn't it true in practice\n>> that to_char() times will be swamped by the amount of time to\n>> parse, plan, and execute a query in most cases?\nAlthough not in PG (yet...) we draw reports that contain sometimes hundreds\nof thousands, sometimes (often) millions of rows, and each row has at least\ntwo to_char calls. Any speed improvement is significant.\n\nAssuming an improvement of 0.22s per 10000 rows, over 5 million rows, that's\nnearly four minutes. That's quite a lot on a report that normally takes\nabout ten or fifteen minutes to run. Of course, the servers we run on are\nprobably a lot more powerful that the one that Karl ran his test on, so the\nimprovement is likely to be less, but still significant.\n\n\nMikeA\n",
"msg_date": "Mon, 27 Dec 1999 16:23:43 +0200",
"msg_from": "\"Ansley, Michael\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] memory dilemma"
}
] |
[
{
"msg_contents": ">> > Anyway, the point of this mail is to say that I have altered the\n>> explain\n>> > code slightly, so that it dumps the results of the explain into a\n>> > table.\n>> \n>> What do you mean by that, exactly? You can't expect to fit long explain\n>> outputs into a single table row, so I suppose it's one row per line.\n>> How are the rows identified? What's the expected declaration of the\n>> table?\nCREATE SEQUENCE explain_plan_seq;\nCREATE TABLE explain_plan (\n\tid INT4,\n\texplain_line CHARACTER VARYING(255),\n\tlevel INT4,\n\tplan_order INT4\n);\n\nThis is pretty close to the way that Oracle implements it. That's where I\ngot the idea from. Just had to add a little SPI, and voila...\n\n>> > I find that a lot more convenient\n>> \n>> It strikes me as a lot less convenient for the sorts of things I use\n>> explain for. \nWhen ODBC is the only way in, then it's pretty inconvenient ;-) If you have\naccess to psql, then it's fine, but for certain (perhaps most) other\ninterfaces, it's not so cool. And when there is separation of duties (i.e.:\nthe dba is not the same person as the developer), and the developers are\nusing traditional win32 tools, the table is a lot more accessible.\nGenerally, in the environments that I've worked in, the developers only use\nthings like psql if they happen to be a db designer as well. Frequently,\nonce the database has been designed and created, the developers only have\nODBC access. Any change requests go through the dba.\n\n>> But I wouldn't object if it were an optional feature:\n>> \n>> \tEXPLAIN [ VERBOSE ] [ INTO <table> ] <query>\n>> \n>> which would also solve your problem of figuring out which table to write\n>> to.\n\nYes I suppose that's probably the correct way to do it. I was hoping not to\nhave to modify the language. However, what to do if the columns are\nincorrect, or the table doesn't exist? Just generate an elog? Also, what\nabout the sequence. I suppose that I can just elog ANY error generated.\n\n>> > e) The plan id is output using elog. How would I ensure that this\n>> gets back\n>> > to any arbitrary client. If I understand right, elogs don't go to\n>> ODBC, and\n>> > possibly other, clients.\n>> \n>> What's a \"plan id\", and is it actually necessary?\nThe plan id is the unique number assigned to the plan, so that you can\nidentify it. There will potentially be others in the table, so you need to\nbe able to identify the one that you have just generated. So, yes, it is\nnecessary.\n\n\nThis is what an output looks like (you might need to widen your window if it\nwraps):\n\ntemplate1=# select * from explain_plan where id = 10;\n id | explain_line\n| level | plan_order \n----+-----------------------------------------------------------------------\n----+-------+------------\n 10 | Hash Join (cost=327.99 rows=228 width=36)\n| 1 | 1\n 10 | -> Seq Scan on test1 (cost=162.17 rows=4096 width=16)\n| 2 | 2\n 10 | -> Hash (cost=15.38 rows=228 width=20)\n| 2 | 3\n 10 | -> Index Scan using pk1_test2 on test2 (cost=15.38 rows=228\nwidth=20) | 3 | 4\n(4 rows)\n\n\n\n\nI will look at changing the EXPLAIN syntax...\n\n\nMikeA\n\n",
"msg_date": "Mon, 27 Dec 1999 19:20:14 +0200",
"msg_from": "\"Ansley, Michael\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] Explain plan output "
}
] |
[
{
"msg_contents": "Hi all,\n\nIt seems fe-connect.c was changed to call inet_aton() recently.\nI can't make executables linking libpq.so because my environ-\nment(i386-pc-solaris2.5.1, compiled by gcc 2.7.2.3) doesn't have\ninet_aton(). \n\nRegards.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Tue, 28 Dec 1999 16:30:06 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "can't link libpq.so(inet_aton() not found)"
},
{
"msg_contents": "\"Hiroshi Inoue\" <[email protected]> writes:\n> It seems fe-connect.c was changed to call inet_aton() recently.\n> I can't make executables linking libpq.so because my environ-\n> ment(i386-pc-solaris2.5.1, compiled by gcc 2.7.2.3) doesn't have\n> inet_aton(). \n\nHmm. We could make libpq dependent on the substitute inet_aton\nthat's in backend/ports. But since this is only needed for a very\noptional feature (and one I don't much care for ;-)), my inclination\nis to just #ifdef it out, and not support pghostaddr on machines\nwithout inet_aton.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 28 Dec 1999 10:19:18 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] can't link libpq.so(inet_aton() not found) "
},
{
"msg_contents": "> -----Original Message-----\n> From: Tom Lane [mailto:[email protected]]\n> \n> \"Hiroshi Inoue\" <[email protected]> writes:\n> > It seems fe-connect.c was changed to call inet_aton() recently.\n> > I can't make executables linking libpq.so because my environ-\n> > ment(i386-pc-solaris2.5.1, compiled by gcc 2.7.2.3) doesn't have\n> > inet_aton(). \n> \n> Hmm. We could make libpq dependent on the substitute inet_aton\n> that's in backend/ports. But since this is only needed for a very\n> optional feature (and one I don't much care for ;-)), my inclination\n> is to just #ifdef it out, and not support pghostaddr on machines\n> without inet_aton.\n>\n\nI agree to $ifdef it out.\nIt seems bad to lower the independecy of libpq by such a optional\nfeature.\n\nI don't maintain current source tree in i386-pc-solaris.\nAfter a long time I tried to install current tree to my i386-pc-solaris\nand found 3 errors.\n\n1) this one\n2) psql compile error due to old verison readline as Jan already\n reported.\n3) initdb error due to \"id -u\" error as Keith already reported.\n\nRegards.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Wed, 29 Dec 1999 11:00:08 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] can't link libpq.so(inet_aton() not found) "
}
] |
[
{
"msg_contents": " As discussed, I've removed the LZTEXT datatype again.\n\n No additional news on TOAST yet.\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#========================================= [email protected] (Jan Wieck) #\n\n",
"msg_date": "Tue, 28 Dec 1999 14:35:45 +0100 (MET)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "LZTEXT is removed"
}
] |
[
{
"msg_contents": "Your name : Tomas Cerha\nYour email address : [email protected]\n----------------------------------------------------------------------\nSystem Configuration\n----------------------------------------------------------------------\n Architecture (example: Intel Pentium) : Intel Pentium MMX\n Operating System (example: Linux 2.0.26 ELF) : Linux 2.2.5-15 ELF\n PostgreSQL version (example: PostgreSQL-6.5.3): PostgreSQL-6.5.3 \n Compiler used (example: gcc 2.8.0) : installed from RPMs\n\tinstalled packages:\n\t\tpostgresql-6.5.3-1.i386.rpm\n\t\tpostgresql-perl-6.5.3-1.i386.rpm\n\t\tpostgresql-server-6.5.3-1.i386.rpm\n\t\tpostgresql-tcl-6.5.3-1.i386.rpm\n\t\tpostgresql-test-6.5.3-1.rpm\n----------------------------------------------------------------------\nI've already posted this bug, but nobody replied yet ... I was not\nsubscribed, but now I am. If it is not significant, I'm sorry to\noverload this\nmailing list... Now to the problem:\n\n----------------------------------------------------------------------\nPlease enter a FULL description of your problem:\n----------------------------------------------------------------------\n\nAplying the NOT operator with << INET operator results always in false.\nSee the example below:\n\nThis is the contents of table a:\n\naccounting=> SELECT * FROM a;\n ip\n--------\n10.1.1.1\n10.1.1.2\n10.2.1.2\n10.2.1.1\n(4 rows)\n\nNow, let's select only those hosts from subnet '10.1/16': (works fine)\n\naccounting=> SELECT * FROM a WHERE ip<<'10.1/16';\n ip\n--------\n10.1.1.1\n10.1.1.2\n(2 rows)\n\nAnd now, I only apply NOT to prewious statement ....\n\naccounting=> SELECT * FROM a WHERE NOT ip<<'10.1/16';\nip\n--\n(0 rows)\n\n\nBut that is not true! I tryed this also with other versions of postgress\non other machines and the result was always the same. But this makes all\nabout INET operators quite unusable, when I am not able to exclude some\naddress space (I can only include them). Or is there another way to do\nIt?\n\n\n----------------------------------------------------------------------\nPlease describe a way to repeat the problem. Please try to provide a\nconcise reproducible example, if at all possible: \n----------------------------------------------------------------------\n\nCREATE TABLE a (ip inet);\n\nINSERT INTO a VALUES ('10.1.1.1'); \nINSERT INTO a VALUES ('10.1.1.2');\nINSERT INTO a VALUES ('10.2.1.2');\nINSERT INTO a VALUES ('10.2.1.1');\n\nSELECT * FROM a;\nSELECT * FROM a WHERE ip<<'10.1/16';\nSELECT * FROM a WHERE NOT ip<<'10.1/16';\n\nDROP TABLE a;\n\n----------------------------------------------------------------------\nThank you for any idea which could help to solve this problem ...\n\nTom Cerha, student, FEE CTU Prague Czech Republic\n",
"msg_date": "Tue, 28 Dec 1999 21:14:46 +0100",
"msg_from": "Tomas Cerha <[email protected]>",
"msg_from_op": true,
"msg_subject": "INET operators and NOT"
},
{
"msg_contents": "Tomas Cerha <[email protected]> writes:\n> Aplying the NOT operator with << INET operator results always in false.\n\n> accounting=> SELECT * FROM a;\n> ip\n> --------\n> 10.1.1.1\n> 10.1.1.2\n> 10.2.1.2\n> 10.2.1.1\n> (4 rows)\n\n> accounting=> SELECT * FROM a WHERE ip<<'10.1/16';\n> ip\n> --------\n> 10.1.1.1\n> 10.1.1.2\n> (2 rows)\n\n> accounting=> SELECT * FROM a WHERE NOT ip<<'10.1/16';\n> ip\n> --\n> (0 rows)\n\nWhat's going on here is that the optimizer is simplifying \"NOT x<<y\"\n(network_sub) into \"x>>=y\" (network_supeq), because the pg_operator\nentry for << claims that >>= is its negator. This example demonstrates\nthat that ain't so.\n\nCan anyone comment on whether any of the inet operators are actually the\ncorrect negator of << ? For that matter, are inet's other commutator\nand negator declarations just as broken?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 28 Dec 1999 18:35:44 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [BUGS] INET operators and NOT "
},
{
"msg_contents": "I still see this problem in 7.0.\n\n[ Charset ISO-8859-2 unsupported, converting... ]\n> Your name : Tomas Cerha\n> Your email address : [email protected]\n> ----------------------------------------------------------------------\n> System Configuration\n> ----------------------------------------------------------------------\n> Architecture (example: Intel Pentium) : Intel Pentium MMX\n> Operating System (example: Linux 2.0.26 ELF) : Linux 2.2.5-15 ELF\n> PostgreSQL version (example: PostgreSQL-6.5.3): PostgreSQL-6.5.3 \n> Compiler used (example: gcc 2.8.0) : installed from RPMs\n> \tinstalled packages:\n> \t\tpostgresql-6.5.3-1.i386.rpm\n> \t\tpostgresql-perl-6.5.3-1.i386.rpm\n> \t\tpostgresql-server-6.5.3-1.i386.rpm\n> \t\tpostgresql-tcl-6.5.3-1.i386.rpm\n> \t\tpostgresql-test-6.5.3-1.rpm\n> ----------------------------------------------------------------------\n> I've already posted this bug, but nobody replied yet ... I was not\n> subscribed, but now I am. If it is not significant, I'm sorry to\n> overload this\n> mailing list... Now to the problem:\n> \n> ----------------------------------------------------------------------\n> Please enter a FULL description of your problem:\n> ----------------------------------------------------------------------\n> \n> Aplying the NOT operator with << INET operator results always in false.\n> See the example below:\n> \n> This is the contents of table a:\n> \n> accounting=> SELECT * FROM a;\n> ip\n> --------\n> 10.1.1.1\n> 10.1.1.2\n> 10.2.1.2\n> 10.2.1.1\n> (4 rows)\n> \n> Now, let's select only those hosts from subnet '10.1/16': (works fine)\n> \n> accounting=> SELECT * FROM a WHERE ip<<'10.1/16';\n> ip\n> --------\n> 10.1.1.1\n> 10.1.1.2\n> (2 rows)\n> \n> And now, I only apply NOT to prewious statement ....\n> \n> accounting=> SELECT * FROM a WHERE NOT ip<<'10.1/16';\n> ip\n> --\n> (0 rows)\n> \n> \n> But that is not true! I tryed this also with other versions of postgress\n> on other machines and the result was always the same. But this makes all\n> about INET operators quite unusable, when I am not able to exclude some\n> address space (I can only include them). Or is there another way to do\n> It?\n> \n> \n> ----------------------------------------------------------------------\n> Please describe a way to repeat the problem. Please try to provide a\n> concise reproducible example, if at all possible: \n> ----------------------------------------------------------------------\n> \n> CREATE TABLE a (ip inet);\n> \n> INSERT INTO a VALUES ('10.1.1.1'); \n> INSERT INTO a VALUES ('10.1.1.2');\n> INSERT INTO a VALUES ('10.2.1.2');\n> INSERT INTO a VALUES ('10.2.1.1');\n> \n> SELECT * FROM a;\n> SELECT * FROM a WHERE ip<<'10.1/16';\n> SELECT * FROM a WHERE NOT ip<<'10.1/16';\n> \n> DROP TABLE a;\n> \n> ----------------------------------------------------------------------\n> Thank you for any idea which could help to solve this problem ...\n> \n> Tom Cerha, student, FEE CTU Prague Czech Republic\n> \n> ************\n> \n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 1 Jun 2000 18:22:10 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: INET operators and NOT"
},
{
"msg_contents": "Here is Tom Lane's comment.\n\n> Tomas Cerha <[email protected]> writes:\n> > Aplying the NOT operator with << INET operator results always in false.\n> \n> > accounting=> SELECT * FROM a;\n> > ip\n> > --------\n> > 10.1.1.1\n> > 10.1.1.2\n> > 10.2.1.2\n> > 10.2.1.1\n> > (4 rows)\n> \n> > accounting=> SELECT * FROM a WHERE ip<<'10.1/16';\n> > ip\n> > --------\n> > 10.1.1.1\n> > 10.1.1.2\n> > (2 rows)\n> \n> > accounting=> SELECT * FROM a WHERE NOT ip<<'10.1/16';\n> > ip\n> > --\n> > (0 rows)\n> \n> What's going on here is that the optimizer is simplifying \"NOT x<<y\"\n> (network_sub) into \"x>>=y\" (network_supeq), because the pg_operator\n> entry for << claims that >>= is its negator. This example demonstrates\n> that that ain't so.\n> \n> Can anyone comment on whether any of the inet operators are actually the\n> correct negator of << ? For that matter, are inet's other commutator\n> and negator declarations just as broken?\n> \n> \t\t\tregards, tom lane\n> \n> ************\n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 1 Jun 2000 18:23:18 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: INET operators and NOT"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n>> What's going on here is that the optimizer is simplifying \"NOT x<<y\"\n>> (network_sub) into \"x>>=y\" (network_supeq), because the pg_operator\n>> entry for << claims that >>= is its negator. This example demonstrates\n>> that that ain't so.\n>> \n>> Can anyone comment on whether any of the inet operators are actually the\n>> correct negator of << ? For that matter, are inet's other commutator\n>> and negator declarations just as broken?\n\nI did take out the demonstrably incorrect negator links for 7.0.\nWe still have those other issues about CIDR/INET types though...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 01 Jun 2000 18:42:28 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: INET operators and NOT "
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> I still see this problem in 7.0.\n\nYou do? I don't:\n\nregression=# SELECT * FROM a;\n ip\n----------\n 10.1.1.1\n 10.1.1.2\n 10.2.1.2\n 10.2.1.1\n(4 rows)\n\nregression=# SELECT * FROM a WHERE ip<<'10.1/16';\n ip\n----------\n 10.1.1.1\n 10.1.1.2\n(2 rows)\n\nregression=# SELECT * FROM a WHERE NOT ip<<'10.1/16';\n ip\n----------\n 10.2.1.2\n 10.2.1.1\n(2 rows)\n\nregression=#\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 01 Jun 2000 18:46:36 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: INET operators and NOT "
},
{
"msg_contents": "Sorry, I got the 2's and 1's mixed up. Yes, fixed.\n\n> Bruce Momjian <[email protected]> writes:\n> > I still see this problem in 7.0.\n> \n> You do? I don't:\n> \n> regression=# SELECT * FROM a;\n> ip\n> ----------\n> 10.1.1.1\n> 10.1.1.2\n> 10.2.1.2\n> 10.2.1.1\n> (4 rows)\n> \n> regression=# SELECT * FROM a WHERE ip<<'10.1/16';\n> ip\n> ----------\n> 10.1.1.1\n> 10.1.1.2\n> (2 rows)\n> \n> regression=# SELECT * FROM a WHERE NOT ip<<'10.1/16';\n> ip\n> ----------\n> 10.2.1.2\n> 10.2.1.1\n> (2 rows)\n> \n> regression=#\n> \n> \t\t\tregards, tom lane\n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 1 Jun 2000 19:36:01 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: INET operators and NOT"
}
] |
[
{
"msg_contents": "Hi all. Once again I come to you with a puzzle...\n\nI have the following structures (related to this question) in my\n[PostgreSQL 6.5.2 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66]\ndatabase according to a pg_dump of the schema (reformatted for\nreadability):\n\n---------------------------------------------------------------------------\n\n\tCREATE TABLE \"tblissuearticle\" (\n\t \"ixissue\" int4 NOT NULL,\n\t \"ixarticle\" int4 NOT NULL,\n\t \"ixprocessor\" int4,\n\t \"ixmember\" int4,\n\t \"iorder\" int4,\n\t \"sstatus\" character);\n\n\tREVOKE ALL on \"tblissuearticle\" from PUBLIC;\n\n\tCREATE INDEX \"tblissuearticle_oid\" on \"tblissuearticle\" \n\t\tusing btree (\"oid\" \"oid_ops\" );\n\n\tCREATE INDEX \"tblissuearticle_idx1\" on \"tblissuearticle\" \n\t\tusing btree (\n\t\t\t\"ixissue\" \"int4_ops\", \n\t\t\t\"ixarticle\" \"int4_ops\", \n\t\t\t\"iorder\" \"int4_ops\"\n\t\t);\n\n\tCREATE INDEX \"tblissuearticle_idx2\" on \"tblissuearticle\" \n\t\tusing btree (\"ixissue\" \"int4_ops\" );\n\n---------------------------------------------------------------------------\n\nNow I enter trusty psql to run some SQL statements. Notice the SECOND\nEXPLAIN which I run. I aded the _idx2 index above after this statement\ndidn't catch _idx1 (partial index). Neither parts matched. I tried\ndropping _idx1 and it still didn't use _idx2.\n\n---------------------------------------------------------------------------\n\nmail=> vacuum tblissuearticle ;\nVACUUM\nmail=> vacuum analyze tblissuearticle ;\nVACUUM\nmail=> explain select 1 from tblissuearticle where ixissue = 7 \n\tand ixarticle = 9;\nNOTICE: QUERY PLAN:\n\nIndex Scan using tblissuearticle_idx1 on tblissuearticle \n\t(cost=228.04 rows=1 width=0)\n\nEXPLAIN\nmail=> explain select 1 from tblissuearticle where ixissue = 7;\nNOTICE: QUERY PLAN:\n\nSeq Scan on tblissuearticle (cost=4076.63 rows=76338 width=0)\n\nEXPLAIN\nmail=> explain verbose select 1 from tblissuearticle where ixissue = 7;\nNOTICE: QUERY DUMP:\n\n{ SEQSCAN :cost 4076.63 :size 76338 :width 0 :state <> :qptargetlist ({\nTARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname\n\"?column?\" :reskey 0 :reskeyop 0 :resgroupref 0 :resjunk false } :expr {\nCONST :consttype 23 :constlen 4 :constisnull false :constvalue 4 [ 1 0 0 0\n] :constbyval true }}) :qpqual ({ EXPR :typeOid 0 :opType op :oper { OPER\n:opno 96 :opid 65 :opresulttype 16 } :args ({ VAR :varno 1 :varattno 1\n:vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1} { CONST\n:consttype 23 :constlen 4 :constisnullfalse :constvalue 4 [ 7 0 0 0 ]\n:constbyval true })}) :lefttree <> :righttree <> :extprm () :locprm ()\n:initplan <> :nprm 0 :scanrelid 1 } \n\nNOTICE: QUERY PLAN:\n\nSeq Scan on tblissuearticle (cost=4076.63 rows=76338 width=0)\n\nEXPLAIN\n\n---------------------------------------------------------------------------\n\nHoping someone can shed some light on this for me. Happy Holidays...\n\n- K\n\nKristofer Munn * KMI * 973-509-9414 * AIM KrMunn * ICQ 352499 * www.munn.com\n\n",
"msg_date": "Tue, 28 Dec 1999 21:54:50 -0500 (EST)",
"msg_from": "Kristofer Munn <[email protected]>",
"msg_from_op": true,
"msg_subject": "Index Puzzle for you"
},
{
"msg_contents": "Kristofer Munn <[email protected]> writes:\n> [ why does the second example not use an index? ]\n\n> mail=> explain select 1 from tblissuearticle where ixissue = 7 \n> \tand ixarticle = 9;\n\n> Index Scan using tblissuearticle_idx1 on tblissuearticle \n> \t(cost=228.04 rows=1 width=0)\n\n> mail=> explain select 1 from tblissuearticle where ixissue = 7;\n\n> Seq Scan on tblissuearticle (cost=4076.63 rows=76338 width=0)\n\nThe thing that jumps out at me from this example is the much larger\nestimate of returned rows in the second case. The planner is clearly\nestimating that \"ixissue = 7\" alone is not very selective. That might\nor might not be reasonable (how many rows are in the table, and what's\nthe actual distribution of ixissue values?), but if it is reasonable\nthen a sequential scan might indeed be the right choice. Index scans\nare not always better than sequential scans --- the planner's job would\nbe far simpler if they were ;-)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 29 Dec 1999 00:49:12 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index Puzzle for you "
},
{
"msg_contents": "Tom Lane wrote:\n> The thing that jumps out at me from this example is the much larger\n> estimate of returned rows in the second case. The planner is clearly\n\nGood catch! There were 296 possible issues the table. One had 86,544\narticles associated with it. The next highest was 5,949. Then the\nnumbers drop to 630, 506, 412, 184 and then the rest are all under 62.\nOut of curiosity, how does vacuum decide on the large estimate?\n\nThe maximum is 86,544.\nThe average row return for ixissue = x is 3412.\nThe median is 25.\nThe mode is 25.\n\nixissue is the result of a sequence.\n\nThanks for the heads up on this...\n\n- K\n\nKristofer Munn * KMI * 973-509-9414 * AIM KrMunn * ICQ 352499 * www.munn.com\n\n",
"msg_date": "Wed, 29 Dec 1999 02:10:36 -0500 (EST)",
"msg_from": "Kristofer Munn <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Index Puzzle for you "
},
{
"msg_contents": "> Tom Lane wrote:\n> > The thing that jumps out at me from this example is the much larger\n> > estimate of returned rows in the second case. The planner is clearly\n> \n> Good catch! There were 296 possible issues the table. One had 86,544\n> articles associated with it. The next highest was 5,949. Then the\n> numbers drop to 630, 506, 412, 184 and then the rest are all under 62.\n> Out of curiosity, how does vacuum decide on the large estimate?\n> \n> The maximum is 86,544.\n> The average row return for ixissue = x is 3412.\n> The median is 25.\n> The mode is 25.\n> \n> ixissue is the result of a sequence.\n> \n> Thanks for the heads up on this...\n\nHere is the relevent comment from vacuum.c. It is not perfect, but was\nthe best thing I could think of.\n\n---------------------------------------------------------------------------\n\n/*\n * vc_attrstats() -- compute column statistics used by the optimzer\n *\n * We compute the column min, max, null and non-null counts.\n * Plus we attempt to find the count of the value that occurs most\n * frequently in each column. These figures are used to compute \n * the selectivity of the column.\n *\n * We use a three-bucked cache to get the most frequent item.\n * The 'guess' buckets count hits. A cache miss causes guess1\n * to get the most hit 'guess' item in the most recent cycle, and\n * the new item goes into guess2. Whenever the total count of hits\n * of a 'guess' entry is larger than 'best', 'guess' becomes 'best'.\n *\n * This method works perfectly for columns with unique values, and columns\n * with only two unique values, plus nulls.\n *\n * It becomes less perfect as the number of unique values increases and\n * their distribution in the table becomes more random.\n *\n */\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 29 Dec 1999 05:12:55 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index Puzzle for you"
},
{
"msg_contents": "Kristofer Munn <[email protected]> writes:\n> Good catch! There were 296 possible issues the table. One had 86,544\n> articles associated with it. The next highest was 5,949. Then the\n> numbers drop to 630, 506, 412, 184 and then the rest are all under 62.\n> Out of curiosity, how does vacuum decide on the large estimate?\n\nThe estimate is made using a \"disbursion\" statistic calculated by VACUUM\nANALYZE. I don't know the whole statistical theory here, but if you\nthink of disbursion as the fraction of values in the column that are\nequal to the most common value, you won't be too far off.\n\nI gather from your numbers that your table has about 1 million rows,\nso the disbursion of ixissue would be somewhere around 86544/1000000.\n\nThe planner uses the disbursion in a way that amounts to assuming that\nany \"WHERE column = constant\" search is in fact searching for the most\ncommon value, so we get an estimate of returned rows that is in the\nvicinity of the number of rows with the most common value. (It's not\nexact, first because VACUUM can't estimate that number perfectly\naccurately, and second because the disbursion actually has some second-\norder terms in it too.)\n\nWhen the most common value is much more common than anything else,\nthis essentially means that queries are always optimized for retrieving\nthe most common value, even when they're retrieving some other value.\nIn your particular case, the optimizer is estimating that the runtime\nof an index scan that needs to retrieve almost 10% of the rows in the\ntable will be worse than the runtime of a plain sequential scan. I'm\nnot sure if that's right or not (the cost models could use more work),\nbut the first-order mistake is that the estimate of retrieved rows is\nway off --- unless you are actually retrieving that one hugely popular\nissue.\n\nIn current sources (7.0-to-be), VACUUM records the most common value\nalong with the disbursion, and the planner checks to see if the\n\"constant\" in the WHERE clause is that value or not. If not, it doesn't\nuse the disbursion straight-up, but a smaller estimate. This helps a\ngood deal on drastically skewed column distributions such as you are\ndescribing. It's still easily fooled :-(, but it's hard to see how to\ndo much better without expending a lot more space to store a lot more\nstatistics.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 29 Dec 1999 10:20:43 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Index Puzzle for you "
}
] |
[
{
"msg_contents": " I created index on cidr field on table with about 1 000 000 rows, made \n'vacuum analyze', but exlain told me that sequental scan is done\n on query like that SELECT * FROM table WHERE ipaddr='212.129.92.1'\n\n I'm using PostgreSQL 6.5.1. I need a index scan. Do I miss something ?\nMargarit.\n\n\n",
"msg_date": "Wed, 29 Dec 1999 10:52:49 +0200 (EET)",
"msg_from": "Margarit Nickolov <[email protected]>",
"msg_from_op": true,
"msg_subject": "Index scan on CIDR field ?"
},
{
"msg_contents": "Margarit Nickolov <[email protected]> writes:\n> I created index on cidr field on table with about 1 000 000 rows, made \n> 'vacuum analyze', but exlain told me that sequental scan is done\n> on query like that SELECT * FROM table WHERE ipaddr='212.129.92.1'\n> I'm using PostgreSQL 6.5.1.\n\nHmm. I think this is an artifact of the recently noticed mistake in\n6.5's pg_opclass table: it uses the same name \"network_ops\" for two\ndifferent index operator classes.\n\nI found that current sources seem to work properly:\n\ncreate table cidr1 (f1 cidr);\ncreate index cidri on cidr1 (f1);\nexplain select * from cidr1 where f1 = '212.129.92.1';\n\nIndex Scan using cidri on cidr1 (cost=2.50 rows=10 width=12)\n\nbut 6.5.3 chooses a sequential scan, just as Margarit says.\n\nFurthermore the pg_index entry for cidri is wrong in 6.5.3;\nit shows indclass = 935 (pg_opclass entry for inet) whereas current\nsources show 652 (the one for cidr). I haven't bothered to track down\nexactly where the confusion occurs in the code, but I'll bet some part\nof index creation is assuming that index opclass names are unique.\nThe wrong pg_index entry explains why the optimizer is ignoring the\nindex; it's looking for one whose opclass matches the cidr '=' op\nit's trying to optimize.\n\nMargarit, I think you can fix this in a 6.5.* database as follows:\nas postgres, say\n\nUPDATE pg_opclass SET opcname = 'inet_ops' WHERE oid = 935;\nUPDATE pg_opclass SET opcname = 'cidr_ops' WHERE oid = 652;\n\nThen drop and recreate the faulty index(es). (Probably any index you\nhave on a cidr column is messed up.)\n\nBetter back up your database before trying this!!! It seemed to work\nin a play database, but I make no guarantees.\n\nNote to hackers: perhaps we should recommend that anyone using inet or\ncidr indexes do this? If they don't, when it comes time to update to\n7.0 their pg_dumped index declarations will fail, since 7.0 won't\nrecognize \"network_ops\" as an index opclass name.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 29 Dec 1999 10:47:06 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [SQL] Index scan on CIDR field ? "
}
] |
[
{
"msg_contents": "Why is the install procedure for PL/pgSQL depending on libpq?\nPL/pgSQL is running on backend, and should not use libpq. I see\nfollowings in the Makefile for PL/pgSQL.\n\nCFLAGS+= -I$(LIBPQDIR) -I$(SRCDIR)/include\n\nSHLIB_LINK+= -L$(LIBPQDIR) -lpq\n--\nTatsuo Ishii\n",
"msg_date": "Wed, 29 Dec 1999 22:56:16 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": true,
"msg_subject": "PL/pgSQL install procedure"
}
] |
[
{
"msg_contents": "\nI am writing the subquery chapter of the book. Tom, you once mentioned\nyou could get subqueries to use HASH joins, but you didn't because\nsomeone said it may a run out of memory.\n\nI would suggest that if it is that large a subquery, our nested loop\nhandling will take forever, so would never finish anyway, unless the\nouter query has only a few rows.\n\nTom, does it still look easy to change, and if so, can you change it to\nhash? I know the real fix is for multiple target lists.\n\nI would rather not have to go mention a serious performance workaround\nin the book, because the limitation would be published perhaps for many\nyears.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 29 Dec 1999 09:11:51 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "subquery performance and EXISTS"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> Tom, does it still look easy to change, and if so, can you change it to\n> hash?\n\nWe could probably do it, but there is the little problem that hash joins\nonly work for a very limited set of data types and operators. This\nwouldn't be a complete solution on its own.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 29 Dec 1999 11:07:26 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: subquery performance and EXISTS "
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> > Tom, does it still look easy to change, and if so, can you change it to\n> > hash?\n> \n> We could probably do it, but there is the little problem that hash joins\n> only work for a very limited set of data types and operators. This\n> wouldn't be a complete solution on its own.\n\nHow hard would it be to have the EXISTS be done automatically? The\nperformance problem for subqueries has bothered me for two years now. I\ndon't think I know enough to fix it, though.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 29 Dec 1999 16:20:38 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Re: subquery performance and EXISTS"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> How hard would it be to have the EXISTS be done automatically? The\n> performance problem for subqueries has bothered me for two years now.\n\nI think the ideal solution would involve rewriting the subquery into\na single-level query. I haven't looked at how hard this would be...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 29 Dec 1999 17:25:47 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: subquery performance and EXISTS "
}
] |
[
{
"msg_contents": "Can someone direct me as to why the rights that I specify for a given table\ndoesn't take affect? I revoked all rights to the \"Public\" and the postgres\ndefault id \"nobody\" can still do inserts, deletes, updates, etc. I do a \\z\non the table and it shows no rights, but still allows anyone w/ a valid\npostgres id to wipe out any row they wish. I've even tried to manually\nrevoke the rights from \"nobody\" and it still doesn't work. Are there\nsetting some where that \"turns on\" the specified privileges intiated by the\nrevoke/grant commands?\n\n\nThanks in advance.....\n\n\n\n",
"msg_date": "Wed, 29 Dec 1999 12:14:55 -0600",
"msg_from": "\"svn\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "revoke/grant rights issue"
}
] |
[
{
"msg_contents": "How would I get all friends greater than the average age?\n\n\tCREATE TABLE friends (\n\t\t firstname CHAR(15),\n\t\t lastname CHAR(20),\n\t\t age INTEGER)\n\n\tSELECT firstname, lastname\n\tFROM friends\n\tHAVING age >= AVG(age)\n\t\n\tERROR: Attribute friends.firstname must be GROUPed or used in an\n\taggregate function\n\nThis fails too:\n\n\tSELECT firstname, lastname\n\tFROM friends\n\tWHERE age >= AVG(age)\n\t\n\tERROR: Aggregates not allowed in WHERE clause\n\nThis fails. I am stumped.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 29 Dec 1999 14:51:19 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Using aggregate in HAVING"
},
{
"msg_contents": "Bruce Momjian wrote:\n> \n> How would I get all friends greater than the average age?\n> \n> CREATE TABLE friends (\n> firstname CHAR(15),\n> lastname CHAR(20),\n> age INTEGER)\n> \n> SELECT firstname, lastname\n> FROM friends\n> HAVING age >= AVG(age)\n> \n> ERROR: Attribute friends.firstname must be GROUPed or used in an\n> aggregate function\n> \n> This fails too:\n> \n> SELECT firstname, lastname\n> FROM friends\n> WHERE age >= AVG(age)\n> \n> ERROR: Aggregates not allowed in WHERE clause\n> \n> This fails. I am stumped.\n\nWithout using subselects? With subselects you could also do:\n\nSELECT firstname, lastname\nFROM friends\nWHERE age >= (SELECT AVG(age) FROM friends);\n\nAre you writing the chapter on aggregates? \n\nMike Mascari\n",
"msg_date": "Wed, 29 Dec 1999 15:17:28 -0500",
"msg_from": "Mike Mascari <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Using aggregate in HAVING"
},
{
"msg_contents": "> Bruce Momjian wrote:\n> > \n> > How would I get all friends greater than the average age?\n> > \n> > CREATE TABLE friends (\n> > firstname CHAR(15),\n> > lastname CHAR(20),\n> > age INTEGER)\n> > \n> > SELECT firstname, lastname\n> > FROM friends\n> > HAVING age >= AVG(age)\n> > \n> > ERROR: Attribute friends.firstname must be GROUPed or used in an\n> > aggregate function\n> > \n> > This fails too:\n> > \n> > SELECT firstname, lastname\n> > FROM friends\n> > WHERE age >= AVG(age)\n> > \n> > ERROR: Aggregates not allowed in WHERE clause\n> > \n> > This fails. I am stumped.\n> \n> Without using subselects? With subselects you could also do:\n> \n> SELECT firstname, lastname\n> FROM friends\n> WHERE age >= (SELECT AVG(age) FROM friends);\n> \n> Are you writing the chapter on aggregates? \n\nI have finished the aggregate chapter, and am doing the subselect\nchapter. I thought using a subselect for this example would be great,\nbut then I thought, \"Gee, why can't HAVING do that?\" However, I am\nrealizing that HAVING can't because without a GROUP BY, it applies to\nall rows as a whole, and there is no meaningful GROUP BY for this case.\n\nMy subquery figure actually will show how HAVING fails, and how\nsubqueries allow this. Now, I am just asking for confirmation that this\nis true.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 29 Dec 1999 15:25:27 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Using aggregate in HAVING"
},
{
"msg_contents": "Bruce Momjian wrote:\n> I have finished the aggregate chapter, and am doing the subselect\n> chapter. I thought using a subselect for this example would be great,\n> but then I thought, \"Gee, why can't HAVING do that?\" However, I am\n> realizing that HAVING can't because without a GROUP BY, it applies to\n> all rows as a whole, and there is no meaningful GROUP BY for this case.\n> \n> My subquery figure actually will show how HAVING fails, and how\n> subqueries allow this. Now, I am just asking for confirmation that this\n> is true.\n> \n\nWell...actually, you can use a self-join like so:\n\nSELECT f1.lastname, f1.firstname, f1.age, avg(f2.age)\nFROM friends f1, friends f2\nWHERE true\nGROUP BY f1.lastname, f1.firstname, f1.age\nHAVING f1.age > avg(f2.age);\n\nI don't think you'll be able to state that subselects allow for\nqueries that HAVING won't. Proving a negative can be very\ndifficult (although I think you're probably right).\n\nMike Mascari\n",
"msg_date": "Wed, 29 Dec 1999 15:57:44 -0500",
"msg_from": "Mike Mascari <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Using aggregate in HAVING"
}
] |
[
{
"msg_contents": "Is this a good example of a required correlated subquery:\n\n\tSELECT f1.firstname, f1.lastname, f1.age\n\tFROM friends f1\n\tWHERE age = (\n\t SELECT MAX(age)\n\t FROM friends f2\n\t WHERE f1.state = f2.state\n\t )\n\tORDER BY firstname, lastname\n\nIt finds the oldest person in each state. HAVING can't do that, right?\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 29 Dec 1999 17:36:39 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "correlated subquery"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> Is this a good example of a required correlated subquery:\n> \tSELECT f1.firstname, f1.lastname, f1.age\n> \tFROM friends f1\n> \tWHERE age = (\n> \t SELECT MAX(age)\n> \t FROM friends f2\n> \t WHERE f1.state = f2.state\n> \t )\n> \tORDER BY firstname, lastname\n\n> It finds the oldest person in each state. HAVING can't do that, right?\n\nYes, I think you are right. You could find the oldest age in each state\nwith a HAVING:\n\n\tSELECT state, MAX(age) FROM friends GROUP BY state;\n\nbut I don't see any way to get the other attributes of the record(s)\nmatching that age, except by using a subselect.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 29 Dec 1999 18:18:07 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] correlated subquery "
},
{
"msg_contents": "\n>Is this a good example of a required correlated subquery:\n>\n>\tSELECT f1.firstname, f1.lastname, f1.age\n>\tFROM friends f1\n>\tWHERE age = (\n>\t SELECT MAX(age)\n>\t FROM friends f2\n>\t WHERE f1.state = f2.state\n>\t )\n>\tORDER BY firstname, lastname\n>\n>It finds the oldest person in each state. HAVING can't do that, right?\n\nI'm assuming that this is for the book... If so, you might want to also\nnote that this query can return more people than there are states if\nmultiple people in the same state have the maximum age for that state.\n\nI'm not sure how deeply you are going into this, but getting only one\nperson per state looks like it might be fairly painful... You might be\nable cheat if there was only one field besides age and state in the output\nusing group by and an aggregate.\n\nStephan Szabo\n",
"msg_date": "Wed, 29 Dec 1999 18:59:18 -0500",
"msg_from": "[email protected]",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] correlated subquery "
},
{
"msg_contents": "> \n> >Is this a good example of a required correlated subquery:\n> >\n> >\tSELECT f1.firstname, f1.lastname, f1.age\n> >\tFROM friends f1\n> >\tWHERE age = (\n> >\t SELECT MAX(age)\n> >\t FROM friends f2\n> >\t WHERE f1.state = f2.state\n> >\t )\n> >\tORDER BY firstname, lastname\n> >\n> >It finds the oldest person in each state. HAVING can't do that, right?\n> \n> I'm assuming that this is for the book... If so, you might want to also\n> note that this query can return more people than there are states if\n> multiple people in the same state have the maximum age for that state.\n> \n> I'm not sure how deeply you are going into this, but getting only one\n> person per state looks like it might be fairly painful... You might be\n> able cheat if there was only one field besides age and state in the output\n> using group by and an aggregate.\n\nYikes, that would be painful. Good point. Fortunately, the data has\nonly one max person per state.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 29 Dec 1999 19:44:07 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] correlated subquery"
}
] |
[
{
"msg_contents": "Current votes are:\n\n(8) 8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter M.,\n Michael, Tatsuo\n(5) 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n\n \n open bracket on if () line:\n(7) yes: Massimo, Peter, Vince, Tom Lane, Peter M., Marc, Tatsuo \n(6) no: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.\n\n\nLooks like radical change will come to our source code format for 7.0.\n\nUnless someone else speaks up, I will consider this vote closed. I will\nmodify pgindent to reflect this format the next time it is run.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 30 Dec 1999 01:04:03 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Source code format vote"
},
{
"msg_contents": "Bruce Momjian wrote:\n> \n> Current votes are:\n> \n> (8) 8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter M.,\n> Michael, Tatsuo\n> (5) 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n> \n> \n> open bracket on if () line:\n> (7) yes: Massimo, Peter, Vince, Tom Lane, Peter M., Marc, Tatsuo\n> (6) no: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.\n> \n> Looks like radical change will come to our source code format for 7.0.\n> \n> Unless someone else speaks up, I will consider this vote closed. I will\n> modify pgindent to reflect this format the next time it is run.\n\nDon't know if I qualify to vote - but if I do then I vote for 4-space tabs \n(seeing that I often read the code - now if only two-space tabs \nwere an option...)\n--------\nRegards\nTheo\n",
"msg_date": "Thu, 30 Dec 1999 09:47:19 +0200",
"msg_from": "Theo Kramer <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "> > Current votes are:\n> >\n> > (8) 8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter\nM.,\n> > Michael, Tatsuo\n> > (5) 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n> >\n> >\n> > open bracket on if () line:\n> > (7) yes: Massimo, Peter, Vince, Tom Lane, Peter M., Marc, Tatsuo\n> > (6) no: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.\n> >\n> > Looks like radical change will come to our source code format for 7.0.\n> >\n> > Unless someone else speaks up, I will consider this vote closed. I will\n> > modify pgindent to reflect this format the next time it is run.\n>\n> Don't know if I qualify to vote - but if I do then I vote for 4-space tabs\n> (seeing that I often read the code - now if only two-space tabs\n> were an option...)\n\nSame here, I prefer 4-space tabs as well, looks much better on standard\nscreens.\nAlso I personally prefer the open bracket not to be placed in the if() line.\n\nBut I'm not sure if I qualify to vote either, although I do read the code.\n\nJoost Roeleveld\n\n",
"msg_date": "Thu, 30 Dec 1999 09:14:00 +0100",
"msg_from": "\"J. Roeleveld\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "I would also vote for 4 space tabs.\n\nBut would prefer 2 space tabs.\n\nSteve\n\n\nTheo Kramer wrote:\n\n> Bruce Momjian wrote:\n> >\n> > Current votes are:\n> >\n> > (8) 8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter M.,\n> > Michael, Tatsuo\n> > (5) 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n> >\n> >\n> > open bracket on if () line:\n> > (7) yes: Massimo, Peter, Vince, Tom Lane, Peter M., Marc, Tatsuo\n> > (6) no: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.\n> >\n> > Looks like radical change will come to our source code format for 7.0.\n> >\n> > Unless someone else speaks up, I will consider this vote closed. I will\n> > modify pgindent to reflect this format the next time it is run.\n>\n> Don't know if I qualify to vote - but if I do then I vote for 4-space tabs\n> (seeing that I often read the code - now if only two-space tabs\n> were an option...)\n> --------\n> Regards\n> Theo\n>\n> ************\n\n",
"msg_date": "Thu, 30 Dec 1999 05:00:58 -0800",
"msg_from": "Stephen Birch <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> Current votes are:\n> (8) 8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter M.,\n> Michael, Tatsuo\n> (5) 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n\n> open bracket on if () line:\n> (7) yes: Massimo, Peter, Vince, Tom Lane, Peter M., Marc, Tatsuo \n> (6) no: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.\n\n> Looks like radical change will come to our source code format for 7.0.\n\nIt looks to me like there is consensus to change the tab spacing (which\nis NOT the same as the logical indent step, for those newcomers who\ndon't seem to be aware of the difference).\n\nHowever, I don't see a consensus to change the bracket layout.\n7-to-6 is not enough of a margin to justify a wholesale code change.\nEspecially considering that my original vote was NO, which Bruce chose\nto interpret as YES ;-). Change it back to NO, and the vote is the\nother way.\n\nI think what we have is a consensus to change the physical tab spacing\nbut leave the look of the code alone...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 30 Dec 1999 10:11:00 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote "
},
{
"msg_contents": "Vote is for changing tab size. Indentation will stay at 4 spaces.\n\n\n> Bruce Momjian wrote:\n> > \n> > Current votes are:\n> > \n> > (8) 8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter M.,\n> > Michael, Tatsuo\n> > (5) 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n> > \n> > \n> > open bracket on if () line:\n> > (7) yes: Massimo, Peter, Vince, Tom Lane, Peter M., Marc, Tatsuo\n> > (6) no: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.\n> > \n> > Looks like radical change will come to our source code format for 7.0.\n> > \n> > Unless someone else speaks up, I will consider this vote closed. I will\n> > modify pgindent to reflect this format the next time it is run.\n> \n> Don't know if I qualify to vote - but if I do then I vote for 4-space tabs \n> (seeing that I often read the code - now if only two-space tabs \n> were an option...)\n> --------\n> Regards\n> Theo\n> \n> ************\n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 30 Dec 1999 12:01:29 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "Vote is for changing tab size. Indentation will remain at 4 spaces.\n\n\n[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> > > Current votes are:\n> > >\n> > > (8) 8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter\n> M.,\n> > > Michael, Tatsuo\n> > > (5) 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n> > >\n> > >\n> > > open bracket on if () line:\n> > > (7) yes: Massimo, Peter, Vince, Tom Lane, Peter M., Marc, Tatsuo\n> > > (6) no: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.\n> > >\n> > > Looks like radical change will come to our source code format for 7.0.\n> > >\n> > > Unless someone else speaks up, I will consider this vote closed. I will\n> > > modify pgindent to reflect this format the next time it is run.\n> >\n> > Don't know if I qualify to vote - but if I do then I vote for 4-space tabs\n> > (seeing that I often read the code - now if only two-space tabs\n> > were an option...)\n> \n> Same here, I prefer 4-space tabs as well, looks much better on standard\n> screens.\n> Also I personally prefer the open bracket not to be placed in the if() line.\n> \n> But I'm not sure if I qualify to vote either, although I do read the code.\n> \n> Joost Roeleveld\n> \n> \n> ************\n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 30 Dec 1999 12:01:52 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> > Current votes are:\n> > (8) 8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter M.,\n> > Michael, Tatsuo\n> > (5) 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n> \n> > open bracket on if () line:\n> > (7) yes: Massimo, Peter, Vince, Tom Lane, Peter M., Marc, Tatsuo \n> > (6) no: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.\n> \n> > Looks like radical change will come to our source code format for 7.0.\n> \n> It looks to me like there is consensus to change the tab spacing (which\n> is NOT the same as the logical indent step, for those newcomers who\n> don't seem to be aware of the difference).\n> \n> However, I don't see a consensus to change the bracket layout.\n> 7-to-6 is not enough of a margin to justify a wholesale code change.\n> Especially considering that my original vote was NO, which Bruce chose\n> to interpret as YES ;-). Change it back to NO, and the vote is the\n> other way.\n> \n> I think what we have is a consensus to change the physical tab spacing\n> but leave the look of the code alone...\n\nOK, change tab to 8 spaces, keep indent at 4 spaces, and keep open\nbracked on a separate line. Got it.\n\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 30 Dec 1999 12:09:24 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n> Was \"spaces instead of tabs\" one of the voted-on options? That would\n> make the tab issue moot, and would result in consistant appearance not\n> matter what tab setting one is using.\n\nQuite a good thought, actually. It'd be worth checking to see if there\nis any material expansion in the source's disk footprint and/or the\nsize of a compressed tarball after getting rid of tabs entirely.\nI'd be willing to vote for this if the space penalty is not large...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 03 Jan 2000 02:05:20 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote "
},
{
"msg_contents": "> OK, change tab to 8 spaces, keep indent at 4 spaces, and keep open\n> bracked on a separate line. Got it.\n\nJust a couple of comments:\n\nistm that an 8-5 vote should not be interpreted as a \"consensus\", at\nleast not until you get those 5 to agree that the proposed change is\nacceptable.\n\nWas \"spaces instead of tabs\" one of the voted-on options? That would\nmake the tab issue moot, and would result in consistant appearance not\nmatter what tab setting one is using.\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Mon, 03 Jan 2000 07:08:41 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "Tom Lane wrote:\n> \n> Thomas Lockhart <[email protected]> writes:\n> > Was \"spaces instead of tabs\" one of the voted-on options? That would\n> > make the tab issue moot, and would result in consistant appearance not\n> > matter what tab setting one is using.\n> \n> Quite a good thought, actually. It'd be worth checking to see if there\n> is any material expansion in the source's disk footprint and/or the\n> size of a compressed tarball after getting rid of tabs entirely.\n> I'd be willing to vote for this if the space penalty is not large...\n\nMe too!\n\nAnd, there already is an utility to entab/detab in tools section, so people\ncan use it if they absolutely must have tabs in their source.\n\nAFAIK most decent editors also can [en/de]tab the source they are editing.\n\nSo my vote would be 4-space indents, no tabs\n\n--------------\nHannu\n",
"msg_date": "Tue, 04 Jan 2000 01:00:50 +0200",
"msg_from": "Hannu Krosing <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "Hannu Krosing wrote:\n\n> Tom Lane wrote:\n> >\n> > Thomas Lockhart <[email protected]> writes:\n> > > Was \"spaces instead of tabs\" one of the voted-on options? That would\n> > > make the tab issue moot, and would result in consistant appearance not\n> > > matter what tab setting one is using.\n> >\n> > I'd be willing to vote for this if the space penalty is not large...\n>\n> Me too!\n\n Count me in.\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#========================================= [email protected] (Jan Wieck) #\n\n\n\n",
"msg_date": "Tue, 04 Jan 2000 00:18:54 +0100",
"msg_from": "Jan Wieck <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "> Hannu Krosing wrote:\n> \n> > Tom Lane wrote:\n> > >\n> > > Thomas Lockhart <[email protected]> writes:\n> > > > Was \"spaces instead of tabs\" one of the voted-on options? That would\n> > > > make the tab issue moot, and would result in consistant appearance not\n> > > > matter what tab setting one is using.\n> > >\n> > > I'd be willing to vote for this if the space penalty is not large...\n> >\n> > Me too!\n> \n> Count me in.\n\nDo I need to tabluate a vote on this too?\n\nI have to get all new votes from everyone on:\n\t\n\t8-space tabs\n\tno tabs\n\nIndentaion is still 4-spaces.\n\nI prefer the 8-space tabs to no tabs. Seems like 8-space tabs won over\n4-space tabs, so we need a vote on 8-space tabs vs. no tabs.\n\nI will need new votes because I have not kept any of the old messages.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 3 Jan 2000 18:59:02 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "\nOn 03-Jan-00 Bruce Momjian wrote:\n>> Hannu Krosing wrote:\n>> \n>> > Tom Lane wrote:\n>> > >\n>> > > Thomas Lockhart <[email protected]> writes:\n>> > > > Was \"spaces instead of tabs\" one of the voted-on options? That would\n>> > > > make the tab issue moot, and would result in consistant appearance not\n>> > > > matter what tab setting one is using.\n>> > >\n>> > > I'd be willing to vote for this if the space penalty is not large...\n>> >\n>> > Me too!\n>> \n>> Count me in.\n> \n> Do I need to tabluate a vote on this too?\n> \n> I have to get all new votes from everyone on:\n> \n> 8-space tabs\n> no tabs\n> \n> Indentaion is still 4-spaces.\n> \n> I prefer the 8-space tabs to no tabs. Seems like 8-space tabs won over\n> 4-space tabs, so we need a vote on 8-space tabs vs. no tabs.\n> \n> I will need new votes because I have not kept any of the old messages.\n\nOk, this is probably a really dumb question and probably even been answered\nbefore but I missed it. Why not make a tab be a tab and however it appears\nin the end programmer's editor can be up to the programmer? Or is pgindent\nchanging tabs to spaces?\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n 128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n",
"msg_date": "Mon, 03 Jan 2000 19:15:18 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "\nI'm for no-tabs personally ...\n\n\nOn Mon, 3 Jan 2000, Bruce Momjian wrote:\n\n> > Hannu Krosing wrote:\n> > \n> > > Tom Lane wrote:\n> > > >\n> > > > Thomas Lockhart <[email protected]> writes:\n> > > > > Was \"spaces instead of tabs\" one of the voted-on options? That would\n> > > > > make the tab issue moot, and would result in consistant appearance not\n> > > > > matter what tab setting one is using.\n> > > >\n> > > > I'd be willing to vote for this if the space penalty is not large...\n> > >\n> > > Me too!\n> > \n> > Count me in.\n> \n> Do I need to tabluate a vote on this too?\n> \n> I have to get all new votes from everyone on:\n> \t\n> \t8-space tabs\n> \tno tabs\n> \n> Indentaion is still 4-spaces.\n> \n> I prefer the 8-space tabs to no tabs. Seems like 8-space tabs won over\n> 4-space tabs, so we need a vote on 8-space tabs vs. no tabs.\n> \n> I will need new votes because I have not kept any of the old messages.\n> \n> -- \n> Bruce Momjian | http://www.op.net/~candle\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n> \n> ************\n> \n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n",
"msg_date": "Mon, 3 Jan 2000 20:21:01 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "Thus spake Bruce Momjian\n> I have to get all new votes from everyone on:\n> \t\n> \t8-space tabs\n> \tno tabs\n> \n> Indentaion is still 4-spaces.\n> \n> I prefer the 8-space tabs to no tabs. Seems like 8-space tabs won over\n> 4-space tabs, so we need a vote on 8-space tabs vs. no tabs.\n\nSeems like multiple votes. First vote is whether to use spaces or tabs\nfor indenting. Then, how many characters should we indent if we use\ntabs and if we don't. Note that people may have different opinions\non how much to indent for each of these. I suspect a number of people\nchoose 8 space tabs because it is standard and consistent on different\nmethods of output, not because they particularly like that much\nindentation. I know that I have lately been considering going to 3\nspace, no tab indenting in my own code so that it looks right whether\nI use the editor, cat to the screen or print it.\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": "Mon, 3 Jan 2000 21:18:47 -0500 (EST)",
"msg_from": "[email protected] (D'Arcy J.M. Cain)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "Thus spake Vince Vielhaber\n> Ok, this is probably a really dumb question and probably even been answered\n> before but I missed it. Why not make a tab be a tab and however it appears\n> in the end programmer's editor can be up to the programmer? Or is pgindent\n> changing tabs to spaces?\n\nNot a dumb question at all. However, think about comments. Look at\nthis example.\n\n\ti++;\t/* This variable is being incremented. I am commenting *\n\t\t\t * this because it is such a stupid variable name\n\t\t\t */\n\nUnder my editor that comment lines up nicely but it will look cockeyed\nfor many people reading this because I used tabs instead of spaces and\nmy tabs are 4, not the usual 8.\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": "Mon, 3 Jan 2000 21:22:44 -0500 (EST)",
"msg_from": "[email protected] (D'Arcy J.M. Cain)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "On Mon, 3 Jan 2000, D'Arcy J.M. Cain wrote:\n\n> Thus spake Bruce Momjian\n> > I have to get all new votes from everyone on:\n> > \t\n> > \t8-space tabs\n> > \tno tabs\n> > \n> > Indentaion is still 4-spaces.\n> > \n> > I prefer the 8-space tabs to no tabs. Seems like 8-space tabs won over\n> > 4-space tabs, so we need a vote on 8-space tabs vs. no tabs.\n> \n> Seems like multiple votes. First vote is whether to use spaces or tabs\n> for indenting. Then, how many characters should we indent if we use\n> tabs and if we don't. Note that people may have different opinions\n> on how much to indent for each of these. I suspect a number of people\n> choose 8 space tabs because it is standard and consistent on different\n> methods of output, not because they particularly like that much\n> indentation. I know that I have lately been considering going to 3\n> space, no tab indenting in my own code so that it looks right whether\n> I use the editor, cat to the screen or print it.\n\nI tend to prefer 2 spaces to using tabs myself ...\n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n",
"msg_date": "Mon, 3 Jan 2000 22:35:49 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "Thus spake The Hermit Hacker\n> I tend to prefer 2 spaces to using tabs myself ...\n\nTwo seems a little too small to me although I have been considering\nthree for some time.\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, 4 Jan 2000 00:10:30 -0500 (EST)",
"msg_from": "[email protected] (D'Arcy J.M. Cain)",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "> Thus spake The Hermit Hacker\n> > I tend to prefer 2 spaces to using tabs myself ...\n> \n> Two seems a little too small to me although I have been considering\n> three for some time.\n\nFour is a nice 1/2 multiple of 8, the standard tab size.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Tue, 4 Jan 2000 00:23:48 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "On Mon, 3 Jan 2000, D'Arcy J.M. Cain wrote:\n\n> Thus spake Vince Vielhaber\n> > Ok, this is probably a really dumb question and probably even been answered\n> > before but I missed it. Why not make a tab be a tab and however it appears\n> > in the end programmer's editor can be up to the programmer? Or is pgindent\n> > changing tabs to spaces?\n> \n> Not a dumb question at all. However, think about comments. Look at\n> this example.\n> \n> \ti++;\t/* This variable is being incremented. I am commenting *\n> \t\t\t * this because it is such a stupid variable name\n> \t\t\t */\n> \n> Under my editor that comment lines up nicely but it will look cockeyed\n> for many people reading this because I used tabs instead of spaces and\n> my tabs are 4, not the usual 8.\n\nGood point. I'm looking at it in pine right now and it's not too well\nlined up.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n 128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n\n",
"msg_date": "Tue, 4 Jan 2000 05:25:39 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
}
] |
[
{
"msg_contents": "Word is...\n\nTabs are 8 spaces; not 4, not 2: if your function runs off the end of the\npage (screen), sh*t function...\n\n;-)\n\n\n\n>> -----Original Message-----\n>> From: Theo Kramer [mailto:[email protected]]\n>> Sent: Thursday, December 30, 1999 9:47 AM\n>> To: PostgreSQL-development\n>> Subject: Re: [HACKERS] Source code format vote\n>> \n>> \n>> Bruce Momjian wrote:\n>> > \n>> > Current votes are:\n>> > \n>> > (8) 8-space tabs: Tom Lane, Peter E., Massimo, Jan, \n>> Hiroshi, Peter M.,\n>> > Michael, Tatsuo\n>> > (5) 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy\n>> > \n>> > \n>> > open bracket on if () line:\n>> > (7) yes: Massimo, Peter, Vince, Tom Lane, Peter M., \n>> Marc, Tatsuo\n>> > (6) no: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.\n>> > \n>> > Looks like radical change will come to our source code \n>> format for 7.0.\n>> > \n>> > Unless someone else speaks up, I will consider this vote \n>> closed. I will\n>> > modify pgindent to reflect this format the next time it is run.\n>> \n>> Don't know if I qualify to vote - but if I do then I vote \n>> for 4-space tabs \n>> (seeing that I often read the code - now if only two-space tabs \n>> were an option...)\n>> --------\n>> Regards\n>> Theo\n>> \n>> ************\n>> \n",
"msg_date": "Thu, 30 Dec 1999 11:07:45 +0200",
"msg_from": "\"Ansley, Michael\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] Source code format vote"
},
{
"msg_contents": "\"Ansley, Michael\" wrote:\n\n> Word is...\n>\n> Tabs are 8 spaces; not 4, not 2: if your function runs off the end of the\n> page (screen), sh*t function...\n\nYep, I agree. No point in trying to change the standard size of a tab (i.e.\n8 spaces). How you indent your C-code is a different matter: it is possible\nto indent C-code with spaces instead of tabs ;-). But don't go and change\nstandards.\n\nI prefer indentation that is not too large so that you can see a whole\nfunction, but couldn't care less whether it is 2 or 4 spaces.\n\nAnd no, I definitely don't qualify to vote, but had to butt in anyway....\n\n",
"msg_date": "Thu, 30 Dec 1999 12:17:24 +0200",
"msg_from": "Adriaan Joubert <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
},
{
"msg_contents": "> \n> Word is...\n> \n> Tabs are 8 spaces; not 4, not 2: if your function runs off the end of the\n> page (screen), sh*t function...\n> \n> ;-)\n\nTabs are a relic of the typewriters of yesteryear. They, imo, are outdated,\nnon-standard from computer to printer to display, and a cause for mindless\ndebate ;).\n\nAnyway, a call for a vote presumes a democratic process with no coercion...?\n\nRegards\nTheo\n",
"msg_date": "Thu, 30 Dec 1999 13:16:33 +0200 (SAST)",
"msg_from": "Theo Kramer <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Source code format vote"
}
] |
[
{
"msg_contents": "> \n> \tSELECT f1.firstname, f1.lastname, f1.age\n> \tFROM friends f1\n> \tWHERE age = (\n> \t SELECT MAX(age)\n> \t FROM friends f2\n> \t WHERE f1.state = f2.state\n> \t )\n> \tORDER BY firstname, lastname\n> \n> It finds the oldest person in each state. HAVING can't do \n> that, right?\n\nHaving can do that particular case: (e.g. Informix)\n\n SELECT f1.firstname, f1.lastname, f1.age\n FROM friends f1, friends f2\n WHERE f1.state = f2.state\n GROUP BY f2.state, f1.firstname, f1.lastname, f1.age, f1.state\n HAVING f1.age = max(f2.age)\n ORDER BY firstname, lastname;\n\nAndreas\n\n\n\n",
"msg_date": "Thu, 30 Dec 1999 14:42:21 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: [HACKERS] correlated subquery"
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n>> It finds the oldest person in each state. HAVING can't do \n>> that, right?\n\n> Having can do that particular case: (e.g. Informix)\n\n> SELECT f1.firstname, f1.lastname, f1.age\n> FROM friends f1, friends f2\n> WHERE f1.state = f2.state\n> GROUP BY f2.state, f1.firstname, f1.lastname, f1.age, f1.state\n> HAVING f1.age = max(f2.age)\n> ORDER BY firstname, lastname;\n\nHmm, yes, and you don't even need the GROUP BY state clauses.\n\nBut it's not really the same thing. In particular, if you had two friends\nwith the same name and age, this would produce only one output record\nfor both, not two output records as Bruce's original query does.\n\nThat's neither likely nor a big problem in the hypothetical application,\nbut other applications needing this type of query might be more unhappy\nabout confusing similar records...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 30 Dec 1999 10:05:30 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: [HACKERS] correlated subquery "
},
{
"msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> > \n> > \tSELECT f1.firstname, f1.lastname, f1.age\n> > \tFROM friends f1\n> > \tWHERE age = (\n> > \t SELECT MAX(age)\n> > \t FROM friends f2\n> > \t WHERE f1.state = f2.state\n> > \t )\n> > \tORDER BY firstname, lastname\n> > \n> > It finds the oldest person in each state. HAVING can't do \n> > that, right?\n> \n> Having can do that particular case: (e.g. Informix)\n> \n> SELECT f1.firstname, f1.lastname, f1.age\n> FROM friends f1, friends f2\n> WHERE f1.state = f2.state\n> GROUP BY f2.state, f1.firstname, f1.lastname, f1.age, f1.state\n> HAVING f1.age = max(f2.age)\n> ORDER BY firstname, lastname;\n\nYikes, you are right, and it works on PostgreSQL too. I have added it\nto my book. Can anyone suggest queries that _must_ have subqueries? \nSeems table aliases can replace subqueries in most/all? cases?\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 30 Dec 1999 12:07:35 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: [HACKERS] correlated subquery"
}
] |
[
{
"msg_contents": "I have updated the RPM distribution on postgresql.org today.\n\nThe last two releases, 6.5.3-2 and -3, in both locale and non-locale\nversions, are available. I'm keeping two releases rotating online in\ncase serious problems are found in the latest release that were not in\nthe next-to-latest release.\n\nThe directory structure for the RPMS has been changed somewhat, with the\nRPMs now being under /pub/bindist/RPM, rather than being in /pub/RPM and\n/pub/SRPMS, although those two locations have been symlinked into the\nappropriate directories under /pub/bindist/RPM so that preexisting links\nwouldn't be broken.\n\nMany thanks to Marc and Jeff for making the update possible.\n\nLatest release: postgresql-6.5.3-3 and 6.5.3-3nl.\n\nPlease read /pub/bindist/RPM/README and README.rpm for more information.\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Thu, 30 Dec 1999 16:08:04 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": true,
"msg_subject": "RPMS on PostgreSQL.org updated."
},
{
"msg_contents": "> Latest release: postgresql-6.5.3-3 and 6.5.3-3nl.\n> Please read /pub/bindist/RPM/README and README.rpm for more \n> information.\n\nSo should I blow away all of the other RPM directories on the FTP\nsite??\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Mon, 03 Jan 2000 07:26:13 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [PORTS] RPMS on PostgreSQL.org updated."
},
{
"msg_contents": "Thomas Lockhart wrote:\n> \n> > Latest release: postgresql-6.5.3-3 and 6.5.3-3nl.\n> > Please read /pub/bindist/RPM/README and README.rpm for more\n> > information.\n> \n> So should I blow away all of the other RPM directories on the FTP\n> site??\n\nYou can, if you wish. Jeff gave me the bindist/RPM directory, and\nsymlinked the RPMS and SRPMS tree of yours into the bindist/RPM/RPMS and\nbindist/RPM/SRPMS directories, respectively. The links on the download\nand news pages will have to be changed when you do so -- which is why I\nsuggested to Jeff that he symlink, so that links wouldn't be broken.\n\nFuture download links for the RPMs should point to bindist/RPM, IMO.\n\nI have already found some other annoyances with the RPMs -- on upgrading\nthe server subpackage, a chkconfig --del is performed -- but a\ncorresponding chkconfig --add is not performed, thus removing postgresql\nfrom being autostarted. I think a change in the behavior to leave well\nenough alone if upgrading, and do the chkconfig --del only if this is an\nuninstall would be appropriate. I got bit with this on my production\nserver -- not fun.\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Mon, 03 Jan 2000 11:51:39 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [PORTS] RPMS on PostgreSQL.org updated."
}
] |
[
{
"msg_contents": "As near as I can tell, there are four whole modules of dead code in\nsrc/backend/libpq/: be-dumpdata.c, be-pqexec.c, portal.c, portalbuf.c\n(plus some support code in tcop/dest.c). These provide functions called\nPQexec and PQfn, which apparently were once backend-side equivalents\nto the frontend-libpq functions of the same names, as well as a whole\nbunch of other code that may once have been shared with frontend-libpq,\nbut is so no longer.\n\nThe only externally referenced entry point to these modules is an\nundocumented SQL function \"pqtest\", which I strongly suspect no one\nis using.\n\nI am strongly inclined to rip all this stuff out, because it's buggy.\nI've already found memory-leak problems and dangling-global-pointer\nproblems, and there are probably more. I'd say this code has been\nsuffering from software rot for a long time.\n\nDoes anyone remember what this code was for, or know a reason to keep it\n(and fix it) instead of ripping it out?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 30 Dec 1999 20:50:26 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Is backend-libpq's \"PQexec/PQfn/portal\" code dead?"
},
{
"msg_contents": "\nPerhaps move to _deadcode directory. That is usually what we do.\n\n> As near as I can tell, there are four whole modules of dead code in\n> src/backend/libpq/: be-dumpdata.c, be-pqexec.c, portal.c, portalbuf.c\n> (plus some support code in tcop/dest.c). These provide functions called\n> PQexec and PQfn, which apparently were once backend-side equivalents\n> to the frontend-libpq functions of the same names, as well as a whole\n> bunch of other code that may once have been shared with frontend-libpq,\n> but is so no longer.\n> \n> The only externally referenced entry point to these modules is an\n> undocumented SQL function \"pqtest\", which I strongly suspect no one\n> is using.\n> \n> I am strongly inclined to rip all this stuff out, because it's buggy.\n> I've already found memory-leak problems and dangling-global-pointer\n> problems, and there are probably more. I'd say this code has been\n> suffering from software rot for a long time.\n> \n> Does anyone remember what this code was for, or know a reason to keep it\n> (and fix it) instead of ripping it out?\n> \n> \t\t\tregards, tom lane\n> \n> ************\n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 30 Dec 1999 22:34:55 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Is backend-libpq's \"PQexec/PQfn/portal\" code dead?"
}
] |
[
{
"msg_contents": "I have just committed what I hope is the final solution for the problem\nof LIKE index optimization in non-ASCII locales. indxpath.c now\ngenerates both a lower and upper indexqual in all locales. For example,\n\tx LIKE 'foo%t'\nwill create indexqual conditions\n\tx >= 'foo' AND x < 'fop'\nThe \"<\" condition is omitted only if the code is unable to produce a\nstring greater than the pattern's constant prefix.\n\nLocale-specific variations in collation order are handled by the\ncut-and-try method I suggested a while ago:\n\n> The approach I was considering for fixing the problem was to use a\n> loop that would repeatedly try to generate a string greater than the\n> prefix string. The basic loop step would increment the rightmost\n> byte as Goran has done (or, if it's already up to the limit, chop\n> it off and increment the next character position). Then test to\n> see whether the '<' operator actually believes the result is\n> greater than the given prefix, and repeat if not.\n\nAlthough I believe that the code will work in non-ASCII locales and\nMULTIBYTE character sets, I'm not set up to try it easily. Could\nsome folks try it out and report back?\n\nThe critical subroutine is attached, so if you prefer to eyeball\nthe code, here it is...\n\n\t\t\tregards, tom lane\n\n/*\n * Try to generate a string greater than the given string or any string it is\n * a prefix of. If successful, return a palloc'd string; else return NULL.\n *\n * To work correctly in non-ASCII locales with weird collation orders,\n * we cannot simply increment \"foo\" to \"fop\" --- we have to check whether\n * we actually produced a string greater than the given one. If not,\n * increment the righthand byte again and repeat. If we max out the righthand\n * byte, truncate off the last character and start incrementing the next.\n * For example, if \"z\" were the last character in the sort order, then we\n * could produce \"foo\" as a string greater than \"fonz\".\n *\n * This could be rather slow in the worst case, but in most cases we won't\n * have to try more than one or two strings before succeeding.\n *\n * XXX in a sufficiently weird locale, this might produce incorrect results?\n * For example, in German I believe \"ss\" is treated specially --- if we are\n * given \"foos\" and return \"foot\", will this actually be greater than \"fooss\"?\n */\nstatic char *\nmake_greater_string(const char * str, Oid datatype)\n{\n char *workstr;\n int len;\n\n /* Make a modifiable copy, which will be our return value if successful */\n workstr = pstrdup((char *) str);\n\n while ((len = strlen(workstr)) > 0)\n {\n unsigned char *lastchar = (unsigned char *) (workstr + len - 1);\n\n /*\n * Try to generate a larger string by incrementing the last byte.\n */\n while (*lastchar < (unsigned char) 255)\n {\n (*lastchar)++;\n if (string_lessthan(str, workstr, datatype))\n return workstr; /* Success! */\n }\n /*\n * Truncate off the last character, which might be more than 1 byte\n * in MULTIBYTE case.\n */\n#ifdef MULTIBYTE\n len = pg_mbcliplen((const unsigned char *) workstr, len, len-1);\n workstr[len] = '\\0';\n#else\n *lastchar = '\\0';\n#endif\n }\n\n /* Failed... */\n pfree(workstr);\n return NULL;\n}\n",
"msg_date": "Fri, 31 Dec 1999 00:54:06 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "LIKE fixed(?) for non-ASCII collation orders"
},
{
"msg_contents": "Tom Lane <[email protected]> writes:\n\n> I have just committed what I hope is the final solution for the problem\n> of LIKE index optimization in non-ASCII locales. indxpath.c now\n> generates both a lower and upper indexqual in all locales. For example,\n> \tx LIKE 'foo%t'\n> will create indexqual conditions\n> \tx >= 'foo' AND x < 'fop'\n> The \"<\" condition is omitted only if the code is unable to produce a\n> string greater than the pattern's constant prefix.\n\nthe .. >= .. < .. condition will result in addtional matches, like 'fo ot',\nso you still have to check with LIKE. I'm using such an expression\n(without the additional LIKE) in an application, and it seems to match \nat least everything that LIKE would match too (my users would have\ncomplained about missing matches, but i never did a formal test or\nevaluation).\n",
"msg_date": "31 Dec 1999 15:56:25 +0100",
"msg_from": "Andreas Degert <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LIKE fixed(?) for non-ASCII collation orders"
},
{
"msg_contents": "Andreas Degert <[email protected]> writes:\n> the .. >= .. < .. condition will result in addtional matches, like 'fo ot',\n> so you still have to check with LIKE.\n\nOf course. The point of all this is just to create a \"prefilter\" that can\nbe implemented by scanning an index, so that most of the rows in the\ntable need not be visited at all when the LIKE pattern has the right\nform. But the original LIKE operator is still executed as part of the\nWHERE condition for each row.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 31 Dec 1999 10:40:51 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] LIKE fixed(?) for non-ASCII collation orders "
},
{
"msg_contents": "Yes, we always still match the LIKE. The additional comparisons just\nmake the number of rows smaller.\n\n\n> Tom Lane <[email protected]> writes:\n> \n> > I have just committed what I hope is the final solution for the problem\n> > of LIKE index optimization in non-ASCII locales. indxpath.c now\n> > generates both a lower and upper indexqual in all locales. For example,\n> > \tx LIKE 'foo%t'\n> > will create indexqual conditions\n> > \tx >= 'foo' AND x < 'fop'\n> > The \"<\" condition is omitted only if the code is unable to produce a\n> > string greater than the pattern's constant prefix.\n> \n> the .. >= .. < .. condition will result in addtional matches, like 'fo ot',\n> so you still have to check with LIKE. I'm using such an expression\n> (without the additional LIKE) in an application, and it seems to match \n> at least everything that LIKE would match too (my users would have\n> complained about missing matches, but i never did a formal test or\n> evaluation).\n> \n> ************\n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 31 Dec 1999 13:50:07 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] LIKE fixed(?) for non-ASCII collation orders"
}
] |
[
{
"msg_contents": "Can someone summarize when subqueries are required. I thought\naggregates often needed them, but I see now that table aliases can do it\nin most cases. I think NOT IN can not be done without subqueries.\n\nIs there a general rule on this? A rule about correlated subqueries?\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 31 Dec 1999 01:08:01 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "When are subqueries needed"
}
] |
[
{
"msg_contents": "\n> Zeugswetter Andreas SB <[email protected]> writes:\n> >> It finds the oldest person in each state. HAVING can't do \n> >> that, right?\n> \n> > Having can do that particular case: (e.g. Informix)\n> \n> > SELECT f1.firstname, f1.lastname, f1.age\n> > FROM friends f1, friends f2\n> > WHERE f1.state = f2.state\n> > GROUP BY f2.state, f1.firstname, f1.lastname, \n> f1.age, f1.state\n> > HAVING f1.age = max(f2.age)\n> > ORDER BY firstname, lastname;\n> \n> Hmm, yes, and you don't even need the GROUP BY state clauses.\n> \n> But it's not really the same thing. In particular, if you \n> had two friends\n> with the same name and age, this would produce only one output record\n> for both, not two output records as Bruce's original query does.\n> \n> That's neither likely nor a big problem in the hypothetical \n> application,\n> but other applications needing this type of query might be \n> more unhappy\n> about confusing similar records...\n\nYes, it only gives the same result, if \"f1\" has some sort of primary key\n(e.g. oid),\nthat can be put into the group by clause.\n\nAndreas\n",
"msg_date": "Fri, 31 Dec 1999 09:39:40 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: [HACKERS] correlated subquery "
}
] |
[
{
"msg_contents": "Long life to PostgreSQL!\n-:)))\n\nVadim\n",
"msg_date": "Fri, 31 Dec 1999 19:50:23 +0700",
"msg_from": "Vadim Mikheev <[email protected]>",
"msg_from_op": true,
"msg_subject": "Happy New Year!"
},
{
"msg_contents": "On Fri, 31 Dec 1999, Vadim Mikheev wrote:\n\n> Long life to PostgreSQL!\n> -:)))\n\nHey, wait for us to catch up, eh? :) Its only, like, 9:30am out here, and\neven earlier for the rest of this continent :)\n\nHope everyone is having a safe one ...\n\n\n",
"msg_date": "Fri, 31 Dec 1999 09:26:05 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Happy New Year!"
},
{
"msg_contents": "\nOn 31-Dec-99 The Hermit Hacker wrote:\n> On Fri, 31 Dec 1999, Vadim Mikheev wrote:\n> \n>> Long life to PostgreSQL!\n>> -:)))\n> \n> Hey, wait for us to catch up, eh? :) Its only, like, 9:30am out here, and\n> even earlier for the rest of this continent :)\n> \n> Hope everyone is having a safe one ...\n\nYep, I'm just waking up. Got back from up north late last nite. We\nfigure (based on the y2k testing Detroit Edison did a couple of months\nago) that we'll be in the dark at midnite. Should be interesting :)\n\nHappy Y2K Everyone!!\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n 128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n",
"msg_date": "Fri, 31 Dec 1999 09:37:53 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Happy New Year!"
},
{
"msg_contents": "On Fri, 31 Dec 1999, Vince Vielhaber wrote:\n\n> \n> On 31-Dec-99 The Hermit Hacker wrote:\n> > On Fri, 31 Dec 1999, Vadim Mikheev wrote:\n> > \n> >> Long life to PostgreSQL!\n> >> -:)))\n> > \n> > Hey, wait for us to catch up, eh? :) Its only, like, 9:30am out here, and\n> > even earlier for the rest of this continent :)\n> > \n> > Hope everyone is having a safe one ...\n> \n> Yep, I'm just waking up. Got back from up north late last nite. We\n> figure (based on the y2k testing Detroit Edison did a couple of months\n> ago) that we'll be in the dark at midnite. Should be interesting :)\n\nI'm personally hoping for *some* sort of catastrophe...with all the hype,\nsomething interesting has to happen :)\n\n\n",
"msg_date": "Fri, 31 Dec 1999 11:52:09 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Happy New Year!"
},
{
"msg_contents": "On Fri, 31 Dec 1999, Vadim Mikheev wrote:\n\n> Long life to PostgreSQL!\n\nHere here!\n\nI'm now off to a party, so I'll wish everyone a happy new year.\n\nPeter\n\n--\n Peter T Mount [email protected]\n Main Homepage: http://www.retep.org.uk\nPostgreSQL JDBC Faq: http://www.retep.org.uk/postgres\n Java PDF Generator: http://www.retep.org.uk/pdf\n\n",
"msg_date": "Fri, 31 Dec 1999 16:47:22 +0000 (GMT)",
"msg_from": "Peter Mount <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Happy New Year!"
}
] |
[
{
"msg_contents": "1. you buy a knew HDD.(20GB)\n2. Then you do the files on it.\n3. After that you take the HDD out of your computer.\n4. Then you put it on the CD\n5. Finish.\n\n\n",
"msg_date": "Fri, 31 Dec 1999 16:17:55 +0100",
"msg_from": "\"S���ren Kreimeier\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "How you can put over 20 GB on a single CD!"
}
] |
[
{
"msg_contents": "\nOn 01-Jan-00 Jan Wieck wrote:\n>> I'm personally hoping for *some* sort of catastrophe...with all the hype,\n>> something interesting has to happen :)\n> \n> You too?\n> \n> Now it's 01/01/2000 04:08 here in Harsefeld, and absolutely\n> nothing happened, not one single power peak or fail, not any\n> single radio station telling any kind about Y2K problems.\n> Really frustrating, if I think about all the stress during\n> the past months.\n\nBig yawn here. After all the failed Y2k testing it looks like someone\ngot it all fixed. Happy Y2K Everyone!\n\n> \n> Anyway, something interesting has happened.\n> \n> PostgreSQL, known as the dinosaur of databases, survived Y2K.\n> And ISTM, it's in a better condition than ever before. Isn't\n> that worth all the efford, anyone of us spent?\n> \n> Thanks to all, all over the world, and a happy new year.\n\nMy sentiments exactly!!\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n 128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n",
"msg_date": "Sat, 01 Jan 2000 00:10:27 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Happy New Year!"
}
] |
[
{
"msg_contents": "When I vacuum the database (PostgreSQL 6.5.3 on SuSE 6.3 Linux, 2.2\nkernel), I get the following error message:\n\nERROR: HEAP_MOVED_IN was not expected.\nvacuumdb: database vacuum failed on ntis\n\nThis error only seems to occur after I have used the trim function to\nclean up one of\nthe rows in the msg table of a database called ntis:\n\nntis=>update msg set description = trim(description);\nUPDATE 12069\nntis=>\n\nTo try and track down the problem, I wrote a C program (using ecpg) that\ntrimmed the table one row at a time and vacuumed between each row\noperation. I was hoping that this program would reveal a problem with\nthe data in one of my records. Unfortunately the one row at a time\napproach did not reveal the problem and each vacuum operated without\nerror.\n\nCan anyone tell me what a HEAP_MOVED_IN error is - I checked the source\nbut was not familiar enough to understand it? Any ideas on why trim()\nmay have cause it?\n\n\n\n\n\n\n",
"msg_date": "Sat, 01 Jan 2000 00:39:42 -0800",
"msg_from": "Stephen Birch <[email protected]>",
"msg_from_op": true,
"msg_subject": "HEAP_MOVED_IN during vacuum?"
}
] |
[
{
"msg_contents": "With pg 6.5.2, I just noticed this timestamped vacuum output in\nmy log file...\n\n1000101.18:14:18.555 [6514] DEBUG: --Relation\nui_option_choice--\n1000101.18:14:18.555 [6514] DEBUG: Pages 1: Changed 0, Reapped\n0, Empty 0, New 0; Tup 5: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0,\nMinLen 68, MaxLen 100; Re-using: Free/Avail. Space 0/0;\nEndEmpty/Avail. Pages 0/0. Elapsed 0/0 sec.\n1000101.18:14:18.558 [6514] DEBUG: Index ui_option_choice_pkey:\nPages 2; Tuples 5. Elapsed 0/0 sec.\n1000101.18:14:18.558 [6514] DEBUG: Index\nui_option_choice_id_key: Pages 2; Tuples 5. Elapsed 0/0 sec.\n1000101.18:14:18.570 [6514] DEBUG: --Relation\nui_default_preference--\n\nNotice the Jan 1, 100 A.D. timestamp...\n\n% date\nSat Jan 1 18:24:20 CST 2000\n\nAFAICT, this is limited to the logging mechanism (datetime output\nappears fine).\n\nCheers,\nEd Loehr\n\n",
"msg_date": "Sat, 01 Jan 2000 18:28:20 -0600",
"msg_from": "Ed Loehr <[email protected]>",
"msg_from_op": true,
"msg_subject": "pgsql y2k bug?"
},
{
"msg_contents": "> With pg 6.5.2, I just noticed this timestamped vacuum output in\n> my log file...\n> \n> 1000101.18:14:18.555 [6514] DEBUG: --Relation\n> ui_option_choice--\n> 1000101.18:14:18.555 [6514] DEBUG: Pages 1: Changed 0, Reapped\n> 0, Empty 0, New 0; Tup 5: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0,\n> MinLen 68, MaxLen 100; Re-using: Free/Avail. Space 0/0;\n> EndEmpty/Avail. Pages 0/0. Elapsed 0/0 sec.\n> 1000101.18:14:18.558 [6514] DEBUG: Index ui_option_choice_pkey:\n> Pages 2; Tuples 5. Elapsed 0/0 sec.\n> 1000101.18:14:18.558 [6514] DEBUG: Index\n> ui_option_choice_id_key: Pages 2; Tuples 5. Elapsed 0/0 sec.\n> 1000101.18:14:18.570 [6514] DEBUG: --Relation\n> ui_default_preference--\n> \n> Notice the Jan 1, 100 A.D. timestamp...\n\nOK, I have gone through all the code, looking at the handling of\ntm_year, and found two possible areas for problems. One was in\nDATEDEBUG code that is ifdef'ed out and unused, and the trace code you\nreported.\n\nI am attaching a diff to fix the problem. We were reporting only a\n2-digit year, and tm_year reports years since 1900, so it was reporting\n100 for year 2000. The field was %02d, but the number was three digits\nso it printed all three.\n\nIf we do not make a new release for this, the fix will appear in 7.0.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n\n*** ./backend/utils/misc/trace.c.orig\tSat Jan 1 20:37:01 2000\n--- ./backend/utils/misc/trace.c\tSat Jan 1 20:37:15 2000\n***************\n*** 227,234 ****\n \ttime = localtime(&tm);\n \n \tsprintf(pid, \"[%d]\", MyProcPid);\n! \tsprintf(timestamp, \"%02d%02d%02d.%02d:%02d:%02d.%03d %7s \",\n! \t\t\ttime->tm_year, time->tm_mon + 1, time->tm_mday,\n \t\t\ttime->tm_hour, time->tm_min, time->tm_sec,\n \t\t\t(int) (tv.tv_usec/1000), pid);\n \n--- 227,234 ----\n \ttime = localtime(&tm);\n \n \tsprintf(pid, \"[%d]\", MyProcPid);\n! \tsprintf(timestamp, \"%04d%02d%02d.%02d:%02d:%02d.%03d %7s \",\n! \t\t\ttime->tm_year+1900, time->tm_mon + 1, time->tm_mday,\n \t\t\ttime->tm_hour, time->tm_min, time->tm_sec,\n \t\t\t(int) (tv.tv_usec/1000), pid);",
"msg_date": "Sat, 1 Jan 2000 20:42:57 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] pgsql y2k bug?"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> I am attaching a diff to fix the problem. We were reporting only a\n> 2-digit year, and tm_year reports years since 1900, so it was reporting\n> 100 for year 2000. The field was %02d, but the number was three digits\n> so it printed all three.\n\nIf you are going to go to 4-digit years in timestamps, I think you also\nneed to increase the TIMESTAMP_SIZE constant used by elog.c when\nELOG_TIMESTAMPS is set.\n\nAn alternative solution is to print time->tm_year % 100.\n\nEither of these solutions might break existing programs that analyze\nlogfiles, if any there be...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 01 Jan 2000 21:06:22 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] pgsql y2k bug? "
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> > I am attaching a diff to fix the problem. We were reporting only a\n> > 2-digit year, and tm_year reports years since 1900, so it was reporting\n> > 100 for year 2000. The field was %02d, but the number was three digits\n> > so it printed all three.\n> \n> If you are going to go to 4-digit years in timestamps, I think you also\n> need to increase the TIMESTAMP_SIZE constant used by elog.c when\n> ELOG_TIMESTAMPS is set.\n> \n> An alternative solution is to print time->tm_year % 100.\n> \n> Either of these solutions might break existing programs that analyze\n> logfiles, if any there be...\n\nDone. Length increased by 2 from 28 to 30.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 1 Jan 2000 21:10:32 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] pgsql y2k bug?"
}
] |
[
{
"msg_contents": "I have removed the DATEDEBUG code. I can easily re-add it. Is there\nany use to keeping the code? The code looks clearer without it.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 1 Jan 2000 20:53:47 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Is DATEDEBUG useful"
},
{
"msg_contents": "> I have removed the DATEDEBUG code. I can easily re-add it. Is there\n> any use to keeping the code? The code looks clearer without it.\n\n?? Only useful when debugging date/time code ;)\n\nLeave it out; the code seems to be pretty stable and shouldn't break\nmuch when doing the \"date/time reunification\" sometime soon.\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Mon, 03 Jan 2000 07:41:49 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Is DATEDEBUG useful"
}
] |
[
{
"msg_contents": "Happy new year to you all!!\n\nI've run into this problem 3 days ago:\n\nScript started on Sun Jan 2 14:59:03 2000\n~ 14:59:04: psql\nWelcome to the POSTGRESQL interactive sql monitor:\n Please read the file COPYRIGHT for copyright terms of POSTGRESQL\n[PostgreSQL 6.5.3 on i586-pc-unixware7.0.1, compiled by cc ]\n\n type \\? for help on slash commands\n type \\q to quit\n type \\g or terminate with semicolon to execute query\n You are currently connected to the database: ohp\n\nohp=> select '01-12-1999'::datetime + '@ 1 month - 1 sec' as bug;\n\nbug \n----------------------------\nThu 30 Dec 23:59:59 1999 MET\n(1 row)\n ^^\nShould be 31!!\n\nohp=> select '01-01-2000'::datetime + '@ 1 month - 1 sec' as good;\n\ngood \n----------------------------\nMon 31 Jan 23:59:59 2000 MET\n(1 row)\nSeems OK after Jan 1rst!!\n\nAny idea?\n\nRegards\n-- \nOlivier PRENANT \tTel:\t+33-5-61-50-97-00 (Work)\nQuartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)\n31190 AUTERIVE +33-6-07-63-80-64 (GSM)\nFRANCE Email: [email protected]\n------------------------------------------------------------------------------\nMake your life a dream, make your dream a reality. (St Exupery)\n\n",
"msg_date": "Sun, 2 Jan 2000 15:15:47 +0100",
"msg_from": "Olivier PRENANT <[email protected]>",
"msg_from_op": true,
"msg_subject": "Date calc bug"
},
{
"msg_contents": "[ Forwarded to hackers list from bugs list ]\n\nOlivier PRENANT <[email protected]> writes:\n> ohp=> select '01-12-1999'::datetime + '@ 1 month - 1 sec' as bug;\n> Thu 30 Dec 23:59:59 1999 MET\n\nI see it here too, in a different timezone:\n\nselect '12-01-1999'::datetime + '@ 1 month - 1 sec' ;\nThu Dec 30 23:59:59 1999 EST\n\nIt's not a Y2K issue, because of this similar failure:\n\nselect '3-01-1999'::datetime + '@ 1month - 1 sec'::timespan;\nSun Mar 28 23:59:59 1999 EST\n\nSee the pattern? I suspect what is going on is that the low-order\n(seconds) part of the timespan is being added in before the high-order\n(months) part. If you did the calculation in two steps like this:\n\nselect '12-01-1999'::datetime + '@ - 1 sec'::timespan;\nTue Nov 30 23:59:59 1999 EST\nselect 'Tue Nov 30 23:59:59 1999 EST'::datetime + '@ 1 month'::timespan;\nThu Dec 30 23:59:59 1999 EST\n\nthen you'd think the result is reasonable.\n\nThe question for discussion is whether adding the months part and then\nthe seconds part would give more reasonable answers overall. Are there\nother cases where doing it that way would yield nonintuitive results,\nbut the current code works?\n\nThomas, do you know why the datetime+timespan addition code works like\nthis? For that matter, is the internal representation of a timespan\ngoing to continue to be months + seconds, or is that changing anyway?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 02 Jan 2000 13:02:00 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [BUGS] Date calc bug "
},
{
"msg_contents": "> forum=> select datetime(now())+'74565 days'::timespan as ido;\n> Thu Jan 19 14:07:30 2068\nand\n> select '12-01-1999'::datetime + '@ 1 month - 1 sec' ;\n> Thu Dec 30 23:59:59 1999 EST\n\nI've repaired both problems in both the development and release trees.\nThanks for the reports and analysis. Patch enclosed...\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California",
"msg_date": "Tue, 04 Jan 2000 08:11:32 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [BUGS] Date calc bug"
},
{
"msg_contents": "Thanks you!!\n\nPatch applied and tested.\n\nGreat job.\n\nThat's exactly the reason why I love Internet and postresql.\n\nYou find a bug.. Send a message and correct it.\n\nBest wishes for 2000.\n\nRegards\n\nOn Tue, 4 Jan 2000, Thomas Lockhart wrote:\n\n> > forum=> select datetime(now())+'74565 days'::timespan as ido;\n> > Thu Jan 19 14:07:30 2068\n> and\n> > select '12-01-1999'::datetime + '@ 1 month - 1 sec' ;\n> > Thu Dec 30 23:59:59 1999 EST\n> \n> I've repaired both problems in both the development and release trees.\n> Thanks for the reports and analysis. Patch enclosed...\n> \n> - Thomas\n> \n> \n\n-- \nOlivier PRENANT \tTel:\t+33-5-61-50-97-00 (Work)\nQuartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)\n31190 AUTERIVE +33-6-07-63-80-64 (GSM)\nFRANCE Email: [email protected]\n------------------------------------------------------------------------------\nMake your life a dream, make your dream a reality. (St Exupery)",
"msg_date": "Tue, 4 Jan 2000 19:07:38 +0100 (MET)",
"msg_from": "Olivier PRENANT <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [BUGS] Date calc bug"
}
] |
[
{
"msg_contents": "Hi, all\n\nWhy do I get an authorisation failure when I try to update? If I cvs login,\nand then enter the password, that goes off fine. Then when I try to cvs\nupdate, it fails with a no such user error. Any ideas?\n\nRH Linux 6.0 (ix86)\ncvs 1.10.5\n\nMikeA\n",
"msg_date": "Mon, 3 Jan 2000 01:48:12 +0200 ",
"msg_from": "\"Ansley, Michael\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "CVS problems"
}
] |
[
{
"msg_contents": "OK, seems cvs needed upgrading. Got to 1.10.7 and everything seemed to work\nfine. Sorry to trouble everybody...\n\n-----Original Message-----\nFrom: Ansley, Michael\nTo: '[email protected]'\nSent: 1/3/00 1:48 AM\nSubject: [HACKERS] CVS problems\n\nHi, all\n\nWhy do I get an authorisation failure when I try to update? If I cvs\nlogin,\nand then enter the password, that goes off fine. Then when I try to cvs\nupdate, it fails with a no such user error. Any ideas?\n\nRH Linux 6.0 (ix86)\ncvs 1.10.5\n\nMikeA\n\n************\n",
"msg_date": "Mon, 3 Jan 2000 02:17:42 +0200 ",
"msg_from": "\"Ansley, Michael\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] CVS problems"
}
] |
[
{
"msg_contents": "Another question... how do people normally edit the docs? Is there an sgml\neditor that I can use, or should I do it in some other format, and have it\nconverted, or what?\n\nMikeA\n",
"msg_date": "Mon, 3 Jan 2000 02:20:43 +0200 ",
"msg_from": "\"Ansley, Michael\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Docs"
},
{
"msg_contents": "\nOn 03-Jan-00 Ansley, Michael wrote:\n> Another question... how do people normally edit the docs? Is there an sgml\n> editor that I can use, or should I do it in some other format, and have it\n> converted, or what?\n\nI use xemacs.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n 128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n",
"msg_date": "Sun, 02 Jan 2000 19:51:48 -0500 (EST)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: [HACKERS] Docs"
},
{
"msg_contents": "> Another question... how do people normally edit the docs? Is there an sgml\n> editor that I can use, or should I do it in some other format, and have it\n> converted, or what?\n\nThey just use a standard text editor.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sun, 2 Jan 2000 19:52:22 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Docs"
},
{
"msg_contents": "> Another question... how do people normally edit the docs? Is there an sgml\n> editor that I can use, or should I do it in some other format, and have it\n> converted, or what?\n\nAs Vince mentioned, xemacs is the first choice. Though I think I used\nvi for a bunch of the original editing...\n\nCheck the appendix on \"Documentation\" for some hints on editing.\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Mon, 03 Jan 2000 07:46:29 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Docs"
},
{
"msg_contents": "Thomas Lockhart wrote:\n\n> > Another question... how do people normally edit the docs? Is there an sgml\n> > editor that I can use, or should I do it in some other format, and have it\n> > converted, or what?\n>\n> As Vince mentioned, xemacs is the first choice.\n\nNow, don't go startin' no feud here... if you need a space shuttle, xemacs is\nit. But if you need the One True Editor, well, of course...it's vi/vim. :)\n\n",
"msg_date": "Mon, 03 Jan 2000 01:57:45 -0600",
"msg_from": "Ed Loehr <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Docs"
},
{
"msg_contents": "> > > Another question... how do people normally edit the docs? Is there an sgml\n> > > editor that I can use, or should I do it in some other format, and have it\n> > > converted, or what?\n> > As Vince mentioned, xemacs is the first choice.\n> Now, don't go startin' no feud here... if you need a space shuttle, xemacs is\n> it. But if you need the One True Editor, well, of course...it's vi/vim. :)\n\nMichael wasn't asking for a space shuttle, but he *was* asking for \"an\nsgml editor\", which implied to me an editor with some knowledge of\nsgml notation. afaik The AntiEditor is the only freeware tool to do\nthis...\n\nbtw, xemacs is preferred over emacs since the xemacs \"version 6\"\nimplementation of DTD parsing can handle the DocBook DTD, whereas the\nnewer emacs \"version 7\" implementation barfs with some internal array\nerror when reading our docs after parsing the DTD. These are recent\nresults from my Mandrake/RedHat-6.1 Linux distro.\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Mon, 03 Jan 2000 08:20:27 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Docs"
},
{
"msg_contents": "Thomas Lockhart wrote:\n\n> > > > Another question... how do people normally edit the docs? Is there an sgml\n> > > > editor that I can use, or should I do it in some other format, and have it\n> > > > converted, or what?\n> > > As Vince mentioned, xemacs is the first choice.\n> > Now, don't go startin' no feud here... if you need a space shuttle, xemacs is\n> > it. But if you need the One True Editor, well, of course...it's vi/vim. :)\n>\n> Michael wasn't asking for a space shuttle, but he *was* asking for \"an\n> sgml editor\", which implied to me an editor with some knowledge of\n> sgml notation. afaik The AntiEditor is the only freeware tool to do\n> this...\n\nVim understands sgml notation to the extent of syntax highlighting.\n\n http://relay.nuxi.com/vim/lang.html\n\nI don't know what xemacs does for sgml.\n\nIt appears my attempt at a little late night humor was lost. Please pardon any\noffense; it was unintended.\n\nCheers,\nEd Loehr\n\n",
"msg_date": "Mon, 03 Jan 2000 12:20:14 -0600",
"msg_from": "Ed Loehr <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Docs"
},
{
"msg_contents": "> Vim understands sgml notation to the extent of syntax highlighting.\n> http://relay.nuxi.com/vim/lang.html\n> It appears my attempt at a little late night humor was lost. Please \n> pardon any offense; it was unintended.\n\nAh, we once again have proven to be a humorless lot ;)\n\nThanks for the tip regarding vim...\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Tue, 04 Jan 2000 07:27:25 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Docs"
}
] |
[
{
"msg_contents": "It's not exactly a Y2K bug, because it started to fail at Dec 30 1999\n23:00:00, your local time. Nonetheless, the abstime regression test\nis now showing a \"failure\". It's not a code bug --- it's that the test\nincludes a query whose results depend on whether current time is before\nor after 12-30-1999. Boo hiss.\n\nProbably the best answer is to leave the test script alone and change\nthe expected output. Thomas, do you have a different opinion?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 03 Jan 2000 01:28:11 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Hmm, almost-a-Y2K-bug in abstime regression test"
},
{
"msg_contents": "> It's not exactly a Y2K bug, because it started to fail at Dec 30 1999\n> 23:00:00, your local time. Nonetheless, the abstime regression test\n> is now showing a \"failure\". It's not a code bug --- it's that the test\n> includes a query whose results depend on whether current time is before\n> or after 12-30-1999. Boo hiss.\n\nAh, those short-sighted coders back in 1986 didn't even think about\nY2K coming along.\n\n> Probably the best answer is to leave the test script alone and change\n> the expected output. Thomas, do you have a different opinion?\n\nHmm. That's probably the right thing to do, but it just propagates the\npoor form of expecting the system clock on a test machine to always be\nset to something after the time the regression test was written. I\nmight reformulate the queries to reduce the dependency on current\ntime, assuming that we don't lose some of the testing space while\ndoing it...\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Mon, 03 Jan 2000 08:38:17 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Hmm, almost-a-Y2K-bug in abstime regression test"
}
] |
[
{
"msg_contents": "Thanks, everybody, I think I have enough info now to start documenting the\nchanges that I've made so far.\n\nMikeA\n\n\n>> -----Original Message-----\n>> From: Thomas Lockhart [mailto:[email protected]]\n>> Sent: Monday, January 03, 2000 10:20 AM\n>> To: Ed Loehr\n>> Cc: Ansley, Michael; '[email protected]'\n>> Subject: Re: [HACKERS] Docs\n>> \n>> \n>> > > > Another question... how do people normally edit the \n>> docs? Is there an sgml\n>> > > > editor that I can use, or should I do it in some other \n>> format, and have it\n>> > > > converted, or what?\n>> > > As Vince mentioned, xemacs is the first choice.\n>> > Now, don't go startin' no feud here... if you need a space \n>> shuttle, xemacs is\n>> > it. But if you need the One True Editor, well, of \n>> course...it's vi/vim. :)\n>> \n>> Michael wasn't asking for a space shuttle, but he *was* \n>> asking for \"an\n>> sgml editor\", which implied to me an editor with some knowledge of\n>> sgml notation. afaik The AntiEditor is the only freeware tool to do\n>> this...\n>> \n>> btw, xemacs is preferred over emacs since the xemacs \"version 6\"\n>> implementation of DTD parsing can handle the DocBook DTD, whereas the\n>> newer emacs \"version 7\" implementation barfs with some internal array\n>> error when reading our docs after parsing the DTD. These are recent\n>> results from my Mandrake/RedHat-6.1 Linux distro.\n>> \n>> - Thomas\n>> \n>> -- \n>> Thomas Lockhart\t\t\t\t\n>> [email protected]\n>> South Pasadena, California\n>> \n>> ************\n>> \n",
"msg_date": "Mon, 3 Jan 2000 14:14:52 +0200 ",
"msg_from": "\"Ansley, Michael\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] Docs"
}
] |
[
{
"msg_contents": "Thomas, are you planning on unifying the date/time types for 7.0?\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 3 Jan 2000 08:16:51 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "date/time type changes"
},
{
"msg_contents": "> > Thomas, are you planning on unifying the date/time types for 7.0?\n> \n> Yes I would like to. But I'll leave it to others to suggest whether it\n> is essential for a major rev bump or could wait until 7.1. afaik it\n> should only take a few days, even at my recent snail's pace of\n> Postgres development :(\n\nIt is up to you. It would be best to get it in 7.0, but 7.1 is OK too.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 3 Jan 2000 10:42:09 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: date/time type changes"
},
{
"msg_contents": "> Thomas, are you planning on unifying the date/time types for 7.0?\n\nYes I would like to. But I'll leave it to others to suggest whether it\nis essential for a major rev bump or could wait until 7.1. afaik it\nshould only take a few days, even at my recent snail's pace of\nPostgres development :(\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Mon, 03 Jan 2000 15:45:26 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: date/time type changes"
},
{
"msg_contents": "Could you outline the proposed changes? I am currently using datetime\nand want to make sure my code doesn't break.\n\nSteve\n\n\nThomas Lockhart wrote:\n\n> > Thomas, are you planning on unifying the date/time types for 7.0?\n>\n> Yes I would like to. But I'll leave it to others to suggest whether it\n> is essential for a major rev bump or could wait until 7.1. afaik it\n> should only take a few days, even at my recent snail's pace of\n> Postgres development :(\n>\n> - Thomas\n>\n> --\n> Thomas Lockhart [email protected]\n> South Pasadena, California\n>\n> ************\n\n",
"msg_date": "Mon, 03 Jan 2000 11:32:29 -0800",
"msg_from": "Stephen Birch <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: date/time type changes"
},
{
"msg_contents": "> Could you outline the proposed changes? I am currently using datetime\n> and want to make sure my code doesn't break.\n> > > Thomas, are you planning on unifying the date/time types for 7.0?\n\nThe datetime type will become \"timestamp\" and the timespan type will\nbecome \"interval\". Both \"datetime\" and \"timespan\" will become aliases\nfor timestamp and interval, respectively, and code *should* work\nwithout having to be changed.\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Tue, 04 Jan 2000 07:24:15 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: date/time type changes"
},
{
"msg_contents": "> > Could you outline the proposed changes? I am currently using datetime\n> > and want to make sure my code doesn't break.\n> > > > Thomas, are you planning on unifying the date/time types for 7.0?\n> \n> The datetime type will become \"timestamp\" and the timespan type will\n> become \"interval\". Both \"datetime\" and \"timespan\" will become aliases\n> for timestamp and interval, respectively, and code *should* work\n> without having to be changed.\n\nWouldn't it make more sense to rename timestamp to datetime because\ndatetime is the ANSI name? Just asking.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Tue, 4 Jan 2000 14:52:25 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Re: date/time type changes"
},
{
"msg_contents": "> Wouldn't it make more sense to rename timestamp to datetime because\n> datetime is the ANSI name? Just asking.\n\ntimestamp is the SQL92 name for the date+time data type. datetime was\na name concocted by me to avoid conflicting with other possible\nstandard names when I first implemented the \"new and improved\"\ndate/time types. Am I missing something in my recollection??\n\n - Thomas\n\n-- \nThomas Lockhart\t\t\t\[email protected]\nSouth Pasadena, California\n",
"msg_date": "Wed, 05 Jan 2000 04:24:52 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: date/time type changes"
},
{
"msg_contents": "> > Wouldn't it make more sense to rename timestamp to datetime because\n> > datetime is the ANSI name? Just asking.\n> \n> timestamp is the SQL92 name for the date+time data type. datetime was\n> a name concocted by me to avoid conflicting with other possible\n> standard names when I first implemented the \"new and improved\"\n> date/time types. Am I missing something in my recollection??\n> \n\nOh, I better fix my book.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Tue, 4 Jan 2000 23:44:14 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Re: date/time type changes"
},
{
"msg_contents": "> > Wouldn't it make more sense to rename timestamp to datetime because\n> > datetime is the ANSI name? Just asking.\n> \n> timestamp is the SQL92 name for the date+time data type. datetime was\n> a name concocted by me to avoid conflicting with other possible\n> standard names when I first implemented the \"new and improved\"\n> date/time types. Am I missing something in my recollection??\n\nI had refered to datetime in my book, thinking that was the standard\nname. I now see it is TIMESTAMP. Good thing someone asked about this.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Tue, 4 Jan 2000 23:56:28 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Re: date/time type changes"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.