threads
listlengths
1
2.99k
[ { "msg_contents": "The recently checked-in backend/utils/adt/geo_ops.c does not compile\nunder gcc 2.7.2.2, because it has\n\n#define LINEDEBUG\n\nfollowed by several instances of \n\n#if LINEDEBUG\n\n... in other words #if with an empty expression, which I think gcc\nhas every right to object to. Either the #if's ought to be #ifdef's\nor LINEDEBUG has to be #define'd as 1 rather than empty.\n\nI changed the #if's to #ifdef's and found that it *still* doesn't\ncompile, because the code within the if's is seriously broken ---\nit's got lines like\n\t\tresult->C = pt1->x;\nwhere result is a char * and pt1 isn't even declared.\n\nBacking out the #define LINEDEBUG makes it compile, but who checked\nthis stuff in anyway?\n\n\t\t\tgrumble, tom lane\n", "msg_date": "Sat, 15 Aug 1998 13:19:09 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "geo_ops.c is broken" }, { "msg_contents": "> The recently checked-in backend/utils/adt/geo_ops.c does not compile\n> under gcc 2.7.2.2,\n> Backing out the #define LINEDEBUG makes it compile, but who checked\n> this stuff in anyway?\n\nProbably t'was moi. Will look at it, though I'm suprised that a #define\nLINEDEBUG was in the code. I _always_ do that from the Makefile. I had\ngotten some patches from Gautam Thaker which addressed a boundary\nproblem in one of the routines, and something funny must have crept in.\nI'm not sure what went wrong considering that I took a (fairly) fresh\nsource and passed the regression tests with it...\n\nSorry to slow you up on testing int8 and type conversion stuff :)\n\n - Tom\n", "msg_date": "Sun, 16 Aug 1998 03:20:19 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] geo_ops.c is broken" }, { "msg_contents": "Looks like they are gone now.\n\n\n> The recently checked-in backend/utils/adt/geo_ops.c does not compile\n> under gcc 2.7.2.2, because it has\n> \n> #define LINEDEBUG\n> \n> followed by several instances of \n> \n> #if LINEDEBUG\n> \n> ... in other words #if with an empty expression, which I think gcc\n> has every right to object to. Either the #if's ought to be #ifdef's\n> or LINEDEBUG has to be #define'd as 1 rather than empty.\n> \n> I changed the #if's to #ifdef's and found that it *still* doesn't\n> compile, because the code within the if's is seriously broken ---\n> it's got lines like\n> \t\tresult->C = pt1->x;\n> where result is a char * and pt1 isn't even declared.\n> \n> Backing out the #define LINEDEBUG makes it compile, but who checked\n> this stuff in anyway?\n> \n> \t\t\tgrumble, tom lane\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 18:15:21 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] geo_ops.c is broken" } ]
[ { "msg_contents": "Hi,\n\n now I'm really sure that at least only a few ppl might use\n the current rule system.\n\n Psql cannot send the queries for DEFINE RULE with multiple\n actions to the backend. For this feature, the single colon\n separated statements are enclosed in []'s. But psql doesn't\n handle []'s and sends down the query at the first occurence\n of a colon. And a colon cannot be escaped in psql, it must\n occur in a literal string.\n\n The question is now, should we tell psql that []'s have to be\n treated like ()'s or should we change the syntax of CREATE\n RULE in the backends parser from [] to ()?\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, 15 Aug 1998 20:17:07 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": true, "msg_subject": "Psql doesn't allow multiple action rules" }, { "msg_contents": "[email protected] (Jan Wieck) writes:\n> The question is now, should we tell psql that []'s have to be\n> treated like ()'s or should we change the syntax of CREATE\n> RULE in the backends parser from [] to ()?\n\nIs the syntax of CREATE RULE defined by the SQL standard (or modeled\non something else that is in the standard), or are we just making it\nup out of whole cloth?\n\nIf it's defined by the standard then I think we have no choice but to\nchange psql.\n\nIf it's our own invention, I think switching to () might be a better\nidea. I'm not that worried about changing psql, but I do wonder how\nmany other applications might \"know\" a similar amount about SQL\nsyntax...\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 16 Aug 1998 11:30:56 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Psql doesn't allow multiple action rules " }, { "msg_contents": "> [email protected] (Jan Wieck) writes:\n> > The question is now, should we tell psql that []'s have to be\n> > treated like ()'s or should we change the syntax of CREATE\n> > RULE in the backends parser from [] to ()?\n> \n> Is the syntax of CREATE RULE defined by the SQL standard (or modeled\n> on something else that is in the standard), or are we just making it\n> up out of whole cloth?\n> \n> If it's defined by the standard then I think we have no choice but to\n> change psql.\n> \n> If it's our own invention, I think switching to () might be a better\n> idea. I'm not that worried about changing psql, but I do wonder how\n> many other applications might \"know\" a similar amount about SQL\n> syntax...\n\nYes, if standard requires[], then let's use it. If not, use ().\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 16 Aug 1998 13:21:56 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Psql doesn't allow multiple action rules" } ]
[ { "msg_contents": "Hi,\n\n got a lot of things working up to now. Most things on the\n relation level are fixed now, including qualified instead\n rules. Update rules can now correctly refer to *new* and\n *current*.\n\n Must check if instead nothing with/without qualification is\n O.K. and if the regression tests are still happy with the\n changes.\n\n What I haven't touched yet are rules on the attribute level\n and the update new stuff. If regression tests walk through\n and the instead nothing is O.K. I'll send a first patch with\n some test queries on monday. Next todo is then update new.\n\n Have a nice wieckend :-)\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": "Sun, 16 Aug 1998 01:45:03 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": true, "msg_subject": "Rules: first fix on monday" } ]
[ { "msg_contents": "Tom. (Lockhart)\n\nThings were broken for int8 on SPARC/Linux, showing a regression test\nfailure.\n\nSince makeing your suggested change (removing \"&& defined(i386)\") I'm\ngetting a \"pass\" on the int8 tests.\n\n\nThe platform is SPARCstation IPX, Redhat 4.2.\nPostgreSQL (latest CVS).\nGCC 2.7.2.1.\n\nThanks,\nKeith.\n\nThomas G. Lockhart\" <[email protected]>\n> \n> > > I implemented it on a gcc/x86/Linux machine, and we will need to\n> > > ensure that it works on other platforms.\n<snip>\n> \n> OK, so GCC on 32-bit machines has a convention that \"long long int\" is a\n> 64-bit quantity. On my machine there is library support for simple\n> 64-bit integer math; we'll need to have addition, subtraction,\n> multiplication and division. I'll warn you that on a previous release of\n> gcc on my Linux box I had to poke around in obscure directories to find\n> the subtraction or division routine, but my more recent installations\n> seem to have all of the routines up in the normal places.\n> \n> So, it may be sufficient for testing purposes to remove the\n> \"&& defined(i386)\" and see what you get. We can tailor the defines to\n> your machine later.\n> \n> - Tom\n> \n\n", "msg_date": "Sun, 16 Aug 1998 13:22:53 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] int8 type -- call for porting results!" }, { "msg_contents": "> Things were broken for int8 on SPARC/Linux, showing a regression test\n> failure.\n> \n> Since making your suggested change (removing \"&& defined(i386)\") I'm\n> getting a \"pass\" on the int8 tests.\n> \n> The platform is SPARCstation IPX, Redhat 4.2.\n> PostgreSQL (latest CVS).\n> GCC 2.7.2.1.\n\nOK, great. Do you have a suggestion for a pre-defined compiler value I\ncan check? Is \"sparc\" or \"__sparc\" defined? On my machine I can run\n gcc -v\nwhich tells me where to look for specs, and in that file is a line of\n\"predefines\". I think that there is another way to check this, but I've\nforgotten how.\n\nI wonder if we can try enabling int8's for all gcc compilers? The only\nmachines that might break on are other 64-bit machines (like some\nSGI's?).\n\n - Tom\n", "msg_date": "Sun, 16 Aug 1998 14:06:33 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] int8 type -- call for porting results!" }, { "msg_contents": "> I wonder if we can try enabling int8's for all gcc compilers? The only\n> machines that might break on are other 64-bit machines (like some\n> SGI's?).\n\nYep, should work.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 16 Aug 1998 10:31:46 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] int8 type -- call for porting results!" }, { "msg_contents": ">> I wonder if we can try enabling int8's for all gcc compilers? The only\n>> machines that might break on are other 64-bit machines (like some\n>> SGI's?).\n\n> Yep, should work.\n\nAutoconf, my boys, think autoconf. This sort of guess-and-hope\nconfiguration is exactly what autoconf was invented to prevent.\n\nI'll gin up a few lines of autoconf test code and send them in.\nI'd suggest we say that the autoconf test will deliver the\nfollowing symbols in config.h:\n\nHAVE_LONG_INT_64\t# defined if \"long int\" works and is 8 bytes\nHAVE_LONG_LONG_INT_64\t# defined if \"long long int\" works and is 8 bytes\n\nAre there any other possibilities to worry about?\n\nHow hard should the test code try to make sure that int64 actually\nworks? Judging from Tom's comments, we'd better try a multiply and\na divide at least.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 16 Aug 1998 11:03:36 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] int8 type -- call for porting results! " } ]
[ { "msg_contents": "I am working on a patch to:\n\n\tremove oidname, oidint2, and oidint4\n\tallow the bootstrap code to create multi-key indexes\n\tchange procname index to procname, nargs, argtypes\n\tremove many sequential scans of system tables and use cache\n\tchange the API to lowlevel heap and cache functions to more clearly\n\t\treturn tuples or copies of tuples\n\nI have completed all but the last two items, and should finish this\nweek.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 16 Aug 1998 10:34:02 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "What I'm working on" } ]
[ { "msg_contents": "Tom,\n\nHere's the output of ccsym, hope it gives you something to\nwork with.\n\nKeith.\n\n\n[postgres@sparclinux src]$ tools/ccsym\n__GNUC__=2\n__GNUC_MINOR__=7\n__ELF__\nunix\nsparc\nlinux\n__ELF__\n__unix__\n__sparc__\n__linux__\n__unix\n__sparc\n__linux\nsystem=unix\nsystem=posix\ncpu=sparc\nmachine=sparc\n[postgres@sparclinux src]$ \n\nThomas G. Lockhart\" <[email protected]>\n> \n> > Things were broken for int8 on SPARC/Linux, showing a regression test\n> > failure.\n> > \n> > Since making your suggested change (removing \"&& defined(i386)\") I'm\n> > getting a \"pass\" on the int8 tests.\n> > \n> > The platform is SPARCstation IPX, Redhat 4.2.\n> > PostgreSQL (latest CVS).\n> > GCC 2.7.2.1.\n> \n> OK, great. Do you have a suggestion for a pre-defined compiler value I\n> can check? Is \"sparc\" or \"__sparc\" defined? On my machine I can run\n> gcc -v\n> which tells me where to look for specs, and in that file is a line of\n> \"predefines\". I think that there is another way to check this, but I've\n> forgotten how.\n> \n> I wonder if we can try enabling int8's for all gcc compilers? The only\n> machines that might break on are other 64-bit machines (like some\n> SGI's?).\n> \n> - Tom\n> \n\n", "msg_date": "Sun, 16 Aug 1998 17:53:29 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] int8 type -- call for porting results!" } ]
[ { "msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> > I am working on a patch to:\n> > \n> > \tremove oidname, oidint2, and oidint4\n> > \tallow the bootstrap code to create multi-key indexes\n> \n> Good man...always bugged me that the \"old\" hacked-in multikey\n> indexes were there after Vadim let the user create them.\n\nAlso, pg_procname index really wanted a multi-key index, but did a\nsequential scan of the index after the procname match to simulate it. \nThat is gone too.\n\n> \n> But...returning to Insight as of Sept.1st. Once I get settled\n> in, I should be to stay late a couple of evenings and get my\n> old patches up-to-date.\n\nThe only thing I am concerned about is that beta is September 1. I\nwould rather not dump lots of new patches in after the beta starts. Do\nwe need to start beta after the 1st? Not sure how to handle this.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 16 Aug 1998 13:38:42 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "On Sun, 16 Aug 1998, Bruce Momjian wrote:\n\n> The only thing I am concerned about is that beta is September 1. I\n> would rather not dump lots of new patches in after the beta starts. Do\n> we need to start beta after the 1st? Not sure how to handle this.\n\n\tSept 1st is already a delay'd beta as a result of the \"summer\nholidays\", so I'd almost have to say no to starting it after the 1st.\n\n\tWhat I'd be curious about, at this point, is what \"old\" patches\nare we looking at?\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Sun, 16 Aug 1998 17:57:52 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> > I am working on a patch to:\n> > \n> > \tremove oidname, oidint2, and oidint4\n> > \tallow the bootstrap code to create multi-key indexes\n> \n> Good man...always bugged me that the \"old\" hacked-in multikey\n> indexes were there after Vadim let the user create them.\n> \n> But...returning to Insight as of Sept.1st. Once I get settled\n> in, I should be to stay late a couple of evenings and get my\n> old patches up-to-date.\n\nI have been thinking about the blocksize patch, and I now think it is\ngood we never installed it. I think we need to enable rows to span more\nthan one block. That is what commercial databases do, and I think this\nis a much more general solution to the problem than increasing the block\nsize.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 18:21:39 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "On Sun, 23 Aug 1998, Bruce Momjian wrote:\n\n> [Charset iso-8859-1 unsupported, filtering to ASCII...]\n> > > I am working on a patch to:\n> > > \n> > > \tremove oidname, oidint2, and oidint4\n> > > \tallow the bootstrap code to create multi-key indexes\n> > \n> > Good man...always bugged me that the \"old\" hacked-in multikey\n> > indexes were there after Vadim let the user create them.\n> > \n> > But...returning to Insight as of Sept.1st. Once I get settled\n> > in, I should be to stay late a couple of evenings and get my\n> > old patches up-to-date.\n> \n> I have been thinking about the blocksize patch, and I now think it is\n> good we never installed it. I think we need to enable rows to span more\n> than one block. That is what commercial databases do, and I think this\n> is a much more general solution to the problem than increasing the block\n> size.\n\n\tHrmmm...what does one gain over the other though? The way I saw\nit (sorry Darren, don't mean to oversimplify it), but making the blocksize\nchangeable was largely a matter of Darren making sure that all the\ndependencies were covered through the code. What is making a row span\nmultiple blocks going to give us? Truly variable length \"blocksizes\"?\n\n\tThe blocksize patch allows you to stipulate a different blocksize\nat database creation time...actually, thinking about it, I kinda see them\nas to inter-related, yet different, functions. If, for instance, I create\na table that the majority of tuples are larger then 8k, but smaller then\n12k, so that most of the tuples, in your \"vision\", span two\nblocks...wouldn't being able to increase the blocksize to 12k provide a\nperformance improvement? \n\n\tI'm just not sure if I see either/or being mutually exclusive.\nThe 'row spanning' is great from the perspective that we didn't expect the\nsize of the tuples being larger then 8k, while the increase of blocksize\nbeing great from an optimizing perspective. Even having vacuum (or\nsomething similar) reporting that >50% of the records are >$currblocksize\nmight be cool...\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Sun, 23 Aug 1998 22:31:37 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "> \n> \tHrmmm...what does one gain over the other though? The way I saw\n> it (sorry Darren, don't mean to oversimplify it), but making the blocksize\n> changeable was largely a matter of Darren making sure that all the\n> dependencies were covered through the code. What is making a row span\n> multiple blocks going to give us? Truly variable length \"blocksizes\"?\n> \n> \tThe blocksize patch allows you to stipulate a different blocksize\n> at database creation time...actually, thinking about it, I kinda see them\n> as to inter-related, yet different, functions. If, for instance, I create\n> a table that the majority of tuples are larger then 8k, but smaller then\n> 12k, so that most of the tuples, in your \"vision\", span two\n> blocks...wouldn't being able to increase the blocksize to 12k provide a\n> performance improvement? \n> \n> \tI'm just not sure if I see either/or being mutually exclusive.\n> The 'row spanning' is great from the perspective that we didn't expect the\n> size of the tuples being larger then 8k, while the increase of blocksize\n> being great from an optimizing perspective. Even having vacuum (or\n> something similar) reporting that >50% of the records are >$currblocksize\n> might be cool...\n\nMost filesystem base block sizes are 8k. Making anything larger is not\ngoing to gain much. I don't think we can support block sizes like 12k\nbecause the filesystem is going to sync stuff in 8k chunks.\n\nSeems like we should do the most user-transparent thing and just allow\nspanning rows.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 21:34:58 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "On Sun, 23 Aug 1998, Bruce Momjian wrote:\n\n> Most filesystem base block sizes are 8k. Making anything larger is not\n> going to gain much. I don't think we can support block sizes like 12k\n> because the filesystem is going to sync stuff in 8k chunks.\n> \n> Seems like we should do the most user-transparent thing and just allow\n> spanning rows.\n\n\tThe blocksize patch wasn't a \"user-land\" feature, its an admin\nlevel...no? The admin sets it at the createdb level...no? \n\n\tAgain, I'm curious as to why either/or is mutual exclusive? \n\n\tLet's put it this way, from a performance perspective, which one\nwould provide more? Again, I'm thinking of this from the admin angle, not\nuser. I create a database whose tuples, in general, exceed 8k. vacuum\nkindly tells me this, so, to improve performance, I dump my databases, and\nbecause this is a specialized application, its on its own file system.\nSo, I reformat that drive with a larger blocksize, to match the blocksize\nI'm about to set my database to (yes, I do do similar to this to optimize\nfile systems for news, so it isn't too hypothetical)...\n\n\tBear in mind, I am not arguing for one of them, I'm arguing for\nboth of them...unless there is some architectural reason why both can't be\nimplemented at the same time...?\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Sun, 23 Aug 1998 23:04:17 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "> On Sun, 23 Aug 1998, Bruce Momjian wrote:\n> \n> > Most filesystem base block sizes are 8k. Making anything larger is not\n> > going to gain much. I don't think we can support block sizes like 12k\n> > because the filesystem is going to sync stuff in 8k chunks.\n> > \n> > Seems like we should do the most user-transparent thing and just allow\n> > spanning rows.\n> \n> \tThe blocksize patch wasn't a \"user-land\" feature, its an admin\n> level...no? The admin sets it at the createdb level...no? \n\nYes, OK, admin, not user.\n\n\n> \n> \tAgain, I'm curious as to why either/or is mutual exclusive? \n> \n> \tLet's put it this way, from a performance perspective, which one\n> would provide more? Again, I'm thinking of this from the admin angle, not\n> user. I create a database whose tuples, in general, exceed 8k. vacuum\n> kindly tells me this, so, to improve performance, I dump my databases, and\n> because this is a specialized application, its on its own file system.\n> So, I reformat that drive with a larger blocksize, to match the blocksize\n> I'm about to set my database to (yes, I do do similar to this to optimize\n> file systems for news, so it isn't too hypothetical)...\n> \n> \tBear in mind, I am not arguing for one of them, I'm arguing for\n> both of them...unless there is some architectural reason why both can't be\n> implemented at the same time...?\n\nYes, I guess you could have both. I just think the normal user is going\nto prefer the span stuff better, but you have a good point. If we had\none, we could buy time getting the other.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 22:07:04 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "On Sun, 23 Aug 1998, Bruce Momjian wrote:\n\n> Yes, I guess you could have both. I just think the normal user is going\n> to prefer the span stuff better, but you have a good point. If we had\n> one, we could buy time getting the other.\n\n\tFor whomever is implementing the row-span stuff, can something be\nadded that keeps track of number of rows that are spanned? ie. if most of\nthe rows are spanning the rows, then I would personally like to know that\nso that I can look at dumping and reloading the data with a database set\nto a higher blocksize...\n\n\tThere *has* to be some overhead, performance wise, in the database\nhaving to keep track of row-spanning, and being able to reduce that, IMHO,\nis what I see being able to change the blocksize as doing...\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Sun, 23 Aug 1998 23:34:19 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "> \tThere *has* to be some overhead, performance wise, in the database\n> having to keep track of row-spanning, and being able to reduce that, IMHO,\n> is what I see being able to change the blocksize as doing...\n\nIf both features were present, I would say to increase the blocksize of\nthe db to the max possible. This would reduce the number of tuples that\nare spanned. Each span would require another tuple fetch, so that could\nget expensive with each successive span or if every tuple spanned.\n\nBut if we stick with 8k blocksizes, people with tuples between 8 and 16k\nwould get absolutely killed performance-wise. Would make sense for them\nto go to 16k blocks where the reading of the extra bytes per block would\nbe minimal, if anything, compared to the fetching/processing of the next\nspan(s) to assemble the whole tuple.\n\nIn summary, the capability to span would be the next resort after someone\nhas maxed out their blocksize. Each OS would have a different blocksize\nmax...an AIX driver breaks when going past 16k...don't know about others.\n\nI'd say make the blocksize a run-time variable and then do the spanning.\n\nDarren\n\n", "msg_date": "Sun, 23 Aug 1998 23:01:08 -0400", "msg_from": "\"Stupor Genius\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: [HACKERS] What I'm working on" }, { "msg_contents": "> On Sun, 23 Aug 1998, Bruce Momjian wrote:\n> \n> > Yes, I guess you could have both. I just think the normal user is going\n> > to prefer the span stuff better, but you have a good point. If we had\n> > one, we could buy time getting the other.\n> \n> \tFor whomever is implementing the row-span stuff, can something be\n> added that keeps track of number of rows that are spanned? ie. if most of\n> the rows are spanning the rows, then I would personally like to know that\n> so that I can look at dumping and reloading the data with a database set\n> to a higher blocksize...\n> \n> \tThere *has* to be some overhead, performance wise, in the database\n> having to keep track of row-spanning, and being able to reduce that, IMHO,\n> is what I see being able to change the blocksize as doing...\n\nMakes sense, though vacuum would presumably make all the blocks\ncontigious.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 23:13:52 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "On Sun, 23 Aug 1998, Stupor Genius wrote:\n\n> > \tThere *has* to be some overhead, performance wise, in the database\n> > having to keep track of row-spanning, and being able to reduce that, IMHO,\n> > is what I see being able to change the blocksize as doing...\n> \n> If both features were present, I would say to increase the blocksize of\n> the db to the max possible. This would reduce the number of tuples that\n> are spanned. Each span would require another tuple fetch, so that could\n> get expensive with each successive span or if every tuple spanned.\n> \n> But if we stick with 8k blocksizes, people with tuples between 8 and 16k\n> would get absolutely killed performance-wise. Would make sense for them\n> to go to 16k blocks where the reading of the extra bytes per block would\n> be minimal, if anything, compared to the fetching/processing of the next\n> span(s) to assemble the whole tuple.\n> \n> In summary, the capability to span would be the next resort after someone\n> has maxed out their blocksize. Each OS would have a different blocksize\n> max...an AIX driver breaks when going past 16k...don't know about others.\n\n\tOh...I like this :) that would give us something that the \"big\nguys\" don't also, no? Bruce? \n\n\tCan someone clarify something for me? If, for example, we have\nthe blocksize set to 16k, but the file system size is 8k, would the OS do\nboth reads at the same time in order to get the full 16k? I hope someone\ncan follow this through (unless I'm actually clear), but if we left the\ntuples size at 8k fixed, and had that 16k tuple span two rows, do we send\na request to the OS for the one block, then, once we get that back,\ndetermine that we need the next and request that?\n\n\tDamn, not clear at all...if I'm thinking right, by increasing the\nblocksize to 16k, postgres does one read request, while the OS does two.\nIf we don't, postgres does two read requests while the OS still does two.\n\n\tDoes that make sense?\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 24 Aug 1998 00:18:00 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "RE: [HACKERS] What I'm working on" }, { "msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> > \tThere *has* to be some overhead, performance wise, in the database\n> > having to keep track of row-spanning, and being able to reduce that, IMHO,\n> > is what I see being able to change the blocksize as doing...\n> \n> If both features were present, I would say to increase the blocksize of\n> the db to the max possible. This would reduce the number of tuples that\n> are spanned. Each span would require another tuple fetch, so that could\n> get expensive with each successive span or if every tuple spanned.\n> \n> But if we stick with 8k blocksizes, people with tuples between 8 and 16k\n> would get absolutely killed performance-wise. Would make sense for them\n> to go to 16k blocks where the reading of the extra bytes per block would\n> be minimal, if anything, compared to the fetching/processing of the next\n> span(s) to assemble the whole tuple.\n> \n> In summary, the capability to span would be the next resort after someone\n> has maxed out their blocksize. Each OS would have a different blocksize\n> max...an AIX driver breaks when going past 16k...don't know about others.\n> \n> I'd say make the blocksize a run-time variable and then do the spanning.\n\nIf we could query to find the file system block size at runtime in a\nportable way, that would help us pick the best block size, no?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 23:42:09 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "> \n> \tOh...I like this :) that would give us something that the \"big\n> guys\" don't also, no? Bruce? \n> \n> \tCan someone clarify something for me? If, for example, we have\n> the blocksize set to 16k, but the file system size is 8k, would the OS do\n> both reads at the same time in order to get the full 16k? I hope someone\n> can follow this through (unless I'm actually clear), but if we left the\n> tuples size at 8k fixed, and had that 16k tuple span two rows, do we send\n> a request to the OS for the one block, then, once we get that back,\n> determine that we need the next and request that?\n\nThe filesystem block size really controls how fine-graned the file block\nallocation is. It keeps 8k blocks as one contigious chunk on the disk\n(ignoring trailing file fragments which are blocksize/8 in size).\n\nHow the OS does the disk requests is different. It is related to the\nbase size of a disk block(usually 512 bytes), and if multiple requests\ncan be sent to the drive at the same time(tagged queuing?). These are\nreally not related to the filesystem block size, except that larger\nblock sizes are made up of larger contigious disk block groups.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 23:51:25 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "On Sun, 23 Aug 1998, Bruce Momjian wrote:\n\n> > On Sun, 23 Aug 1998, Bruce Momjian wrote:\n> > \n> > > Yes, I guess you could have both. I just think the normal user is going\n> > > to prefer the span stuff better, but you have a good point. If we had\n> > > one, we could buy time getting the other.\n> > \n> > \tFor whomever is implementing the row-span stuff, can something be\n> > added that keeps track of number of rows that are spanned? ie. if most of\n> > the rows are spanning the rows, then I would personally like to know that\n> > so that I can look at dumping and reloading the data with a database set\n> > to a higher blocksize...\n> > \n> > \tThere *has* to be some overhead, performance wise, in the database\n> > having to keep track of row-spanning, and being able to reduce that, IMHO,\n> > is what I see being able to change the blocksize as doing...\n> \n> Makes sense, though vacuum would presumably make all the blocks\n> contigious.\n\n\tStill going to involve two read requests from the postmaster to\nthe operating system for those two rows...vs one if the tuple doesn't have\nto span two blocks...\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 24 Aug 1998 00:52:41 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "> \n> \tStill going to involve two read requests from the postmaster to\n> the operating system for those two rows...vs one if the tuple doesn't have\n> to span two blocks...\n\nYes, assuming it is not already in our buffer cache.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 24 Aug 1998 00:09:21 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "On Sun, 23 Aug 1998, Bruce Momjian wrote:\n\n> [Charset iso-8859-1 unsupported, filtering to ASCII...]\n> > > \tThere *has* to be some overhead, performance wise, in the database\n> > > having to keep track of row-spanning, and being able to reduce that, IMHO,\n> > > is what I see being able to change the blocksize as doing...\n> > \n> > If both features were present, I would say to increase the blocksize of\n> > the db to the max possible. This would reduce the number of tuples that\n> > are spanned. Each span would require another tuple fetch, so that could\n> > get expensive with each successive span or if every tuple spanned.\n> > \n> > But if we stick with 8k blocksizes, people with tuples between 8 and 16k\n> > would get absolutely killed performance-wise. Would make sense for them\n> > to go to 16k blocks where the reading of the extra bytes per block would\n> > be minimal, if anything, compared to the fetching/processing of the next\n> > span(s) to assemble the whole tuple.\n> > \n> > In summary, the capability to span would be the next resort after someone\n> > has maxed out their blocksize. Each OS would have a different blocksize\n> > max...an AIX driver breaks when going past 16k...don't know about others.\n> > \n> > I'd say make the blocksize a run-time variable and then do the spanning.\n> \n> If we could query to find the file system block size at runtime in a\n> portable way, that would help us pick the best block size, no?\n\n\tThat doesn't sound too safe to me...what if I run out of disk\nspace on file system A (16k blocksize) and move one of the databases to\nfile system B (8k blocksize)? If it auto-detects at run time, how is that\ngoing to affect the tables? Now my tuple size just dropp'd to 8k, but the\ntables were using 16k tuples...\n\n\tSetting this should, I think, be a conscious decision on the\nadmins part, unless, of course, there is nothing in the tables themselves\nthat are \"hard coded\" at 8k tuples, and its purely in the server? If it\nis just in the server, then this would be cool, cause then I wouldn't have\nto dump/reload if I moved to a better tuned file system..just move the\nfiles :)\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 24 Aug 1998 01:15:34 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] What I'm working on" }, { "msg_contents": "On Sun, 23 Aug 1998, Bruce Momjian wrote:\n\n> > \n> > \tOh...I like this :) that would give us something that the \"big\n> > guys\" don't also, no? Bruce? \n> > \n> > \tCan someone clarify something for me? If, for example, we have\n> > the blocksize set to 16k, but the file system size is 8k, would the OS do\n> > both reads at the same time in order to get the full 16k? I hope someone\n> > can follow this through (unless I'm actually clear), but if we left the\n> > tuples size at 8k fixed, and had that 16k tuple span two rows, do we send\n> > a request to the OS for the one block, then, once we get that back,\n> > determine that we need the next and request that?\n> \n> The filesystem block size really controls how fine-graned the file block\n> allocation is. It keeps 8k blocks as one contigious chunk on the disk\n> (ignoring trailing file fragments which are blocksize/8 in size).\n> \n> How the OS does the disk requests is different. It is related to the\n> base size of a disk block(usually 512 bytes), and if multiple requests\n> can be sent to the drive at the same time(tagged queuing?). These are\n> really not related to the filesystem block size, except that larger\n> block sizes are made up of larger contigious disk block groups.\n\n\tOkay...but, what I was more trying to get at was that, ignoring\nthe operating system level right now, a 16k tuple that has to span two 8k\n'rows' is going to require:\n\n\t1 read for the first half\n\tprocessing to determine that a second half is required\n\t1 read for the second half\n\n\tA 16k that spans a single 16k row will require:\n\n\t1 read for the whole thing\n\n\tconsidering all the streamlining that you've been working at, it\nseems illogical to advocate a two read system only, when we can have a two\nread system that gives us a base solution, with a one read system for\nthose that wish to reduce that overhead...no?\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 24 Aug 1998 01:18:36 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] What I'm working on" } ]
[ { "msg_contents": "Jan,\n\nWhilst you are working on the rules system it would be nice if\nyou could look for an oportunity to store the plain text rule\ndefinition at creation time.\n\nIf the definition were stored in a table column it would allow us\nto dump and restore databases in a more complete way.\n\nI looked at this some while ago myself but never got close to \nmaking it work.\n\n\tKeith.\n\t \[email protected] (Jan Wieck)\n> \n> Hi,\n> \n> got a lot of things working up to now. Most things on the\n> relation level are fixed now, including qualified instead\n> rules. Update rules can now correctly refer to *new* and\n> *current*.\n> \n> Must check if instead nothing with/without qualification is\n> O.K. and if the regression tests are still happy with the\n> changes.\n> \n> What I haven't touched yet are rules on the attribute level\n> and the update new stuff. If regression tests walk through\n> and the instead nothing is O.K. I'll send a first patch with\n> some test queries on monday. Next todo is then update new.\n> \n> Have a nice wieckend :-)\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", "msg_date": "Sun, 16 Aug 1998 21:21:07 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Rules: first fix on monday" }, { "msg_contents": ">\n> Jan,\n>\n> Whilst you are working on the rules system it would be nice if\n> you could look for an oportunity to store the plain text rule\n> definition at creation time.\n>\n> If the definition were stored in a table column it would allow us\n> to dump and restore databases in a more complete way.\n>\n> I looked at this some while ago myself but never got close to\n> making it work.\n>\n> Keith.\n>\n\n Yes, that would really be nice and I had something the like\n already in mind.\n\n I'm not really sure if it's a good thing to save the rules\n definition text instead of the parsetree. The advantages of\n doing so would be that the rule could easily be dumped and\n (more important) that the rules can have more complicated\n actions (remember that the currently stored parsetrees can\n quickly override the size limit of a text type).\n\n Storing the definition text only would require to parse at\n least the actions any time, a rule should be fired on a\n query. Bad for performance - but must check if significant\n bad.\n\n At least I can't do this for 6.4 I think. But I'm willing to\n take a look at it after.\n\n On the other hand wouldn't it be too complicated to\n reconstruct a command from the parsetree, that exactly\n creates the rule. Reading a parsetree isn't fun, but after\n all I did on the rewrite system I'm somewhat familiar with it\n now (sometimes I see the cup in a targetlist, the coffee\n machine in the rangetable and all the buttons in the\n qualification when pulling a coffee out of it - think I\n should I consult a psychist when the rule system is fixed\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": "Mon, 17 Aug 1998 12:22:12 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules: first fix on monday" }, { "msg_contents": "> > Whilst you are working on the rules system it would be nice if\n> > you could look for an oportunity to store the plain text rule\n> > definition at creation time.\n> > If the definition were stored in a table column it would allow us\n> > to dump and restore databases in a more complete way.\n> Yes, that would really be nice and I had something the like\n> already in mind.\n> I'm not really sure if it's a good thing to save the rules\n> definition text instead of the parsetree. The advantages of\n> doing so would be that the rule could easily be dumped and\n> (more important) that the rules can have more complicated\n> actions (remember that the currently stored parsetrees can\n> quickly override the size limit of a text type).\n> \n> Storing the definition text only would require to parse at\n> least the actions any time, a rule should be fired on a\n> query. Bad for performance - but must check if significant\n> bad.\n\nHow about storing both an internal form and the plain text source? That\nway you can use the fast form internally and dump the plain text...\n\n - Tom\n", "msg_date": "Mon, 17 Aug 1998 15:33:12 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules: first fix on monday" }, { "msg_contents": "I wrote:\n>\n> >\n> > Jan,\n> >\n> > Whilst you are working on the rules system it would be nice if\n> > you could look for an oportunity to store the plain text rule\n> > definition at creation time.\n> >\n> > If the definition were stored in a table column it would allow us\n> > to dump and restore databases in a more complete way.\n> >\n> > I looked at this some while ago myself but never got close to\n> > making it work.\n> >\n> > Keith.\n> >\n>\n> Yes, that would really be nice and I had something the like\n> already in mind.\n>\n> [...]\n> On the other hand wouldn't it be too complicated to\n> reconstruct a command from the parsetree, that exactly\n> creates the rule. Reading a parsetree isn't fun, but after\n> all I did on the rewrite system I'm somewhat familiar with it\n> now (sometimes I see the cup in a targetlist, the coffee\n> machine in the rangetable and all the buttons in the\n> qualification when pulling a coffee out of it - think I\n> should I consult a psychist when the rule system is fixed\n> :-).\n>\n>\n> Jan\n\n To demonstrate that it really isn't that complicated as it\n looks, here is a C function that if defined in the backend as\n\n CREATE FUNCTION get_ruledef(name)\n RETURNS text AS '.../get_ruledef.so'\n LANGUAGE 'C';\n\n can be used to see a textual representation of the rule given\n as argument.\n\n It is able to handle ALL the rules I defined in the test\n suite for my first fix (sent yesterday). In addition I tested\n a\n\n ... WHERE (att, att) IN (SELECT ...)\n\n in the definition of a view. Worked too. The output can\n easily be fed back into a psql and produces exactly the same\n pg_rewrite entries that where there before.\n\n It is not complete (aggregates are not handled up to now and\n there might be some other expression constructs, that could\n occur). But it's a starting point I think. At least we could\n produce a view\n\n CREATE VIEW pg_rule AS\n SELECT rulename, get_ruledef(rulename) AS definition\n FROM pg_rewrite;\n\n Now pg_dump could output views as commands for regular tables\n and add commands for the rules. It must omit the rule\n _retpg_user in the dump, but that's all. All views and rules\n are restored.\n\n pg_dump should not select all rules at once, because if only\n one of the rules cannot be converted back to it's definition\n string, none could be dumped. Instead it should get a list of\n all the rule names in pg_rewrite (without _retpg_user) and\n then loop over it getting one at a time.\n\n As soon as anybody reports an error (pg_dump cannot save rule\n ...) we know what case isn't handled by get_ruledef() and\n could implement 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\nbegin 644 get_ruledef.tar.gz\nM'XL(`,:UV34\"`^P\\^7?;-M+YE?HK$#6I)44^<[2U-]FG2'+,_63)E61WNVV?\nM'T5!-C<4R?*(H^W+__[-#``2I*C#3=)CMWIY,0D\",X.9P5P`></CZS!Q^93/\nM]A]\\IA][=O#5\\^?L`8/?TP/Z>W@D_LK?`6,OGK]X\\?3IT8L7<'UX^/3I\\P?L\nM^8/?X)=$L14R]B\"XB7YVU_2;3JP'_X6_&TW^Y]9;/G-<_JEQ'!X<O'CV;*7\\\nM#[]Z_I64_]'1BV='T/+T\\.#I`W;PE_P_^^^+W4_UJWQ1^8(I%8)+^*D[-O-#\nMIFE:K<YFB6?'CN_1*+/3[8_-4[/=&IN#OAC[Z(Q;4QX>L_TD\"O==W[;<_2BT\nM]TE.XLJ%?]GML#U*-;CYCAWN';'#;[[Y>O_@Z_W#I^SPQ?'SI\\?/OF8T@'7?\nM!^P1XOYTTZ>9C+GKLCE0P>YN><A9?,M9X$?Q3<@1;>0GH<TCYCKO@$65T;#=\nM,8<O5TY1P#0]VTVF`M:-ZT\\LEUG>%,\"&,8L\";CLSQTY9'<$01PYX5!,(ZBE?\nM]L3X=3T0;*72/NVUWHR>O&2[YJ-:SWQ]\\2WVHCLU0L(`&MDIB'<VOPGW;O,#\nM5=>)9;_EWK12Z75:G0X^[.6@NL'/8JJ=WN#U/Y@3T5RG\"\\^:.\\`4=['K^J`,\nM4^9/_LWMF!&A,(\"ZO]0UZU&MTQM=GIZ:_ZQ7*O!P]-+0GN[YE4JKUWMI8#=X\nM6A=87R>..R64T:T5IFC@&>`^!B;!&.BJ!AW#<`0M1[==;GD,+FV\\.*X8X9SM\nMSM0H>==`U(X'M@8APG\\5`&+V1V/LQ,1E[QI8<CVX&(^P1>#\"B^YHC&PBCA$[\nM,^I+2,I-]S@W>]\"GM?8_U_<WL_\\O7CP[?)[Z_R/R_\\\\@`OC+_O\\6O_W&)_E5\nM6(/EU,?89:?2Q+/8QV?,8O@T8O#<\\1SQA+^/8:AA&(SY2<S\\&7/B'5C^20`^\nMA!'8@G.`EA7>09C-$J\\0N->W8#%='N[9Y!D.4\\]P\\!4$F\\=/OP'GD/,,`C7\\\nMQK=@C2)_%M^!94#+9/O!(G1N;F.P$Y,%^P>L_>\\<;K]EN^S,FD^2\\&9/'\\V9\nME<2W8!_1'4#_F]#RXH@%/)P[480\\0/:P).)-1K#AS]R?.K-%4\\*8.E$<.I,D\nMQAYH^,%[V-R+T\"'HM.$C!T!/?3N9<R^VR+T*&.A_+6_!@B0$;P2`@M!_YZ!%\nMC6^MF/'W@,/Q;K+),<^/'?14`%G\"\"'EL.1X,80X0#2:,Z'6@CZ\"*(`F:Q&#D\nMEG024PGC'0\\G0-<<02`]Z=R`U&B/]7UV%SIQS.$I>$R.TVBJZ2I^P%18Z\"\\L\nM-U[`Q#AGB\"?D/R<.FFXU4]\"D.&6^\\Q]X`BR.]B2,<^0PN!;\"BP+(LW)N+=B$\nMLYRL4=@(T@DE#\"E7,7F/8Q>8-_+:=?T[ZBM)1\\[&('!4_<B&^:;\\0*4H\"@/'\nM>?Q.CD!R&'J6T%T@YZ=(->)*98O]9TX8Q2RP;CA.G%OV+?G(+`A9,\"L(W(6F\nMFF:?]0>L>P6+BXW.P`VQ\\5F7M2['9X,A@W\\=<S0>FJ\\OQX/AB+WNLI[9>MWK\nMLO&`M?K?2Q@7K>'X>\\9.H3OT'W;;XR9!SJY'%]VVV>J)YC8M97$W&$H8[4%_\nMU/WV$M=XJP?WG=9YZTUWQ%AK:([,_AOH>CF&_TX9$<@N1UUU9XXDC-'@=/Q=\nM:]AM,G,\\8IU!^_(<$:&]:.)<@&+6Z0[-*VBZ`M@`:-@=G#9I^HH?\"H%D`3MK\nM775AXMT^:W6NS%&W@UBQQ\\5@-#)?FST3Y@Y-H\\OVF80A:-?7OPZPU>^P/%L%\nM>]\"T]7K?,WK8[K7,<\\8T)L/$ABW@3G?4)\";V+CO`%KA^C7SI#^\"_GGENCH%`\nMD$Y3(C7/+WIFM[,$0_#NO#MLGT%#2TP#!IV:XWYW-)+\";`G9FNW+7DL)ZN)R\nM\"#,''M-$^H/^KMD_'0(I763VGA!(*@H&UQ?#P16('!BGF-SJLVIK!,^J['5K\nM9,*,$):F>&5,(D$`0@EC\\+IGOB'9(H,'2)G`@^NZ9?;'W7ZKW^Z2]EU>7`R&\nMJ(B7%YW6&#@H873[9]@'\"1^1AIP/.JF+&4D!?I+?/@2)*MK^6Q1/'7_O]E6^\nMR74F2VT6N)%<6^*!J9SFVV:V%[O%H2%8&VS+&JO\\/;>3V`_WH\\#9NZUJ3VQ_\nM/@?[%>W#L)L;\\(^YIV\"6W6B?N_Y-6?L$HF9P&E'^F>>#C=NG__,/_`#L/ACB\nM<-]V+;+%)3\"C162#\\>)ES]SRAV`.+:`0O/\\U`(ZBE4_C15`8*E*6:J52V6\\P\nM+9,#'7DC\\JPI#,?;W,/]2H3.U68V9`NL@4$-)\"K\\1#6_\\YTI:P2NY5U#V(./\nMV4O6O^SU3O(#?TYXN-\"Z5$?='IA-0'<Z')Q#.'(=<G2'G'V']HHI1-#UT6'U\nM9`W9*KF.2FC'D(LU]&2\\#S`[,%&8\"H*OET+N88BU%G!N;I@\"IP@@5@O&&-'1\nM%\"\"V:S*Z[8`W%$VQ72\\P!PD4#$((W^*5Y%A9SXB[D+#=8P#H+0_O,R`)0!?X\nM/09,@:1[#4!&7//W05CKP5('8<36Q(7HP/%B%B+%4_Z^\"2$2:&X#UU>337S?\nM9>^L,`@AHGY?!A/EM1DFA+S0'[MM`S/>ALPQ&#`>=[T8IQR[6Q%K@U[%`G0;\nM+UF#6MY9;BF[N$OAVS7J;&T`2PY:G&E95RN6`72A+Q%]Q.\"QE\\RS@40IV!G[\nM[;4SNPYA&)BK:6VU'/!)E`3E\"T=;:9#F[+*.#U$ZA<\\8.$)0G800[6J9D\"%#\nM:=M/W\"F&H8B=61`*,B20@N*LIP\\@[)!#.P6\"B&GEHJ^L6_657RH434)/PVC(\nM7B?4!MV2N6&`2*,?#G\\2;<A=P_`2UXU^.))MP`<@\"IQ,:(N&=.$;AESYHCU=\nM_;(]MG6@C7@>Z`#!Z@%G\\;[`7/PUV'=<1-]J^I!^H)&,_#D7X>^4\\P\"RHCM/\nMC5B\"L4]_-?N*?R`?K:4&<25VT%0/2U(@B-&%\"9F#!T%XN`&3,V,UZ(T:CX-K\nM=?;P)0Z_'OS?-<3#??`\"]8K:&T'_6^L.AX-ADU4U\"1XSV_(PX[!+2:BN)7O@\nM:7D#EM@@\">&!I2J6X+L0G.O[;Y,`/1&D*/:>QG'0N*EJ9SZD=31.0\\^PV(6=\nM(!]),`-2@ZG,)CTYX@`%I[4F<S<\";-F0>D:0XBRA7L/0O,,5'K?.?JD8L-Y1\nM=]'_\"_TUT$,;Y*&!1]FS@Y_04;?.NP.S<Y+RGY@AQ\"-Y5,MY[B8[;#(%`YAN\nM*&)2(BK&DAQU:'4VLR!9$_/_L?HX^K%:;;(<#@1;\"\"@00F2]X]A,Z.J\"Y`]K\nMI/Z&B_12\"RVHTD*8*046]F,MK\\D,$*LN?%B@/`2H9\"%J:@%)2H1QH)ZU;&TI\nMP?R=[7@[[)CML!V]^R%VW_GQ0#:2,9&SQ3`VR(F9^!XUQ5\"0@T2,`A`#LV4E\nM8BO4A])U)24@*U6E_'D<@50*4_R06\\ZHJ:\"W``?P'BI<AGJ,5:_H-K?83\\V^\nM.3HK4Y#<0L^-%J16ZYF&RGY*26$U^W;MJC4\\ZPQ'_V)/B\"\\&W(_,?W5KLG,=\nM>NM=1`](DEII#R&ZG5T0A2']5,XM2$V3EEUBARL*\"'9?@=]&Z9]DG6)[J1-<\nM84WD9`NE72H>TB9($J,[!3WTF4IS(C;G<S]<;-!C\\#)`3BY03</3+\"C%GB!R\nMZ`FI%5S48%@=&*9XETUO20+06P(HX3TY-7P&M-K!HE9D?A/I:Q+JW1396I/>\nM<2+E\"6:A/_\\5[FB-@FYV1BMT=#6]72M:P-R<R-M!&?Y]DW<N:.\"'LF!+ER9%\nM6Q`<80P9)K90HO:PVQIWV?\"RUV4R^4UC*2H=LAOG'?>6+,\"F?*=R_X1'!EP4\nM\\S0FR4P+@?@[RE9%\"[HO;*'L-HV+CK`)`UO1@C&KX437TNMJL!K0[^?$<@M-\nM%N5QHA$#>:,A6B)T@69/B[]FGI_#@<9VG5Q;J/P8CT:!92O7PJ7\\P#:2_UK:\nM`U@K>^`.D\"67U=>'WQS5MS$8:=@/:8>;@.V@99&9$BG8M9AA\\G)1SR!'F/\"P\nM)L4'ZB^EI\"RQO$5OAURNXR!8(1/'`_1+IJ6)H)OL2\\%/-9\\-Z$@%-'QTCPA!\nM1SX'/N2@A@YO$1NJWR='ERFOPIBU(%+4OL\\Q1UP;VASQ5G8'1*0XY7BT6$/B\nMTX:+:L]6+*95IS-9[)G]>A)2`(((U2-[\\C\"+C959S]:^S.KKHI`X]C'/S<9N\nM$6-FF^DK=OO6KC=`B]X0%CRP1S?6NB\\92^`BT=-&6K$868C2]$=5UAJQ07\\)\nM'@>KG\\49N*4T2_>3%(8[)[9OB9.XT\"FWL*V(LYW#G6,CAT16\\L8#P@/>90)Y\nMS5M,-L2`H^(`49]>/>!I<8#9'W6':S`\\*P[H`$FE&)0.@*\"LQ(V/#7BXVLT3\nM=QY'[-:*6.)%28#G18!/DG]H`!]/(5!&#(:20U,91RF0%'E>F4BNLJQ3(@IH\nM+)'U<BU(&<9Z/:_]:+U>L0-=[W,<VB/&%&$7BD<*>%,9Q/K2FC!G&?'()L@$\nM!7?0.*3;CI\"[3''#5@_\"[email protected]:I5+;<1D:A\\6\"].\"I>LT1`^WZ\"JHR&J\nMCJ@=$EQQ>1.@$WR,14HP`[):67>I1%\"3!J*NZ4M^58D2=2D'L\\(F0=]]I4J&\nM!TUB\"01'P\\MN@8]YZ)W!TH+%$S/=5H>]Y8L[/YR\"\"9RQR*_K[,P<B`A@EU80\nM`=`!GSH>'C?2S)>RC!I8X/U-?)NR!-A/N9ZAAU$EG,\\AKQ&GP+C07JV$U60I\nMS%]$2KA>'`BB;#ED-6=1;\"[K5ST1POI0(*Q^HGS1!PCVP9+\\(@H:Q4F#BAZD\nM9.8@]`?C,[/_YD2`3X%@OR)+-D\\Q^K@YRBEN\\EGC6PM/G3CQ=CD(!>L?5A5[\nM4\\HH`;FP0I@_'H`#^\\6E@\"D2E7F'(7;P`^P7AYSCT0B*7M.-%MG+!?7:F(:L\nMV3:1^8;R8G(MRB1HG'-H[?..+)@<\"Z[*B9=NM:@-#>HH[3I=:\\\"$>UL&MK2K\nML@TPX?J6@2WMZ6P#3+C%96!+VS>K@2F#F,*4*R`/5*V+:AY$Q5!^=WT1\".NH\nMCZ-CN5RDU)2_I8,GSAS2&=P<`%>YX'&U*0#J7KA$YGEJ]+*.(%L$D2N5O:@-\nM19VWF`R%4OW>2H77[^?IF;,!B_$'3`ES^Q*-B*NMAFPC\"G<67)E4#RWOAH\\G\nMKGC0@!!&RW'QGO9\\]%T(:!(VL-`(03UMT(`]U$&$<C_+]URT;NCA](&.EGD;\nMC;7Y]\"G5Z._D+H?8ZO#96\\^_8W>W#BQE5(1;N)MGYY[4V!\"GR<C=,M\",$$]K\nM2?LB%`DK_D2^;(V)7=+6\"!@0`&-?')H+8#;92L4O4>Q\"YY%S_]++2$YGZ7WD\nM_(?[,Y'NX0P4&-D?X_&:0]QF#OM;]AQNGSS1PR#T6B6[>%CL;+*:V+^K*YK$\nMO%$<=8A+ZJEGD^3]X/R4\"E&U2\\$_>;+DYNZ%F2*O',Y5>(T\"TKR3+AUYVNJ-\nM%,D?MO&$?=`C(ATGH9VC(QF1-A64\"1(\\9S;C(6U*\"AA49FGTN]\\U2#4;[<OA\nML-L?-_8P,HY\\5&681,S\\N2,R+CKN($Z%*!@0S_-PXZY/MNC22,I-K9Q4,Q7`\nM/$P9\\^3)3[+B#BLT=KR$:U$MB`N#D9Q]R((25^WO/,0X8Q[4H#M@XC-A7ZLT\nMZVI]\"?S:,8H_)>,TLG+F1,FU-(U:E9,G@;;P10+`=N46(,@DLA;26-\\G1Q<C\nM\"L&YA_!B?!7BCDXT^DP8=%;+;`R:F#1:!W.-.0ZKKI2FMD#5ODI,^V\"UW%&#\nMG*#T6!`P4)-`A+%A93E3B5<G*G2&H:;9>XSZ2W,_9:E]F&LH;&\\D=O3%FL\"\"\nM@A(YY8\"%):\"G&@]S<O_R2Y8C0`3@^4P)`9$T#+DZ#(VWQOIEHK#F5@H^,#:O\nM\"NBTU;HH*KBQ_=)8'KHD8*;+-_]<@G9E74C@+<B3YKJ<?8J\"R5*12:.5.GQ8\nM:6=;4LHB299B!OQBKT&3M^83RLITGRCE3G%LH]%E1QZ\"Q;(EH2TX2];^I[+X\nMKQUQV3:Y\"@#>-`EP+O4U@6<QV%\\*/#TF2V3WBSS7'PS[WXH\\TY,U,MP$#2T:\nM-:_$J*GAQ=B26$A!`*0K3?&B1R:FO;T]=M7J7=(A71EY(K([)^*%;L+G[/T5\nM@/ZY`]\"_PK<MP[<1*$>L6=P[!Y1:K@>S/QXPZ=8V+HA2WGC:PN!1XL9#58+?\nM174I6S.Y\"%`GI%JRXU)PO$6?J&6<Q6BPMFTXN#$4+/6@)1&#_CAVB>YHZL_I\nM[]*QGWS=-%='5I,3!HW)+7!UOCOS]\\7P3O?_+S?X?PE;5)+E+%;$>`5NT>F7\nM31PSMF!766'VU\\30RU7HY2)T$<^*.N2?)7XI5CY+XA>Y)WB_^&7].?7/&+]L\nM$U\"4&C(Y36DA8)&,?Q\\[)NG8PH0MA^)`=.GZITHKKADK)*TB*^?/V`Z>.1='\nMC6E_?Z=@^CYI'EPQ/M[J%;+,E^5IQZJU7RJ6)FX1DTDHV?[3]N(P1;;^`*G3\nMZDGD,JKRR?Q!K5!QEV.Y?\"^/#=S/\"*U_]V6=$2JS+O>T)Y)BJJC\\KH&13L@]\nM`R/K#U@JH*#U3Z/9Z;1*'\"LV<WKY?BMM_N@7LW2%U_0]%24.REX62'.&_'RK\nMJ7]!$`?9,?G5@K@,,'7'S-UD4Q^/V:HT'E_XH/?,$3.]N,`FW/7OU$@;N`2N\nM!\\VO;]L)OLU1.`^!DLMM!T5[V6XZOG4SI\\\\(3,2+..S.#]]\"%CZ+-V7M8GN:\nM6#*V;NAO/=N8'E^W;FY\"?G,,9A=K=48`NA7/:M4?O<?1CQ[X,QKHCTCGY&@Z\nM[93;5Q5`:-=TP>G=+7&*J:KJ>(735./K-Z&?!&U:C1^)6X-T'P+P';T4<Y?T\nMFM[80\\,EWM^K(T;\"MV19Z;A706N@*:\\T>,B@(=X%I-=WV:WU3KVA(SZ?@79I\nMXL1LBE^\"@%LYI`AC'_^DA^4`WNXK/T@/&,@R+LYJ<''=_>?%\\)C.BJVV2VJ]\nMI6NM(D]$L+26@0-0N_R`$-:U+MDR%,(PRFJ[R^C]@(Y[U6J#@\"-SU3QX6,<_\nMGG\\_</>>#7UV8IOIE)I%0S\\0J'-\\N(+C\\D#2[R:'.KZ$7_OMN;><=6[#4PE-\nM'\"71V-OJ=_[B[V?D;W\\P7L5?_`[&[\\WCZJ]9DJ>7_78VJ8+SS[_#O8YXS0>4\nM$IQC:H&.[`32?;Q:WJU)OU'JSXP/NCC+O-N5E3FW*RI#`.7HVJZLG&=;3@]6\nM!>XP'E]!\"SU?1.MIF(Y@MB@!9ZXJ)V./W^VI2:6E*2,MNF]1(\\X&+`&'0`O/\nM42@$^?J7)#N5*)8+M4E\"\"J#40J+8O&%9,C^%FZ2DJO;R;L/):)7.X'OUBC`L\nM<Y\"GK*Q>%F7Z@('V1\\99%*O?(\\`:)9.>X[U-L<I[K(@E$Q>N4--DHZZ2XDRK\nM/-2JGV.MR7&[K^!\"5\"L%F5FE+(W51-5-J68Z$,T0AEYZ@E<FM9JF,5HE6#3H\nM1:0ER&O4L6Q#_5>85B.M1#67[&>J7R7E=+.O@JD/E<HJ;[K-J>`R*WU/=:3/\nM4:2:H=EF[9,5ZIL5I!E+D(HO652V5^M-)T(3#[,Z+\\OE\\$!H7C3U*@DC.PB:\nM3Z]6OY0AIRKWJU8FVZF+6JX?X4<`\"=U6J?9'?Z]D76U)^QH%OJF=?HWBU`_G\nMU_)#`_1D1.^+%LO:935RG!W<(]FX]&FRL/*U9&&;%Q73K^JD7U38YM5$.0=\\\nM4XQ;H7T[6D1M_*@\"3;%V,1P,S$Y32G9`'S0UI^FK^HAR]Q7^[TSK5.O!?]H+\nM,P]3;IG1%:3YTYK$5Y?O4N344GS-07XN`G?(:1:@A_)%X\";+(91,R7A-S-/$\nM4&=ONN/1>'C9'J=X3S8><+-4K0E6!HPBKX0?\"*C?XT\";^O+'E[6,NMU7$EIZ\nM/&;9&*TOW@N%(%[email protected]%JVRLBNVJVL;OBHB:S@*<T4GPCY?2IY<5;(\nM`^/2RFT89Y4\\/(E*U8GLA8GT8*HXD6J!&0KGEJL-VLLZRY>V)'#;=Y.Y)]_>\nMRCI9'KY4##9V[D.0D[ZV$;(D2K!8EO4,DACI\":SI%%BVNV\\G\\6Z.F1K0T$^\\\nM_V_O6GK:B(%PK_17Y$+9H`\"BXD1+)0YMA=2B\"J5\"/:&E;$(D(\"B[E/;?US/C\nML<?K?3AT2WN8[P)YK#VVQ^.Q9_R%PD6R.95Q&6:[H_/\"?Y,39T'\"U>**V%(G\nM/DU&-/WA]G[/^&++_&H/_H>LF4?B$P)NRH?[\\/*)KY<8,GOM]#`<4-98/\\DN\nMBR.PR!33&[@>H[$VJ_35A1&F4^4YZ9GNJL-Q/U_><T-.%*M!@KT<,9E!3]J)\nM34?%K(U]+QU#/0QG!7AK<SZ%\"])E%;`46B?E3C!D+F%?P'T9^1_HQ''0RFK'\nME:)\"<4]3'!>\"&&YW/)@D9)MUP?ZW\"_9)1:;LLI\"3`^-WU>,2:'V0P[@4-/JX\nMPO'S9E+9FPDEA-'1[<U+031!<76<L?@M-`+F,9><\"!.V.D@BEJH[`F89!]U\\\nM/?A4K-5DBJ[L/*A](BBK_K80@CD+!#DYG1X8/1UV.K;<>Z+X?T8AB&I9X<LR\nMGQ5C.::L*UZA7!0+=V2@`K<Y!\"/@(5(+:ZO)SI?>PO=&I]Q:`A/`[?BJZVP_\nM</+>1-:53Q=]\"=;,8B&##R)P=!R,,U\\;W/HC,L6'`FMN7F&>85S/X:[:SF@.\nM5Q:K7;QQ)!P:<JK0:_*_$9+D3B:ZR&*40KE;'5\"_R4</%'XIPV\\U5@4X`()N\nMG7TU-&77UC1]SR'OAPCN<_),&OPLX6!U<&'&7A-4X;D5S0M\\'\\PS?B3=I@^W\nM\\]7)W6RYL3%;F#\\71B;CJ@:;V^(G5\",SRIGSIW%G35Q:)$'+TC;]]J5K:>.6\nM615%GHBT%<Y6\"XFW[:L;*)4]%7&+6U.5HBE^C0MZ4RYR7#6'\\;&[email protected]\nM).`;OH!NSWPE.^_,_S0*D]$K.2A,\"8/#P:Q\"X*QL8SDS,TE66?C$N-Z7.-VY\nMXRTOSF2TL\\]BE_80BG:%6YOEUN$A\\MQ1K7([7!,YV`ZOF9HAV3IP2GVD7X?@\nM]!K,C+O\\!<Q7:0D:+52P\\4Q!ZHYH@X'OTF<\\5TC7[;=;U/KL_:<NM289TA29\nM:^KWU8PVNWZ2&LWDMU[PV%$C5A2AQ*[:8!C]F(MR?*92U]\"&(0$_MG>\"C(M'\nM%^Y_>'O)C2IAU.UO66R5EILW20O26'YCG8#%GS7BF,OP%M1\\'\"@%?;U%)8ZG\nMT].OGWM5(L.78Q(I03VHSB3E\\/V\\B1=O&I4%#H.Y\\D!Q7&-!;>+.D+IC96K1\nM'%>066HIU;55;Z*+*J@VM!_/Y78:+Z+GXN0$$IEL8ESM:K(XB3$[!;Z$M.C@\nMSX\"5[N532)^M0O7F<=DS]*0D)W%RXJ(.,AU[NS'EET)2(D(1-\\<W!8,S[BJ0\nMWXI/+)-U<R\"DEGU%+XW/D,_1(;9Y52(ZMK8DIB1.<NZ1I2DE2[RWL3U?P33-\nM9,+5GTAFBC-]!'W=(]@ZJ5IK2Q&XKUU2I(;4K00R8'[D8\\DRRGQ3_\"AN2K!]\nM1YTU!\\%;<2W`O))GXLPTA]H?AM&[ND.<=)?D^M%SW!\"^JT8QZW#R/5/D-P[\\\nM^MAN5]-:;N9!EP.)KVMJT-*U\"H[CO[5>C(I.Z4`7'JU_N2/Z^:2HYJ)II@P8\nMW'RA4\"@4\"H5\"H5`H%`J%0J%0*!0*A4*A4\"@4\"H5\"H5`H%`J%0O'_XS>B9>)Y\n$`*``````\n`\nend\n", "msg_date": "Tue, 18 Aug 1998 19:43:32 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] dumping rules" }, { "msg_contents": "BTW: get_ruledef() would be useful for psql's \\d too.\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, 18 Aug 1998 19:47:48 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] dumping rules" }, { "msg_contents": "I have fixed the parser to all update/insert queries will have a\nresdomno equal to the attribute number of the base relation.\n\nAt least, I hope so. Can you remove the rewrite renumbering code and\nlet me know. Thanks.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 24 Aug 1998 23:15:38 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "rewrite system and Resdom" } ]
[ { "msg_contents": "Attached is a patch that uses autoconf to determine whether there is\na working 64-bit-int type available.\n\nIn playing around with it on my machine, I found that gcc provides\nperfectly fine support for \"long long\" arithmetic ... but sprintf()\nand sscanf(), which are system-supplied, don't work :-(. So the\nautoconf test program does a cursory test on them too.\n\nIf we find that a lot of systems are like this, it might be worth\nthe trouble to implement binary<->ASCII conversion of int64 ourselves\nrather than relying on sprintf/sscanf to handle the data type.\n\n\t\t\tregards, tom lane\n\n\n*** src/configure.in.orig\tSat Aug 15 11:52:03 1998\n--- src/configure.in\tSun Aug 16 16:41:24 1998\n***************\n*** 522,528 ****\n #endif\n main() { double d = DBL_MIN; if (d != DBL_MIN) exit(-1); else exit(0); }],\n \tAC_MSG_RESULT(yes),\n! \t[AC_MSG_RESULT(no) AC_DEFINE(HAVE_DBL_MIN_PROBLEM)])\n \n dnl Checks for library functions.\n AC_PROG_GCC_TRADITIONAL\n--- 522,604 ----\n #endif\n main() { double d = DBL_MIN; if (d != DBL_MIN) exit(-1); else exit(0); }],\n \tAC_MSG_RESULT(yes),\n! \t[AC_MSG_RESULT(no) AC_DEFINE(HAVE_DBL_MIN_PROBLEM)],\n! \tAC_MSG_RESULT(assuming ok on target machine))\n! \n! dnl Check to see if we have a working 64-bit integer type.\n! AC_MSG_CHECKING(whether 'long int' is 64 bits)\n! AC_TRY_RUN([#include <stdio.h>\n! typedef long int int64;\n! #define INT64_FORMAT \"%ld\"\n! \n! int64 a = 20000001;\n! int64 b = 40000005;\n! \n! int does_int64_work()\n! {\n! int64 c,d,e;\n! char buf[100];\n! \n! if (sizeof(int64) != 8)\n! return 0;\t\t\t/* doesn't look like the right size */\n! \n! /* we do perfunctory checks on multiply, divide, sprintf, sscanf */\n! c = a * b;\n! sprintf(buf, INT64_FORMAT, c);\n! if (strcmp(buf, \"800000140000005\") != 0)\n! return 0;\t\t\t/* either multiply or sprintf is busted */\n! if (sscanf(buf, INT64_FORMAT, &d) != 1)\n! return 0;\n! if (d != c)\n! return 0;\n! e = d / b;\n! if (e != a)\n! return 0;\n! return 1;\n! }\n! main() {\n! exit(! does_int64_work());\n! }],\n! \t[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LONG_INT_64)],\n! \tAC_MSG_RESULT(no),\n! \tAC_MSG_RESULT(assuming not on target machine))\n! \n! AC_MSG_CHECKING(whether 'long long int' is 64 bits)\n! AC_TRY_RUN([#include <stdio.h>\n! typedef long long int int64;\n! #define INT64_FORMAT \"%Ld\"\n! \n! int64 a = 20000001;\n! int64 b = 40000005;\n! \n! int does_int64_work()\n! {\n! int64 c,d,e;\n! char buf[100];\n! \n! if (sizeof(int64) != 8)\n! return 0;\t\t\t/* doesn't look like the right size */\n! \n! /* we do perfunctory checks on multiply, divide, sprintf, sscanf */\n! c = a * b;\n! sprintf(buf, INT64_FORMAT, c);\n! if (strcmp(buf, \"800000140000005\") != 0)\n! return 0;\t\t\t/* either multiply or sprintf is busted */\n! if (sscanf(buf, INT64_FORMAT, &d) != 1)\n! return 0;\n! if (d != c)\n! return 0;\n! e = d / b;\n! if (e != a)\n! return 0;\n! return 1;\n! }\n! main() {\n! exit(! does_int64_work());\n! }],\n! \t[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LONG_LONG_INT_64)],\n! \tAC_MSG_RESULT(no),\n! \tAC_MSG_RESULT(assuming not on target machine))\n \n dnl Checks for library functions.\n AC_PROG_GCC_TRADITIONAL\n*** src/include/config.h.in.orig\tSat Aug 15 11:54:54 1998\n--- src/include/config.h.in\tSun Aug 16 16:33:22 1998\n***************\n*** 219,224 ****\n--- 219,230 ----\n /* Set to 1 if your DBL_MIN is problematic */\n #undef HAVE_DBL_MIN_PROBLEM\n \n+ /* Set to 1 if type \"long int\" works and is 64 bits */\n+ #undef HAVE_LONG_INT_64\n+ \n+ /* Set to 1 if type \"long long int\" works and is 64 bits */\n+ #undef HAVE_LONG_LONG_INT_64\n+ \n /*\n * Code below this point should not require changes\n */\n*** src/include/utils/int8.h.orig\tWed Jul 8 10:10:30 1998\n--- src/include/utils/int8.h\tSun Aug 16 16:37:51 1998\n***************\n*** 23,51 ****\n #ifndef INT8_H\n #define INT8_H\n \n! #if defined(__alpha) || defined(PPC)\n typedef long int int64;\n- \n #define INT64_FORMAT \"%ld\"\n! \n! #elif defined(__GNUC__) && defined(i386)\n typedef long long int int64;\n- \n #define INT64_FORMAT \"%Ld\"\n- \n #else\n typedef long int int64;\n- \n #define INT64_FORMAT \"%ld\"\n #endif\n- \n- \n- /*\n- #if sizeof(int64) == 8\n- #define HAVE_64BIT_INTS 1\n #endif\n- */\n- \n \n extern int64 *int8in(char *str);\n extern char *int8out(int64 * val);\n--- 23,44 ----\n #ifndef INT8_H\n #define INT8_H\n \n! #ifdef HAVE_LONG_INT_64\n! /* Plain \"long int\" fits, use it */\n typedef long int int64;\n #define INT64_FORMAT \"%ld\"\n! #else\n! #ifdef HAVE_LONG_LONG_INT_64\n! /* We have working support for \"long long int\", use that */\n typedef long long int int64;\n #define INT64_FORMAT \"%Ld\"\n #else\n+ /* Won't actually work, but fall back to long int so that int8.c compiles */\n typedef long int int64;\n #define INT64_FORMAT \"%ld\"\n+ #define INT64_IS_BUSTED\n #endif\n #endif\n \n extern int64 *int8in(char *str);\n extern char *int8out(int64 * val);\n", "msg_date": "Sun, 16 Aug 1998 16:57:46 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Autoconf'd test for int64" }, { "msg_contents": "> Attached is a patch that uses autoconf to determine whether there is\n> a working 64-bit-int type available.\n\nUsing autoconf for things sounds great. I've been relying on scrappy for\nthat stuff, and find it a mystery myself. Marc or someone, would you be\nwilling to write a few sentences on how to make incremental changes to\nthe Postgres autoconfig system? I'll put it into the Developer's Guide,\nand could make a stab at using it elsewhere.\n\n> In playing around with it on my machine, I found that gcc provides\n> perfectly fine support for \"long long\" arithmetic ... but sprintf()\n> and sscanf(), which are system-supplied, don't work :-(. So the\n> autoconf test program does a cursory test on them too.\n\nSorry to hear the formatting routines are broken. sprintf() and sscanf()\nare HP supplied? Doesn't gcc have its own library also??\n\n> If we find that a lot of systems are like this, it might be worth\n> the trouble to implement binary<->ASCII conversion of int64 ourselves\n> rather than relying on sprintf/sscanf to handle the data type.\n\nYuck. Whaddya mean \"we\"; *my* system works fine :)\n\n - Tom\n", "msg_date": "Sun, 16 Aug 1998 22:20:03 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Autoconf'd test for int64" }, { "msg_contents": "On Sun, 16 Aug 1998, Thomas G. Lockhart wrote:\n\n> > Attached is a patch that uses autoconf to determine whether there is\n> > a working 64-bit-int type available.\n> \n> Using autoconf for things sounds great. I've been relying on scrappy for\n> that stuff, and find it a mystery myself. Marc or someone, would you be\n> willing to write a few sentences on how to make incremental changes to\n> the Postgres autoconfig system? I'll put it into the Developer's Guide,\n> and could make a stab at using it elsewhere.\n\n\tSorry to say, but from my perspective as well its \"funky\nmagic\"...I cheat alot by looking at autoconf from other packages to try\nand recreate what I want to do, as well as spend alot of time in the info\npages...\n\n\tI don't think this is something that can be easily explained in \"a\nfew sentences\" :(\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Sun, 16 Aug 1998 19:57:37 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Autoconf'd test for int64" }, { "msg_contents": "> Sorry to say, but from my perspective as well its \"funky\n> magic\"...\n> I don't think this is something that can be easily explained in \"a\n> few sentences\" :(\n\nWell, no harm in asking :)\n\n - Tom^H^H^HThomas\n", "msg_date": "Sun, 16 Aug 1998 23:11:09 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Autoconf'd test for int64" }, { "msg_contents": "\"Thomas G. Lockhart\" <[email protected]> writes:\n> Using autoconf for things sounds great. I've been relying on scrappy for\n> that stuff, and find it a mystery myself. Marc or someone, would you be\n> willing to write a few sentences on how to make incremental changes to\n> the Postgres autoconfig system?\n\nWell, there's really no substitute for reading the autoconf manual ;-)\n\nBut basically the idea is that you don't want to have your code\n#ifdef'ing on system ID symbols except in very specific circumstances.\nUsually what you really want to know is \"does feature X exist here?\",\nand the right way to handle that is to have a direct test for feature X.\nIf you take that approach your code is a lot more likely to work\nout-of-the-box on a new system. Not to mention the fact that some systems\nlike HPUX and Linux come in a lot of flavors --- testing the system ID\nsymbols isn't good enough there anyway.\n\nWhat autoconf does is provide a system whereby you can make exactly the\ntests you need during configuration, and have the results available when\nyour code is being compiled. The results are usually expressed in the\nform of configuration symbols that get defined (or not) in config.h.\nYou can also have autoconf apply system-specific edits to other places\nlike makefiles, but config.h is most often the file to tweak.\n\nTo take the particular example at hand, I had to go through the\nfollowing steps:\n\n1. Ask myself what we really wanted to know. What we wanted to know,\nit seemed like, was whether either \"long int\" or \"long long int\" could\nbe used as a 64-bit integer type. So I invented some configuration\nsymbol names that would carry this info from autoconf to the\ncompile-time tests needed in int8.h:\n \n/* Set to 1 if type \"long int\" works and is 64 bits */\n#undef HAVE_LONG_INT_64\n\n/* Set to 1 if type \"long long int\" works and is 64 bits */\n#undef HAVE_LONG_LONG_INT_64\n\n2. I put the above lines into src/include/config.h.in, which is the\nmaster file that autoconf will edit during configuration to create the\nlocalized version src/include/config.h (.in is the usual convention for\nindicating an autoconf master file). Autoconf provides automatic\nsupport for changing \"#undef X\" into \"#define X something\" when\nappropriate, so we start with the \"#undef\" format.\n\n3. Then I needed to figure out how to test these conditions. Basically\nwhat autoconf can do is to (try to) compile and run little test\nprograms; if it succeeds then it figures that particular feature is\nthere. So I wrote a little program that checks sizeof(long long int)\n(to make sure it's 8) and also tries to do some simple arithmetic to\nmake sure the answers come out right. You can see the details in the\npatch, but the important point is that if long long isn't OK, the\nprogram will either fail to compile at all, or will exit with a nonzero\nreturn status (which is program failure by Unix convention). Autoconf\nwill only believe the test succeeded if the program compiles and exits\nwith zero status when run.\n\n4. After I'd tested the test program to my satisfaction, I wrapped it\ninto this autoconf code:\n\nAC_MSG_CHECKING(whether 'long long int' is 64 bits)\nAC_TRY_RUN([\n... test program code here ...\n],\n\t[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LONG_LONG_INT_64)],\n\tAC_MSG_RESULT(no),\n\tAC_MSG_RESULT(assuming not on target machine))\n\nAC_TRY_RUN is a macro that's basically like an if-then-else structure.\nIf the test program (whose text is the first argument) succeeds, the\nsecond argument is executed; if the test fails, the third argument\nis executed; and if autoconf knows it is cross-compiling for another\nmachine and therefore can't run a test program at all, it doesn't try\nbut just executes the fourth argument. Usually that last alternative\nshould be the most conservative assumption.\n\nThe AC_MSG macros are just user interface aids (they generate all that\njunk that the configure script prints as it runs). The important aspect\nis the AC_DEFINE() macro --- if that gets executed, it cues Autoconf\nto convert \"#undef HAVE_LONG_LONG_INT_64\" to\n\"#define HAVE_LONG_LONG_INT_64 1\" later on when it's generating config.h\nfrom config.h.in. (I could give AC_DEFINE a second argument if I wanted\nto define the symbol as some particular string instead of \"1\".) In the\nother cases, AC_DEFINE is not executed so that line of config.h.in will\nbe left unmodified.\n\nThe other thing to know to read this is that square brackets are m4's\nquoting convention.\n\nI made another copy that was exactly the same but it works on \"long int\"\nand defines HAVE_LONG_INT_64 if it wins.\n\n5. Then I ran autoconf to generate a configure shell script from the\nconfigure.in source code, and I was done.\n\n6. AC_TRY_RUN is the sledgehammer of Autoconf programming --- you only\nneed it if you need to verify some unusual detail of a system's run-time\nbehavior. Most of the standard sorts of problems can be dealt with\nusing simpler Autoconf macros. For example, if I had been satisfied\njust to test whether the declaration \"long long int\" would compile, I\ncould've just done\n\t AC_TRY_COMPILE(, [ long long int x; ],\n\t\t\t[success action], [fail action])\nwhich would compile the code but not try to run it. There are even\nsimpler macros that handle most of the really common cases. For\nexample, PostgreSQL's configure.in includes\n\tAC_CHECK_HEADERS(limits.h)\nwhich tries to compile a program that says \"#include <limits.h>\",\nand if it succeeds then it automatically defines HAVE_LIMITS_H.\n(We still have to remember to put #undef HAVE_LIMITS_H into\nconfig.h.in, however, or the AC_DEFINE would have no visible effect.)\n\nBTW this last example should cue you that there are conventions for\nchoosing configuration symbol names in Autoconf --- a symbol that\nindicates that <stdlib.h> exists should be called HAVE_STDLIB_H,\nand not anything else; if you violate these conventions you risk\nconfusing autoconf experts, or even breaking some other part of\nconfiguration. (A while back we had a configuration bug because\nHAVE_HISTORY was getting used for two different purposes: both to\nindicate whether <history.h> exists and whether libhistory exists\nto be linked with. Following the convention prevents this error,\nsince HAVE_HISTORY_H refers to the include file and HAVE_LIBHISTORY\nto the library.)\n\n7. The configure script generated by Autoconf is a self-contained\nshell script that will run on darn near any Unix platform. But to generate\nconfigure from configure.in, you need to have Autoconf itself installed,\nand you also need GNU m4 because Autoconf is really just a script in\nthe m4 macro processing language. You can find these at any GNU archive\nsite if you don't have 'em already. Both are painless to install.\n\n8. There's really no substitute for reading the autoconf manual ;-).\nBut maybe this will motivate you to go do that.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 16 Aug 1998 19:35:08 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Quick cut at an autoconf tutorial" }, { "msg_contents": "\"Thomas G. Lockhart\" <[email protected]> writes:\n>> In playing around with it on my machine, I found that gcc provides\n>> perfectly fine support for \"long long\" arithmetic ... but sprintf()\n>> and sscanf(), which are system-supplied, don't work :-(. So the\n>> autoconf test program does a cursory test on them too.\n\n> Sorry to hear the formatting routines are broken. sprintf() and sscanf()\n> are HP supplied? Doesn't gcc have its own library also??\n\ngcc supplies low-level routines that implement doubleword arithmetic,\nbut it doesn't attempt to supplant the local libc.\n\n>> If we find that a lot of systems are like this, it might be worth\n>> the trouble to implement binary<->ASCII conversion of int64 ourselves\n>> rather than relying on sprintf/sscanf to handle the data type.\n\n> Yuck. Whaddya mean \"we\"; *my* system works fine :)\n\nI'm not eager to do it either --- I hope to have upgraded to HPUX 10\nbefore I actually need to do anything with int8. I was just throwing\nthat idea out in case someone else needed int8 bad enough to want to\nmake it happen.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 16 Aug 1998 19:37:51 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Autoconf'd test for int64 " }, { "msg_contents": "> I'm not eager to do it either --- I hope to have upgraded to HPUX 10\n> before I actually need to do anything with int8. I was just throwing\n> that idea out in case someone else needed int8 bad enough to want to\n> make it happen.\n\nThe fact that machines need to provide their own i/o means that those\nrelying on gcc for compiling but non-gnu i/o libraries aren't likely to\nsucceed on 32-bit machines without rolling your own :(\n\n - Tom\n", "msg_date": "Mon, 17 Aug 1998 00:02:11 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Autoconf'd test for int64" }, { "msg_contents": "> 8. There's really no substitute for reading the autoconf manual ;-).\n> But maybe this will motivate you to go do that.\n\nSure, didn't even know one existed. Don't know if it is shipped on my\nmachine, and don't know where to look for one.\n\nOh boy, maybe I'll get to use GNU info! Not. Is there a hardcopy or html\nversion somewhere? *sigh*\n\n - Tom\n", "msg_date": "Mon, 17 Aug 1998 00:25:01 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quick cut at an autoconf tutorial" }, { "msg_contents": "\"Thomas G. Lockhart\" <[email protected]> writes:\n>> 8. There's really no substitute for reading the autoconf manual ;-).\n\n> Sure, didn't even know one existed. Don't know if it is shipped on my\n> machine, and don't know where to look for one.\n> Oh boy, maybe I'll get to use GNU info! Not. Is there a hardcopy or html\n> version somewhere? *sigh*\n\nPicky picky. The manual comes with the autoconf distribution tarball.\nThe master copy is in GNU \"texinfo\" format, looks like. I always use\nthe GNU-info-format version of it, which gets installed automatically\nby autoconf's install script. But this is convenient for me because\nI use the One True Editor, Emacs ;-) ;-). If you don't live in Emacs\nthen I agree info format is less than convenient.\n\nIt is possible to generate html or latex (hence PostScript, hence nice-\nlooking hardcopy) from texinfo sources. (Basically texinfo is the same\nidea as SGML but a few years before its time.) I'm not an expert on\nhow to do either process, not having ever felt the need. If you look\naround the net you can certainly get the tools for this, and possibly\neven find the autoconf manual already converted to a format you like.\n\nOr you can just read the texinfo source file. It's certainly no less\nlegible than sgml source.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 16 Aug 1998 23:14:53 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Quick cut at an autoconf tutorial " }, { "msg_contents": "On Sun, 16 Aug 1998, Tom Lane wrote:\n\n> \"Thomas G. Lockhart\" <[email protected]> writes:\n> >> 8. There's really no substitute for reading the autoconf manual ;-).\n> \n> > Sure, didn't even know one existed. Don't know if it is shipped on my\n> > machine, and don't know where to look for one.\n> > Oh boy, maybe I'll get to use GNU info! Not. Is there a hardcopy or html\n> > version somewhere? *sigh*\n> \n> Picky picky. The manual comes with the autoconf distribution tarball.\n> The master copy is in GNU \"texinfo\" format, looks like. I always use\n> the GNU-info-format version of it, which gets installed automatically\n> by autoconf's install script. But this is convenient for me because\n> I use the One True Editor, Emacs ;-) ;-). If you don't live in Emacs\n> then I agree info format is less than convenient.\n\n\tActually, I just type 'info autoconf' on my machine(s) to read\nit...I don't use emacs myself, and don't find that 'info' requires\nfore-knowledge of it\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 17 Aug 1998 00:30:53 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: Quick cut at an autoconf tutorial " }, { "msg_contents": "> Actually, I just type 'info autoconf' on my machine(s) to read\n> it...I don't use emacs myself, and don't find that 'info' requires\n> fore-knowledge of it\n\nI'm info-impaired. Never used it enough to remember how to traverse it,\nand never managed to find what I needed without just running through the\nentire document.\n\nI'd like to learn emacs (I've got a new project using lisp) but haven't\nfound it useful yet. 15 years of vi is tough to break. I suppose I\nshould buy a book for it...\n\n - Tom\n", "msg_date": "Mon, 17 Aug 1998 04:46:13 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: Quick cut at an autoconf tutorial" }, { "msg_contents": "> \n> \"Thomas G. Lockhart\" <[email protected]> writes:\n> >> 8. There's really no substitute for reading the autoconf manual ;-).\n> \n> > Sure, didn't even know one existed. Don't know if it is shipped on my\n> > machine, and don't know where to look for one.\n> > Oh boy, maybe I'll get to use GNU info! Not. Is there a hardcopy or html\n> > version somewhere? *sigh*\n> \n> Picky picky. The manual comes with the autoconf distribution tarball.\n> The master copy is in GNU \"texinfo\" format, looks like. I always use\n> the GNU-info-format version of it, which gets installed automatically\n> by autoconf's install script. But this is convenient for me because\n> I use the One True Editor, Emacs ;-) ;-). If you don't live in Emacs\n> then I agree info format is less than convenient.\n\nThere is also 'tkinfo' which makes reading info files fairly painless.\n\n-dg\n\nDavid Gould [email protected] 510.628.3783 or 510.305.9468 \nInformix Software (No, really) 300 Lakeside Drive Oakland, CA 94612\n - If simplicity worked, the world would be overrun with insects. -\n", "msg_date": "Mon, 17 Aug 1998 00:50:33 -0700 (PDT)", "msg_from": "[email protected] (David Gould)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: Quick cut at an autoconf tutorial" }, { "msg_contents": "Applied. Autoconf run.\n\n> Attached is a patch that uses autoconf to determine whether there is\n> a working 64-bit-int type available.\n> \n> In playing around with it on my machine, I found that gcc provides\n> perfectly fine support for \"long long\" arithmetic ... but sprintf()\n> and sscanf(), which are system-supplied, don't work :-(. So the\n> autoconf test program does a cursory test on them too.\n> \n> If we find that a lot of systems are like this, it might be worth\n> the trouble to implement binary<->ASCII conversion of int64 ourselves\n> rather than relying on sprintf/sscanf to handle the data type.\n> \n> \t\t\tregards, tom lane\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 18:30:14 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Autoconf'd test for int64" } ]
[ { "msg_contents": "I need to make some more updates to the libpq documentation, and I'm\nconfused (again) about whether to work on libpq.sgml or libpq.3.\nThe last I heard libpq.3 was the primary doco, but I find that\nyesterday someone stuck this notice on it:\n\n: Current documentation for this topic is available in the new\n: Programmer's Guide chapter on libpq. This man page is obsolete, though\n: in sync with the Programmer's Guide as of 1998/08/15.\n\nwhich I'd be willing to believe if it weren't an evident falsehood\n(the files are NOT in sync). Do I have to do the syncing? Or should\nI just wait for the docs crew to do whatever they're planning to do?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 16 Aug 1998 18:11:35 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "So what is the current documentation status?" }, { "msg_contents": "> I need to make some more updates to the libpq documentation, and I'm\n> confused (again) about whether to work on libpq.sgml or libpq.3.\n> The last I heard libpq.3 was the primary doco, but I find that\n> yesterday someone stuck this notice on it:\n> \n> : Current documentation for this topic is available in the new\n> : Programmer's Guide chapter on libpq. This man page is obsolete, \n> : though in sync with the Programmer's Guide as of 1998/08/15.\n> \n> which I'd be willing to believe if it weren't an evident falsehood\n> (the files are NOT in sync). Do I have to do the syncing? Or should\n> I just wait for the docs crew to do whatever they're planning to do?\n\nThe \"doc's crew\" is me, at least for this stuff :/\n\nI put the note in, since Bruce pointed out that it is difficult to tell\nwhich versions of which docs should be maintained. I've also put a\n_complete_ list of all documentation resources into docguide.sgml, with\nnotes for some of the files on the current status or future prospects. I\nhope that this helps the developers get on the same page with the\ndirection the docs are going. Unfortunately, most developers don't\nactually read the docs, and it wouldn't help here anyway especially\nsince recent changes aren't formatted for use yet (see below) :)\n\nHow are the docs (sources) not in sync? I found some words on\nPQsetNoticeProcessor() in libpq.3 which were not in an earlier version,\nand moved those into libpq.sgml. I recall you (or someone else?)\nsubmitting some previous docs patches which covered both versions. Let\nme know the scope of the problem and we can work out the best way to\nremerge.\n\nI'm planning on updating the web page with new, intermediate versions of\nthe sgml/html docs, both online and in tar files. That way people can\nsee the results of contributions.\n\nNow, there *is* the issue of whether libpq.3 is appropriate for a man\npage. I believe it is not, since there is *so* much information needed\nto understand and since man pages have such a flat structure. Other\ninterface libraries do not have man pages at all, for Postgres and for\nmy system in general. At the moment, the man page comes out to 22 pages\nof info on my machine.\n\nThe man pages which are not candidates for v6.4 replacement are those\nfor SQL commands and for programs. The pages for SQL commands are\npartially replaced by Jose's and Oliver's sgml reference pages, but\nthere is some info in the man pages which needs to move to the User's\nGuide for \"how-to\" reading. Don't know if we'll get to this for v6.4. If\nnot then, that leaves something for me to do on v6.5...\n\nLet me know how this sounds and what would be easiest for you. I'll see\nif I can get enough finished on the web site pages to update them with\nnew info today.\n\n - Tom\n", "msg_date": "Sun, 16 Aug 1998 23:08:38 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] So what is the current documentation status?" }, { "msg_contents": "\"Thomas G. Lockhart\" <[email protected]> writes:\n> How are the docs (sources) not in sync? I found some words on\n> PQsetNoticeProcessor() in libpq.3 which were not in an earlier version,\n> and moved those into libpq.sgml.\n\nThere's bits and pieces in each file that are not in the other one ---\nI'm afraid there's no substitute for going through both files manually\nto bring libpq.sgml fully up to speed. I'm willing to do that; I was\njust waiting until things had reached the point where everybody agrees\nthat the .sgml version is the one that will be maintained. The last\ntime I asked about this, I was told (by Bruce? I forget) that the man\npage version was still the one to maintain. I'm not willing to do that\ncomparison more than once, so I left well enough alone for a while.\n\n> Now, there *is* the issue of whether libpq.3 is appropriate for a man\n> page. I believe it is not, since there is *so* much information needed\n> to understand and since man pages have such a flat structure.\n\nI concur; the libpq doco is unwieldy for a man page. I don't have any\nproblem with dropping the man page --- I'm just waiting for the\nmerry-go-round to come to a stop.\n\n> Let me know how this sounds and what would be easiest for you. I'll see\n> if I can get enough finished on the web site pages to update them with\n> new info today.\n\nIf anyone has any un-checked-in changes for either libpq.3 or\nlibpq.sgml, please check them in soon or at least let me know about\nthem. I'll try to get to the documentation update work in a few days.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 16 Aug 1998 19:50:25 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] So what is the current documentation status? " }, { "msg_contents": "> There's bits and pieces in each file that are not in the other one ---\n> I'm afraid there's no substitute for going through both files manually\n> to bring libpq.sgml fully up to speed. I'm willing to do that...\n\nThanks. At your convenience, and I'll regenerate snapshot output.\n\n> I concur; the libpq doco is unwieldy for a man page. I don't have any\n> problem with dropping the man page --- I'm just waiting for the\n> merry-go-round to come to a stop.\n\nOK, it is stopped, at least for libpq. Thanks for supporting this; the\nnew docs really look nice and the html and hardcopy output seems to be a\ngood way to present information. \n\nThere is now a list of all docs sources, with suggestions for some on\nwhether they are current, obsolete, or in need of replacement. The list\nis in the Documentation appendix in either the integrated document\n(postgres.tar.gz) or the Programmer's Guide (programmer.tar.gz).\n\n> \n> > I'll see if I can get enough finished on the web site pages to \n> > update them with new info today.\n\nThe web page is now updated, and I've put full copies of several html\ndocuments in ftp://postgresql.org/pub/patches/*.tar.gz, which is pointed\nto by the web page.\n\n> If anyone has any un-checked-in changes for either libpq.3 or\n> libpq.sgml, please check them in soon or at least let me know about\n> them. I'll try to get to the documentation update work in a few days.\n\nSorry things got out of sync. I'll try to be more active in coordinating\nthings. Please make suggestions on what you would find useful (got to\nkeep those docs writers happy! :)\n\n - Thomas\n", "msg_date": "Mon, 17 Aug 1998 00:53:52 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] So what is the current documentation status?" }, { "msg_contents": "> The \"doc's crew\" is me, at least for this stuff :/\n> \n> I put the note in, since Bruce pointed out that it is difficult to tell\n> which versions of which docs should be maintained. I've also put a\n> _complete_ list of all documentation resources into docguide.sgml, with\n> notes for some of the files on the current status or future prospects. I\n> hope that this helps the developers get on the same page with the\n> direction the docs are going. Unfortunately, most developers don't\n> actually read the docs, and it wouldn't help here anyway especially\n> since recent changes aren't formatted for use yet (see below) :)\n> \n> How are the docs (sources) not in sync? I found some words on\n> PQsetNoticeProcessor() in libpq.3 which were not in an earlier version,\n> and moved those into libpq.sgml. I recall you (or someone else?)\n> submitting some previous docs patches which covered both versions. Let\n> me know the scope of the problem and we can work out the best way to\n> remerge.\n\nYou have to do a cvs diff for the file from the time you created\nlibpq.sgml to current. You will see lots of things.\n\n> \n> I'm planning on updating the web page with new, intermediate versions of\n> the sgml/html docs, both online and in tar files. That way people can\n> see the results of contributions.\n> \n> Now, there *is* the issue of whether libpq.3 is appropriate for a man\n> page. I believe it is not, since there is *so* much information needed\n> to understand and since man pages have such a flat structure. Other\n> interface libraries do not have man pages at all, for Postgres and for\n> my system in general. At the moment, the man page comes out to 22 pages\n> of info on my \n\nI really like libpq.3 as a manual page. I use it for quick reference. \nI have printf as a manual pages, and that is a library function. How is\nlibpq.3 different? Perhaps we could remove the examples, but that is\nreally not going to save us much.\n\n> The man pages which are not candidates for v6.4 replacement are those\n> for SQL commands and for programs. The pages for SQL commands are\n> partially replaced by Jose's and Oliver's sgml reference pages, but\n> there is some info in the man pages which needs to move to the User's\n> Guide for \"how-to\" reading. Don't know if we'll get to this for v6.4. If\n> not then, that leaves something for me to do on v6.5...\n> \n> Let me know how this sounds and what would be easiest for you. I'll see\n> if I can get enough finished on the web site pages to update them with\n> new info today.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 16 Aug 1998 20:56:04 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [DOCS] Re: [HACKERS] So what is the current documentation status?" }, { "msg_contents": "> \"Thomas G. Lockhart\" <[email protected]> writes:\n> > How are the docs (sources) not in sync? I found some words on\n> > PQsetNoticeProcessor() in libpq.3 which were not in an earlier version,\n> > and moved those into libpq.sgml.\n> \n> There's bits and pieces in each file that are not in the other one ---\n> I'm afraid there's no substitute for going through both files manually\n> to bring libpq.sgml fully up to speed. I'm willing to do that; I was\n> just waiting until things had reached the point where everybody agrees\n> that the .sgml version is the one that will be maintained. The last\n> time I asked about this, I was told (by Bruce? I forget) that the man\n> page version was still the one to maintain. I'm not willing to do that\n> comparison more than once, so I left well enough alone for a while.\n> \n> > Now, there *is* the issue of whether libpq.3 is appropriate for a man\n> > page. I believe it is not, since there is *so* much information needed\n> > to understand and since man pages have such a flat structure.\n> \n> I concur; the libpq doco is unwieldy for a man page. I don't have any\n> problem with dropping the man page --- I'm just waiting for the\n> merry-go-round to come to a stop.\n> \n> > Let me know how this sounds and what would be easiest for you. I'll see\n> > if I can get enough finished on the web site pages to update them with\n> > new info today.\n> \n> If anyone has any un-checked-in changes for either libpq.3 or\n> libpq.sgml, please check them in soon or at least let me know about\n> them. I'll try to get to the documentation update work in a few days.\n\nGo for it. I can easily generate the cvs diff file which make things\nvery easy.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 16 Aug 1998 21:04:32 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] So what is the current documentation status?" }, { "msg_contents": "> I really like libpq.3 as a manual page. I use it for quick reference.\n> I have printf as a manual pages, and that is a library function.\n> How is libpq.3 different?\n\nprintf == single function\nlibpq == entire library of functions\n\nIt should be noted that many people have trouble giving up man pages.\nBut we have limited resources for documentation, and man pages clearly\nfall at the bottom of the list in usefulness and viability (at least for\nthings like full library interfaces). We should choose the most\nappropriate format for each of our documentation resources, at least\nuntil we have the documentation under control.\n\nThere is someone working on a man page output from the sgml, and if that\ncomes through then this is pretty much a moot point.\n\nbtw, had a chance to look at the new reference pages? They are near the\nend of the User's Guide on the web site and in /pub/patches on the ftp\nsite.\n\n - Tom\n", "msg_date": "Mon, 17 Aug 1998 02:16:51 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [DOCS] Re: [HACKERS] So what is the current documentation status?" }, { "msg_contents": "> > I really like libpq.3 as a manual page. I use it for quick reference.\n> > I have printf as a manual pages, and that is a library function.\n> > How is libpq.3 different?\n> \n> printf == single function\n> libpq == entire library of functions\n> \n> It should be noted that many people have trouble giving up man pages.\n> But we have limited resources for documentation, and man pages clearly\n> fall at the bottom of the list in usefulness and viability (at least for\n> things like full library interfaces). We should choose the most\n> appropriate format for each of our documentation resources, at least\n> until we have the documentation under control.\n\nOK, I am happy if you can output html to use that, or convert it myself\nto man pages from that. Why not?\n\n> \n> There is someone working on a man page output from the sgml, and if that\n> comes through then this is pretty much a moot point.\n> \n> btw, had a chance to look at the new reference pages? They are near the\n> end of the User's Guide on the web site and in /pub/patches on the ftp\n> site.\n\nNo, but I need to look up the access method stuff, and was really\nuseful. However, the class diagram was unreadable, and I see that\nconverting it to gif with any normal resolution may be too large. Maybe\nsomeone could do a rewrite in xfig? I have added the old catalog.gif to\nthe distribution so we can use that if we need to.\n\nI am burried in a patch that is already 12k lines of diff, and I haven't\neven started testing the regression tests or reviewing the diff.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 16 Aug 1998 22:53:44 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [DOCS] Re: [HACKERS] So what is the current documentation status?" }, { "msg_contents": "\"Thomas G. Lockhart\" <[email protected]> writes:\n> There is someone working on a man page output from the sgml, and if that\n> comes through then this is pretty much a moot point.\n\nRight, that's the ultimate solution for not having to maintain two sets\nof doc files. I was kinda hoping that that would happen for 6.4,\nactually. Any estimate how soon that will be possible?\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 17 Aug 1998 10:17:33 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [DOCS] Re: [HACKERS] So what is the current documentation status?" } ]
[ { "msg_contents": "Take a look at the new snapshot docs on the web site; Jose and Oliver\nhave a _really_ nice start at SQL syntax reference pages. Oliver is in\nthe middle of converting and augmenting Jose's stuff.\n\nbtw, if anyone has an interest in this, we (Oliver and myself) could use\nsome help in finishing the conversion of Jose's raw files...\n\n - Tom\n", "msg_date": "Mon, 17 Aug 1998 00:58:53 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": true, "msg_subject": "New docs" } ]
[ { "msg_contents": "\nGot this this morning and am just curious as to what it means? My guess\nis that I've exceeded some size, table or otherwise?\n\nWARN:ethernets: cannot extend\n\n\n", "msg_date": "Mon, 17 Aug 1998 07:35:26 -0400 (EDT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": true, "msg_subject": "What does \"cannot extend\" mean?" }, { "msg_contents": "On Mon, 17 Aug 1998, The Hermit Hacker wrote:\n\n> \n> Got this this morning and am just curious as to what it means? My guess\n> is that I've exceeded some size, table or otherwise?\n> \n> WARN:ethernets: cannot extend\n\nYour disk is full.....\n\nMaarten\n\n_____________________________________________________________________________\n| TU Delft, The Netherlands, Faculty of Information Technology and Systems |\n| Department of Electrical Engineering |\n| Computer Architecture and Digital Technique section |\n| [email protected] |\n-----------------------------------------------------------------------------\n\n", "msg_date": "Wed, 19 Aug 1998 11:14:15 +0200 (MET DST)", "msg_from": "Maarten Boekhold <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] What does \"cannot extend\" mean?" } ]
[ { "msg_contents": "Hi,\n\n as proposed here comes the first patch for the query rewrite\n system.\n\n The tar archive contains mainly a little test suite that\n would fit into our regression tests. You'll find the patch\n itself (src.diff) in the directory ./ruletest.\n\n Changes:\n\n The syntax of CREATE RULE now accepts () in addition to\n [] to group the action statements. I looked around to\n see, what ANSI says on CREATE RULE with no luck. But I\n found what other database systems expect:\n\n Sybase, Microsoft SQL Server and some others use\n CREATE RULE to add value checking on table columns.\n But Sybase says for ANSI compliance the check clause\n on CREATE TABLE should be used.\n\n Ingres uses CREATE RULE where PostgreSQL uses CREATE\n TRIGGER (and it uses ... EXECUTE PROCEDURE\n proname(args) too on it).\n\n AMOS uses ... DO proname(args), so I assume this\n means trigger like in Ingres.\n\n INSTEAD NOTHING rules now create an action. It is a new\n query command type CMD_NOTHING that is treated in the\n rewrite handler as a null statement (thrown away). This\n allows now event qualification on instead nothing rules\n (formerly not supported).\n\n Queries that are fired in by the rule system are now\n executed before the original query (if it still exists\n after rewriting). This is required because a constraint\n delete query fired in by a delete rule would become a\n mergejoin (or the like) that does a scan on the triggered\n relation, but in the case of a delete it cannot find the\n deleted tuples if the delete takes place first. The same\n would happen if an update modifies the key fields. This\n might interfere with table constraints or triggers that\n check for foreign keys. It could be a situation where\n only a real trigger can help (Bruce, did you receive\n PL/pgSQL?).\n\n Major change is that relation level rules seem to work\n now (as far as I tested them). I was able to create\n insert/update/delete rules on a view that do the required\n actions on the tables behind it. Constraint\n update/delete rules work. Instead rules with\n qualification can be used to distribute insertion into\n different tables (user inserts every time into the same\n table but tuples are really inserted into different\n and/or multiple tables depending on qualifications).\n\n Left to do:\n\n Create more tests.\n\n There are still problems (don't know how to copy\n object...) when using a rule after creation without\n starting a new backend. This must get fixed.\n\n Create more tests.\n\n I haven't had a look on attribute level rules.\n\n Create more tests.\n\n I still must look at the update new stuff. I don't know\n what it currently does at all, but I know what it must\n do. It must modify (or extend) the actual parsetree's\n targetlist entries putting in the rule actions target\n list expressions.\n\n Create more tests.\n\n Last but not least: create much more tests (would someone\n be so kind to assist?)\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 ruletest.tar.gz\nM'XL(`%H@V#4\"`^P]:W?32+)\\C7Y%DV''3G`2/?T(`^<P0[C#+H39P%S.GMT]\nMK&QW8H$M&4DF9-?<WWZKNEL/VVJI93LAS$8'8DM=KZZNJGZIR^%L3&,:Q4?W\nMKN\\BMMYQ''*/P&7I[-,P^:>X=$+:3KNMF[IN.U\"J=_3V/>+<NX%K%L5N2,B]\nMZ47T:5P\"-^R[]_Z`5YBT?S0(O6D<'7W#]G<Z'4LW#\"RU=?NN_;])^X<S_WWR\nM\\+!<):J7H>MMVY:UOPG&82;M;YL=\"TK;N@'^K]^U_[5?!P?:P0%Y\"XT=D<`G\nM+OGLT4L2C]R8>!&)Z)@.8K)/@G,HBMW^F\"*XZP_)R(V(YT<TC(]FTZ$;TZ,A\nM1:O!AS%UAP2-*\")Q@`A].G(_4S(8!Q$E8^\\C!0Z4A-0=<Z*'`*1I7)9WE/B4\nM#@D:($'\"9`Q_0BSE_(!#')`0R]_')OGLCF?`J&FTB&GL/2H',@'(K`*R`,@\"\nMH\"(H*\\_/DO\"S\\OPLLPH(^%E6%9`-0'85D`-`#DH.>A2`O*@`[;.1KXI17)4<\nM$%3%P*JD-G$>!I,4C/,4)G#IQ2,R\",`07#\\F],LTI%'D!;XFRA<PR>6(AA3,\nMZS$QY-25Y\"\\AWT?RYIKTDZI7`EDE^MG?)V=T0B=]&C+K%\\*BFZ#G)8#'Y$5,\nM(O<J0H1GK\\F+TS=O3YX^(\\].7IZ\\/2'/SUZ_2MK=(.]^/3D[8:H;S,*0^O&A\nMBVAO`N``[AM[$ZAY`(T1!I<1;Q8$-LD$PAZYH+&08JC]8ZK](]Q$@46H\"X;(\nM$8MU6$0T7HM9Y$Z$_467[G2*<<0-H:)C+Y+P;O9;Q-U+1,`;52F0GQ]<<G:!\nM/[Z\"/U3P(VX<AUY_%E,)UXSE(C]+SJ_X>=H^7N3/QF,NUC@O`7`8>N?G8'=-\nMUNY],#Z4-+4ZL\"30'`7`?O\"9[FD\\H&>%$5*#]G?)0QB;KS`LM9H$J$J)G&<D\nMCQT+0GWF0J%1VF8N@I2TE@R_U\\M9N+T&@6XW)?`3<?2Z5EOF$(D-'KJMU#X.\nM^X)=5@A\"I*5NN:H3-7O8UT\\HF.J'P),K-^71SRDY8UPSGA:ZN:6H<;D=/H%1\nM9;UF6]084#/UG!%DFB[593)P(N=!R\"TV=*&^B8K%>\"@J'KA$5S!*FJ2=1R,(\nMP<8;+=)XZ?FS+^3/KD_>>73PL5'8[2QC^T'\\X1*QWWG^Z=L,FS2AA/:#X..>\nM(B$ZC6=,CN<>#-]H^)F&C>*A$'REX;D[H`65H/%(+V98@64H8Z55KL4KJU^\"\nM5H`WI6$$L3%%XGPJFF09J3]!I)_#&;!_%4P^>*XO8><.)]X*-ZZ40DZ%\\%P=\nM*O!<,*$(E&C!081!H)/`5Q][T\\>D,1W/XJ`A7\"3W7%`!(D5^DNJ_V(V87,O\\\nMA1J1_S3A\\N&2J5VPGPYI-,#'68-(^\"<,5N.NJ.5*?;C6-ZL.#PQG.*S[-'/'\nMWKDW<&,@RR8TQ<&`3J99^V!E1]A$CJ[KA[K$MA=0+C#>($I7SW`6U(K@J%.:\nMU!2Y?$E4NO!TU%#!_0CL(G?LAE?XI\"W8%M'[(J.7H7=*T+%U5QL0:2P!<R5(\nMV@[@Q\\&%1)$3-XHR94[H%<0\\4*9=H?\\E--?C:$Y-M\"N&U:YJ;$FMD-JCTBHO\nMZY[Q7]\"_^/*0-`PA156++1`[%(\\7VV,1A#TMEU.ED6L3%=[X:C:.O2EXY,\"-\nM!NX09@7\"->%;?KVBQ$=C.S_=;)S101`.230*9N,AN8`)5P98W(@Y`N:F!`R]\nMG()33<'9F$*O@@);)HH[U=JHJ(S-\";6K\";65\"'6K\"76W1,C2-VUI6X5\"H0O$\nM=K%KQ([D>5ORO\"-YWBWL6I%MP5.G\\&F[\\&FG\\&FW>$&NMZE;]C9UR][&;MG;\nMV\"U[VW++WK;<LK<MM^QMRRU[&[MEKZ9;%GIVH2_UTNGU3S`7_98>75_F/OD_\nMTA\":OZV2LQ6#%HA:K'28'S%[1\\.P]6\\:4?F`Y9<1SM[9-@RN%8.9T=#S+W`?\nMAN^KG'LACETB`B88XKIJX:\"%X>76R27+TPS,7&+NG:=#(YA<CI#[Y1&NS@6S\nM>&EF<QF$'R7K'(CJ+ZS4-RYQ80_7IXN];`G#K(W!HO`0YG&-F-3$[*V+R8)E\nM391>;11K[9I9:]?,KE\\SISY*>P6ET%`Y5J&OLR)ST0CB(\"#1Q!V/2V0P%\\6N\nMAP+S)<!Y_1<E8#,'+*^=9`&:E5F%(ZY$*9(24UIBR15IU_98N[;'VFM[K+VV\nMQ]KU/=:N[['VVAYKK^VQ=GV/M>M[K%WFL5(OEQJT7>7G$LNUE2Q7U9_M^B'`\nMKA,\"[.(0(`T8ZZFK*G`HOO\\3T7@VW>X;0.7O_QB&W>XLO_]C.<[=^S\\W^/X/\nMOH03L>F3&%X&_\"4%_C:06!0;A!37!-D;.]FF7!.'S[&-@VO\\!,LN@C,5X:P\"\nMN`20\"9/NX[E1\\;3$2`FS%;T$_CVX&^+`<%4X7GYG<A@D@UUMIV`>D0U4?'J)\nMF['XT=^3<)I-AX*36$65<9+M;PHF??&UK^UDFZ_IBQX2YA`Q!7,1.V7,\"Y98\nM\\N_BY/AH%4:RLO>9O`J6&`X@GP8Q/<8O.U/P,S(-Z6>@'G'VTUD<X_QB$(R!\nM%-=\\/W0''VF,;<;00OIIQN8\\R'6\"Z[G$';#9!Q/F$%]ZN<2W:LX]GY((R/%W\nMU78R6:D[&*5(>7)^<\"FQ;[%1U$SVB&+Z)6[ACA';A,*[8CO.MAZ74+WS]*88\nM4VR`-:<YI&D%-[[#MX\"2YYISH9RM``1:JB$Q55%SL)@E.\\VJMKA)B)::W&D[\nM.\\M[:XD]B2>/Y!*9=27BU=],&HDX8,B&Q)U2<8I<*5/2FGH`DN8ZC+DNUJDN\nM&EY)Z!)V6:;]:4[W_+O8L5V28EHN@SR\"Y64HK[J,944D&P<7%QB(2GH\\W)1J\nM\\OVHP<@-84BWE^Z$3@*?7A6[*-^06L6\\'`4$'[62P,2*#\"P\"-0)=3K1%@O$P\nMO9.R8'M[5=(5Z!U02_I'K#):6^'&)-8JWSE27IL+&D\\O9@\"/M\\V]%OC@3F.$\nM$;?!>T\\N%(R&DVU/B5ARB\\RV!S-ZY'[.V/F3[4@>^,&J[(N<Y'606[2R:A-6\nM94*>\"_5RE1:)5V'^D^IM4L1/=TJ);%1HYT=Q\\GXK=A3AVHIP'46XKB)<KP\"N\nMH(UC&[W'D+A/;*<=$!O8D2>/\\>TU5#^_QR7_JA&H(QN!2L4Q:XAC+HICZ1*C\nMA(:H(893$E-B9UD*8C@RKITZ7-ME7-LK7$VG2O5=*?<*=V)2H5/R]?NR7D4L\nMU`MK*[9&ODJ_/#\\\"-U^VS`C&MM0?I,,)^JE04XS>^]\"2Z$J(5*X<(=.*@K[$\nM\\*C92`5HL!#58-PM<L!?3Q<;9^',)U8X!\"41.QY)N@(AK%TJ;-JX:,2&KE^#\nM\\':!\\*8_+)?:K%+QMJ0S\"Z0SHKA<.N.F#<\"H-H`*SUK>F\"KQ++$$J13OQ?J;\nM.JQ5`]96ZTL8K+Q1>'6T.OT)3$'Y.HE1RM&LQ]%:Y&@O<!3M4L;.*F-G%E2P\nMRIM%@ZCW%$(0NT*0PFK]\\<Y_TB]3L!$ZO(8#P#7._]J6V<%2QS+NSO]^F_9?\nM.``<S.+K/O]K&WIN_9^W?]NPS;OU_YNX_OK[R=G?CHG2R5H5V.2`K0IL<LY6\nM#KMZVE8%-CETJP*;[email protected]*K`)B=QI;`%QU=58).CJ`)6=CS)G9.^=O`0\nMAD3&W#`T<VZ86M-DQT#WM`2Y^C2N,A?.P$`&&?TZE58X>5JORK6$6=*JTCG?\nM-5H`_EA:TU)O!L6JW^ZCQ14-4WPJLJPE9*>%:[2(B2UBFIHU-Q5;I%RDZD/$\nM6Q.N]G'B=3D;<T+@%OY8^,?&/P[^:7:71%(\\F.S.&2,DC'21+%)%HEK36:)9\nM\\PRRBB\\MP6[>%*I'DNLQ9+S,N6VJ,UPYP[P6QUY/G>/*H><:707P,>;=+K\"%\nM/UMPOHT.2]?0E(7&8*$Q6#6,H?((]?5&!MF9Z_6CPH(:[+EE@P-;SFI4J'5Z\nMNT(<PN5A`A$F$6$B$2X3$\\I@4AE,+(/)92@(5OM$^$:2FEQ]3%*326HR2<UB\nM23<[-ZY,1/'XN#H]R2ER*0&5L^3K(AMUD5=.EM=\"7CE@+L56.&:NC\"LY;2[%\nM+S]S7@\\M/7JNBK9\\`KW(+=<\\AU[BG/GCVQQSSE_&`6=EUT/^H3$U$#+'!H31\nM3N[6@%M6VZR4293=-FV%H9$X*<[>29@+6;2\\\"`<:LB!SP5K<\"<Y:?X)W@G%%\nM/[3F<7I%X<FB])GX3,1,1LXQ5QUVF]1'8010=5Y_&\\U>T;!FS8:MJ9M4&69E\nM%U\"9+4`-LS!I0)$-U<P=H$RB7@J!,K+JF02D%E:24*\"DP9-CYAQG\\9KCJSUD\nM+E[K80[,7^AAGLW?YH$K,<.%Z^&\"R4B_:DSGRWS92N:<O6O#'SQP6EPM\\)5]\nM,+ZL>M6X75T@YW&9.B6X_$T9AMO.^*8BJ.)V,MR43)G,YSF94T%SXJ_.,-?,\nM!5$#NR`E1!WLE<P0I8Y=FB#BSH;_$#;,[+&ZOG:1KI@UKJEGM$52C=LNPBV?\nM?BDG)%&*_^OF);ESCSOW^$;N4<:W2L]E?*OT7*:K'&ZNOJG:M*9A5`[9%9/W\nMW'G>G>?=>9ZRYY7(+&FCMHK,$MR.BLP27\"<7+>S*D7?-[%HJ=,PMT5%*ZJ-$\nMR-D6H1HI?I0T52/3CQ*]&@E_E.AUMTM/*?V/\"B&[!B%90AGBSOND\\M(6NB;I\nMA3L.I8H2U(BI!&;J<P6ST,RV`EA7,[M*8):N))NM!M;L**S;80*?[;:#42J=\nMDU`S'#6PWES!W5<74F5)B;9;5T4K67[O0Y89:<L-H:@Z%>&Z6]?<5AU'X?TN\nM##CR0J>LL%U6V\"DK[)8%T]Z6^OW>EOK]WK;Z_=ZV^OW>EOO]WI;[_=Z6^_W>\nMEOO]WK;Z_=Y:_?[Z.0`K!@[ED4@KCT!:^3A!*Q\\?J.V&_;?UJLGK;4U=!>&V\nM]W32VFR:(/)['@]OM[^V[YSH#^Y$W]5P<9OY4^^</`$SE\"9'EEH5;.-NTGM+\nM)KW&W:3W.XEB!4F02RJ<Y$*&.L\\'*K5^J-@F<V->=D8_-?NY.2_+-)#!67.%\nM=`H`9\\\\53MVOCD;JYW)61337193FB54FT-N0P&K66&7,WKJ8UJ:UMC:MM;UV\nMK9VU,=LRS+)\\L?E(M1\"/<(R0$L.10'9CZOF;7N[&SI<X^9MV_F:EMUTC.;4J\nMIK,V9CY/K2J.N8I3EGZVUM@]R4M+6)MI?.\\=AA#Z_/5?H$W8A\\**9M+RY0!F\nM%8!5I11[W;!GKQOV[$W#GKUIV+/7#GOVVF'/WC3LV9N&/7OML&>O'?;LZK\"W\nM5G+M[R9DRO-\\UW*2&I'17CNFVFO$5+LLIJZ5\"/S;QN-[=]<?-?_+4@+X+62`\nMJ<K_;MCF<OX7NWV7__TF\\[^HIG8O`3?K@5N5X,KIWA?1;B#K>QG#FTK^7B;#\nM->2`E[>D4HIT.;IBIG0Y@<J$Z7+4ZKSI4BVK9D^OGSQ=)5MYE5AF3;$J,JAO\nM+-(-I%&OXG^=V=2EO%5SJF\\KI7JY(`J)U=?,JRYW,95TZ:786\\V:7LI)*7FZ\nM5,.W(85ZJ7#?52+UTIK<EG3J):.;HF2O)>!./?!V/?!./?!N/?!>)?@MR91>\nM(=3-YDN7\"W/]6=/EO&\\N=[K<H%92H5>`EF5$7T0MRHLNU<7MS8Y>)?)MSI%>\nM)?MMR)1>)>,MS)<N=Q%I^O,*%+,^BE4?Q:[3=UQS9O0JOM>2'[V*Z0UG2:\\2\nM9YU<Z7=KK-_%^B_^&7M1?`T\\RM=_\\:'-UW]M@`,`S/]N6W?KOS=Q+:[V:_GD\nM[W>>^]_D_]DO_HZNP?_+?O_!L-H6\\_^V;G1,F%/`$].\\R_]_(]</]X_ZGG\\4\nMC33MV<^G3U^=/$[=GWZ9!M#)\\\\>:]OSL]>G;D]-GCW?9+[@>^.2`DH-/Y&!(\nM'G\"8W00E`=4T.A@%9'<?+S($HF%PA6MR\"089NC`F=\"-*&,BN)F\"&_01BD808\nMF,!P14J!@ZP2V!6?9S/?3WXR*-J%TC!\\K&OLAX7P-?9_#=R8)'WAO\\@CG'*@\nMD3)DJ//N@Y@<'AZ27?;T05)3\\E/R^]D/V&]FDR<AC69C?A_,8F(^^=%@*-XY\nM&4RFY\"`B2Q#I!JRX?X2IW'TMZ2.Y],%'SIB.([I4]/SIBY<GSW:U':P1YW7N\nM:</`IYH&3/].'D`!M-DGHI,#EQR<LZ52#/],X'_F&28JR[Z'0FUYG-T56&89\nM2<O\\E(?50)82,>+9^7E=,1(<%3$26!3C+N@7Q?\\H'!P.O?/S&Q__V;JE.R+^\nMZTY;M['4=N[B_XU<V.3D8!`2;/\\@]\"Z.^OB[V_[P:.J&,,D[<GUW?/5O>CA`\nM\"&FAAM&YDL3.\\]`C3V<7A'2(81SK]K%E$*/7Z^+K1J7T=U[!K!,Q#<`TC^WV\nML='CF/N+%Q.D8YNMCF.R+H&19@\\Z-N'OM9$X=/T(0O[D#*S_33R)F[\\AOS<Q\nM=B[[TP@_6R0I)/L1_-T#O/_`_YV_SFAXM0.&N_\\IO'JD/<P_X;M1^!+5SDOH\nM/W+/(GR(SS^Q1'43]R,]#8:TR7#W'HF2@R>#8#)Q_>';JRENL_WRZMG[W]^^\nM>/GB[=\\8/C`[VL>_9)\\TEF;:#?$;>>*G.,0OMT)WAOMC/J5#X@K,3\\@30$`+\nM%Y2OR40!_\\5*>AEZH(,1B#\"F(1FX/G&'0RP3N#[%-%'\\]_B6>,2<!EJ`!^W&\nMV1R2=PFJZ+Q=P9_)B0C8FXMJDQCKC;4^??WVUQ>G_R-0V2I'/(*N&7]ZA/?P\nM)(+^T@,^_:L%V?F&[B''/,(/Z'::V(0'3T1;D,>/R>F+EWO0H%`LVF]G7RCR\nMO:2)$#0'4M160FJ$9>\"@NS-4,OLAPQ,_#J^:B75Q@8+^!^CT#V\"T,.8[4;O[\nMO_Q^=G9R^G9_M\\5(X`5F]/SIRS<G+?XA9%F'^.G)NRK\"J_4,N8T\\)IS\\P1.8\nM,+)'*?B2=LG8G4[!C9N@Y!;)T>*2?T4T,/@,?@$_\\92C_6+G;G>9+[,'`+:3\nM2>5%;/(*!.-P1A_M``GVDY$PM$+C<L=CM(A%G)$;/;VX0\"'.71A4,>;W`6)\\\nM[H51W!0R[3&:(FJPB)&H>@F.NW*N:F-<VTV+6>E7C6>F(YV>WNKTNDE8NJZJ\nMB#WRQX2;,MG?6Q+Z$0-#-^%/%DW[_H)M[S'8:U=/9;]T$;J3PZNB3H.7E/9(\nM'&2Y.W*.8?)9UAT)M#<ST1>UB6X=F_:QV97W14;/T%OPQ\\EZH^11.VGXU],8\nME89=QC$A0M',0?]#'CP@+%@](E^9ZN8([4V\\?Z,#(E8.;#P`)38?&\"T6W3*,\nMQM\\;\"8^?Q\\'@(VG\\LY%A/3`1\\B&';\"Y#[JU`(DWAHWG0X_3V%?Z,>'4+LH_W\nM$)Q8]U$\\P%B&*6W59>\"\"]NV6MN\\*@<66MCO'3KNTI:%5NVE@0G_B;H`N=/K[\nMRY<XAMAA@PA6&%+VBEL6Q'\\+(C_U'%':(C]&,RC[#%.^][/I'M+2R8\\_<C=L\nMWO?\\YV$P^65,YG.2!\\0^3M]C''=VZ#BX:)Z<G;T^@TZ`L6*OSY`_1;P79;_P\nM/@EX)^N3P!_0W52\"G%?\"9XBQ1O0HO$L(A[-I4SP!6&'A+5.WTL!V*U0!O3T#\nM1'[W06R8AC=3RKE^=P_Q\"P!8WYF1V?'\\&+3QWO.']`NF-UVG\"H\\$K1#FR:%/\nMFAR[/V;=.01J/QXU4QX'>`1_N0].2'S=3DMC&/A:J[WE?BY&9,GG,WKN^<L3\nM\"0E,L9]+@)F?_WDVAMDE,2`:6\\<PRRST<QF!_.S\"@\"AQ;)3YN>.TC'8[&X#L\nM\\H$WC'.P7PXN0</858M-,O@F7E.\"5O?C\",?).*R.X]#KSV*ZFQ\\4<%=A@.]Q\nM=`W63>Z+*01^AV&!&/;O(7\"^N=G];H;*-NIDDP245;S/-(9.=#;%=3LZ1%D.\nML-E_`#%T_A7'882-PO&G!\"E(#3RP$H,QYO%-ZU&POXFC=>B2/E.D#2B\"3D.=\nM4`K6S(H?\\Q##6L'@(4;9!G_E$YMR(TR!E*PPA5[M;BQ;R0PS\"HMV:,`LUY+;\nMH:FWS-RH`F_3$<4/GC\\8SX:4[/HPA8F.IJ$W8=\\.1[O<L3.(?.<'<RL*(,EH\nM,WT&LR'?F\\YXQ\\BG5<4$LMZ3,5J1`V%D@BRIY0VW2@0LJK[MM!P]J[[=;CEI\nMAX,QTAL0'%\"1?3;H/>,T7_LT&02G=6/^MX`QI'0J$!AP*<KGP!N27T9T\\/%_\nM/7KY&PTG4?-,*(&=86@)JFF\\?KB`*AC]%M)I&`QH%$E9IGBB+,$,HEB@G@;^\nM&_9&0['$\\(\\Y,_@@S.)A4BTHO**Q2PZ*@YW5!3<SDV#W-:5R'ZEX0^JR*7E`\nMIK,X\\UH68_Z_O:/K:1O9WM?\\B^E+&QH7DI\"$4$0E[BXK(57=6\\I*O4_(Q`9\\\nMF]AI[)1&J_[W/9_S83MTVTNU?2!2\"_',F3DS<[[/&7.57J.>6:4W0#<K>4B!\nMAKAB\\/0S(FW*%*@+U@7\"<X/!@;BD'\\#XI8E!1#VKC*PO30C[O?J!P7<JK,&0\nM3=GE9VB3EARU>>*%8Q0=,JHCUIWX/#L*NLE2+AEKML!%(^*JXMEM-P/O1N<0\nM4T;V$]&`F>#_2S*BP?,*6G;4+<IVK)-&5I!\"O'B5E6<JY]EHJ>&C'G;P/#)V\nM!#$+)$]`%H:N6T'E20@DFD@-DAS$]\\SU#&:CWM:7'8S`^CWH*P=N)Q0LJZT1\nM!6U&1'%_C2F!OM`J%AJ`.Z+KN\\X;7:05U$BU:T[RC9FGBX75/^N\\8HV\\^W\\1\nM3T@YCEK:2:71ZI!N]/B'\",NWA[T.9'8<JY6NINYW41^37SB$OP_U86Q;<Z@O\nMYOM(N6>\\[ENHV4[+0-]$^JV*>7\\4#4=]9R#*(78<-5S/XQM`Z.+\\C],C:?LM\nM^WR>EDFQP*!+V;62^\\6K*E[=I!0=4//,<QG8Y[>]Q?7G/NP3?&'S8#0$I`Z8\nM/UOUZ6`0C093#VOYT*;*D#SB;1HO+V?SHDS1.4G15[%ZWPLF!:O=T;,CK#GW\nMZ<2-TB#WDD[$)J3;!]-HY(R;!T?-_-F*7.`+W8-BZVY.)]'H<*R[Z31O!^4?\nMB1K0N\"C:4-V<5>F*\"B1O5\\7ZYI:CZR0##%#X?(.RC`AOUYB3:^B,'H0O_.Q(\nM!'D;H_8%88K`S$Z,[O_P;W-CO-T9=BA2P3LQOKUC1\\/<6$71=5'`%'@L/B$\"\nM-W&6`SH7MQ93DNLD2LG:!YL17&3XYX9+\\S*C=(-H_'(7-I+_</E+@`4VK#8H\nMM*_):8*U766K!#;JA;E!'X$V<(L0)SHY'(%-:.GDP3;=@IS`ZED&:D7K;9JM\nM3'&7NQV%,SKSU9(%IH1'2]ZDC#^E8>;$CF5A*>;+B1B83Y,PC?Q+!OKO'+8Q\nMT)U*%JAG<[*Q<,5W)KZ+-UOF=2MV(SS0.;4QRW@`QOMPZ(D>G[W4.0;>Y=,Y\nM]O4U:\\HC]%A\":X`4H03)'UBS(JV-AP?@<.Q[,NF[<%YYI^69,3\\&[]:]W^]'\nMX]'8[7U=1[79#BQQO3!%T`V?U./\\7K--\\Z@P]L:1Z\"\"&.FK:@ZR(Y]CI$F11\nMLIY5,*S8%FH&A,UBW,/GEV*Y.<F3DR1Y\"QU\\92FX1,;AX,#8,]#PF_31%(8>\nMS<H.PHI!5(G+\"=/*;0I&3F.E*AHSC*Z;[.4,\\/V=DG?>WJ@'U\\%<T(MO_C`D\nM6-+OJG1I!B_U.TPN!..N>]M0\"[\"W/*3L[GHYQS]UO,K0D64N`*M_?#AT7/!S\nM4H^:NIKI]>E$3%79A+/\\NNA0<P:_81LW`ZMZ>_E$]O+L&@4H7J:!?R$7D[0/\nM!+02),`U\\^0H3<LJ`_VR3%>814N37?/O-444`[#M\"?C2%(2.)_P93'PG1#-)\nM,'&.BL(D!3S,JF>ETJ\\I\\OG&`F6YF<4E+D22[ZF;DF9\"2V#[3)2!W`7K(,L_\nM8&^8$(P2'\"5)KV,PKRR,L`;,%].,6#&@.A$V!9Z';&T!81F-0,V.+5G(*BU(\nM^\"@F#4-A79^)R8:ZH[#6S3REWNNE27,T!'9MW^:)[SF7J2Z+;$D!BP^_%>/F\nM*G,T7$_^S+;>-E&+\\?]^5-L!%_)7ZK0$NTO<T.D<&Q\\BR.<>U4'`'KP$ILX+\nM@)JG^0U,&0)+X,KTS-`'=NC6Y*O?&AD5IU;4ZH,6D6ME;=!'UUM'W).LM04[\nMOK42`@\\(T]AG;]Z=GE]@BB=X_,=_?CVY.%5_%WRQ-^E=]ZF=*PJ&WW'CUZD@\nM+'UH`,FA_8,*I!>X_&WY_N-:OI^+1<#-K+)\\S34?/Y$6:K5I)OO1>'+HN[(.\nM?:=$+9^?$B6\\#:QI.)X9VOFPD^@(@`AS/A-JOO?OWZ-5;A=4@J=5511TPMM6\nMU5UA8YA%GIJ[/7L^D3R`#;;0MG$7?`P0;\"C!\\#ZZ*`<ZUH)N<:$,YE-3X#W2\nMQ)-!/YH,`A_Y0=?\\LZRU[;PG_0&L?>@YV]!Y>0UH=Y%Y;8!@2V\"\"MN0*N/%#\nM(_XI-=I'+J)9#QW>FR>(S%51S$-C1-,!-9E.L48ZR!'6-^U[3NRVQ1#B3<-$\nM[1)0GG<QQDRWADPC[>\\YA-\"=1,::/$74PXEY)CK[6>\"9MJE(U9`UP^SX:X99\nM0XQJB-0+P&PYDIX)MZ\"'X>+VI(KAUDZ<4\"`D2:LXFY.)02$.=VK6VN%B0H9*\nM4A3L2.(\\1VW.O3\"O`]_^;F8'NO[)I9WAF&2&73L;AN(ZL6R`II@PM@,N=W:3\nM>U6:W`5,/`S!F'R-CGNI]I`3K-J0^;`<;30VCV=$&>X8MP%H+]UAM!Z6-H]G\nM(`D$^#D8$SC]-=B,.<H2,NL\\1M9JS?3S$I`L4>T)*+UQQA5R5I0+P`I2::]O\nMC2WM]\"*EX=:85Z:O-9Y!847G^:I*.;ZG?3NKA!]03+[SO)KSUPO:#8&JY@*%\nMI1]`CQBMS0MZ1(]7F)UN+^+8CB16=6A!IM_+90MA8(R64VBS@\"-8=?VB#%>T\nM*1:%Z58@=]OCQ[(;G8I*\"[O>ZEQ58#676>T*H2L0#4YV4E5OUHON*@$>F?-:\nMH`?]]`I(.HVV@@IDO/WB(M!>+6*;N`)1:;^?O5LRGY;',81GI9W<\\V;_I,AM\nM$3+_\\=(,R9+!FI7$7V-V86>/W_]6/E:97NAMQ?%F)BQ75-3W\"LP[R%RDBP,#\nM+\\P0$R%:T[(*Z$!(\"GML80H.F'M69K539Y-Z4-VP:)=NL+^OP4UW8UUJ^,MU\nMDA7;AK/PN>J';>WX7)&R@:X.F;^6$W0'>[TC_=[`.F`G;@YYR@-37!KC`(2D\nMA.S<9%L'@&Q\"\"^?A\":/K/ULD%1>.RZG6G#3JW-8DI>;O3E^?_G(A_00_$2.+\nMN)K=XC&47=<S,B%2D1?8DFEV[I_5P]JQ,*^7YW_\"+K\"_6BN2L(<&,54(=:3\"\nMN1:Q%-J3+![W5(>EEK\\4L5DG&4[=!4]Y;CL>HRX_W#K\"@;Z^GJ\"_0X@J`X5\"\nM+JG8[\\AK612))D#[EFJ^93/\"H1&&MP85.TK:8_-BL..-?(*B\\%PJJ7#<KIRP\nMU3ML#/;J3K@^\".;S^X7,8%N>ZA(5Y2_;17Y+DDZO\"/1<+I;Q/5*]\\(/-\\%8?\nM`\\SRR=B[=B!^NJT841ZDIQX+DAG<PGUD!;B],[X<UR2OH'6IWI6,[M)97BS;\nM)D9-8VSR*Z;]PV@Z&&U/`$_&!]%DXMV:[email protected]/TR[&F9B?[IZ<,KX9]TP\nM:M&6J\\?M.!B)18E\\\\XCLP#(#)X2</X'2]Q;YJOMJH_;E&H.5NN22JXP$\\!:C\nMB:VF0$(5H(GI8J$6UY?@U//L0[JSJ^#O\"@P5SBBLB?>$;],%W4BR'1H+W+,2\nMI7Z\"3X*;1U(!LOPH?,**_GFU6![Y[1BAJ_M&V%R32<N/D:G-YV02C-ER`V3Y\nMT4H5[G\"?#0,];.\\:2AKU\\A^#B6@!\\**G\"MT&41L?RK,.O3Q[#<;YZ505TDK-\nMAP?10=^GYH-I-)V.E9JMY/#+`UO,-,,[N,67\"XTO>SWP7\"L8KUYG^0??^+>!\nMN*]U!)H%M^JMC=NUK7':/R\"6]N(>2N7'?*-+\"EK(&SP.A:0G'9\\*%/Q6YV6I\nM2'X25!T[#^UX>_V)G[_,5=Y)`A//X_\"P'QT>CK?+H^D`!-9PXMV;Z??[T:#O\nM%X(@;GJ_V^IKR<8Z'+641YY$]OJXJQ+:YG^'<8EXE;;E;KRKC)2<42^\\F>O'\nMO$FM<F.;=RLE)R$\"_A+O76']'+>O\\*(U%\\7\\#)*1LM&`\"`IG3?<PX%4ZBT'H\nMZNM$479*H;OG[Y=FD=W<5@2>%`(9YQNI#Z?HQD;29Y^*#WA+E7(SN)LR<+$2\nM,!D=L/-R9(B^WA[E6C^LO)]AN4)>64RK.RR'<9&4]',Z6].)X#5/34SA\\*`+\nM,-3)@(MX<Y5ZN(#12>%G4!Q9B5L4K_3J;#F+72A#M81$EH+]@'ZX&:!W2-<L\nMOAK?<+S7J_.>+7^SY]XH^'5A,^G#@;-FQ;R48>]QH;;4:%/9>FM+6!O?VJ5>\nM$#]YV3\\(\"^+;P;Q;5X/)R^'!R_X]5?#[_7&T[V*_'9?CB<@\\X;H0O(B!ETQ-\nME^AF-=\\(A>\\(JR'8K^`H79Q&^O7-[Q=GO_V78J3>/6P=%#RADNP$*06*]/TF\nM$3GGD5>G!H?[*9ZMUXO(I-5LEV?\\8GY9B*M'YT1[PHMQ\\NU'+R9ZF-7T[!SV\nMXB*,F:P7BXWES6MF8SM&[:I(T%;+H/MMK5OW^!J/!WC_D[R-Y@?,84;WOO\\)\nG/GUY_\\<0WP!\"[_\\8#/YEQH_O_WC\\/'X>/X^?'_;Y\"ZF1A?@`\\```\n`\nend\n", "msg_date": "Mon, 17 Aug 1998 15:21:39 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": true, "msg_subject": "Rules: first fix" }, { "msg_contents": "On Mon, 17 Aug 1998, Jan Wieck wrote:\n\n> Hi,\n> \n> as proposed here comes the first patch for the query rewrite\n> system.\n> \n> The tar archive contains mainly a little test suite that\n> would fit into our regression tests. You'll find the patch\n> itself (src.diff) in the directory ./ruletest.\n\n\tApplied...I'm a little confused though as to what in the ruletest\ndirectory was suppose to be included, so I only included the\nresults/expected subdirectories. scripts didn't seem to \"fit\" anywhere in\nthe regression tests...let me know if I'm wrong :(\n\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 17 Aug 1998 21:51:40 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules: first fix" }, { "msg_contents": "> \n> On Mon, 17 Aug 1998, Jan Wieck wrote:\n> \n> > Hi,\n> > \n> > as proposed here comes the first patch for the query rewrite\n> > system.\n> > \n> > The tar archive contains mainly a little test suite that\n> > would fit into our regression tests. You'll find the patch\n> > itself (src.diff) in the directory ./ruletest.\n> \n> \tApplied...I'm a little confused though as to what in the ruletest\n> directory was suppose to be included, so I only included the\n> results/expected subdirectories. scripts didn't seem to \"fit\" anywhere in\n> the regression tests...let me know if I'm wrong :(\n> \n> \n> Marc G. Fournier \n\n Ooops - sorry. The files scripts/setup_ruletest.sql and\n scripts/run_ruletest.sql must go into .../regression/sql.\n And then these two must be added to .../regression/sql/tests.\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, 18 Aug 1998 09:30:06 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Rules: first fix" }, { "msg_contents": "On Tue, 18 Aug 1998, Jan Wieck wrote:\n\n> > \n> > On Mon, 17 Aug 1998, Jan Wieck wrote:\n> > \n> > > Hi,\n> > > \n> > > as proposed here comes the first patch for the query rewrite\n> > > system.\n> > > \n> > > The tar archive contains mainly a little test suite that\n> > > would fit into our regression tests. You'll find the patch\n> > > itself (src.diff) in the directory ./ruletest.\n> > \n> > \tApplied...I'm a little confused though as to what in the ruletest\n> > directory was suppose to be included, so I only included the\n> > results/expected subdirectories. scripts didn't seem to \"fit\" anywhere in\n> > the regression tests...let me know if I'm wrong :(\n> > \n> > \n> > Marc G. Fournier \n> \n> Ooops - sorry. The files scripts/setup_ruletest.sql and\n> scripts/run_ruletest.sql must go into .../regression/sql.\n> And then these two must be added to .../regression/sql/tests.\n\n\tFixed... :)\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Tue, 18 Aug 1998 21:15:04 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules: first fix" }, { "msg_contents": "> as proposed here comes the first patch for the query rewrite system.\n\nHi Jan. I'm having trouble with views on my Linux system. The symptom is\nthat there is a segfault as memory is getting free'd at the end of a\nquery. The pg_view, pg_rule, and pg_user tables are all inaccessible as\nviews, though the underlying query which defines the view does work.\n\nUnfortunately, I don't have any insight into the view stuff, and the\nsegfault is happening after everything executes so is far away from\nwhere the bad or replicated pointer must be. afaik the problem has been\npresent for a month or two (your rules patches were applied Aug 17, so\nthat might be when).\n\nDo you have any suggestions on where to look? I assume that you do no\ndevelop under Linux because other Linux boxes (Tatsuo's at least) show\nthe same symptoms. I'd like to clear this up (I know that you are\ndeveloping new patches for the rules system, but...) since we have at\nleast two separate problems in the backend now (views and apparently\nindices) and we need to reduce the discrepencies between the various\nplatforms to make progress.\n\nAn additional clue might be that I can do\n\n select viewname from pg_view;\n\nbut not\n\n select description from pg_view;\nor\n select * from pg_view;\n\nActually, there are three views in the system after the initdb, and the\nonly queries which result in a segfault are ones involving the \"text\"\nfields. Of course, two of the three views have only two columns, one of\nwhich is a text field, but it is suspicious; I can see all of the other\ncolumns in pg_user except the passwd field, for example. I'll keep\npoking at it.\n\nbtw, compiling with assert checking enabled does not catch the problem.\n\nRegards.\n\n - Tom\n", "msg_date": "Tue, 08 Sep 1998 00:32:51 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules: first fix" } ]
[ { "msg_contents": "What does this mean, please?:\n\nbray=> select * from organisation* where id in (select c.org from\n org_contact as c, organisation* as o where c.contact = '100020'\n and c.org = o.id);\nERROR: ExecReScan: node type 12 not supported\n\nand how can I get round it?\n\nbray=> \\d organisation\n\nTable = organisation\n+----------------------------------+----------------------------------+-------+\n| Field | Type | Length|\n+----------------------------------+----------------------------------+-------+\n| id | char() not null | 10 |\n| name | text not null | var |\n| address | int4 | 4 |\n| salutation | text default 'Dear Sir' | var |\n| envelope | text | var |\n| email | text | var |\n| www | text | var |\n| contact | char() | 10 |\n+----------------------------------+----------------------------------+-------+\nbray=> \\d org_contact\n\nTable = org_contact\n+----------------------------------+----------------------------------+-------+\n| Field | Type | Length|\n+----------------------------------+----------------------------------+-------+\n| org | char() not null | 10 |\n| contact | char() not null | 10 |\n| role | text not null | var |\n| address | int4 | 4 |\n+----------------------------------+----------------------------------+-------+\n\n\n(PostgreSQL version 6.3.2, Linux, libc6)\n\n-- \nOliver Elphick [email protected]\nIsle of Wight http://www.lfix.co.uk/oliver\n PGP key from public servers; key ID 32B8FAA1\n ========================================\n \"If ye abide in me, and my words abide in you, ye shall\n ask what ye will, and it shall be done unto you.\" \n John 15:7 \n\n\n", "msg_date": "Mon, 17 Aug 1998 19:15:13 +0100", "msg_from": "\"Oliver Elphick\" <[email protected]>", "msg_from_op": true, "msg_subject": "What does this error mean?" }, { "msg_contents": "> What does this mean, please?:\n> \n> bray=> select * from organisation* where id in (select c.org from\n> org_contact as c, organisation* as o where c.contact = '100020'\n> and c.org = o.id);\n> ERROR: ExecReScan: node type 12 not supported\n> \n> and how can I get round it?\n\nI assume this is with 6.3.2? I think this is fixed in 6.4. Beta starts\nSeptember 1.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 17 Aug 1998 17:15:43 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] What does this error mean?" } ]
[ { "msg_contents": "Tom, Jan,\n\nThese were my thought too.\n\nWe could add another column to \"pg_rewrite\" which contained the\nsource for the rule. This could be used by pg_dump to dump the\nrule creation statement, or by the user to see what the rule\nactually does.\n\nPerhaps someone who knows how to graft in new columns could do\nthat now before we finalise 6.4, even if we don't use it straight\naway it would serve as a marker.\n\nI believe a dump/restore is required for 6.3 to 6.4 so we might as\nwell get the catalog change in sooner rather than later.\n\nKeith.\n\n\nThomas G. Lockhart <[email protected]>\n> \n> > > Whilst you are working on the rules system it would be nice if\n> > > you could look for an oportunity to store the plain text rule\n> > > definition at creation time.\n> > > If the definition were stored in a table column it would allow us\n> > > to dump and restore databases in a more complete way.\n> > Yes, that would really be nice and I had something the like\n> > already in mind.\n> > I'm not really sure if it's a good thing to save the rules\n> > definition text instead of the parsetree. The advantages of\n> > doing so would be that the rule could easily be dumped and\n> > (more important) that the rules can have more complicated\n> > actions (remember that the currently stored parsetrees can\n> > quickly override the size limit of a text type).\n> > \n> > Storing the definition text only would require to parse at\n> > least the actions any time, a rule should be fired on a\n> > query. Bad for performance - but must check if significant\n> > bad.\n> \n> How about storing both an internal form and the plain text source? That\n> way you can use the fast form internally and dump the plain text...\n> \n> - Tom\n\n", "msg_date": "Mon, 17 Aug 1998 23:37:58 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Rules: first fix on monday" }, { "msg_contents": "> We could add another column to \"pg_rewrite\" which contained the\n> source for the rule. This could be used by pg_dump to dump the\n> rule creation statement, or by the user to see what the rule\n> actually does.\n> \n> Perhaps someone who knows how to graft in new columns could do\n> that now before we finalise 6.4, even if we don't use it straight\n> away it would serve as a marker.\n> \n> I believe a dump/restore is required for 6.3 to 6.4 so we might as\n> well get the catalog change in sooner rather than later.\n\nAdding a column will take away from the already-tight space needed\nto keep the plan.\n\nPerhaps a better way is to have a new non-cached system table that\nwould be joined to pg_rewrite to show the plain-text plan when needed.\n\nRather than require the user to know this join, postgres could (or\nshould) have some system views (ala Oracle) to hide the underlying\ntable structures and prevent any user except the superuser from\nmodifying a system table without using a postgres command.\n\ndarrenk\n", "msg_date": "Mon, 17 Aug 1998 19:01:48 -0400", "msg_from": "\"Stupor Genius\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: [HACKERS] Rules: first fix on monday" }, { "msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> > We could add another column to \"pg_rewrite\" which contained the\n> > source for the rule. This could be used by pg_dump to dump the\n> > rule creation statement, or by the user to see what the rule\n> > actually does.\n> > \n> > Perhaps someone who knows how to graft in new columns could do\n> > that now before we finalise 6.4, even if we don't use it straight\n> > away it would serve as a marker.\n> > \n> > I believe a dump/restore is required for 6.3 to 6.4 so we might as\n> > well get the catalog change in sooner rather than later.\n> \n> Adding a column will take away from the already-tight space needed\n> to keep the plan.\n> \n> Perhaps a better way is to have a new non-cached system table that\n> would be joined to pg_rewrite to show the plain-text plan when needed.\n> \n> Rather than require the user to know this join, postgres could (or\n> should) have some system views (ala Oracle) to hide the underlying\n> table structures and prevent any user except the superuser from\n> modifying a system table without using a postgres command.\n\nObviously the real fix is for larger block sizes.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 17 Aug 1998 21:06:10 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules: first fix on monday" }, { "msg_contents": "> > We could add another column to \"pg_rewrite\" which contained the\n> > source for the rule. This could be used by pg_dump to dump the\n> > rule creation statement, or by the user to see what the rule\n> > actually does.\n> > \n> > Perhaps someone who knows how to graft in new columns could do\n> > that now before we finalise 6.4, even if we don't use it straight\n> > away it would serve as a marker.\n> > \n> > I believe a dump/restore is required for 6.3 to 6.4 so we might as\n> > well get the catalog change in sooner rather than later.\n> \n> Adding a column will take away from the already-tight space needed\n> to keep the plan.\n> \n> Perhaps a better way is to have a new non-cached system table that\n> would be joined to pg_rewrite to show the plain-text plan when needed.\n> \n> Rather than require the user to know this join, postgres could (or\n> should) have some system views (ala Oracle) to hide the underlying\n> table structures and prevent any user except the superuser from\n> modifying a system table without using a postgres command.\n> \n> darrenk\n\nI don't think we should save plans in persistant storage at all. We did this\nat Sybase and it was a major headache. Suddenly you can't dump/restore across\narchitectures. Minor changes to the structure of a plan require wholesale\nupgrades or boatloads of compatibility code. Much more shared update access to\ncatalogs. Somehow the plan read and write code got very complex and tended\nto screw up the saved plans which was no fun at all to debug (since the crash\ncomes a lot later than the damage) All this to save a bit of parsing. \n\nYou can get pretty much the same benefits without most of the problems by just\ncaching the plans in memory and reusing them. If we had a sharable cache that\nwould be even better.\n\n-dg\n\nDavid Gould [email protected] 510.628.3783 or 510.305.9468 \nInformix Software (No, really) 300 Lakeside Drive Oakland, CA 94612\n - If simplicity worked, the world would be overrun with insects. -\n\n", "msg_date": "Tue, 18 Aug 1998 09:43:41 -0700 (PDT)", "msg_from": "[email protected] (David Gould)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules: first fix on monday" }, { "msg_contents": ">\n> > We could add another column to \"pg_rewrite\" which contained the\n> > source for the rule. This could be used by pg_dump to dump the\n> > rule creation statement, or by the user to see what the rule\n> > actually does.\n> >\n> > [...]\n>\n> Adding a column will take away from the already-tight space needed\n> to keep the plan.\n>\n> [...]\n>\n> darrenk\n\n The limited space for the querytrees and event qualification\n is really a problem, that we should fix. And since we now\n really support multiple action rewrite rules, it will become\n more important.\n\n I had something different in mind to make the space\n unlimited. I could add an Oid field to pg_rewrite, pointing\n to an extension record.\n\n If a rule does not fit into one tuple, it is splitted into\n multiple ones in rewriteDefine.c. All the extension tuples\n have the event realtion set to the invalid Oid value to not\n get fired everywhere.\n\n I don't think that reading some extension records is too much\n overhead compared against the rewrite work and the actions,\n those MONSTER-rules will result in.\n\n Comments?\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, 19 Aug 1998 11:35:30 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules: first fix on monday" } ]
[ { "msg_contents": "Author: Michael Ivanov ([email protected]).\n\nVadim\n", "msg_date": "Tue, 18 Aug 1998 10:46:24 +0800", "msg_from": "Vadim Mikheev <[email protected]>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL logos" }, { "msg_contents": "> \n> Author: Michael Ivanov ([email protected]).\n\nSorry, forgot image itself -:)\n\nVadim", "msg_date": "Tue, 18 Aug 1998 10:48:35 +0800", "msg_from": "Vadim Mikheev <[email protected]>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL logos" }, { "msg_contents": "On Tue, 18 Aug 1998, Vadim Mikheev wrote:\n\n> > \n> > Author: Michael Ivanov ([email protected]).\n> \n> Sorry, forgot image itself -:)\n\nYes yes yes yes...\n\nBtw...I like it :)\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Tue, 18 Aug 1998 00:35:02 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: PostgreSQL logos" }, { "msg_contents": "On Tue, 18 Aug 1998, The Hermit Hacker wrote:\n\n> On Tue, 18 Aug 1998, Vadim Mikheev wrote:\n> \n> > > \n> > > Author: Michael Ivanov ([email protected]).\n> > \n> > Sorry, forgot image itself -:)\n> \n> Yes yes yes yes...\n> \n> Btw...I like it :)\n\nI like it too. Guess I'll hold off on the one my kid did, eh Marc? :)\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] flame-mail: /dev/null\n # include <std/disclaimers.h> TEAM-OS2\n Online Searchable Campground Listings http://www.camping-usa.com\n \"There is no outfit less entitled to lecture me about bloat\n than the federal government\" -- Tony Snow\n==========================================================================\n\n\n\n", "msg_date": "Tue, 18 Aug 1998 06:51:18 -0400 (EDT)", "msg_from": "Vince Vielhaber <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: PostgreSQL logos" } ]
[ { "msg_contents": "I found that current pg_dump command produces wrong output if a table\nname includes upper letters (See below).\n\nin bin/pg_dump.c:\n\nsprintf(q, \"CREATE TABLE \\\"%s\\\" (\", fmtId(tblinfo[i].relname));\n\nHere fmtId() returns double quoted results if the table name (or\nattribute name, index name...) has upper letters. then sprintf adds\nextra double quotations. The result is too much double quotations!\n\nI don't understand why sprintf adds extra quotes (I think 6.3.2\ndidn't).\nComments?\n--\nTatsuo Ishii\[email protected]\n---------------------------------------------------------------\nWelcome to the POSTGRESQL interactive sql monitor:\n Please read the file COPYRIGHT for copyright terms of POSTGRESQL\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: test\n\ntest=> create table \"TTT\" (\"III\" int);\n\nCREATE\ntest=> insert into \"TTT\" values(100);\n\nINSERT 143849 1\ntest=> select * from \"TTT\";\nIII\n---\n100\n(1 row)\n\ntest=>\n[srapc451.sra.co.jp]t-ishii{274} pg_dump test\nCREATE TABLE \"\"TTT\"\" (\"\"III\"\" int4);\nCOPY \"TTT\" FROM stdin;\n100\n\\.\n\n", "msg_date": "Tue, 18 Aug 1998 14:01:03 +0900", "msg_from": "[email protected]", "msg_from_op": true, "msg_subject": "odd pg_dump output?" }, { "msg_contents": "> I found that current pg_dump command produces wrong output if a table\n> name includes upper letters (See below).\n> fmtId() returns double quoted results if the table name (or\n> attribute name, index name...) has upper letters.\n> I don't understand why sprintf adds extra quotes (I think 6.3.2\n> didn't).\n\nI added some stuff in to handle double quotes; obviously some parts were\nalready handled. Thanks for catching it; will look at it...\n\n - Tom\n", "msg_date": "Tue, 18 Aug 1998 05:33:37 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] odd pg_dump output?" }, { "msg_contents": "> I found that current pg_dump command produces wrong output if a table\n> name includes upper letters (See below).\n> \n> in bin/pg_dump.c:\n> \n> sprintf(q, \"CREATE TABLE \\\"%s\\\" (\", fmtId(tblinfo[i].relname));\n> \n> Here fmtId() returns double quoted results if the table name (or\n> attribute name, index name...) has upper letters. then sprintf adds\n> extra double quotations. The result is too much double quotations!\n> \n> I don't understand why sprintf adds extra quotes (I think 6.3.2\n> didn't).\n> Comments?\n> --\n> Tatsuo Ishii\n> [email protected]\n\nThis appears to be fixed. Beta is September 1.\n\n\n> ---------------------------------------------------------------\n> Welcome to the POSTGRESQL interactive sql monitor:\n> Please read the file COPYRIGHT for copyright terms of POSTGRESQL\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: test\n> \n> test=> create table \"TTT\" (\"III\" int);\n> \rCREATE\n> test=> insert into \"TTT\" values(100);\n> \rINSERT 143849 1\n> test=> select * from \"TTT\";\n> III\n> ---\n> 100\n> (1 row)\n> \n> test=>\n> [srapc451.sra.co.jp]t-ishii{274} pg_dump test\n> CREATE TABLE \"\"TTT\"\" (\"\"III\"\" int4);\n> COPY \"TTT\" FROM stdin;\n> 100\n> \\.\n> \n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 28 Aug 1998 22:54:49 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] odd pg_dump output?" }, { "msg_contents": ">This appears to be fixed. Beta is September 1.\n\nOk. BTW Mr. Kataoka who is maintaing Japanese version of PostgreSQL\nODBC driver have found a bug in 6.3.2 pg_dump and have made patches. I\nconfirmed that the same bug still exists in the current source\ntree. So I made up patches based on Kataoka's. Here are some\nexplanations.\n\no fmtId() returns pointer to a static memory in it. In the meantime\nthere is a line where is fmtId() called twice without saving the first\nvalue returned by fmtId(). So second call to fmtId() will break the\nfirst one.\n\no findTableByName() looks up a table by its name. if a table name\ncontanins upper letters or non ascii chars, fmtId() will returns a\nname quoted in double quotes, which will not what findTableByName()\nwants. The result is SEG fault.\n--\nTatsuo Ishii\[email protected]\n\n*** pg_dump.c.orig\tWed Aug 26 00:02:04 1998\n--- pg_dump.c\tSat Aug 29 22:34:24 1998\n***************\n*** 2435,2441 ****\n \tint\t\t\ti,\n \t\t\t\tj,\n \t\t\t\tk;\n! \tchar\t\tq[MAXQUERYLEN];\n \tchar\t **parentRels;\t\t/* list of names of parent relations */\n \tint\t\t\tnumParents;\n \tint\t\t\tactual_atts;\t/* number of attrs in this CREATE statment */\n--- 2435,2443 ----\n \tint\t\t\ti,\n \t\t\t\tj,\n \t\t\t\tk;\n! \tchar\t\tq[MAXQUERYLEN],\n! \t\t\t\tid1[MAXQUERYLEN],\n! \t\t\t\tid2[MAXQUERYLEN];\n \tchar\t **parentRels;\t\t/* list of names of parent relations */\n \tint\t\t\tnumParents;\n \tint\t\t\tactual_atts;\t/* number of attrs in this CREATE statment */\n***************\n*** 2506,2516 ****\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n \t\t\t\t\t\tsprintf(q, \"%s%s%s %s\",\n \t\t\t\t\t\t\t\tq,\n \t\t\t\t\t\t\t\t(actual_atts > 0) ? \", \" : \"\",\n! \t\t\t\t\t\t\t\tfmtId(tblinfo[i].attnames[j]),\n! \t\t\t\t\t\t\t\tfmtId(tblinfo[i].typnames[j]));\n \t\t\t\t\t\tactual_atts++;\n \t\t\t\t\t}\n \t\t\t\t\tif (tblinfo[i].adef_expr[j] != NULL)\n--- 2508,2520 ----\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n+ \t\t\t\t\t\tstrcpy(id1, fmtId(tblinfo[i].attnames[j]));\n+ \t\t\t\t\t\tstrcpy(id2, fmtId(tblinfo[i].typnames[j]));\n \t\t\t\t\t\tsprintf(q, \"%s%s%s %s\",\n \t\t\t\t\t\t\t\tq,\n \t\t\t\t\t\t\t\t(actual_atts > 0) ? \", \" : \"\",\n! \t\t\t\t\t\t\tid1,\n! \t\t\t\t\t\t\tid2);\n \t\t\t\t\t\tactual_atts++;\n \t\t\t\t\t}\n \t\t\t\t\tif (tblinfo[i].adef_expr[j] != NULL)\n***************\n*** 2572,2584 ****\n \t\t\t\tindclass;\n \tint\t\t\tnclass;\n \n! \tchar\t\tq[MAXQUERYLEN];\n \tPGresult *res;\n \n \tfor (i = 0; i < numIndices; i++)\n \t{\n \t\ttableInd = findTableByName(tblinfo, numTables,\n! \t\t\t\t\t\t\t\t fmtId(indinfo[i].indrelname));\n \n \t\tif (strcmp(indinfo[i].indproc, \"0\") == 0)\n \t\t\tfuncname = NULL;\n--- 2576,2590 ----\n \t\t\t\tindclass;\n \tint\t\t\tnclass;\n \n! \tchar\t\tq[MAXQUERYLEN],\n! \t\t\t\tid1[MAXQUERYLEN],\n! \t\t\t\tid2[MAXQUERYLEN];\n \tPGresult *res;\n \n \tfor (i = 0; i < numIndices; i++)\n \t{\n \t\ttableInd = findTableByName(tblinfo, numTables,\n! \t\t\t\t\t (indinfo[i].indrelname));\n \n \t\tif (strcmp(indinfo[i].indproc, \"0\") == 0)\n \t\t\tfuncname = NULL;\n***************\n*** 2659,2666 ****\n \t\t\t\t\t\t\tattname, indinfo[i].indexrelname);\n \t\t\t\t\texit_nicely(g_conn);\n \t\t\t\t}\n \t\t\t\tsprintf(attlist + strlen(attlist), \"%s%s %s\",\n! \t\t\t\t\t\t(k == 0) ? \"\" : \", \", fmtId(attname), fmtId(classname[k]));\n \t\t\t\tfree(classname[k]);\n \t\t\t}\n \t\t}\n--- 2665,2674 ----\n \t\t\t\t\t\t\tattname, indinfo[i].indexrelname);\n \t\t\t\t\texit_nicely(g_conn);\n \t\t\t\t}\n+ \t\t\t\tstrcpy(id1, fmtId(attname));\n+ \t\t\t\tstrcpy(id2, fmtId(classname[k]));\n \t\t\t\tsprintf(attlist + strlen(attlist), \"%s%s %s\",\n! \t\t\t\t\t\t(k == 0) ? \"\" : \", \", id1, id2);\n \t\t\t\tfree(classname[k]);\n \t\t\t}\n \t\t}\n***************\n*** 2668,2677 ****\n \t\tif (!tablename || (!strcmp(indinfo[i].indrelname, tablename)))\n \t\t{\n \n \t\t\tsprintf(q, \"CREATE %s INDEX %s on %s using %s (\",\n \t\t\t (strcmp(indinfo[i].indisunique, \"t\") == 0) ? \"UNIQUE\" : \"\",\n! \t\t\t\t\tfmtId(indinfo[i].indexrelname),\n! \t\t\t\t\tfmtId(indinfo[i].indrelname),\n \t\t\t\t\tindinfo[i].indamname);\n \t\t\tif (funcname)\n \t\t\t{\n--- 2676,2687 ----\n \t\tif (!tablename || (!strcmp(indinfo[i].indrelname, tablename)))\n \t\t{\n \n+ \t\t\tstrcpy(id1, fmtId(indinfo[i].indexrelname));\n+ \t\t\tstrcpy(id2, fmtId(indinfo[i].indrelname));\n \t\t\tsprintf(q, \"CREATE %s INDEX %s on %s using %s (\",\n \t\t\t (strcmp(indinfo[i].indisunique, \"t\") == 0) ? \"UNIQUE\" : \"\",\n! \t\t\t\t\tid1,\n! \t\t\t\t\tid2,\n \t\t\t\t\tindinfo[i].indamname);\n \t\t\tif (funcname)\n \t\t\t{\n", "msg_date": "Sat, 29 Aug 1998 23:52:52 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] odd pg_dump output? " }, { "msg_contents": "> o fmtId() returns pointer to a static memory in it. In the meantime\n> there is a line where is fmtId() called twice without saving the first\n> value returned by fmtId(). So second call to fmtId() will break the\n> first one.\n> \n> o findTableByName() looks up a table by its name. if a table name\n> contanins upper letters or non ascii chars, fmtId() will returns a\n> name quoted in double quotes, which will not what findTableByName()\n> wants. The result is SEG fault.\n\nThanks Tatsuo! But these are older problems, not new breakage from me,\nright? Have you had a chance to test the latest pg_dump with your\npatches? I'm still concerned that I didn't test pg_dump with a\nregression test dump/reload/dump sequence (by comparing the two dump\nfiles).\n\n - Tom\n", "msg_date": "Sat, 29 Aug 1998 16:27:14 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] odd pg_dump output?" }, { "msg_contents": "Patch applied.\n\n\n> >This appears to be fixed. Beta is September 1.\n> \n> Ok. BTW Mr. Kataoka who is maintaing Japanese version of PostgreSQL\n> ODBC driver have found a bug in 6.3.2 pg_dump and have made patches. I\n> confirmed that the same bug still exists in the current source\n> tree. So I made up patches based on Kataoka's. Here are some\n> explanations.\n> \n> o fmtId() returns pointer to a static memory in it. In the meantime\n> there is a line where is fmtId() called twice without saving the first\n> value returned by fmtId(). So second call to fmtId() will break the\n> first one.\n> \n> o findTableByName() looks up a table by its name. if a table name\n> contanins upper letters or non ascii chars, fmtId() will returns a\n> name quoted in double quotes, which will not what findTableByName()\n> wants. The result is SEG fault.\n> --\n> Tatsuo Ishii\n> [email protected]\n> \n> *** pg_dump.c.orig\tWed Aug 26 00:02:04 1998\n> --- pg_dump.c\tSat Aug 29 22:34:24 1998\n> ***************\n> *** 2435,2441 ****\n> \tint\t\t\ti,\n> \t\t\t\tj,\n> \t\t\t\tk;\n> ! \tchar\t\tq[MAXQUERYLEN];\n> \tchar\t **parentRels;\t\t/* list of names of parent relations */\n> \tint\t\t\tnumParents;\n> \tint\t\t\tactual_atts;\t/* number of attrs in this CREATE statment */\n> --- 2435,2443 ----\n> \tint\t\t\ti,\n> \t\t\t\tj,\n> \t\t\t\tk;\n> ! \tchar\t\tq[MAXQUERYLEN],\n> ! \t\t\t\tid1[MAXQUERYLEN],\n> ! \t\t\t\tid2[MAXQUERYLEN];\n> \tchar\t **parentRels;\t\t/* list of names of parent relations */\n> \tint\t\t\tnumParents;\n> \tint\t\t\tactual_atts;\t/* number of attrs in this CREATE statment */\n> ***************\n> *** 2506,2516 ****\n> \t\t\t\t\t}\n> \t\t\t\t\telse\n> \t\t\t\t\t{\n> \t\t\t\t\t\tsprintf(q, \"%s%s%s %s\",\n> \t\t\t\t\t\t\t\tq,\n> \t\t\t\t\t\t\t\t(actual_atts > 0) ? \", \" : \"\",\n> ! \t\t\t\t\t\t\t\tfmtId(tblinfo[i].attnames[j]),\n> ! \t\t\t\t\t\t\t\tfmtId(tblinfo[i].typnames[j]));\n> \t\t\t\t\t\tactual_atts++;\n> \t\t\t\t\t}\n> \t\t\t\t\tif (tblinfo[i].adef_expr[j] != NULL)\n> --- 2508,2520 ----\n> \t\t\t\t\t}\n> \t\t\t\t\telse\n> \t\t\t\t\t{\n> + \t\t\t\t\t\tstrcpy(id1, fmtId(tblinfo[i].attnames[j]));\n> + \t\t\t\t\t\tstrcpy(id2, fmtId(tblinfo[i].typnames[j]));\n> \t\t\t\t\t\tsprintf(q, \"%s%s%s %s\",\n> \t\t\t\t\t\t\t\tq,\n> \t\t\t\t\t\t\t\t(actual_atts > 0) ? \", \" : \"\",\n> ! \t\t\t\t\t\t\tid1,\n> ! \t\t\t\t\t\t\tid2);\n> \t\t\t\t\t\tactual_atts++;\n> \t\t\t\t\t}\n> \t\t\t\t\tif (tblinfo[i].adef_expr[j] != NULL)\n> ***************\n> *** 2572,2584 ****\n> \t\t\t\tindclass;\n> \tint\t\t\tnclass;\n> \n> ! \tchar\t\tq[MAXQUERYLEN];\n> \tPGresult *res;\n> \n> \tfor (i = 0; i < numIndices; i++)\n> \t{\n> \t\ttableInd = findTableByName(tblinfo, numTables,\n> ! \t\t\t\t\t\t\t\t fmtId(indinfo[i].indrelname));\n> \n> \t\tif (strcmp(indinfo[i].indproc, \"0\") == 0)\n> \t\t\tfuncname = NULL;\n> --- 2576,2590 ----\n> \t\t\t\tindclass;\n> \tint\t\t\tnclass;\n> \n> ! \tchar\t\tq[MAXQUERYLEN],\n> ! \t\t\t\tid1[MAXQUERYLEN],\n> ! \t\t\t\tid2[MAXQUERYLEN];\n> \tPGresult *res;\n> \n> \tfor (i = 0; i < numIndices; i++)\n> \t{\n> \t\ttableInd = findTableByName(tblinfo, numTables,\n> ! \t\t\t\t\t (indinfo[i].indrelname));\n> \n> \t\tif (strcmp(indinfo[i].indproc, \"0\") == 0)\n> \t\t\tfuncname = NULL;\n> ***************\n> *** 2659,2666 ****\n> \t\t\t\t\t\t\tattname, indinfo[i].indexrelname);\n> \t\t\t\t\texit_nicely(g_conn);\n> \t\t\t\t}\n> \t\t\t\tsprintf(attlist + strlen(attlist), \"%s%s %s\",\n> ! \t\t\t\t\t\t(k == 0) ? \"\" : \", \", fmtId(attname), fmtId(classname[k]));\n> \t\t\t\tfree(classname[k]);\n> \t\t\t}\n> \t\t}\n> --- 2665,2674 ----\n> \t\t\t\t\t\t\tattname, indinfo[i].indexrelname);\n> \t\t\t\t\texit_nicely(g_conn);\n> \t\t\t\t}\n> + \t\t\t\tstrcpy(id1, fmtId(attname));\n> + \t\t\t\tstrcpy(id2, fmtId(classname[k]));\n> \t\t\t\tsprintf(attlist + strlen(attlist), \"%s%s %s\",\n> ! \t\t\t\t\t\t(k == 0) ? \"\" : \", \", id1, id2);\n> \t\t\t\tfree(classname[k]);\n> \t\t\t}\n> \t\t}\n> ***************\n> *** 2668,2677 ****\n> \t\tif (!tablename || (!strcmp(indinfo[i].indrelname, tablename)))\n> \t\t{\n> \n> \t\t\tsprintf(q, \"CREATE %s INDEX %s on %s using %s (\",\n> \t\t\t (strcmp(indinfo[i].indisunique, \"t\") == 0) ? \"UNIQUE\" : \"\",\n> ! \t\t\t\t\tfmtId(indinfo[i].indexrelname),\n> ! \t\t\t\t\tfmtId(indinfo[i].indrelname),\n> \t\t\t\t\tindinfo[i].indamname);\n> \t\t\tif (funcname)\n> \t\t\t{\n> --- 2676,2687 ----\n> \t\tif (!tablename || (!strcmp(indinfo[i].indrelname, tablename)))\n> \t\t{\n> \n> + \t\t\tstrcpy(id1, fmtId(indinfo[i].indexrelname));\n> + \t\t\tstrcpy(id2, fmtId(indinfo[i].indrelname));\n> \t\t\tsprintf(q, \"CREATE %s INDEX %s on %s using %s (\",\n> \t\t\t (strcmp(indinfo[i].indisunique, \"t\") == 0) ? \"UNIQUE\" : \"\",\n> ! \t\t\t\t\tid1,\n> ! \t\t\t\t\tid2,\n> \t\t\t\t\tindinfo[i].indamname);\n> \t\t\tif (funcname)\n> \t\t\t{\n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sat, 29 Aug 1998 14:06:49 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] odd pg_dump output?" }, { "msg_contents": "At 4:27 PM 98.8.29 +0000, Thomas G. Lockhart wrote:\n\n>Thanks Tatsuo! But these are older problems, not new breakage from me,\n>right? \n\nOh yes, yes. I know you are not responsible for these bugs.\nI should have made clear this point.\n\n>Have you had a chance to test the latest pg_dump with your\n>patches? I'm still concerned that I didn't test pg_dump with a\n>regression test dump/reload/dump sequence (by comparing the two dump\n>files).\n\nNot yet. pg_dump with the regression db fails while dumping constraints\nrelated tables (I don't remeber table names).\nSeems this is due to the constraints test failure (backend's death).\nStill I have serious regression problems with my LinuxPPC box. \nAs someone mentioned none -O2 might hep. If that fixes the problems,\nI think I can start the testing of pg_dump. I will try this today.\n--\nTatsuo Ishii\[email protected]\n\n", "msg_date": "Sun, 30 Aug 1998 08:25:17 +0900", "msg_from": "[email protected] (Tatsuo Ishii)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] odd pg_dump output?" }, { "msg_contents": ">Thanks Tatsuo! But these are older problems, not new breakage from me,\n>right? Have you had a chance to test the latest pg_dump with your\n>patches? I'm still concerned that I didn't test pg_dump with a\n>regression test dump/reload/dump sequence (by comparing the two dump\n>files).\n\nI ran pg_dump with the regression DB, then did psql to reload.\nseems there are some problems in the output from pg_dump.\n\nBTW, this is FreeBSD 2.2.6 and one of the regression gets dump core\n(select_having).\n--\nTatsuo Ishii\[email protected]\n\nCREATE TYPE widget ( internallength = 24, externallength = -1, input = 144673(widget_in), output = 144674(widget_out), send = 144674(widget_out), receive = 144673(widget_in), default = '-');\nERROR: parser: parse error at or near \"(\"\nCREATE TYPE _widget ( internallength = -1, externallength = -1, input = 750(array_in), output = 751(array_out), send = 751(array_out), receive = 750(array_in), default = '-');\nERROR: parser: parse error at or near \"(\"\nCREATE TYPE city_budget ( internallength = 16, externallength = -1, input = 1287(int44in), output = 653(int44out), send = 653(int44out), receive = 1287(int44in), default = '-', element = int4, delimiter = ',');\nERROR: parser: parse error at or near \"(\"\nCREATE TYPE _city_budget ( internallength = -1, externallength = -1, input = 750(array_in), output = 751(array_out), send = 751(array_out), receive = 750(array_in), default = '-');\nERROR: parser: parse error at or near \"(\"\nCREATE SEQUENCE default_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;\nSELECT nextval ('default_seq');\nCREATE\nnextval\n-------\n 1\n(1 row)\n\nCREATE SEQUENCE check_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;\nCREATE SEQUENCE insert_seq start 8 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;\nSELECT nextval ('insert_seq');\nCREATE\nCREATE\nnextval\n-------\n 8\n(1 row)\n\nCREATE SEQUENCE rtest_seq start 4 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;\nSELECT nextval ('rtest_seq');\nCREATE\nnextval\n-------\n 4\n(1 row)\n\nCREATE TABLE char_tbl (f1 char(4));\nCREATE TABLE varchar_tbl (f1 varchar(4));\nCREATE TABLE text_tbl (f1 text);\nCREATE TABLE int2_tbl (f1 int2);\nCREATE TABLE int4_tbl (f1 int4);\nCREATE TABLE int8_tbl (q1 int8, q2 int8);\nCREATE TABLE float4_tbl (f1 float4);\nCREATE TABLE float8_tbl (f1 float8);\nCREATE TABLE point_tbl (f1 point);\nCREATE TABLE lseg_tbl (s lseg);\nCREATE TABLE box_tbl (f1 box);\nCREATE TABLE path_tbl (f1 path);\nCREATE TABLE polygon_tbl (f1 polygon);\nCREATE TABLE circle_tbl (f1 circle);\nCREATE TABLE timespan_tbl (f1 timespan);\nCREATE TABLE datetime_tbl (d1 datetime);\nCREATE TABLE reltime_tbl (f1 reltime);\nCREATE TABLE abstime_tbl (f1 abstime);\nCREATE TABLE tinterval_tbl (f1 tinterval);\nCREATE TABLE hobbies_r (name text, person text);\nCREATE TABLE equipment_r (name text, hobby text);\nCREATE TABLE onek (unique1 int4, unique2 int4, two int4, four int4, ten int4, twenty int4, hundred int4, thousand int4, twothousand int4, fivethous int4, tenthous int4, odd int4, even int4, stringu1 name, stringu2 name, string4 name);\nCREATE TABLE tenk1 (unique1 int4, unique2 int4, two int4, four int4, ten int4, twenty int4, hundred int4, thousand int4, twothousand int4, fivethous int4, tenthous int4, odd int4, even int4, stringu1 name, stringu2 name, string4 name);\nCREATE TABLE tenk2 (unique1 int4, unique2 int4, two int4, four int4, ten int4, twenty int4, hundred int4, thousand int4, twothousand int4, fivethous int4, tenthous int4, odd int4, even int4, stringu1 name, stringu2 name, string4 name);\nCREATE TABLE person (name text, age int4, location point);\nCREATE TABLE emp (salary int4, manager name) inherits ( person);\nCREATE TABLE student (gpa float8) inherits ( person);\nCREATE TABLE stud_emp (percent int4) inherits ( emp, student);\nCREATE TABLE city (name name, location box, budget city_budget);\nERROR: type name lookup of city_budget failed\nCREATE TABLE dept (dname name, mgrname text);\nCREATE TABLE slow_emp4000 (home_base box);\nCREATE TABLE fast_emp4000 (home_base box);\nCREATE TABLE road (name text, thepath path);\nCREATE TABLE ihighway () inherits ( road);\nCREATE TABLE shighway (surface text) inherits ( road);\nCREATE TABLE real_city (pop int4, cname text, outline path);\nCREATE TABLE a_star (class char(1), aa int4, a text);\nCREATE TABLE b_star (bb text) inherits ( a_star);\nCREATE TABLE c_star (cc name) inherits ( a_star);\nCREATE TABLE d_star (dd float8) inherits ( b_star, c_star);\nCREATE TABLE e_star (ee int2, e int4) inherits ( c_star);\nCREATE TABLE f_star (ff polygon, f int4) inherits ( e_star);\nCREATE TABLE aggtest (a int2, b float4);\nCREATE TABLE arrtest (a _int2, b _int4, c _name, d _text, e _float8);\nCREATE TABLE hash_i4_heap (seqno int4, random int4);\nCREATE TABLE hash_name_heap (seqno int4, random name);\nCREATE TABLE hash_txt_heap (seqno int4, random text);\nCREATE TABLE hash_f8_heap (seqno int4, random float8);\nCREATE TABLE bt_i4_heap (seqno int4, random int4);\nCREATE TABLE bt_name_heap (seqno name, random int4);\nCREATE TABLE bt_txt_heap (seqno text, random int4);\nCREATE TABLE bt_f8_heap (seqno float8, random int4);\nCREATE TABLE default_tbl (i int4 DEFAULT 100, x text DEFAULT 'vadim', f float8 DEFAULT 123.456);\nCREATE TABLE defaultexpr_tbl (i1 int4 DEFAULT 100 + ( 200 - 199 ) * 2, i2 int4 DEFAULT nextval ( 'default_seq' ));\nCREATE TABLE check_tbl (x int4, CONSTRAINT check_con CHECK (x > 3));\nCREATE TABLE check2_tbl (x int4, y text, z int4, CONSTRAINT sequence_con CHECK (x > 3 AND y <> 'check failed' AND z < 8));\nCREATE TABLE insert_tbl (x int4 DEFAULT nextval ( 'insert_seq' ), y text DEFAULT '-NULL-', z int4 DEFAULT - 1 * currval ( 'insert_seq' ), CONSTRAINT insert_con CHECK (x >= 3 AND y <> 'check failed' AND x < 8), CHECK (x + z = 0));\nCREATE TABLE copy_tbl (x int4, y text, z int4, CONSTRAINT copy_con CHECK (x > 3 AND y <> 'check failed' AND x < 7));\nCREATE TABLE onek2 (unique1 int4, unique2 int4, two int4, four int4, ten int4, twenty int4, hundred int4, thousand int4, twothousand int4, fivethous int4, tenthous int4, odd int4, even int4, stringu1 name, stringu2 name, string4 name);\nCREATE TABLE bprime (unique1 int4, unique2 int4, two int4, four int4, ten int4, twenty int4, hundred int4, thousand int4, twothousand int4, fivethous int4, tenthous int4, odd int4, even int4, stringu1 name, stringu2 name, string4 name);\nCREATE TABLE ramp (name text, thepath path);\nCREATE TABLE iportaltest (i int4, d float4, p polygon);\nCREATE TABLE test_having (a int4, b int4, c char(8), d char(1));\nCREATE TABLE subselect_tbl (f1 int4, f2 int4, f3 float8);\nCREATE TABLE xacttest (a int2, b float4);\nCREATE TABLE random_tbl (random int4);\nCREATE TABLE rtest_t1 (a int4, b int4);\nCREATE TABLE rtest_t2 (a int4, b int4);\nCREATE TABLE rtest_t3 (a int4, b int4);\nCREATE TABLE rtest_system (sysname text, sysdesc text);\nCREATE TABLE rtest_interface (sysname text, ifname text);\nCREATE TABLE rtest_person (pname text, pdesc text);\nCREATE TABLE rtest_admin (pname text, sysname text);\nCREATE TABLE rtest_emp (ename char(20), salary money);\nCREATE TABLE rtest_emplog (ename char(20), who name, action char(10), newsal money, oldsal money);\nCREATE TABLE rtest_empmass (ename char(20), salary money);\nCREATE TABLE rtest_t4 (a int4, b text);\nCREATE TABLE rtest_t5 (a int4, b text);\nCREATE TABLE rtest_t6 (a int4, b text);\nCREATE TABLE rtest_t7 (a int4, b text);\nCREATE TABLE rtest_t8 (a int4, b text);\nCREATE TABLE rtest_t9 (a int4, b text);\nCREATE TABLE rtest_order1 (a int4);\nCREATE TABLE rtest_order2 (a int4, b int4, c text);\nCREATE TABLE rtest_nothn1 (a int4, b text);\nCREATE TABLE rtest_nothn2 (a int4, b text);\nCREATE TABLE rtest_nothn3 (a int4, b text);\nCREATE TABLE rtest_nothn4 (a int4, b text);\nCREATE FUNCTION widget_in (opaque ) RETURNS widget AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../regress.so' LANGUAGE 'C';\nNOTICE: ProcedureCreate: type 'widget' is not yet defined\nCREATE FUNCTION widget_out (opaque ) RETURNS opaque AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../regress.so' LANGUAGE 'C';\nCREATE FUNCTION check_primary_key ( ) RETURNS opaque AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../../../../contrib/spi/refint.so' LANGUAGE 'C';\nCREATE FUNCTION check_foreign_key ( ) RETURNS opaque AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../../../../contrib/spi/refint.so' LANGUAGE 'C';\nCREATE FUNCTION autoinc ( ) RETURNS opaque AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../../../../contrib/spi/autoinc.so' LANGUAGE 'C';\nCREATE FUNCTION funny_dup17 ( ) RETURNS opaque AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../regress.so' LANGUAGE 'C';\nCREATE FUNCTION ttdummy ( ) RETURNS opaque AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../regress.so' LANGUAGE 'C';\nCREATE FUNCTION set_ttdummy (int4 ) RETURNS int4 AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../regress.so' LANGUAGE 'C';\nCREATE FUNCTION hobbies (person ) RETURNS SETOF hobbies_r AS 'select * from hobbies_r where person = $1.name' LANGUAGE 'SQL';\nCREATE FUNCTION hobby_construct (text,text ) RETURNS hobbies_r AS 'select $1 as name, $2 as hobby' LANGUAGE 'SQL';\nCREATE FUNCTION equipment (hobbies_r ) RETURNS SETOF equipment_r AS 'select * from equipment_r where hobby = $1.name' LANGUAGE 'SQL';\nCREATE FUNCTION user_relns ( ) RETURNS SETOF name AS 'select relname\n from pg_class\n where relname !~ ''pg_.*'' and\n relkind <> ''i'' ' LANGUAGE 'SQL';\nCREATE FUNCTION pt_in_widget (point,widget ) RETURNS int4 AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../regress.so' LANGUAGE 'C';\nNOTICE: ProcedureCreate: arg type 'widget' is only a shell\nCREATE FUNCTION overpaid (emp ) RETURNS bool AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../regress.so' LANGUAGE 'C';\nCREATE FUNCTION boxarea (box ) RETURNS int4 AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../regress.so' LANGUAGE 'C';\nCREATE FUNCTION interpt_pp (path,path ) RETURNS point AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../regress.so' LANGUAGE 'C';\nCREATE FUNCTION reverse_name (name ) RETURNS name AS '/mnt2/home/mgr/t-ishii/src/PostgreSQL/anonCVS/pgsql/src/test/regress/input/../regress.so' LANGUAGE 'C';\nCREATE AGGREGATE newcnt ( BASETYPE = int4, SFUNC2 = 766(int4inc), STYPE2 = int4, INITCOND2 = '0' );\nERROR: parser: parse error at or near \"(\"\nCREATE AGGREGATE newavg ( BASETYPE = int4, SFUNC1 = 177(int4pl), STYPE1 = int4, INITCOND1 = '0', SFUNC2 = 766(int4inc), STYPE2 = int4, INITCOND2 = '0', FINALFUNC = 154(int4div) );\nERROR: parser: parse error at or near \"(\"\nCREATE AGGREGATE newsum ( BASETYPE = int4, SFUNC1 = 177(int4pl), STYPE1 = int4, INITCOND1 = '0' );\nERROR: parser: parse error at or near \"(\"\nCREATE OPERATOR #%# (PROCEDURE = 142(int4fac) , LEFTARG = int4 );\nERROR: parser: parse error at or near \"(\"\n CREATE OPERATOR ## (PROCEDURE = 973(path_inter) , LEFTARG = path , RIGHTARG = path , COMMUTATOR = ## );\nERROR: parser: parse error at or near \"(\"\n CREATE OPERATOR <% (PROCEDURE = 145188(pt_in_widget) , LEFTARG = point , RIGHTARG = widget , COMMUTATOR = >=% );\nERROR: parser: parse error at or near \"(\"\n CREATE OPERATOR >=% (PROCEDURE = 145188(pt_in_widget) , LEFTARG = point , RIGHTARG = widget , COMMUTATOR = <% );\nERROR: parser: parse error at or near \"(\"\n CREATE OPERATOR @#@ (PROCEDURE = 142(int4fac) , RIGHTARG = int4 );\nERROR: parser: parse error at or near \"(\"\n CREATE OPERATOR #@# (PROCEDURE = 142(int4fac) , LEFTARG = int4 );\nERROR: parser: parse error at or near \"(\"\n COPY char_tbl FROM stdin;\n", "msg_date": "Mon, 31 Aug 1998 15:46:58 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] odd pg_dump output? " }, { "msg_contents": "> >Thanks Tatsuo! But these are older problems, not new breakage from me,\n> >right? Have you had a chance to test the latest pg_dump with your\n> >patches? I'm still concerned that I didn't test pg_dump with a\n> >regression test dump/reload/dump sequence (by comparing the two dump\n> >files).\n> \n> I ran pg_dump with the regression DB, then did psql to reload.\n> seems there are some problems in the output from pg_dump.\n> \n> BTW, this is FreeBSD 2.2.6 and one of the regression gets dump core\n> (select_having).\n> --\n> Tatsuo Ishii\n> [email protected]\n> \n> CREATE TYPE widget ( internallength = 24, externallength = -1, input = 144673(widget_in), output = 144674(widget_out), send = 144674(widget_out), receive = 144673(widget_in), default = '-');\n> ERROR: parser: parse error at or near \"(\"\n> CREATE TYPE _widget ( internallength = -1, externallength = -1, input = 750(array_in), output = 751(array_out), send = 751(array_out), receive = 750(array_in), default = '-');\n> ERROR: parser: parse error at or near \"(\"\n\nOK, this is my mistake. The regproc fields output the pg_proc.proname,\nbut that is not unique, and should not be used to load into those\nfields. I prepended the object id of the pg_proc entry, to try and make\nit more reliable, but forgot the parentheses would mess up the scannar.\n\nI have changed 233(proname) to proname_233, which will now work.\n\nSorry.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 31 Aug 1998 03:51:27 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] odd pg_dump output?" }, { "msg_contents": "> >Thanks Tatsuo! But these are older problems, not new breakage from me,\n> >right? Have you had a chance to test the latest pg_dump with your\n> >patches? I'm still concerned that I didn't test pg_dump with a\n> >regression test dump/reload/dump sequence (by comparing the two dump\n> >files).\n> \n> I ran pg_dump with the regression DB, then did psql to reload.\n> seems there are some problems in the output from pg_dump.\n> \n> BTW, this is FreeBSD 2.2.6 and one of the regression gets dump core\n> (select_having).\n> --\n> Tatsuo Ishii\n> [email protected]\n> \n> CREATE TYPE widget ( internallength = 24, externallength = -1, input = 144673(widget_in), output = 144674(widget_out), send = 144674(widget_out), receive = 144673(widget_in), default = '-');\n> ERROR: parser: parse error at or near \"(\"\n> CREATE TYPE _widget ( internallength = -1, externallength = -1, input = 750(array_in), output = 751(array_out), send = 751(array_out), receive = 750(array_in), default = '-');\n> ERROR: parser: parse error at or near \"(\"\n\nAh, I see now. It is even more complicated that I thought. Creating a\ntype requires you to specify a valud regproc value WITHOUT QUOTES. \nTricky. My fix should do it. It will appear as widget_in_144673. You\ncan optionally just specify the object id. Output will always show\nboth. I have to use an undercore, because that is the only way to make\nthem valid identifiers.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 31 Aug 1998 03:58:47 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] odd pg_dump output?" }, { "msg_contents": ">> CREATE TYPE widget ( internallength = 24, externallength = -1, input = 144673(widget_in), output = 144674(widget_out), send = 144674(widget_out), receive = 144673(widget_in), default = '-');\n>> ERROR: parser: parse error at or near \"(\"\n>> CREATE TYPE _widget ( internallength = -1, externallength = -1, input = 750(array_in), output = 751(array_out), send = 751(array_out), receive = 750(array_in), default = '-');\n>> ERROR: parser: parse error at or near \"(\"\n>\n>OK, this is my mistake. The regproc fields output the pg_proc.proname,\n>but that is not unique, and should not be used to load into those\n>fields. I prepended the object id of the pg_proc entry, to try and make\n>it more reliable, but forgot the parentheses would mess up the scannar.\n>\n>I have changed 233(proname) to proname_233, which will now work.\n\nThanks. but... Seems still we have problems with pg_dump.\nI did cvs up, initdb, run regression then pg_dump. reloading db shows\nfollowing complains:\n\nCREATE TYPE widget ( internallength = 24, externallength = -1, input = widget_in_19233, output = widget_out_19234, send = widget_out_19234, receive = widget_in_19233, default = '-');\nQUERY: CREATE TYPE widget ( internallength = 24, externallength = -1, input = widget_in_19233, output = widget_out_19234, send = widget_out_19234, receive = widget_in_19233, default = '-');\nERROR: TypeCreate: function 'widget_in_19233(opaque)' does not exist\nCREATE TYPE _widget ( internallength = -1, externallength = -1, input = array_in_750, output = array_out_751, send = array_out_751, receive = array_in_750, default = '-');\nQUERY: CREATE TYPE _widget ( internallength = -1, externallength = -1, input = array_in_750, output = array_out_751, send = array_out_751, receive = array_in_750, default = '-');\nERROR: TypeCreate: function 'array_in_750(opaque)' does not exist\nCREATE TYPE city_budget ( internallength = 16, externallength = -1, input = int44in_1287, output = int44out_653, send = int44out_653, receive = int44in_1287, default = '-', element = int4, delimiter = ',');\nQUERY: CREATE TYPE city_budget ( internallength = 16, externallength = -1, input = int44in_1287, output = int44out_653, send = int44out_653, receive = int44in_1287, default = '-', element = int4, delimiter = ',');\nERROR: TypeCreate: function 'int44in_1287(opaque)' does not exist\nCREATE TYPE _city_budget ( internallength = -1, externallength = -1, input = array_in_750, output = array_out_751, send = array_out_751, receive = array_in_750, default = '-');\nQUERY: CREATE TYPE _city_budget ( internallength = -1, externallength = -1, input = array_in_750, output = array_out_751, send = array_out_751, receive = array_in_750, default = '-');\nERROR: TypeCreate: function 'array_in_750(opaque)' does not exist\n\n[snip]\n\nCREATE TABLE person (name text, age int4, location point);\nQUERY: CREATE TABLE person (name text, age int4, location point);\nCREATE TABLE emp (salary int4, manager name) inherits ( person);\nQUERY: CREATE TABLE emp (salary int4, manager name) inherits ( person);\nCREATE TABLE student (gpa float8) inherits ( person);\nQUERY: CREATE TABLE student (gpa float8) inherits ( person);\nCREATE TABLE stud_emp (percent int4) inherits ( emp, student);\nQUERY: CREATE TABLE stud_emp (percent int4) inherits ( emp, student);\nCREATE TABLE city (name name, location box, budget city_budget);\nQUERY: CREATE TABLE city (name name, location box, budget city_budget);\nERROR: type name lookup of city_budget failed\n\n[snip]\n\nCREATE AGGREGATE newcnt ( BASETYPE = int4, SFUNC2 = int4inc_766, STYPE2 = int4, INITCOND2 = '0' );\nQUERY: CREATE AGGREGATE newcnt ( BASETYPE = int4, SFUNC2 = int4inc_766, STYPE2 = int4, INITCOND2 = '0' );\nERROR: AggregateCreate: 'int4inc_766'('int4') does not exist\nCREATE AGGREGATE newavg ( BASETYPE = int4, SFUNC1 = int4pl_177, STYPE1 = int4, INITCOND1 = '0', SFUNC2 = int4inc_766, STYPE2 = int4, INITCOND2 = '0', FINALFUNC = int4div_154 );\nQUERY: CREATE AGGREGATE newavg ( BASETYPE = int4, SFUNC1 = int4pl_177, STYPE1 = int4, INITCOND1 = '0', SFUNC2 = int4inc_766, STYPE2 = int4, INITCOND2 = '0', FINALFUNC = int4div_154 );\nERROR: AggregateCreate: 'int4pl_177('int4', 'int4') does not exist\nCREATE AGGREGATE newsum ( BASETYPE = int4, SFUNC1 = int4pl_177, STYPE1 = int4, INITCOND1 = '0' );\nQUERY: CREATE AGGREGATE newsum ( BASETYPE = int4, SFUNC1 = int4pl_177, STYPE1 = int4, INITCOND1 = '0' );\nERROR: AggregateCreate: 'int4pl_177('int4', 'int4') does not exist\nCREATE OPERATOR #%# (PROCEDURE = int4fac_142 , LEFTARG = int4 );\nQUERY: CREATE OPERATOR #%# (PROCEDURE = int4fac_142 , LEFTARG = int4 );\nERROR: OperatorDef: function 'int4fac_142(int4)' does not exist\n CREATE OPERATOR ## (PROCEDURE = path_inter_973 , LEFTARG = path , RIGHTARG = path , COMMUTATOR = ## );\nQUERY: CREATE OPERATOR ## (PROCEDURE = path_inter_973 , LEFTARG = path , RIGHTARG = path , COMMUTATOR = ## );\nERROR: OperatorDef: function 'path_inter_973(path, path)' does not exist\n CREATE OPERATOR <% (PROCEDURE = pt_in_widget_19748 , LEFTARG = point , RIGHTARG = widget , COMMUTATOR = >=% );\nQUERY: CREATE OPERATOR <% (PROCEDURE = pt_in_widget_19748 , LEFTARG = point , RIGHTARG = widget , COMMUTATOR = >=% );\nERROR: OperatorGet: left type 'widget' nonexistent\n CREATE OPERATOR >=% (PROCEDURE = pt_in_widget_19748 , LEFTARG = point , RIGHTARG = widget , COMMUTATOR = <% );\nQUERY: CREATE OPERATOR >=% (PROCEDURE = pt_in_widget_19748 , LEFTARG = point , RIGHTARG = widget , COMMUTATOR = <% );\nERROR: OperatorGet: left type 'widget' nonexistent\n CREATE OPERATOR @#@ (PROCEDURE = int4fac_142 , RIGHTARG = int4 );\nQUERY: CREATE OPERATOR @#@ (PROCEDURE = int4fac_142 , RIGHTARG = int4 );\nERROR: OperatorDef: function 'int4fac_142(int4)' does not exist\n CREATE OPERATOR #@# (PROCEDURE = int4fac_142 , LEFTARG = int4 );\nQUERY: CREATE OPERATOR #@# (PROCEDURE = int4fac_142 , LEFTARG = int4 );\nERROR: OperatorDef: function 'int4fac_142(int4)' does not exist\n COPY char_tbl FROM stdin;\nQUERY: COPY char_tbl FROM stdin;\n", "msg_date": "Tue, 01 Sep 1998 11:32:24 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] odd pg_dump output? " }, { "msg_contents": "> >> CREATE TYPE widget ( internallength = 24, externallength = -1, input = 144673(widget_in), output = 144674(widget_out), send = 144674(widget_out), receive = 144673(widget_in), default = '-');\n> >> ERROR: parser: parse error at or near \"(\"\n> >> CREATE TYPE _widget ( internallength = -1, externallength = -1, input = 750(array_in), output = 751(array_out), send = 751(array_out), receive = 750(array_in), default = '-');\n> >> ERROR: parser: parse error at or near \"(\"\n> >\n> >OK, this is my mistake. The regproc fields output the pg_proc.proname,\n> >but that is not unique, and should not be used to load into those\n> >fields. I prepended the object id of the pg_proc entry, to try and make\n> >it more reliable, but forgot the parentheses would mess up the scannar.\n> >\n> >I have changed 233(proname) to proname_233, which will now work.\n> \n> Thanks. but... Seems still we have problems with pg_dump.\n> I did cvs up, initdb, run regression then pg_dump. reloading db shows\n> following complains:\n> \n> CREATE TYPE widget ( internallength = 24, externallength = -1, input = widget_in_19233, output = widget_out_19234, send = widget_out_19234, receive = widget_in_19233, default = '-');\n> QUERY: CREATE TYPE widget ( internallength = 24, externallength = -1, input = widget_in_19233, output = widget_out_19234, send = widget_out_19234, receive = widget_in_19233, default = '-');\n> ERROR: TypeCreate: function 'widget_in_19233(opaque)' does not exist\n> CREATE TYPE _widget ( internallength = -1, externallength = -1, input = array_in_750, output = array_out_751, send = array_out_751, receive = array_in_750, default = '-');\n> QUERY: CREATE TYPE _widget ( internallength = -1, externallength = -1, input = array_in_750, output = array_out_751, send = array_out_751, receive = array_in_750, default = '-');\n> ERROR: TypeCreate: function 'array_in_750(opaque)' does not exist\n> CREATE TYPE city_budget ( internallength = 16, externallength = -1, input = int44in_1287, output = int44out_653, send = int44out_653, receive = int44in_1287, default = '-', element = int4, delimiter = ',');\n> QUERY: CREATE TYPE city_budget ( internallength = 16, externallength = -1, input = int44in_1287, output = int44out_653, send = int44out_653, receive = int44in_1287, default = '-', element = int4, delimiter = ',');\n> ERROR: TypeCreate: function 'int44in_1287(opaque)' does not exist\n> CREATE TYPE _city_budget ( internallength = -1, externallength = -1, input = array_in_750, output = array_out_751, send = array_out_751, receive = array_in_750, default = '-');\n> QUERY: CREATE TYPE _city_budget ( internallength = -1, externallength = -1, input = array_in_750, output = array_out_751, send = array_out_751, receive = array_in_750, default = '-');\n> ERROR: TypeCreate: function 'array_in_750(opaque)' does not exist\n> \n> [snip]\n> \n> CREATE TABLE person (name text, age int4, location point);\n> QUERY: CREATE TABLE person (name text, age int4, location point);\n> CREATE TABLE emp (salary int4, manager name) inherits ( person);\n> QUERY: CREATE TABLE emp (salary int4, manager name) inherits ( person);\n> CREATE TABLE student (gpa float8) inherits ( person);\n> QUERY: CREATE TABLE student (gpa float8) inherits ( person);\n> CREATE TABLE stud_emp (percent int4) inherits ( emp, student);\n> QUERY: CREATE TABLE stud_emp (percent int4) inherits ( emp, student);\n> CREATE TABLE city (name name, location box, budget city_budget);\n> QUERY: CREATE TABLE city (name name, location box, budget city_budget);\n> ERROR: type name lookup of city_budget failed\n> \n> [snip]\n> \n> CREATE AGGREGATE newcnt ( BASETYPE = int4, SFUNC2 = int4inc_766, STYPE2 = int4, INITCOND2 = '0' );\n> QUERY: CREATE AGGREGATE newcnt ( BASETYPE = int4, SFUNC2 = int4inc_766, STYPE2 = int4, INITCOND2 = '0' );\n> ERROR: AggregateCreate: 'int4inc_766'('int4') does not exist\n> CREATE AGGREGATE newavg ( BASETYPE = int4, SFUNC1 = int4pl_177, STYPE1 = int4, INITCOND1 = '0', SFUNC2 = int4inc_766, STYPE2 = int4, INITCOND2 = '0', FINALFUNC = int4div_154 );\n> QUERY: CREATE AGGREGATE newavg ( BASETYPE = int4, SFUNC1 = int4pl_177, STYPE1 = int4, INITCOND1 = '0', SFUNC2 = int4inc_766, STYPE2 = int4, INITCOND2 = '0', FINALFUNC = int4div_154 );\n> ERROR: AggregateCreate: 'int4pl_177('int4', 'int4') does not exist\n> CREATE AGGREGATE newsum ( BASETYPE = int4, SFUNC1 = int4pl_177, STYPE1 = int4, INITCOND1 = '0' );\n> QUERY: CREATE AGGREGATE newsum ( BASETYPE = int4, SFUNC1 = int4pl_177, STYPE1 = int4, INITCOND1 = '0' );\n> ERROR: AggregateCreate: 'int4pl_177('int4', 'int4') does not exist\n> CREATE OPERATOR #%# (PROCEDURE = int4fac_142 , LEFTARG = int4 );\n> QUERY: CREATE OPERATOR #%# (PROCEDURE = int4fac_142 , LEFTARG = int4 );\n> ERROR: OperatorDef: function 'int4fac_142(int4)' does not exist\n> CREATE OPERATOR ## (PROCEDURE = path_inter_973 , LEFTARG = path , RIGHTARG = path , COMMUTATOR = ## );\n> QUERY: CREATE OPERATOR ## (PROCEDURE = path_inter_973 , LEFTARG = path , RIGHTARG = path , COMMUTATOR = ## );\n> ERROR: OperatorDef: function 'path_inter_973(path, path)' does not exist\n> CREATE OPERATOR <% (PROCEDURE = pt_in_widget_19748 , LEFTARG = point , RIGHTARG = widget , COMMUTATOR = >=% );\n> QUERY: CREATE OPERATOR <% (PROCEDURE = pt_in_widget_19748 , LEFTARG = point , RIGHTARG = widget , COMMUTATOR = >=% );\n> ERROR: OperatorGet: left type 'widget' nonexistent\n> CREATE OPERATOR >=% (PROCEDURE = pt_in_widget_19748 , LEFTARG = point , RIGHTARG = widget , COMMUTATOR = <% );\n> QUERY: CREATE OPERATOR >=% (PROCEDURE = pt_in_widget_19748 , LEFTARG = point , RIGHTARG = widget , COMMUTATOR = <% );\n> ERROR: OperatorGet: left type 'widget' nonexistent\n> CREATE OPERATOR @#@ (PROCEDURE = int4fac_142 , RIGHTARG = int4 );\n> QUERY: CREATE OPERATOR @#@ (PROCEDURE = int4fac_142 , RIGHTARG = int4 );\n> ERROR: OperatorDef: function 'int4fac_142(int4)' does not exist\n> CREATE OPERATOR #@# (PROCEDURE = int4fac_142 , LEFTARG = int4 );\n> QUERY: CREATE OPERATOR #@# (PROCEDURE = int4fac_142 , LEFTARG = int4 );\n> ERROR: OperatorDef: function 'int4fac_142(int4)' does not exist\n> COPY char_tbl FROM stdin;\n> QUERY: COPY char_tbl FROM stdin;\n> \n\nLooks like I am going to need some help here.\n\nThe old code dumped out regproc fields as the pg_proc.proname. There is\na problem with this. First, you can have multiple proname entries with\nthe same proname. The differ in their argument number/types. The old\ncode, when reading in a regproc name, would do a sequential scan of the\npg_proc table, and find the first entry that matches the given proname. \nIf that is not the one you wanted, too bad. No way to change it.\n\nThe new code outputs the proname, followed by the oid, int4in_1312. \nWhen reading in regproc, you can specify the value just the same as it\nwas output, or you can specify just the pg_proc oid. Much more\naccurate.\n\nThe problem now is that certain functions in pg_dump look at the regproc\nvalues of the defined type, and use those to try and recreate the type. \nThe problem is that again, the CREATE TYPE expects a function NAME, not\nname and oid:\n\n create type typename (internallength = (number | variable),\n [ externallength = (number | variable), ]\n input = input_function,\n output = output_function\n [, element = typename]\n [, delimiter = <character>]\n [, default = \"string\" ]\n [, send = send_function ]\n [, receive = receive_function ]\n [, passedbyvalue])\n\nHow do people want to handle this? We are using functions with the same\nname more and more for type conversion stuff. Picking the first\nmatching entry, and sequentially scanning the table, just seem bad, but\nI am not sure of the best solution.\n\nI can imagine in the case above, that we usually would not have multiple\nentries with the same name. Should we have \"create type\" accept the new\nformat just like regprocin/regprocout. It would be easy to do. You\ncould specify the name&oid, or just the oid.\n\nIt appears create type, create operator, and create aggregate all have\nthis problem. I can fix them with very little code. Just call\nregprocin, and it returns the oid.\n\nComments?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 1 Sep 1998 00:38:06 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] odd pg_dump output?" } ]
[ { "msg_contents": "Hi, sorry to bother you, but do you know what the following problem could\nbe? I am trying to\ncreate some relationships with the following SQL code in Postgresql:\n\nALTER TABLE dialup_account\n\n ADD CONSTRAINT customer_dialup_account\n\n FOREIGN KEY (\n\n customer_id\n\n )\n\n REFERENCES customer (\n\n customer_id\n\n );\n\n\nI get the following error message:\n\nERROR: parser: parse error at or near \"constraint\" \n\nAny ideas?\n\nNabeel\n\n\n", "msg_date": "Tue, 18 Aug 1998 14:19:07 +0100", "msg_from": "\"M. N. Khan\" <[email protected]>", "msg_from_op": true, "msg_subject": "urgent : postgresql question" } ]
[ { "msg_contents": "subscribe\nend\n\n\n", "msg_date": "Tue, 18 Aug 1998 17:48:25 +0400", "msg_from": "\"������������������ ���������������������������\" <[email protected]>", "msg_from_op": true, "msg_subject": "None" } ]
[ { "msg_contents": "subscribe\nend\n\n\n", "msg_date": "Tue, 18 Aug 1998 17:55:05 +0400", "msg_from": "\"������������������ ���������������������������\" <[email protected]>", "msg_from_op": true, "msg_subject": "None" } ]
[ { "msg_contents": "Is there any reason why the sqlca array is defined in every source file?\nThat way adding initialization code breaks the whole procedure as the\ninitialized sqlca counts as a double definition.\n\nHowever, that's exactly how Oracle does things. I think it's a better idea\nto include the variable definition in the library itself instead of the\nsource files and just include the extern definition in the sources.\n\nComments?\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Tue, 18 Aug 1998 16:13:25 +0200", "msg_from": "\"Dr. Michael Meskes\" <[email protected]>", "msg_from_op": true, "msg_subject": "Need an explanation" } ]
[ { "msg_contents": "Right now, we allow PRIMARY to auto-create an index.\n\nCan we have something to auto-create sequences, instead of the more\ncomplicated CREATE SEQUENCE process.\n\nPerhaps use the data type SERIAL to autocreate a sequence. Should make\nlife easier for novices. We are getting too many sequence questions.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 18 Aug 1998 12:50:07 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "sequence creation" }, { "msg_contents": "> > Right now, we allow PRIMARY to auto-create an index.\n> > Can we have something to auto-create sequences, instead of the more\n> > complicated CREATE SEQUENCE process.\n> > Perhaps use the data type SERIAL to autocreate a sequence. Should \n> > make life easier for novices. We are getting too many sequence \n> > questions.\n> \n> That would be possible. I'd be happier doing it for v6.5, since I'm\n> hoping to work on docs in the meantime. Of course, maybe it would be\n> easy :)\n> \n> What should the syntax be exactly?\n> \n> CREATE TABLE t (s SERIAL);\n> \n> or\n> \n> CREATE TABLE t (i INT DEFAULT SERIAL);\n> \n> or ??\n> \n> Are there alternate syntaxes from other DBs which should be considered?\n\nCan't be that hard. I like the first one myself, and it matches\nInformix.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 18 Aug 1998 22:35:12 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] sequence creation" }, { "msg_contents": "> Right now, we allow PRIMARY to auto-create an index.\n> Can we have something to auto-create sequences, instead of the more\n> complicated CREATE SEQUENCE process.\n> Perhaps use the data type SERIAL to autocreate a sequence. Should \n> make life easier for novices. We are getting too many sequence \n> questions.\n\nThat would be possible. I'd be happier doing it for v6.5, since I'm\nhoping to work on docs in the meantime. Of course, maybe it would be\neasy :)\n\nWhat should the syntax be exactly?\n\n CREATE TABLE t (s SERIAL);\n\nor\n\n CREATE TABLE t (i INT DEFAULT SERIAL);\n\nor ??\n\nAre there alternate syntaxes from other DBs which should be considered?\n\n - Tom\n", "msg_date": "Wed, 19 Aug 1998 02:35:41 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] sequence creation" }, { "msg_contents": "Thus spake Thomas G. Lockhart\n> > Perhaps use the data type SERIAL to autocreate a sequence. Should \n> > make life easier for novices. We are getting too many sequence \n> > questions.\n> \n> That would be possible. I'd be happier doing it for v6.5, since I'm\n> hoping to work on docs in the meantime. Of course, maybe it would be\n> easy :)\n> \n> What should the syntax be exactly?\n> \n> CREATE TABLE t (s SERIAL);\n> \n> or\n> \n> CREATE TABLE t (i INT DEFAULT SERIAL);\n\nI think the first one is simpler and, as far as I know, is more common\nin existing practice.\n\n> Are there alternate syntaxes from other DBs which should be considered?\n\nThe standard doesn't specify a serial type. One question would be,\nwhat is the behaviour? Should the field always be set to the next\nnumber on insert or should we be able to override it? I prefer the\nformer but I can see that it would be a problem on dump and reload.\nHow do other DBs handle this?\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 424 2871 (DoD#0082) (eNTP) | what's for dinner.\n", "msg_date": "Tue, 18 Aug 1998 23:12:18 -0400 (EDT)", "msg_from": "[email protected] (D'Arcy J.M. Cain)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] sequence creation\\" } ]
[ { "msg_contents": "Stupor Genius <[email protected]>\n> \n> > We could add another column to \"pg_rewrite\" which contained the\n> > source for the rule. This could be used by pg_dump to dump the\n> > rule creation statement, or by the user to see what the rule\n> > actually does.\n> > \n> > Perhaps someone who knows how to graft in new columns could do\n> > that now before we finalise 6.4, even if we don't use it straight\n> > away it would serve as a marker.\n> > \n> > I believe a dump/restore is required for 6.3 to 6.4 so we might as\n> > well get the catalog change in sooner rather than later.\n> \n> Adding a column will take away from the already-tight space needed\n> to keep the plan.\n\nAh, yes, I remember, the 8k limit.\n> \n> Perhaps a better way is to have a new non-cached system table that\n> would be joined to pg_rewrite to show the plain-text plan when needed.\n\nAnother table would be the answer, and no need to have it cached.\n\n> \n> Rather than require the user to know this join, postgres could (or\n> should) have some system views (ala Oracle) to hide the underlying\n> table structures and prevent any user except the superuser from\n> modifying a system table without using a postgres command.\n> \n\nI use Oracle at work and I must admit I find the views useful.\n\nIt seems quite natural to use SQL to to look at these things\nand views to combine information.\n\nKeith.\n\n\n", "msg_date": "Tue, 18 Aug 1998 18:59:52 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "RE: [HACKERS] Rules: first fix on monday" } ]
[ { "msg_contents": "> Right now, we allow PRIMARY to auto-create an index.\n> \n> Can we have something to auto-create sequences, instead of the more\n> complicated CREATE SEQUENCE process.\n> \n> Perhaps use the data type SERIAL to autocreate a sequence. Should\n> make\n> life easier for novices. We are getting too many sequence questions.\n> \nI'm all for it.\n\n\t\t-DEJ\n", "msg_date": "Tue, 18 Aug 1998 13:53:34 -0500", "msg_from": "\"Jackson, DeJuan\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: [HACKERS] sequence creation" } ]
[ { "msg_contents": "Hi,\n\n\njust updated development version from cvs and got strange problem :\n\nselect * from WORK_FLATS where DISTRICT_ID in (4,101);\nselect * from WORK_FLATS where DISTRICT_ID in (101,4);\n\nDoes anyone understand what's the difference between this two selects ?\n\nexplain produces the same plans:\nIndex Scan using wfidx_district_id on work_flats (cost=6.90 size=29 width=132)\nbut first select works fine while second fails with message:\nflats=> select * from WORK_FLATS where DISTRICT_ID in (101,4);\npqReadData() -- backend closed the channel unexpectedly.\n This probably means the backend terminated abnormally before or while processing the request.\nWe have lost the connection to the backend, so further processing is impossible. Terminating.\n\n\n6.3.2+patches works ok !!!\n\n\tRegards,\n\n\t\tOleg\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": "Tue, 18 Aug 1998 23:27:57 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": true, "msg_subject": "weird problem with latest cvs" }, { "msg_contents": "It seems this happens only if \nselect * from WORK_FLATS where DISTRICT_ID=101\nproduces zero result ^^^\nand \nselect * from WORK_FLATS where DISTRICT_ID=4\n ^\nproduces non-zero result\n\nBelow is an example:\n\nflats=> select count(*) from WORK_FLATS where DISTRICT_ID in (101);\ncount\n-----\n 0\n(1 row)\n\nflats=> select count(*) from WORK_FLATS where DISTRICT_ID in (100);\ncount\n-----\n 0\n(1 row)\n\nflats=> select count(*) from WORK_FLATS where DISTRICT_ID in (100,101);\ncount\n-----\n 0\n(1 row)\n\nflats=> select count(*) from WORK_FLATS where DISTRICT_ID in (0);\ncount\n-----\n 4\n(1 row)\n\nflats=> select count(*) from WORK_FLATS where DISTRICT_ID in (101,0);\npqReadData() -- backend closed the channel unexpectedly.\n This probably means the backend terminated abnormally before or while processing the request.\nWe have lost the connection to the backend, so further processing is impossible. Terminating.\n\n\n\tOleg\n\nOn Tue, 18 Aug 1998, Oleg Bartunov wrote:\n\n> Date: Tue, 18 Aug 1998 23:27:57 +0400 (MSK DST)\n> From: Oleg Bartunov <[email protected]>\n> To: [email protected]\n> Subject: [HACKERS] weird problem with latest cvs\n> \n> Hi,\n> \n> \n> just updated development version from cvs and got strange problem :\n> \n> select * from WORK_FLATS where DISTRICT_ID in (4,101);\n> select * from WORK_FLATS where DISTRICT_ID in (101,4);\n> \n> Does anyone understand what's the difference between this two selects ?\n> \n> explain produces the same plans:\n> Index Scan using wfidx_district_id on work_flats (cost=6.90 size=29 width=132)\n> but first select works fine while second fails with message:\n> flats=> select * from WORK_FLATS where DISTRICT_ID in (101,4);\n> pqReadData() -- backend closed the channel unexpectedly.\n> This probably means the backend terminated abnormally before or while processing the request.\n> We have lost the connection to the backend, so further processing is impossible. Terminating.\n> \n> \n> 6.3.2+patches works ok !!!\n> \n> \tRegards,\n> \n> \t\tOleg\n> \n> _____________________________________________________________\n> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,\n> Sternberg Astronomical Institute, Moscow University (Russia)\n> Internet: [email protected], http://www.sai.msu.su/~megera/\n> phone: +007(095)939-16-83, +007(095)939-23-83\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": "Tue, 18 Aug 1998 23:56:31 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] weird problem with latest cvs" }, { "msg_contents": "I am able to reproduce the bug. Looks like some problem with the\nindexing or OR's. I will check into it.\n\n\n> It seems this happens only if \n> select * from WORK_FLATS where DISTRICT_ID=101\n> produces zero result ^^^\n> and \n> select * from WORK_FLATS where DISTRICT_ID=4\n> ^\n> produces non-zero result\n> \n> Below is an example:\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (101);\n> count\n> -----\n> 0\n> (1 row)\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (100);\n> count\n> -----\n> 0\n> (1 row)\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (100,101);\n> count\n> -----\n> 0\n> (1 row)\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (0);\n> count\n> -----\n> 4\n> (1 row)\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (101,0);\n> pqReadData() -- backend closed the channel unexpectedly.\n> This probably means the backend terminated abnormally before or while processing the request.\n> We have lost the connection to the backend, so further processing is impossible. Terminating.\n> \n> \n> \tOleg\n> \n> On Tue, 18 Aug 1998, Oleg Bartunov wrote:\n> \n> > Date: Tue, 18 Aug 1998 23:27:57 +0400 (MSK DST)\n> > From: Oleg Bartunov <[email protected]>\n> > To: [email protected]\n> > Subject: [HACKERS] weird problem with latest cvs\n> > \n> > Hi,\n> > \n> > \n> > just updated development version from cvs and got strange problem :\n> > \n> > select * from WORK_FLATS where DISTRICT_ID in (4,101);\n> > select * from WORK_FLATS where DISTRICT_ID in (101,4);\n> > \n> > Does anyone understand what's the difference between this two selects ?\n> > \n> > explain produces the same plans:\n> > Index Scan using wfidx_district_id on work_flats (cost=6.90 size=29 width=132)\n> > but first select works fine while second fails with message:\n> > flats=> select * from WORK_FLATS where DISTRICT_ID in (101,4);\n> > pqReadData() -- backend closed the channel unexpectedly.\n> > This probably means the backend terminated abnormally before or while processing the request.\n> > We have lost the connection to the backend, so further processing is impossible. Terminating.\n> > \n> > \n> > 6.3.2+patches works ok !!!\n> > \n> > \tRegards,\n> > \n> > \t\tOleg\n> > \n> > _____________________________________________________________\n> > Oleg Bartunov, sci.researcher, hostmaster of AstroNet,\n> > Sternberg Astronomical Institute, Moscow University (Russia)\n> > Internet: [email protected], http://www.sai.msu.su/~megera/\n> > phone: +007(095)939-16-83, +007(095)939-23-83\n> > \n> > \n> \n> _____________________________________________________________\n> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,\n> Sternberg Astronomical Institute, Moscow University (Russia)\n> Internet: [email protected], http://www.sai.msu.su/~megera/\n> phone: +007(095)939-16-83, +007(095)939-23-83\n> \n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 19 Aug 1998 02:04:54 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] weird problem with latest cvs" }, { "msg_contents": "It is my code that tries to check if a new row was matched by a previous\nindex, and hence discard it. If the previous index did not return any\nrows, the slot is NULL, and it crashes. I will try to work on a fix.\n\n\n> It seems this happens only if \n> select * from WORK_FLATS where DISTRICT_ID=101\n> produces zero result ^^^\n> and \n> select * from WORK_FLATS where DISTRICT_ID=4\n> ^\n> produces non-zero result\n> \n> Below is an example:\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (101);\n> count\n> -----\n> 0\n> (1 row)\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (100);\n> count\n> -----\n> 0\n> (1 row)\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (100,101);\n> count\n> -----\n> 0\n> (1 row)\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (0);\n> count\n> -----\n> 4\n> (1 row)\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (101,0);\n> pqReadData() -- backend closed the channel unexpectedly.\n> This probably means the backend terminated abnormally before or while processing the request.\n> We have lost the connection to the backend, so further processing is impossible. Terminating.\n> \n> \n> \tOleg\n> \n> On Tue, 18 Aug 1998, Oleg Bartunov wrote:\n> \n> > Date: Tue, 18 Aug 1998 23:27:57 +0400 (MSK DST)\n> > From: Oleg Bartunov <[email protected]>\n> > To: [email protected]\n> > Subject: [HACKERS] weird problem with latest cvs\n> > \n> > Hi,\n> > \n> > \n> > just updated development version from cvs and got strange problem :\n> > \n> > select * from WORK_FLATS where DISTRICT_ID in (4,101);\n> > select * from WORK_FLATS where DISTRICT_ID in (101,4);\n> > \n> > Does anyone understand what's the difference between this two selects ?\n> > \n> > explain produces the same plans:\n> > Index Scan using wfidx_district_id on work_flats (cost=6.90 size=29 width=132)\n> > but first select works fine while second fails with message:\n> > flats=> select * from WORK_FLATS where DISTRICT_ID in (101,4);\n> > pqReadData() -- backend closed the channel unexpectedly.\n> > This probably means the backend terminated abnormally before or while processing the request.\n> > We have lost the connection to the backend, so further processing is impossible. Terminating.\n> > \n> > \n> > 6.3.2+patches works ok !!!\n> > \n> > \tRegards,\n> > \n> > \t\tOleg\n> > \n> > _____________________________________________________________\n> > Oleg Bartunov, sci.researcher, hostmaster of AstroNet,\n> > Sternberg Astronomical Institute, Moscow University (Russia)\n> > Internet: [email protected], http://www.sai.msu.su/~megera/\n> > phone: +007(095)939-16-83, +007(095)939-23-83\n> > \n> > \n> \n> _____________________________________________________________\n> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,\n> Sternberg Astronomical Institute, Moscow University (Russia)\n> Internet: [email protected], http://www.sai.msu.su/~megera/\n> phone: +007(095)939-16-83, +007(095)939-23-83\n> \n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 19 Aug 1998 02:15:54 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] weird problem with latest cvs" }, { "msg_contents": "I fixed this problem this morning, and the current sources contain the\nfix.\n\nThanks for the report.\n\n> It seems this happens only if \n> select * from WORK_FLATS where DISTRICT_ID=101\n> produces zero result ^^^\n> and \n> select * from WORK_FLATS where DISTRICT_ID=4\n> ^\n> produces non-zero result\n> \n> Below is an example:\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (101);\n> count\n> -----\n> 0\n> (1 row)\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (100);\n> count\n> -----\n> 0\n> (1 row)\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (100,101);\n> count\n> -----\n> 0\n> (1 row)\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (0);\n> count\n> -----\n> 4\n> (1 row)\n> \n> flats=> select count(*) from WORK_FLATS where DISTRICT_ID in (101,0);\n> pqReadData() -- backend closed the channel unexpectedly.\n> This probably means the backend terminated abnormally before or while processing the request.\n> We have lost the connection to the backend, so further processing is impossible. Terminating.\n> \n> \n> \tOleg\n> \n> On Tue, 18 Aug 1998, Oleg Bartunov wrote:\n> \n> > Date: Tue, 18 Aug 1998 23:27:57 +0400 (MSK DST)\n> > From: Oleg Bartunov <[email protected]>\n> > To: [email protected]\n> > Subject: [HACKERS] weird problem with latest cvs\n> > \n> > Hi,\n> > \n> > \n> > just updated development version from cvs and got strange problem :\n> > \n> > select * from WORK_FLATS where DISTRICT_ID in (4,101);\n> > select * from WORK_FLATS where DISTRICT_ID in (101,4);\n> > \n> > Does anyone understand what's the difference between this two selects ?\n> > \n> > explain produces the same plans:\n> > Index Scan using wfidx_district_id on work_flats (cost=6.90 size=29 width=132)\n> > but first select works fine while second fails with message:\n> > flats=> select * from WORK_FLATS where DISTRICT_ID in (101,4);\n> > pqReadData() -- backend closed the channel unexpectedly.\n> > This probably means the backend terminated abnormally before or while processing the request.\n> > We have lost the connection to the backend, so further processing is impossible. Terminating.\n> > \n> > \n> > 6.3.2+patches works ok !!!\n> > \n> > \tRegards,\n> > \n> > \t\tOleg\n> > \n> > _____________________________________________________________\n> > Oleg Bartunov, sci.researcher, hostmaster of AstroNet,\n> > Sternberg Astronomical Institute, Moscow University (Russia)\n> > Internet: [email protected], http://www.sai.msu.su/~megera/\n> > phone: +007(095)939-16-83, +007(095)939-23-83\n> > \n> > \n> \n> _____________________________________________________________\n> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,\n> Sternberg Astronomical Institute, Moscow University (Russia)\n> Internet: [email protected], http://www.sai.msu.su/~megera/\n> phone: +007(095)939-16-83, +007(095)939-23-83\n> \n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 20 Aug 1998 00:04:08 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] weird problem with latest cvs" } ]
[ { "msg_contents": "Jan,\n\nI'm absolutely amazed by this piece of magic.\n\nI updated postrgreSQL from CVS, built postgres and the get_ruledef()\nfunction and gave it a try.\n\nA simple VIEW I have goes in as:-\n\n SELECT t.artist, t.song, t.trackno, d.cdname\n FROM disks d, tracks t\n WHERE d.diskid = t.diskid \n \nAnd comes out as :-\n\ndisks=> select get_ruledef('_RETsongs');\nget_ruledef \n--------------------------------------------------------------------------------\n---------------------------------------------------------------------\nCREATE RULE _RETsongs AS ON SELECT TO songs DO INSTEAD SELECT t.artist, t.song, \nt.trackno, d.cdname FROM disks d, tracks t WHERE d.diskid = t.diskid;\n(1 row)\n\ndisks=>\n\nAbsolutely perfect rule definition for the VIEW.\n\nOne slight bug I found was that ANDs come out as ORs but that's\neasily fixed with the following patch.\n\nWhat can I say..... \nThanks,\nKeith.\n\n\n*** get_ruledef/get_ruledef.c.orig\tTue Aug 18 19:34:34 1998\n--- get_ruledef/get_ruledef.c\tTue Aug 18 19:34:53 1998\n***************\n*** 738,744 ****\n \t\t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n \t\t\t\t\t (Node *)get_leftop(expr),\n \t\t\t\t\t varprefix));\n! \t\t\t\tstrcat(buf, \") OR (\");\n \t\t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n \t\t\t\t\t (Node *)get_rightop(expr),\n \t\t\t\t\t varprefix));\n--- 738,744 ----\n \t\t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n \t\t\t\t\t (Node *)get_leftop(expr),\n \t\t\t\t\t varprefix));\n! \t\t\t\tstrcat(buf, \") AND (\");\n \t\t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n \t\t\t\t\t (Node *)get_rightop(expr),\n \t\t\t\t\t varprefix));\n\n\n\[email protected] (Jan Wieck)\n> >\n> > > [email protected]\n> > > Jan,\n> > >\n> > > Whilst you are working on the rules system it would be nice if\n> > > you could look for an oportunity to store the plain text rule\n> > > definition at creation time.\n> > >\n> > > If the definition were stored in a table column it would allow us\n> > > to dump and restore databases in a more complete way.\n> > >\n> > > I looked at this some while ago myself but never got close to\n> > > making it work.\n> > >\n> > > Keith.\n> > >\n> >\n> > Yes, that would really be nice and I had something the like\n> > already in mind.\n> >\n> > [...]\n> > On the other hand wouldn't it be too complicated to\n> > reconstruct a command from the parsetree, that exactly\n> > creates the rule. Reading a parsetree isn't fun, but after\n> > all I did on the rewrite system I'm somewhat familiar with it\n> > now (sometimes I see the cup in a targetlist, the coffee\n> > machine in the rangetable and all the buttons in the\n> > qualification when pulling a coffee out of it - think I\n> > should I consult a psychist when the rule system is fixed\n> > :-).\n> >\n> >\n> > Jan\n> \n> To demonstrate that it really isn't that complicated as it\n> looks, here is a C function that if defined in the backend as\n> \n> CREATE FUNCTION get_ruledef(name)\n> RETURNS text AS '.../get_ruledef.so'\n> LANGUAGE 'C';\n> \n> can be used to see a textual representation of the rule given\n> as argument.\n\n", "msg_date": "Tue, 18 Aug 1998 21:07:17 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] dumping rules" }, { "msg_contents": "> \n> Jan,\n> \n> I'm absolutely amazed by this piece of magic.\n\n Written just to check if I understand parsetrees now.\n\n :-)\n\n> A simple VIEW I have goes in as:-\n> \n> SELECT t.artist, t.song, t.trackno, d.cdname\n> FROM disks d, tracks t\n> WHERE d.diskid = t.diskid \n> \n> And comes out as :-\n> \n> disks=> select get_ruledef('_RETsongs');\n> get_ruledef \n> --------------------------------------------------------------------------------\n> ---------------------------------------------------------------------\n> CREATE RULE _RETsongs AS ON SELECT TO songs DO INSTEAD SELECT t.artist, t.song, \n> t.trackno, d.cdname FROM disks d, tracks t WHERE d.diskid = t.diskid;\n> (1 row)\n> \n> disks=>\n> \n> Absolutely perfect rule definition for the VIEW.\n> \n> One slight bug I found was that ANDs come out as ORs but that's\n> easily fixed with the following patch.\n\n cut-n-paste error, tnx.\n\n Another one might be ISNULL (I think I missed it). But as I said,\n it's just a point to start from.\n\n> \n> What can I say..... \n> Thanks,\n> Keith.\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, 18 Aug 1998 22:18:51 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] dumping rules" } ]
[ { "msg_contents": "OK, here are the details to the patch I am currently applying. It\ncleans up a lot of the internal tuple access routines.\n\ncvs update and initdb, everyone.\n\n---------------------------------------------------------------------------\n\n\nheap_fetch requires buffer pointer, must be released\nheap_getnext no longer returns buffer pointer, can be gotten from scan\n\tdescriptor\nbootstrap can create multi-key indexes\npg_procname index now is multi-key index\noidint2, oidint4, oidname are gone (must be removed from regression tests)\nuse System Cache rather than sequential scan in many places\nheap_modifytuple no longer takes buffer parameter\nremove unused buffer parameter in a few other functions\noid8 is not index-able\nremove some use of single-character variable names\ncleanup Buffer variables usage and scan descriptor looping\ncleaned up allocation and freeing of tuples\n18k lines of diff\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 18 Aug 1998 21:41:48 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Massive patch" }, { "msg_contents": "> OK, here are the details to the patch I am currently applying. It\n> cleans up a lot of the internal tuple access routines.\n> \n> cvs update and initdb, everyone.\n> \n> ---------------------------------------------------------------------------\n> \n> \n> heap_fetch requires buffer pointer, must be released\n> heap_getnext no longer returns buffer pointer, can be gotten from scan\n> \tdescriptor\n> bootstrap can create multi-key indexes\n> pg_procname index now is multi-key index\n> oidint2, oidint4, oidname are gone (must be removed from regression tests)\n> use System Cache rather than sequential scan in many places\n> heap_modifytuple no longer takes buffer parameter\n> remove unused buffer parameter in a few other functions\n> oid8 is not index-able\n ^^^\n\nI meant to say \"now indexable\".\n\n> remove some use of single-character variable names\n> cleanup Buffer variables usage and scan descriptor looping\n> cleaned up allocation and freeing of tuples\n> 18k lines of diff\n> \n> -- \n> Bruce Momjian | 830 Blythe Avenue\n> [email protected] | Drexel Hill, Pennsylvania 19026\n> + If your life is a hard drive, | (610) 353-9879(w)\n> + Christ can be your backup. | (610) 853-3000(h)\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 18 Aug 1998 21:54:20 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Massive patch" } ]
[ { "msg_contents": "Are the system caches FIFO, or do they just keep growing as they look up\ninformation?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 18 Aug 1998 23:17:02 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "system caches" } ]
[ { "msg_contents": "I have added this to the developer's FAQ. Any comments or corrections?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n\n9) How do I efficiently access information in tables from the backend code?\n\nThere are two ways. First, SearchSysCacheTuple() and related functions allow\nyou to query the system catalogs. This is the preferred way to access system\ntables, because the first call to the cache loads the needed rows, and\nfuture requests can return the results without accessing the base table.\nSome of the caches use system table indexes to look up tuples. A list of\navailable caches is located in src/backend/utils/cache/syscache.c.\nsrc/backend/utils/cache/lsyscache.c contains many column-specific cache\nlookup functions.\n\nThe rows returned are cached-owned copies of the heap rows. They are\ninvalidated when the base table changes. Because the cache is local to each\nbackend, you may use the pointer returned from the cache for short periods\nwithout making a copy of the tuple. If you send the pointer into a large\nfunction that will be doing its own cache lookups, it is possible your entry\nmay be flushed, so you should use SearchSysCacheTupleCopy() in these cases,\nand pfree() the resulting tuple when you are done.\n\nIf you can't use the system cache, you will need to retrieve the data\ndirectly from the heap table, using the buffer cache that is shared by all\nbackends. The backend automatically takes care of loading the rows into the\nbuffer cache.\n\nOpen the table with heap_open(). You can then start a table scan with\nheap_beginscan(), then use heap_getnext() and continue as long as\nHeapTupleIsValid is true. Then do a heap_endscan(). Keys can be assigned to\nthe scan. No indexes are used, so all rows are going to be compared to the\nkeys, and only the valid rows returned.\n\nYou can also use heap_fetch() to sequentially fetch rows from the table.\nScans automatically lock/unlock rows from the buffer cache, so when using\nheap_fetch(), you must retrieve the Buffer pointer, and ReleaseBuffer it\nwhen completed.", "msg_date": "Tue, 18 Aug 1998 23:26:09 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "New Developer's FAQ item" }, { "msg_contents": " I have added this to the developer's FAQ. Any comments or corrections?\n\n 9) How do I efficiently access information in tables from the backend code?\n\nIs all this relevant for writing triggers that have to access tables\nin order to verify/modify a given tuple? Is that even possible? Are\nthere any examples?\n\nCheers,\nBrook\n", "msg_date": "Tue, 18 Aug 1998 22:28:04 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] New Developer's FAQ item" }, { "msg_contents": "> I have added this to the developer's FAQ. Any comments or corrections?\n> \n> 9) How do I efficiently access information in tables from the backend code?\n> \n> Is all this relevant for writing triggers that have to access tables\n> in order to verify/modify a given tuple? Is that even possible? Are\n> there any examples?\n\nYes, I think so. You can check out contrib/spi.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 19 Aug 1998 00:31:51 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] New Developer's FAQ item" }, { "msg_contents": "> \n> I have added this to the developer's FAQ. Any comments or corrections?\n> \n> 9) How do I efficiently access information in tables from the backend code?\n> \n> Is all this relevant for writing triggers that have to access tables\n> in order to verify/modify a given tuple? Is that even possible? Are\n> there any examples?\n> \n> Cheers,\n> Brook\n\n But keep in mind that the syscache and heap access goes\n in without ACL checks!\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": "Wed, 19 Aug 1998 09:42:02 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] New Developer's FAQ item" }, { "msg_contents": " > Is all this relevant for writing triggers that have to access tables\n > in order to verify/modify a given tuple? Is that even possible? Are\n > there any examples?\n\n But keep in mind that the syscache and heap access goes\n in without ACL checks!\n\nI don't quite know what you mean here. What are ACL checks? Sorry\nfor the naive question.\n\nCheers,\nBrook\n", "msg_date": "Fri, 21 Aug 1998 17:06:48 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] New Developer's FAQ item" }, { "msg_contents": ">\n> > Is all this relevant for writing triggers that have to access tables\n> > in order to verify/modify a given tuple? Is that even possible? Are\n> > there any examples?\n>\n> But keep in mind that the syscache and heap access goes\n> in without ACL checks!\n>\n> I don't quite know what you mean here. What are ACL checks? Sorry\n> for the naive question.\n>\n> Cheers,\n> Brook\n\n On any table, the owner or a superuser can GRANT or REVOKE\n access to or from other users. Thus, you might have granted\n another user permissions to read some of your tables, but not\n other ones. The permissions you've setup are held in the\n relacl column in pg_class.\n\n But these permissions are checked only if a regular query is\n processed by the executor (or after my new changes during\n query rewrite). When accessing information through the\n syscache or heap access methods, the ACL's (access control\n lists) aren't checked.\n\n If you write a function, that reads tables and returns\n information from them, any user can use these functions to\n see the data they return. Even if you explicitly revoked the\n user from reading these tables. If the function uses SPI to\n access the tables, the ACL checks get performed and the user\n cannot use them to look at your data.\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": "Sun, 23 Aug 1998 10:36:10 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] New Developer's FAQ item" } ]
[ { "msg_contents": "Is there a reason why anyone renamed struct index to\nstruct RelationGetRelidindex in ecpg's type.h? I'm surprised it doesn't\nbreak the ecpg compilation procedure since the usage in preproc.y hasn't\nbeen changed at all. \n\nI just checked and found that is does indeed break ecpg compilation. I just\ndidn't notice because ecpg isn't compiled per default. Any reason why it\nisn't?\n\nMichael\n\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Wed, 19 Aug 1998 09:13:18 +0200", "msg_from": "\"Dr. Michael Meskes\" <[email protected]>", "msg_from_op": true, "msg_subject": "struct index" }, { "msg_contents": "> Is there a reason why anyone renamed struct index to\n> struct RelationGetRelidindex in ecpg's type.h? I'm surprised it doesn't\n> break the ecpg compilation procedure since the usage in preproc.y hasn't\n> been changed at all. \n> \n> I just checked and found that is does indeed break ecpg compilation. I just\n> didn't notice because ecpg isn't compiled per default. Any reason why it\n> isn't?\n> \n> Michael\n\nSorry. I am fixing it now. I am not sure how that got changed, but I\nclearly did it:\n\t\n---------------------------------------------------------------------------\n\n\t*** type.h 1998/05/26 13:43:55 1.10\n\t--- type.h 1998/08/19 01:33:47\n\t***************\n\t*** 75,81 ****\n\t char *str;\n\t };\n\t \n\t! struct index\n\t {\n\t int index1;\n\t int index2;\n\t--- 75,81 ----\n\t char *str;\n\t };\n\t \n\t! struct RelationGetRelidindex\n\t {\n\t int index1;\n\t int index2;\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 19 Aug 1998 10:42:14 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] struct index" }, { "msg_contents": "> I just checked and found that is does indeed break ecpg compilation. I \n> just didn't notice because ecpg isn't compiled per default. Any reason \n> why it isn't?\n\nI suspect it is for historical reasons: either ecpg had trouble\ncompiling at one time so someone disabled the default build, _or_ some\nsystems have trouble with your bison or flex input file. I'm vaguely\nrecalling the latter, and the fix will be for you to include the bison\nand flex output in the distribution so it does not need to be rebuilt\nunless someone changes the source.\n\nIf you do this, it is important to \"touch\" the output files _before_\ncommitting to CVS, so that the outputs are definitely dated later than\nthe inputs, otherwise make will decide to rebuild them anyway. I made\nthis mistake yet again the last time I committed gram.c for the main\nparser, and we'll need to fix this before v6.4 is released...\n\n - Tom\n", "msg_date": "Wed, 19 Aug 1998 15:08:50 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] struct index" }, { "msg_contents": "On Wed, Aug 19, 1998 at 03:08:50PM +0000, Thomas G. Lockhart wrote:\n> I suspect it is for historical reasons: either ecpg had trouble\n> compiling at one time so someone disabled the default build, _or_ some\n> systems have trouble with your bison or flex input file. I'm vaguely\n> recalling the latter, and the fix will be for you to include the bison\n> and flex output in the distribution so it does not need to be rebuilt\n> unless someone changes the source.\n\nNo problem with me. Shall I upload these files, or could anyone with direct\ncvs access put them in there?\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Wed, 19 Aug 1998 20:10:34 +0200", "msg_from": "\"Dr. Michael Meskes\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] struct index" }, { "msg_contents": "> On Wed, Aug 19, 1998 at 03:08:50PM +0000, Thomas G. Lockhart wrote:\n> > I suspect it is for historical reasons: either ecpg had trouble\n> > compiling at one time so someone disabled the default build, _or_ some\n> > systems have trouble with your bison or flex input file. I'm vaguely\n> > recalling the latter, and the fix will be for you to include the bison\n> > and flex output in the distribution so it does not need to be rebuilt\n> > unless someone changes the source.\n> \n> No problem with me. Shall I upload these files, or could anyone with direct\n> cvs access put them in there?\n\nOK. It will compile by default now.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 21:19:01 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] struct index" } ]
[ { "msg_contents": "I tried to initdb as Bruce applied that huge patch but:\n\nRunning: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1\nERROR: fmgr_info: function 683: cache lookup failed\n\nERROR: fmgr_info: function 683: cache lookup failed\n\n/usr/local/pgsql/bin/initdb: line 325: 4201 Broken pipe cat\n$TEMPLATE\n 4202 | sed -e \"s/postgres\nPGUID/$POSTGRES_SUPERUSERNAME $POSTGRES_SUPERUID/\" -e\n\"s/PGUID/$POSTGRES_SUPERUID/\"\n 4203 Segmentation fault | postgres $BACKENDARGS template1\ninitdb: could not create template database\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Wed, 19 Aug 1998 10:27:42 +0200", "msg_from": "\"Dr. Michael Meskes\" <[email protected]>", "msg_from_op": true, "msg_subject": "initb won't work" }, { "msg_contents": "> \n> I tried to initdb as Bruce applied that huge patch but:\n> [...]\n> -- \n> Michael Meskes\t\t\[email protected], [email protected]\n\n I checked out CVS today (Aug 19 08:33 UTC) and it worked.\n\n Linux i486 2.1.88\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": "Wed, 19 Aug 1998 12:00:55 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initb won't work" }, { "msg_contents": "On Wed, Aug 19, 1998 at 12:00:55PM +0200, Jan Wieck wrote:\n> I checked out CVS today (Aug 19 08:33 UTC) and it worked.\n\nHmm, I checked out at about 7 o'clock local time.\n\n> Linux i486 2.1.88\n\nI use 2.1.116 on a pentium machine, but that shouldn't make muchof a\ndifference. I do run glibc 2.0.7 though.\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Wed, 19 Aug 1998 12:57:13 +0200", "msg_from": "\"Dr. Michael Meskes\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initb won't work" }, { "msg_contents": "At 0:00 PM 98.8.19 +0200, Jan Wieck wrote:\n>> \n>> I tried to initdb as Bruce applied that huge patch but:\n>> [...]\n>> -- \n>> Michael Meskes\t\t\[email protected], [email protected]\n>\n> I checked out CVS today (Aug 19 08:33 UTC) and it worked.\n>\n> Linux i486 2.1.88\n\nWorked for me too, except the strange pg_type oid problem\nas I mentioned.\nThis is FreeBSD 2.2.6-RELEASE.\n--\nTatsuo Ishii\[email protected]\n\n", "msg_date": "Wed, 19 Aug 1998 23:03:53 +0900", "msg_from": "[email protected] (Tatsuo Ishii)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initb won't work" }, { "msg_contents": "> I tried to initdb as Bruce applied that huge patch but:\n> \n> Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1\n> ERROR: fmgr_info: function 683: cache lookup failed\n> \n> ERROR: fmgr_info: function 683: cache lookup failed\n> \n> /usr/local/pgsql/bin/initdb: line 325: 4201 Broken pipe cat\n> $TEMPLATE\n> 4202 | sed -e \"s/postgres\n> PGUID/$POSTGRES_SUPERUSERNAME $POSTGRES_SUPERUID/\" -e\n> \"s/PGUID/$POSTGRES_SUPERUID/\"\n> 4203 Segmentation fault | postgres $BACKENDARGS template1\n> initdb: could not create template database\n\nI just tested it again here, and it worked fine. Did you do a clean\nrecompile of everything?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 19 Aug 1998 10:44:30 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initb won't work" }, { "msg_contents": "On Wed, Aug 19, 1998 at 10:44:30AM -0400, Bruce Momjian wrote:\n> I just tested it again here, and it worked fine. Did you do a clean\n> recompile of everything?\n\nYes, I did. No idea what's going on.\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Wed, 19 Aug 1998 20:09:35 +0200", "msg_from": "\"Dr. Michael Meskes\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initb won't work" } ]
[ { "msg_contents": "\n>> Right now, we allow PRIMARY to auto-create an index.\n>> Can we have something to auto-create sequences, instead of the more\n>> complicated CREATE SEQUENCE process.\n>> Perhaps use the data type SERIAL to autocreate a sequence. Should \n>> make life easier for novices. We are getting too many sequence \n>> questions.\n>\n>That would be possible. I'd be happier doing it for v6.5, since I'm\n>hoping to work on docs in the meantime. Of course, maybe it would be\n>easy :)\n>\n>What should the syntax be exactly?\n>\n> CREATE TABLE t (s SERIAL);\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nexactly this. :-) (like in Informix)\n\nInformix also allows to specify a starting value like:\ncreate table t (s serial(1000)); \ndefaulting to 1 but I think this additional syntax is rather misleading\n\nAndreas\n\n", "msg_date": "Wed, 19 Aug 1998 11:00:25 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "AW: [HACKERS] sequence creation" }, { "msg_contents": "> \n> >> Right now, we allow PRIMARY to auto-create an index.\n> >> Can we have something to auto-create sequences, instead of the more\n> >> complicated CREATE SEQUENCE process.\n> >> Perhaps use the data type SERIAL to autocreate a sequence. Should \n> >> make life easier for novices. We are getting too many sequence \n> >> questions.\n> >\n> >That would be possible. I'd be happier doing it for v6.5, since I'm\n> >hoping to work on docs in the meantime. Of course, maybe it would be\n> >easy :)\n> >\n> >What should the syntax be exactly?\n> >\n> > CREATE TABLE t (s SERIAL);\n> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n> \n> exactly this. :-) (like in Informix)\n> \n> Informix also allows to specify a starting value like:\n> create table t (s serial(1000)); \n> defaulting to 1 but I think this additional syntax is rather misleading\n\nThanks to Thomas, this will be in 6.4.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 28 Aug 1998 22:55:29 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: [HACKERS] sequence creation" } ]
[ { "msg_contents": "> I had something different in mind to make the space\n> unlimited. I could add an Oid field to pg_rewrite, pointing\n> to an extension record.\n>\n> If a rule does not fit into one tuple, it is splitted into\n> multiple ones in rewriteDefine.c. All the extension tuples\n> have the event realtion set to the invalid Oid value to not\n> get fired everywhere.\n\nI think it would actually be better to allow postgresql data pages to be chained,\nso allowing all rows to be larger than 8k.\nUsual limits are 32k independent of page size.\n\nThe trick is to add pointers to followup pages if the record does not fit in.\nThis will usually be the following pages, but might be somwhere completely different.\nIn this case performance will be bad, but all major players suffer from this.\n\nI really think doing tricks for system tables to overcome the 8k limit \nis putting work into the wrong direction. \n\nAndreas\n\n", "msg_date": "Wed, 19 Aug 1998 12:08:52 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "AW: [HACKERS] Rules: first fix on monday" }, { "msg_contents": "> I really think doing tricks for system tables to overcome the 8k limit \n> is putting work into the wrong direction. \n> \n> Andreas\n\n Right!\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": "Wed, 19 Aug 1998 12:23:08 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: AW: [HACKERS] Rules: first fix on monday" } ]
[ { "msg_contents": "Marc,\n\n just that the regression tests for rules work, please apply\n the following to regress/sql/tests.\n\n If applying by hand note that the setup_... must run before\n the run_... (that I splitted these two was due to the errors\n that occured when creating rules and using them then in the\n same session - I'll post another fix for this later).\n\n BTW: the regression tests sanity_checks and alter_table\n fail now due to the remove of some indices and the oidint4\n and oidname types. At least expectes should be set to\n the current results.\n\n Thanks.\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*** tests.orig\tWed Aug 19 12:02:27 1998\n--- tests\tWed Aug 19 12:02:17 1998\n***************\n*** 61,65 ****\n select_views\n alter_table\n portals_p2\n! run_ruletest.sql\n! setup_ruletest.sql\n--- 61,65 ----\n select_views\n alter_table\n portals_p2\n! setup_ruletest\n! run_ruletest\n", "msg_date": "Wed, 19 Aug 1998 12:20:58 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": true, "msg_subject": "Rules: regression tests" }, { "msg_contents": "Applied.\n\n\n> Marc,\n> \n> just that the regression tests for rules work, please apply\n> the following to regress/sql/tests.\n> \n> If applying by hand note that the setup_... must run before\n> the run_... (that I splitted these two was due to the errors\n> that occured when creating rules and using them then in the\n> same session - I'll post another fix for this later).\n> \n> BTW: the regression tests sanity_checks and alter_table\n> fail now due to the remove of some indices and the oidint4\n> and oidname types. At least expectes should be set to\n> the current results.\n> \n> Thanks.\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> *** tests.orig\tWed Aug 19 12:02:27 1998\n> --- tests\tWed Aug 19 12:02:17 1998\n> ***************\n> *** 61,65 ****\n> select_views\n> alter_table\n> portals_p2\n> ! run_ruletest.sql\n> ! setup_ruletest.sql\n> --- 61,65 ----\n> select_views\n> alter_table\n> portals_p2\n> ! setup_ruletest\n> ! run_ruletest\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 21:17:48 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules: regression tests" } ]
[ { "msg_contents": "Hi,\n\n here's the second patch for the rule system. It fixes the\n backend crashes that occur when using views/rules in the same\n session where they are created. The bug was that the new\n actions parsetrees and event qualifications, added to the\n relations rd_rules locks, where not copied to the cache\n memory context.\n\n In addition it prepares tcop/postgres.c to handle a zero\n length rewritten list returned by QueryRewrite() correctly\n (due to instead nothing).\n\n Next patch will allow instead nothing on select rules to\n return no tuples at all instead of one with all NULL fields\n (as it is 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\ndiff -cr backend.orig/rewrite/rewriteSupport.c backend/rewrite/rewriteSupport.c\n*** backend.orig/rewrite/rewriteSupport.c\tWed Aug 19 10:36:15 1998\n--- backend/rewrite/rewriteSupport.c\tWed Aug 19 10:55:03 1998\n***************\n*** 158,163 ****\n--- 158,167 ----\n \t */\n \toldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt);\n \tthisRule = (RewriteRule *) palloc(sizeof(RewriteRule));\n+ \tif (qual != NULL)\n+ \t\tqual = copyObject(qual);\n+ \tif (actions != NIL)\n+ \t\tactions = copyObject(actions);\n \tMemoryContextSwitchTo(oldcxt);\n \n \tthisRule->ruleId = ruleId;\ndiff -cr backend.orig/tcop/postgres.c backend/tcop/postgres.c\n*** backend.orig/tcop/postgres.c\tFri Aug 7 11:05:41 1998\n--- backend/tcop/postgres.c\tWed Aug 19 10:51:50 1998\n***************\n*** 451,474 ****\n \t\t/* rewrite queries (retrieve, append, delete, replace) */\n \t\trewritten = QueryRewrite(querytree);\n \n! \t\t/*\n! \t\t * Rewrite the UNIONS.\n! \t\t */\n! \t\tforeach(rewritten_list, rewritten)\n! \t\t{\n! \t\t\tQuery\t *qry = (Query *) lfirst(rewritten_list);\n! \n! \t\t\tunion_result = NIL;\n! \t\t\tforeach(union_list, qry->unionClause)\n! \t\t\t\tunion_result = nconc(union_result, QueryRewrite((Query *) lfirst(union_list)));\n! \t\t\tqry->unionClause = union_result;\n! \t\t}\n! \n! \t\tif (rewritten != NULL)\n \t\t{\n \t\t\tint\t\t\tlen,\n \t\t\t\t\t\tk;\n \n \t\t\tlen = length(rewritten);\n \t\t\tif (len == 1)\n \t\t\t\tnew_list->qtrees[j++] = (Query *) lfirst(rewritten);\n--- 451,474 ----\n \t\t/* rewrite queries (retrieve, append, delete, replace) */\n \t\trewritten = QueryRewrite(querytree);\n \n! \t\tif (rewritten != NIL)\n \t\t{\n \t\t\tint\t\t\tlen,\n \t\t\t\t\t\tk;\n \n+ \t\t\t/*\n+ \t\t\t * Rewrite the UNIONS.\n+ \t\t\t */\n+ \t\t\tforeach(rewritten_list, rewritten)\n+ \t\t\t{\n+ \t\t\t\tQuery\t *qry = (Query *) lfirst(rewritten_list);\n+ \n+ \t\t\t\tunion_result = NIL;\n+ \t\t\t\tforeach(union_list, qry->unionClause)\n+ \t\t\t\t\tunion_result = nconc(union_result, QueryRewrite((Query *) lfirst(union_list)));\n+ \t\t\t\tqry->unionClause = union_result;\n+ \t\t\t}\n+ \n \t\t\tlen = length(rewritten);\n \t\t\tif (len == 1)\n \t\t\t\tnew_list->qtrees[j++] = (Query *) lfirst(rewritten);\n***************\n*** 487,492 ****\n--- 487,500 ----\n \t\t}\n \t}\n \n+ \t/* ----------\n+ \t * Due to rewriting, the new list could also have been\n+ \t * shrunk (do instead nothing). Forget obsolete queries\n+ \t * at the end.\n+ \t * ----------\n+ \t */\n+ \tnew_list->len = j;\n+ \n \t/* we're done with the original lists, free it */\n \tfree(querytree_list->qtrees);\n \tfree(querytree_list);\n***************\n*** 530,536 ****\n \t\t\t\telog(NOTICE, \"(transaction aborted): %s\",\n \t\t\t\t\t \"queries ignored until END\");\n \n! \t\t\t\t*queryListP = (QueryTreeList *) NULL;\n \t\t\t\treturn (List *) NULL;\n \t\t\t}\n \n--- 538,547 ----\n \t\t\t\telog(NOTICE, \"(transaction aborted): %s\",\n \t\t\t\t\t \"queries ignored until END\");\n \n! \t\t\t\tfree(querytree_list->qtrees);\n! \t\t\t\tfree(querytree_list);\n! \t\t\t\tif (queryListP)\n! \t\t\t\t\t*queryListP = (QueryTreeList *) NULL;\n \t\t\t\treturn (List *) NULL;\n \t\t\t}\n \n***************\n*** 571,576 ****\n--- 582,597 ----\n \t\telse\n \t\t\tplan_list = lappend(plan_list, NULL);\n #endif\n+ \t}\n+ \n+ \t/* ----------\n+ \t * Check if the rewriting had thrown away anything\n+ \t * ----------\n+ \t */\n+ \tif (querytree_list->len == 0) {\n+ \t\tfree(querytree_list->qtrees);\n+ \t\tfree(querytree_list);\n+ \t\tquerytree_list = NULL;\n \t}\n \n \tif (queryListP)\n", "msg_date": "Wed, 19 Aug 1998 12:43:28 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": true, "msg_subject": "Rules: 2nd patch" }, { "msg_contents": "> Next patch will allow instead nothing on select rules to\n> return no tuples at all instead of one with all NULL fields\n> (as it is now).\n\n Ooops - though it would be so easy - but it isn't. Instead\n rules for select are a damned thing. Select rules are applied\n totally different from the others, since the parsetree cannot\n get splitted. Anything I tried resulted in something that\n doesn't work at all, except for unqualified instead nothing\n rule (but what is a write-only table good for? :-). So up to\n now they make no sense for me. Qualified instead nothing is a\n topic for a view, with the handmade negated qualification.\n\n Next thing will be the UPDATE NEW stuff then.\n\n Another rule related topic though:\n As the rule system becomes more and more useful now, wouldn't\n it be nice to enable them for users? I think rule\n creation/deletion must be restricted to the table owner (or\n superuser). And anything the rule does has to be checked\n against the permissions of the rule owner.\n\n Next rule related topic:\n My new function get_ruledef(name) has now a little sister.\n Her name is get_viewdef(name) and when called with a relation\n name she's telling either 'Not a view' or the complete SELECT\n statement, that builds the view. I've defined them in the\n regression database and setup a view xx_view. Now I can do\n\nregression=> select * from xx_view;\nviewname|definition\n--------+--------------------------------------------------------------------------------------------------------------------------------------------------\npg_user |SELECT usename, usesysid, usecreatedb, usetrace, usesuper, usecatupd, '********'::text AS passwd, valuntil FROM pg_shadow;\nstreet |SELECT r.name, r.thepath, c.cname FROM road r, real_city c WHERE c.outline ## r.thepath;\niexit |SELECT ih.name, ih.thepath, interpt_pp(ih.thepath, r.thepath) AS exit FROM ihighway ih, ramp r WHERE ih.thepath ## r.thepath;\ntoyemp |SELECT name, age, location, '12'::int4 * salary AS annualsal FROM emp;\nrtest_v1|SELECT a, b FROM rtest_t1;\nxx_view |SELECT relname AS viewname, get_viewdef(relname) AS definition FROM pg_class WHERE (relhasrules) AND (get_viewdef(relname) <> 'Not a view'::text);\n(6 rows)\n\nregression=>\n\n (Sorry for the long lines)\n\n Except for the explicit type casting on all constants, they\n are exactly the definitions of the original views. And the\n postgres parser accepts that as input to produce bit by bit\n the same rules/views again.\n\n I tought them how to handle aggregates and group by and will\n tell them about isnull soon.\n\n If nobody votes against, I would like to make them builtins\n as pg_get_ruledef() and pg_get_viewdef() and then setup the\n appropriate views (pg_rule and pg_view) in template1 by\n initdb like we do it with pg_user. It cannot break anything,\n except that a rule action the two functions cannot handle\n will make the new views unusable. But it would be a really\n powerful possibility for pg_dump or just useful to see what\n that damn event qual and parsetree's in pg_rewrite came from.\n\n Comments?\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, 19 Aug 1998 19:13:27 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": true, "msg_subject": "Rules and views (was Re: [HACKERS] Rules: 2nd patch)" }, { "msg_contents": "> If nobody votes against, I would like to make them builtins\n> as pg_get_ruledef() and pg_get_viewdef() and then setup the\n> appropriate views (pg_rule and pg_view) in template1 by\n> initdb like we do it with pg_user. It cannot break anything,\n> except that a rule action the two functions cannot handle\n> will make the new views unusable. But it would be a really\n> powerful possibility for pg_dump or just useful to see what\n> that damn event qual and parsetree's in pg_rewrite came from.\n> \n> Comments?\n> \n\nGo, Jan, go.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 19 Aug 1998 13:56:00 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Rules and views (was Re: [HACKERS] Rules: 2nd patch)" }, { "msg_contents": ">\n> > If nobody votes against, I would like to make them builtins\n> > as pg_get_ruledef() and pg_get_viewdef() and then setup the\n> > appropriate views (pg_rule and pg_view) in template1 by\n> > initdb like we do it with pg_user. It cannot break anything,\n> > except that a rule action the two functions cannot handle\n> > will make the new views unusable. But it would be a really\n> > powerful possibility for pg_dump or just useful to see what\n> > that damn event qual and parsetree's in pg_rewrite came from.\n> >\n> > Comments?\n> >\n>\n> Go, Jan, go.\n\n You'll get it after the currently running clean compile of\n the initial source tree (with the patch applied) and the rest\n went through.\n\n>\n> --\n> Bruce Momjian | 830 Blythe Avenue\n\n For the rule permissions:\n\n I think it would be O.K. to check the rule actions against\n the owner of their event relation. And the creator/destructor\n must be the owner of it or a superuser. This way, a regular\n user can do with rules anything he want's on the tables he\n has access to and as soon as he grant's access to his tables\n the granted user can use them as he would including the rule\n actions.\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, 19 Aug 1998 21:54:32 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": true, "msg_subject": "Re: Rules and views (was Re: [HACKERS] Rules: 2nd patch)" }, { "msg_contents": "> You'll get it after the currently running clean compile of\n> the initial source tree (with the patch applied) and the rest\n> went through.\n\n Here they are.\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\ndiff -crN src.orig/backend/utils/adt/Makefile src/backend/utils/adt/Makefile\n*** src.orig/backend/utils/adt/Makefile\tWed Aug 19 10:36:19 1998\n--- src/backend/utils/adt/Makefile\tWed Aug 19 20:21:30 1998\n***************\n*** 22,29 ****\n \tgeo_ops.o geo_selfuncs.o int.o int8.o like.o \\\n \tmisc.o nabstime.o name.o not_in.o numutils.o \\\n \toid.o oracle_compat.o \\\n! \tregexp.o regproc.o selfuncs.o sets.o tid.o timestamp.o \\\n! \tvarchar.o varlena.o version.o\n \n all: SUBSYS.o\n \n--- 22,29 ----\n \tgeo_ops.o geo_selfuncs.o int.o int8.o like.o \\\n \tmisc.o nabstime.o name.o not_in.o numutils.o \\\n \toid.o oracle_compat.o \\\n! \tregexp.o regproc.o ruleutils.o selfuncs.o sets.o \\\n! \ttid.o timestamp.o varchar.o varlena.o version.o\n \n all: SUBSYS.o\n \ndiff -crN src.orig/backend/utils/adt/ruleutils.c src/backend/utils/adt/ruleutils.c\n*** src.orig/backend/utils/adt/ruleutils.c\tThu Jan 1 01:00:00 1970\n--- src/backend/utils/adt/ruleutils.c\tWed Aug 19 20:20:29 1998\n***************\n*** 0 ****\n--- 1,1376 ----\n+ /**********************************************************************\n+ * get_ruledef.c\t- Function to get a rules definition text\n+ *\t\t\t out of it's tuple\n+ *\n+ * IDENTIFICATION\n+ * $Header: $\n+ *\n+ * This software is copyrighted by Jan Wieck - Hamburg.\n+ *\n+ * The author hereby grants permission to use, copy, modify,\n+ * distribute, and license this software and its documentation\n+ * for any purpose, provided that existing copyright notices are\n+ * retained in all copies and that this notice is included\n+ * verbatim in any distributions. No written agreement, license,\n+ * or royalty fee is required for any of the authorized uses.\n+ * Modifications to this software may be copyrighted by their\n+ * author and need not follow the licensing terms described\n+ * here, provided that the new terms are clearly indicated on\n+ * the first page of each file where they apply.\n+ *\n+ * IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTORS BE LIABLE TO ANY\n+ * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR\n+ * CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS\n+ * SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN\n+ * IF THE AUTHOR HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH\n+ * DAMAGE.\n+ *\n+ * THE AUTHOR AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY\n+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\n+ * PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON\n+ * AN \"AS IS\" BASIS, AND THE AUTHOR AND DISTRIBUTORS HAVE NO\n+ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,\n+ * ENHANCEMENTS, OR MODIFICATIONS.\n+ *\n+ **********************************************************************/\n+ \n+ #include <stdio.h>\n+ #include <stdlib.h>\n+ #include <stdarg.h>\n+ #include <unistd.h>\n+ #include <fcntl.h>\n+ #include <string.h>\n+ \n+ #include \"executor/spi.h\"\n+ #include \"commands/trigger.h\"\n+ #include \"utils/elog.h\"\n+ #include \"utils/builtins.h\"\n+ #include \"nodes/nodes.h\"\n+ #include \"optimizer/clauses.h\"\n+ #include \"utils/syscache.h\"\n+ #include \"utils/lsyscache.h\"\n+ #include \"catalog/pg_class.h\"\n+ #include \"catalog/pg_type.h\"\n+ #include \"fmgr.h\"\n+ \n+ \n+ /* ----------\n+ * Global data\n+ * ----------\n+ */\n+ static char *rulename;\n+ static void *plan_getrule = NULL;\n+ static char *query_getrule = \"SELECT * FROM pg_rewrite WHERE rulename = $1\";\n+ static void *plan_getview = NULL;\n+ static char *query_getview = \"SELECT * FROM pg_rewrite WHERE rulename = $1 or rulename = $2\";\n+ \n+ \n+ /* ----------\n+ * Global functions\n+ * ----------\n+ */\n+ text *pg_get_ruledef(NameData *rname);\n+ text *pg_get_viewdef(NameData *rname);\n+ \n+ \n+ /* ----------\n+ * Local functions\n+ * ----------\n+ */\n+ static char *make_ruledef(HeapTuple ruletup, TupleDesc rulettc);\n+ static char *make_viewdef(HeapTuple ruletup, TupleDesc rulettc);\n+ static char *get_query_def(Query *query);\n+ static char *get_select_query_def(Query *query);\n+ static char *get_insert_query_def(Query *query);\n+ static char *get_update_query_def(Query *query);\n+ static char *get_delete_query_def(Query *query);\n+ static char *get_rule_expr(List *rtable, int rt_index, Node *node, bool varprefix);\n+ static char *get_func_expr(List *rtable, int rt_index, Expr *expr, bool varprefix);\n+ static char *get_tle_expr(List *rtable, int rt_index, TargetEntry *tle, bool varprefix);\n+ static char *get_const_expr(Const *constval);\n+ static char *get_relation_name(Oid relid);\n+ static char *get_attribute_name(Oid relid, int2 attnum);\n+ static bool check_if_rte_used(int rt_index, Node *node, int sup);\n+ \n+ \n+ /* ----------\n+ * get_ruledef\t\t\t- Do it all and return a text\n+ *\t\t\t\t that could be used as a statement\n+ *\t\t\t\t to recreate the rule\n+ * ----------\n+ */\n+ text *\n+ pg_get_ruledef(NameData *rname)\n+ {\n+ text\t\t*ruledef;\n+ Datum\t\targs[1];\n+ char\t\tnulls[2];\n+ int\t\t\tspirc;\n+ HeapTuple\t\truletup;\n+ TupleDesc\t\trulettc;\n+ char\t\t*tmp;\n+ int\t\t\tlen;\n+ \n+ /* ----------\n+ * We need the rules name somewhere deep down\n+ * ----------\n+ */\n+ rulename = nameout(rname);\n+ \n+ /* ----------\n+ * Connect to SPI manager\n+ * ----------\n+ */\n+ if (SPI_connect() != SPI_OK_CONNECT)\n+ elog(ERROR, \"get_ruledef: cannot connect to SPI manager\");\n+ \n+ /* ----------\n+ * On the first call prepare the plan to lookup pg_proc.\n+ * We read pg_proc over the SPI manager instead of using\n+ * the syscache to be checked for read access on pg_proc.\n+ * ----------\n+ */\n+ if (plan_getrule == NULL) {\n+ \tOid\targtypes[1];\n+ \tvoid\t*plan;\n+ \n+ \targtypes[0] = NAMEOID;\n+ plan = SPI_prepare(query_getrule, 1, argtypes);\n+ \tif (plan == NULL)\n+ \t elog(ERROR, \"SPI_prepare() failed for \\\"%s\\\"\", query_getrule);\n+ \tplan_getrule = SPI_saveplan(plan);\n+ }\n+ \n+ /* ----------\n+ * Get the pg_rewrite tuple for this rule\n+ * ----------\n+ */\n+ args[0] = PointerGetDatum(rulename);\n+ nulls[0] = (rulename == NULL) ? 'n' : ' ';\n+ nulls[1] = '\\0';\n+ spirc = SPI_execp(plan_getrule, args, nulls, 1);\n+ if (spirc != SPI_OK_SELECT) {\n+ elog(ERROR, \"failed to get pg_rewrite tuple for %s\", rulename);\n+ }\n+ if (SPI_processed != 1) {\n+ \tif (SPI_finish() != SPI_OK_FINISH)\n+ \t elog(ERROR, \"get_ruledef: SPI_finish() failed\");\n+ ruledef = SPI_palloc(VARHDRSZ + 1);\n+ \tVARSIZE(ruledef) = VARHDRSZ + 1;\n+ \tVARDATA(ruledef)[0] = '-';\n+ \treturn ruledef;\n+ }\n+ \n+ ruletup = SPI_tuptable->vals[0];\n+ rulettc = SPI_tuptable->tupdesc;\n+ \n+ /* ----------\n+ * Get the rules definition and put it into executors memory\n+ * ----------\n+ */\n+ tmp = make_ruledef(ruletup, rulettc);\n+ len = strlen(tmp) + VARHDRSZ;\n+ ruledef = SPI_palloc(len);\n+ VARSIZE(ruledef) = len;\n+ memcpy(VARDATA(ruledef), tmp, len - VARHDRSZ);\n+ \n+ /* ----------\n+ * Disconnect from SPI manager\n+ * ----------\n+ */\n+ if (SPI_finish() != SPI_OK_FINISH)\n+ elog(ERROR, \"get_ruledef: SPI_finish() failed\");\n+ \n+ /* ----------\n+ * Easy - isn't it?\n+ * ----------\n+ */\n+ return ruledef;\n+ }\n+ \n+ \n+ /* ----------\n+ * get_viewdef\t\t\t- Mainly the same thing, but we\n+ *\t\t\t\t only return the SELECT part of a view\n+ * ----------\n+ */\n+ text *\n+ pg_get_viewdef(NameData *rname)\n+ {\n+ text\t\t*ruledef;\n+ Datum\t\targs[2];\n+ char\t\tnulls[3];\n+ int\t\t\tspirc;\n+ HeapTuple\t\truletup;\n+ TupleDesc\t\trulettc;\n+ char\t\t*tmp;\n+ int\t\t\tlen;\n+ char\t\tname1[NAMEDATALEN + 5];\n+ char\t\tname2[NAMEDATALEN + 5];\n+ \n+ /* ----------\n+ * We need the rules name somewhere deep down\n+ * ----------\n+ */\n+ rulename = nameout(rname);\n+ \n+ /* ----------\n+ * Connect to SPI manager\n+ * ----------\n+ */\n+ if (SPI_connect() != SPI_OK_CONNECT)\n+ elog(ERROR, \"get_viewdef: cannot connect to SPI manager\");\n+ \n+ /* ----------\n+ * On the first call prepare the plan to lookup pg_proc.\n+ * We read pg_proc over the SPI manager instead of using\n+ * the syscache to be checked for read access on pg_proc.\n+ * ----------\n+ */\n+ if (plan_getview == NULL) {\n+ \tOid\targtypes[2];\n+ \tvoid\t*plan;\n+ \n+ \targtypes[0] = NAMEOID;\n+ \targtypes[1] = NAMEOID;\n+ plan = SPI_prepare(query_getview, 2, argtypes);\n+ \tif (plan == NULL)\n+ \t elog(ERROR, \"SPI_prepare() failed for \\\"%s\\\"\", query_getview);\n+ \tplan_getview = SPI_saveplan(plan);\n+ }\n+ \n+ /* ----------\n+ * Get the pg_rewrite tuple for this rule\n+ * ----------\n+ */\n+ sprintf(name1, \"_RET%s\", rulename);\n+ sprintf(name2, \"_ret%s\", rulename);\n+ args[0] = PointerGetDatum(name1);\n+ args[1] = PointerGetDatum(name2);\n+ nulls[0] = ' ';\n+ nulls[1] = ' ';\n+ nulls[2] = '\\0';\n+ spirc = SPI_execp(plan_getview, args, nulls, 1);\n+ if (spirc != SPI_OK_SELECT) {\n+ elog(ERROR, \"failed to get pg_rewrite tuple for view %s\", rulename);\n+ }\n+ if (SPI_processed != 1) {\n+ tmp = \"Not a view\";\n+ } else {\n+ \t/* ----------\n+ \t * Get the rules definition and put it into executors memory\n+ \t * ----------\n+ \t */\n+ \truletup = SPI_tuptable->vals[0];\n+ \trulettc = SPI_tuptable->tupdesc;\n+ \ttmp = make_viewdef(ruletup, rulettc);\n+ }\n+ len = strlen(tmp) + VARHDRSZ;\n+ ruledef = SPI_palloc(len);\n+ VARSIZE(ruledef) = len;\n+ memcpy(VARDATA(ruledef), tmp, len - VARHDRSZ);\n+ \n+ /* ----------\n+ * Disconnect from SPI manager\n+ * ----------\n+ */\n+ if (SPI_finish() != SPI_OK_FINISH)\n+ elog(ERROR, \"get_viewdef: SPI_finish() failed\");\n+ \n+ /* ----------\n+ * Easy - isn't it?\n+ * ----------\n+ */\n+ return ruledef;\n+ }\n+ \n+ \n+ /* ----------\n+ * make_ruledef\t\t\t- reconstruct the CREATE RULE command\n+ *\t\t\t\t for a given pg_rewrite tuple\n+ * ----------\n+ */\n+ static char *\n+ make_ruledef(HeapTuple ruletup, TupleDesc rulettc)\n+ {\n+ char\t*buf;\n+ char\tev_type;\n+ Oid\t\tev_class;\n+ int2\tev_attr;\n+ bool\tis_instead;\n+ char\t*ev_qual;\n+ char\t*ev_action;\n+ List\t*actions = NIL;\n+ int\t\tfno;\n+ bool\tisnull;\n+ \n+ /* ----------\n+ * Allocate space for the returned rule definition text\n+ * ----------\n+ */\n+ buf = palloc(8192);\n+ \n+ /* ----------\n+ * Get the attribute values from the rules tuple\n+ * ----------\n+ */\n+ fno = SPI_fnumber(rulettc, \"ev_type\");\n+ ev_type = (char)SPI_getbinval(ruletup, rulettc, fno, &isnull);\n+ \n+ fno = SPI_fnumber(rulettc, \"ev_class\");\n+ ev_class = (Oid)SPI_getbinval(ruletup, rulettc, fno, &isnull);\n+ \n+ fno = SPI_fnumber(rulettc, \"ev_attr\");\n+ ev_attr = (int2)SPI_getbinval(ruletup, rulettc, fno, &isnull);\n+ \n+ fno = SPI_fnumber(rulettc, \"is_instead\");\n+ is_instead = (bool)SPI_getbinval(ruletup, rulettc, fno, &isnull);\n+ \n+ fno = SPI_fnumber(rulettc, \"ev_qual\");\n+ ev_qual = SPI_getvalue(ruletup, rulettc, fno);\n+ if (isnull) ev_qual = NULL;\n+ \n+ fno = SPI_fnumber(rulettc, \"ev_action\");\n+ ev_action = SPI_getvalue(ruletup, rulettc, fno);\n+ if (isnull) ev_action = NULL;\n+ if (ev_action != NULL) {\n+ actions = (List *)stringToNode(ev_action);\n+ }\n+ \n+ /* ----------\n+ * Build the rules definition text\n+ * ----------\n+ */\n+ strcpy(buf, \"CREATE RULE \");\n+ \n+ /* The rule name */\n+ strcat(buf, rulename);\n+ strcat(buf, \" AS ON \");\n+ \n+ /* The event the rule is fired for */\n+ switch (ev_type) {\n+ \tcase '1':\tstrcat(buf, \"SELECT TO \");\n+ \t\t\tbreak;\n+ \n+ \tcase '2':\tstrcat(buf, \"UPDATE TO \");\n+ \t\t\tbreak;\n+ \n+ \tcase '3':\tstrcat(buf, \"INSERT TO \");\n+ \t\t\tbreak;\n+ \n+ \tcase '4':\tstrcat(buf, \"DELETE TO \");\n+ \t\t\tbreak;\n+ \n+ default:\t\n+ \t\telog(ERROR, \"get_ruledef: rule %s has unsupported event type %d\", \n+ \t\t\t\trulename, ev_type);\n+ \t\tbreak;\n+ }\n+ \n+ /* The relation the rule is fired on */\n+ strcat(buf, get_relation_name(ev_class));\n+ if (ev_attr > 0) {\n+ strcat(buf, \".\");\n+ \tstrcat(buf, get_attribute_name(ev_class, ev_attr));\n+ }\n+ \n+ /* If the rule has an event qualification, add it */\n+ if (ev_qual == NULL) ev_qual = \"\";\n+ if (strlen(ev_qual) > 0) {\n+ Node\t*qual;\n+ \tQuery\t*query;\n+ \n+ \tqual = stringToNode(ev_qual);\n+ \tquery = (Query *)lfirst(actions);\n+ \n+ strcat(buf, \" WHERE \");\n+ \tstrcat(buf, get_rule_expr(query->rtable, 0, qual, TRUE));\n+ }\n+ \n+ strcat(buf, \" DO \");\n+ \n+ /* The INSTEAD keyword (if so) */\n+ if (is_instead)\n+ \tstrcat(buf, \"INSTEAD \");\n+ \n+ /* Finally the rules actions */\n+ if (length(actions) > 1) {\n+ \tList\t*action;\n+ \tQuery\t*query;\n+ \n+ \tstrcat(buf, \"(\");\n+ \tforeach (action, actions) {\n+ \t query = (Query *)lfirst(action);\n+ \t strcat(buf, get_query_def(query));\n+ \t strcat(buf, \"; \");\n+ \t}\n+ \tstrcat(buf, \");\");\n+ } else {\n+ \tif (length(actions) == 0) {\n+ \t strcat(buf, \"NOTHING;\");\n+ \t} else {\n+ \t Query\t*query;\n+ \n+ \t query = (Query *)lfirst(actions);\n+ \t strcat(buf, get_query_def(query));\n+ \t strcat(buf, \";\");\n+ \t}\n+ }\n+ \n+ /* ----------\n+ * That's it\n+ * ----------\n+ */\n+ return buf;\n+ }\n+ \n+ \n+ /* ----------\n+ * make_viewdef\t\t\t- reconstruct the SELECT part of a\n+ *\t\t\t\t view rewrite rule\n+ * ----------\n+ */\n+ static char *\n+ make_viewdef(HeapTuple ruletup, TupleDesc rulettc)\n+ {\n+ char\tbuf[8192];\n+ Query\t*query;\n+ char\tev_type;\n+ Oid\t\tev_class;\n+ int2\tev_attr;\n+ bool\tis_instead;\n+ char\t*ev_qual;\n+ char\t*ev_action;\n+ List\t*actions = NIL;\n+ int\t\tfno;\n+ bool\tisnull;\n+ \n+ /* ----------\n+ * Get the attribute values from the rules tuple\n+ * ----------\n+ */\n+ fno = SPI_fnumber(rulettc, \"ev_type\");\n+ ev_type = (char)SPI_getbinval(ruletup, rulettc, fno, &isnull);\n+ \n+ fno = SPI_fnumber(rulettc, \"ev_class\");\n+ ev_class = (Oid)SPI_getbinval(ruletup, rulettc, fno, &isnull);\n+ \n+ fno = SPI_fnumber(rulettc, \"ev_attr\");\n+ ev_attr = (int2)SPI_getbinval(ruletup, rulettc, fno, &isnull);\n+ \n+ fno = SPI_fnumber(rulettc, \"is_instead\");\n+ is_instead = (bool)SPI_getbinval(ruletup, rulettc, fno, &isnull);\n+ \n+ fno = SPI_fnumber(rulettc, \"ev_qual\");\n+ ev_qual = SPI_getvalue(ruletup, rulettc, fno);\n+ if (isnull) ev_qual = \"\";\n+ \n+ fno = SPI_fnumber(rulettc, \"ev_action\");\n+ ev_action = SPI_getvalue(ruletup, rulettc, fno);\n+ if (isnull) ev_action = NULL;\n+ if (ev_action != NULL) {\n+ actions = (List *)stringToNode(ev_action);\n+ }\n+ \n+ if (length(actions) != 1)\n+ \treturn \"Not a view\";\n+ \n+ query = (Query *)lfirst(actions);\n+ \n+ if (ev_type != '1' || ev_attr >= 0 || !is_instead || strcmp(ev_qual, \"\"))\n+ return \"Not a view\";\n+ \n+ strcpy(buf, get_select_query_def(query));\n+ strcat(buf, \";\");\n+ \n+ /* ----------\n+ * That's it\n+ * ----------\n+ */\n+ return pstrdup(buf);\n+ }\n+ \n+ \n+ /* ----------\n+ * get_query_def\t\t\t- Parse back one action from\n+ *\t\t\t\t\t the parsetree in the actions\n+ *\t\t\t\t\t list\n+ * ----------\n+ */\n+ static char *\n+ get_query_def(Query *query)\n+ {\n+ switch (query->commandType) {\n+ \tcase CMD_SELECT:\n+ \t return get_select_query_def(query);\n+ \t break;\n+ \t \n+ \tcase CMD_UPDATE:\n+ \t return get_update_query_def(query);\n+ \t break;\n+ \t \n+ \tcase CMD_INSERT:\n+ \t return get_insert_query_def(query);\n+ \t break;\n+ \t \n+ \tcase CMD_DELETE:\n+ \t return get_delete_query_def(query);\n+ \t break;\n+ \t \n+ case CMD_NOTHING:\n+ \t return \"NOTHING\";\n+ \t break;\n+ \n+ \tdefault:\n+ \t elog(ERROR, \"get_ruledef of %s: query command type %d not implemented yet\",\n+ \t \t\trulename, query->commandType);\n+ \t break;\n+ }\n+ \n+ return NULL;\n+ }\n+ \n+ \n+ /* ----------\n+ * get_select_query_def\t\t\t- Parse back a SELECT parsetree\n+ * ----------\n+ */\n+ static char *\n+ get_select_query_def(Query *query)\n+ {\n+ char\t\tbuf[8192];\n+ char\t\t*sep;\n+ TargetEntry\t\t*tle;\n+ RangeTblEntry\t*rte;\n+ bool\t\t*rt_used;\n+ int\t\t\trt_length;\n+ int\t\t\trt_numused = 0;\n+ bool\t\trt_constonly = TRUE;\n+ int\t\t\ti;\n+ List\t\t*l;\n+ \n+ /* ----------\n+ * First we need need to know which and how many of the\n+ * range table entries in the query are used in the target list\n+ * or queries qualification\n+ * ----------\n+ */\n+ rt_length = length(query->rtable);\n+ rt_used = palloc(sizeof(bool) * rt_length);\n+ for (i = 0; i < rt_length; i++) {\n+ if (check_if_rte_used(i + 1, (Node *)(query->targetList), 0)) {\n+ \t rt_used[i] = TRUE;\n+ \t rt_numused++;\n+ \t} else {\n+ \t if (check_if_rte_used(i + 1, (Node *)(query->qual), 0)) {\n+ \t rt_used[i] = TRUE;\n+ \t\trt_numused++;\n+ \t } else {\n+ \t rt_used[i] = FALSE;\n+ \t }\n+ \t}\n+ }\n+ \n+ /* ----------\n+ * Now check if any of the used rangetable entries is different\n+ * from *NEW* and *CURRENT*. If so we must omit the FROM clause\n+ * later.\n+ * ----------\n+ */\n+ i = 0;\n+ foreach (l, query->rtable) {\n+ \tif (!rt_used[i++])\n+ \t continue;\n+ \n+ rte = (RangeTblEntry *)lfirst(l);\n+ \tif (!strcmp(rte->refname, \"*NEW*\"))\n+ \t continue;\n+ \tif (!strcmp(rte->refname, \"*CURRENT*\"))\n+ \t continue;\n+ \n+ rt_constonly = FALSE;\n+ \tbreak;\n+ }\n+ \n+ /* ----------\n+ * Build up the query string - first we say SELECT\n+ * ----------\n+ */\n+ strcpy(buf, \"SELECT\");\n+ \n+ /* Then we tell what to select (the targetlist) */\n+ sep = \" \";\n+ foreach (l, query->targetList) {\n+ \tbool\t\ttell_as = FALSE;\n+ \n+ \ttle = (TargetEntry *)lfirst(l);\n+ \tstrcat(buf, sep);\n+ \tsep = \", \";\n+ \n+ \tstrcat(buf, get_tle_expr(query->rtable, 0, tle, (rt_numused > 1)));\n+ \n+ \t/* Check if we must say AS ... */\n+ \tif (nodeTag(tle->expr) != T_Var) {\n+ \t\ttell_as = strcmp(tle->resdom->resname, \"?column?\");\n+ \t} else {\n+ \t\tVar\t\t*var = (Var *)(tle->expr);\n+ \t\tchar\t\t*attname;\n+ \n+ \t\trte = (RangeTblEntry *)nth(var->varno - 1, query->rtable);\n+ \t\tattname = get_attribute_name(rte->relid, var->varattno);\n+ \t\tif (strcmp(attname, tle->resdom->resname))\n+ \t\t\ttell_as = TRUE;\n+ \t}\n+ \n+ \t/* and do if so */\n+ \tif (tell_as) {\n+ \t\tstrcat(buf, \" AS \");\n+ \t\tstrcat(buf, tle->resdom->resname);\n+ \t}\n+ }\n+ \n+ /* If we need other tables that *NEW* or *CURRENT* add the FROM clause */\n+ if (!rt_constonly && rt_numused > 0) {\n+ \tstrcat(buf, \" FROM\");\n+ \n+ \ti = 0;\n+ \tsep = \" \";\n+ \tforeach (l, query->rtable) {\n+ \t if (rt_used[i++]) {\n+ \t\trte = (RangeTblEntry *)lfirst(l);\n+ \n+ \t\tif (!strcmp(rte->refname, \"*NEW*\"))\n+ \t\t continue;\n+ \n+ \t\tif (!strcmp(rte->refname, \"*CURRENT*\"))\n+ \t\t continue;\n+ \n+ \t\tstrcat(buf, sep); sep = \", \";\n+ \t\tstrcat(buf, rte->relname);\n+ \t\tif (rt_numused > 1) {\n+ \t\t strcat(buf, \" \");\n+ \t\t strcat(buf, rte->refname);\n+ \t\t}\n+ \t }\n+ \t}\n+ }\n+ \n+ /* Add the WHERE clause if given */\n+ if (query->qual != NULL) {\n+ strcat(buf, \" WHERE \");\n+ \tstrcat(buf, get_rule_expr(query->rtable, 0, query->qual, (rt_numused > 1)));\n+ }\n+ \n+ /* Add the GROUP BY CLAUSE */\n+ if (query->groupClause != NULL) {\n+ strcat(buf, \" GROUP BY \");\n+ \tsep = \"\";\n+ \tforeach (l, query->groupClause) {\n+ \t strcat(buf, sep); sep = \", \";\n+ \t strcat(buf, get_rule_expr(query->rtable, 0, lfirst(l), (rt_numused > 1)));\n+ \t}\n+ }\n+ \n+ /* ----------\n+ * Copy the query string into allocated space and return it\n+ * ----------\n+ */\n+ return pstrdup(buf);\n+ }\n+ \n+ \n+ /* ----------\n+ * get_insert_query_def\t\t\t- Parse back an INSERT parsetree\n+ * ----------\n+ */\n+ static char *\n+ get_insert_query_def(Query *query)\n+ {\n+ char\t\tbuf[8192];\n+ char\t\t*sep;\n+ TargetEntry\t\t*tle;\n+ RangeTblEntry\t*rte;\n+ bool\t\t*rt_used;\n+ int\t\t\trt_length;\n+ int\t\t\trt_numused = 0;\n+ bool\t\trt_constonly = TRUE;\n+ int\t\t\ti;\n+ List\t\t*l;\n+ \n+ /* ----------\n+ * We need to know if other tables than *NEW* or *CURRENT*\n+ * are used in the query. If not, it's an INSERT ... VALUES,\n+ * otherwise an INSERT ... SELECT.\n+ * ----------\n+ */\n+ rt_length = length(query->rtable);\n+ rt_used = palloc(sizeof(bool) * rt_length);\n+ for (i = 0; i < rt_length; i++) {\n+ if (check_if_rte_used(i + 1, (Node *)(query->targetList), 0)) {\n+ \t rt_used[i] = TRUE;\n+ \t rt_numused++;\n+ \t} else {\n+ \t if (check_if_rte_used(i + 1, (Node *)(query->qual), 0)) {\n+ \t rt_used[i] = TRUE;\n+ \t\trt_numused++;\n+ \t } else {\n+ \t rt_used[i] = FALSE;\n+ \t }\n+ \t}\n+ }\n+ \n+ i = 0;\n+ foreach (l, query->rtable) {\n+ \tif (!rt_used[i++])\n+ \t continue;\n+ \n+ rte = (RangeTblEntry *)lfirst(l);\n+ \tif (!strcmp(rte->refname, \"*NEW*\"))\n+ \t continue;\n+ \tif (!strcmp(rte->refname, \"*CURRENT*\"))\n+ \t continue;\n+ \n+ rt_constonly = FALSE;\n+ \tbreak;\n+ }\n+ \n+ /* ----------\n+ * Start the query with INSERT INTO relname\n+ * ----------\n+ */\n+ rte = (RangeTblEntry *)nth(query->resultRelation - 1, query->rtable);\n+ strcpy(buf, \"INSERT INTO \");\n+ strcat(buf, rte->relname);\n+ \n+ /* Add the target list */\n+ sep = \" (\";\n+ foreach (l, query->targetList) {\n+ \ttle = (TargetEntry *)lfirst(l);\n+ \n+ strcat(buf, sep); sep = \", \";\n+ \tstrcat(buf, tle->resdom->resname);\n+ }\n+ strcat(buf, \") \");\n+ \n+ /* Add the VALUES or the SELECT */\n+ if (rt_constonly && query->qual == NULL) {\n+ strcat(buf, \"VALUES (\");\n+ \tsep = \"\";\n+ \tforeach (l, query->targetList) {\n+ \t tle = (TargetEntry *)lfirst(l);\n+ \n+ \t strcat(buf, sep); sep = \", \";\n+ \t strcat(buf, get_tle_expr(query->rtable, 0, tle, (rt_numused > 1)));\n+ \t}\n+ \tstrcat(buf, \")\");\n+ } else {\n+ \tstrcat(buf, get_select_query_def(query));\n+ }\n+ \n+ /* ----------\n+ * Copy the query string into allocated space and return it\n+ * ----------\n+ */\n+ return pstrdup(buf);\n+ }\n+ \n+ \n+ /* ----------\n+ * get_update_query_def\t\t\t- Parse back an UPDATE parsetree\n+ * ----------\n+ */\n+ static char *\n+ get_update_query_def(Query *query)\n+ {\n+ char\t\tbuf[8192];\n+ char\t\t*sep;\n+ TargetEntry\t\t*tle;\n+ RangeTblEntry\t*rte;\n+ List\t\t*l;\n+ \n+ /* ----------\n+ * Start the query with UPDATE relname SET\n+ * ----------\n+ */\n+ rte = (RangeTblEntry *)nth(query->resultRelation - 1, query->rtable);\n+ strcpy(buf, \"UPDATE \");\n+ strcat(buf, rte->relname);\n+ strcat(buf, \" SET \");\n+ \n+ /* Add the comma separated list of 'attname = value' */\n+ sep = \"\";\n+ foreach (l, query->targetList) {\n+ \ttle = (TargetEntry *)lfirst(l);\n+ \n+ \tstrcat(buf, sep); sep = \", \";\n+ \tstrcat(buf, tle->resdom->resname);\n+ \tstrcat(buf, \" = \");\n+ \tstrcat(buf, get_tle_expr(query->rtable, query->resultRelation,\n+ \t\t\ttle, TRUE));\n+ }\n+ \n+ /* Finally add a WHERE clause if given */\n+ if (query->qual != NULL) {\n+ strcat(buf, \" WHERE \");\n+ \tstrcat(buf, get_rule_expr(query->rtable, query->resultRelation,\n+ \t\t\tquery->qual, TRUE));\n+ }\n+ \n+ /* ----------\n+ * Copy the query string into allocated space and return it\n+ * ----------\n+ */\n+ return pstrdup(buf);\n+ }\n+ \n+ \n+ /* ----------\n+ * get_delete_query_def\t\t\t- Parse back a DELETE parsetree\n+ * ----------\n+ */\n+ static char *\n+ get_delete_query_def(Query *query)\n+ {\n+ char\t\tbuf[8192];\n+ RangeTblEntry\t*rte;\n+ \n+ /* ----------\n+ * Start the query with DELETE FROM relname\n+ * ----------\n+ */\n+ rte = (RangeTblEntry *)nth(query->resultRelation - 1, query->rtable);\n+ strcpy(buf, \"DELETE FROM \");\n+ strcat(buf, rte->relname);\n+ \n+ /* Add a WHERE clause if given */\n+ if (query->qual != NULL) {\n+ strcat(buf, \" WHERE \");\n+ \tstrcat(buf, get_rule_expr(query->rtable, 0, query->qual, FALSE));\n+ }\n+ \n+ /* ----------\n+ * Copy the query string into allocated space and return it\n+ * ----------\n+ */\n+ return pstrdup(buf);\n+ }\n+ \n+ \n+ /* ----------\n+ * get_rule_expr\t\t\t- Parse back an expression\n+ * ----------\n+ */\n+ static char *\n+ get_rule_expr(List *rtable, int rt_index, Node *node, bool varprefix)\n+ {\n+ char\tbuf[8192];\n+ \n+ if (node == NULL)\n+ return pstrdup(\"\");\n+ \n+ buf[0] = '\\0';\n+ \n+ /* ----------\n+ * Up to now I don't know if all the node types below\n+ * can really occur in rules actions and qualifications.\n+ * There might be some work left.\n+ * ----------\n+ */\n+ switch(nodeTag(node)) {\n+ \tcase T_TargetEntry:\n+ \t\t{\n+ \t\t\tTargetEntry\t*tle = (TargetEntry *)node;\n+ \n+ \t\t\treturn get_rule_expr(rtable, rt_index,\n+ \t\t\t\t\t(Node *)(tle->expr), varprefix);\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_Aggreg:\n+ \t\t{\n+ \t\t\tAggreg\t\t*agg = (Aggreg *)node;\n+ \n+ \t\t\tstrcat(buf, agg->aggname);\n+ \t\t\tstrcat(buf, \"(\");\n+ \t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n+ \t\t\t\t\t(Node *)(agg->target), varprefix));\n+ \t\t\tstrcat(buf, \")\");\n+ \t\t\treturn pstrdup(buf);\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_GroupClause:\n+ \t\t{\n+ \t\t\tGroupClause\t*grp = (GroupClause *)node;\n+ \n+ \t\t\treturn get_rule_expr(rtable, rt_index,\n+ \t\t\t\t\t(Node *)(grp->entry), varprefix);\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_Expr:\n+ \t\t{\n+ \t\t\tExpr\t\t*expr = (Expr *)node;\n+ \n+ \t\t\t/* ----------\n+ \t\t\t * Expr nodes have to be handled a bit detailed\n+ \t\t\t * ----------\n+ \t\t\t */\n+ \t\t\tswitch (expr->opType) {\n+ \t\t\t case OP_EXPR:\n+ \t\t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n+ \t\t\t\t\t (Node *)get_leftop(expr),\n+ \t\t\t\t\t varprefix));\n+ \t\t\t\tstrcat(buf, \" \");\n+ \t\t\t\tstrcat(buf, get_opname(((Oper *)expr->oper)->opno));\n+ \t\t\t\tstrcat(buf, \" \");\n+ \t\t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n+ \t\t\t\t\t (Node *)get_rightop(expr),\n+ \t\t\t\t\t varprefix));\n+ \t\t\t\treturn pstrdup(buf);\n+ \t\t\t\tbreak;\n+ \n+ \t\t\t case OR_EXPR:\n+ \t\t\t\tstrcat(buf, \"(\");\n+ \t\t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n+ \t\t\t\t\t (Node *)get_leftop(expr),\n+ \t\t\t\t\t varprefix));\n+ \t\t\t\tstrcat(buf, \") OR (\");\n+ \t\t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n+ \t\t\t\t\t (Node *)get_rightop(expr),\n+ \t\t\t\t\t varprefix));\n+ \t\t\t\tstrcat(buf, \")\");\n+ \t\t\t\treturn pstrdup(buf);\n+ \t\t\t\tbreak;\n+ \t\t\t \n+ \t\t\t case AND_EXPR:\n+ \t\t\t\tstrcat(buf, \"(\");\n+ \t\t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n+ \t\t\t\t\t (Node *)get_leftop(expr),\n+ \t\t\t\t\t varprefix));\n+ \t\t\t\tstrcat(buf, \") AND (\");\n+ \t\t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n+ \t\t\t\t\t (Node *)get_rightop(expr),\n+ \t\t\t\t\t varprefix));\n+ \t\t\t\tstrcat(buf, \")\");\n+ \t\t\t\treturn pstrdup(buf);\n+ \t\t\t\tbreak;\n+ \t\t\t \n+ \t\t\t case NOT_EXPR:\n+ \t\t\t\tstrcat(buf, \"NOT (\");\n+ \t\t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n+ \t\t\t\t\t (Node *)get_leftop(expr),\n+ \t\t\t\t\t varprefix));\n+ \t\t\t\tstrcat(buf, \")\");\n+ \t\t\t\treturn pstrdup(buf);\n+ \t\t\t\tbreak;\n+ \n+ \t\t\t case FUNC_EXPR:\n+ \t\t\t return get_func_expr(rtable, rt_index,\n+ \t\t\t\t\t (Expr *)node,\n+ \t\t\t\t\t varprefix);\n+ \t\t\t break;\n+ \n+ \t\t\t default:\n+ \t\t\t\tprintf(\"\\n%s\\n\", nodeToString(node));\n+ \t\t\t\telog(ERROR, \"Expr not yet supported\");\n+ \t\t\t}\t \n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_Var:\n+ \t\t{\n+ \t\t\tVar\t\t*var = (Var *)node;\n+ \t\t\tRangeTblEntry\t*rte = (RangeTblEntry *)nth(var->varno - 1, rtable);\n+ \n+ \t\t\tif (!strcmp(rte->refname, \"*NEW*\")) {\n+ \t\t\t strcat(buf, \"new.\");\n+ \t\t\t} else {\n+ \t\t\t if (!strcmp(rte->refname, \"*CURRENT*\")) {\n+ \t\t\t strcat(buf, \"current.\");\n+ \t\t\t } else {\n+ \t\t\t\tif (varprefix && var->varno != rt_index) {\n+ \t\t\t\t strcat(buf, rte->refname);\n+ \t\t\t\t strcat(buf, \".\");\n+ \t\t\t\t}\n+ \t\t\t }\n+ \t\t\t}\n+ \t\t\tstrcat(buf, get_attribute_name(rte->relid, var->varattno));\n+ \n+ \t\t\treturn pstrdup(buf);\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_List:\n+ \t\t{\n+ \t\t\tprintf(\"\\n%s\\n\", nodeToString(node));\n+ \t\t\telog(ERROR, \"List not yet supported\");\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_SubLink:\n+ \t\t{\n+ \t\t\tSubLink\t\t*sublink = (SubLink *)node;\n+ \t\t\tQuery\t\t*query = (Query *)(sublink->subselect);\n+ \t\t\tList\t\t*l;\n+ \t\t\tchar\t\t*sep;\n+ \n+ \t\t\tif (sublink->lefthand != NULL) {\n+ \t\t\t strcat(buf, \"(\");\n+ \t\t\t sep = \"\";\n+ \t\t\t foreach (l, sublink->lefthand) {\n+ \t\t\t strcat(buf, sep); sep = \", \";\n+ \t\t\t\tstrcat(buf, get_rule_expr(rtable, rt_index,\n+ \t\t\t\t\t\tlfirst(l), varprefix));\n+ \t\t\t }\n+ \t\t\t strcat(buf, \") IN \");\n+ \t\t\t}\n+ \n+ \t\t\tstrcat(buf, \"(\");\n+ \t\t\tstrcat(buf, get_query_def(query));\n+ \t\t\tstrcat(buf, \")\");\n+ \n+ \t\t\treturn pstrdup(buf);\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_Const:\n+ \t\t{\n+ \t\t\treturn get_const_expr((Const *)node);\n+ \t\t}\n+ \t\tbreak;\n+ \n+ default:\n+ \t\tprintf(\"\\n%s\\n\", nodeToString(node));\n+ \t\telog(ERROR, \"get_ruledef of %s: unknown node type %d get_rule_expr()\",\n+ \t\t\trulename, nodeTag(node));\n+ \t\tbreak;\n+ }\n+ \n+ return FALSE;\n+ }\n+ \n+ \n+ /* ----------\n+ * get_func_expr\t\t\t- Parse back a Func node\n+ * ----------\n+ */\n+ static char *\n+ get_func_expr(List *rtable, int rt_index, Expr *expr, bool varprefix)\n+ {\n+ char\t\tbuf[8192];\n+ HeapTuple\t\tproctup;\n+ Form_pg_proc\tprocStruct;\n+ List\t\t*l;\n+ char\t\t*sep;\n+ Func\t\t*func = (Func *)(expr->oper);\n+ char\t\t*proname;\n+ \n+ /* ----------\n+ * Get the functions pg_proc tuple\n+ * ----------\n+ */\n+ proctup = SearchSysCacheTuple(PROOID,\n+ \t\tObjectIdGetDatum(func->funcid), 0, 0, 0);\n+ if (!HeapTupleIsValid(proctup))\n+ \telog(ERROR, \"cache lookup for proc %d failed\", func->funcid);\n+ \n+ procStruct = (Form_pg_proc) GETSTRUCT(proctup);\n+ proname = nameout(&(procStruct->proname));\n+ \n+ if (procStruct->pronargs == 1 && procStruct->proargtypes[0] == InvalidOid) {\n+ if (!strcmp(proname, \"nullvalue\")) {\n+ \t strcpy(buf, \"(\");\n+ \t strcat(buf, get_rule_expr(rtable, rt_index, lfirst(expr->args),\n+ \t \t\tvarprefix));\n+ \t strcat(buf, \") ISNULL\");\n+ \t return pstrdup(buf);\n+ \t}\n+ if (!strcmp(proname, \"nonnullvalue\")) {\n+ \t strcpy(buf, \"(\");\n+ \t strcat(buf, get_rule_expr(rtable, rt_index, lfirst(expr->args),\n+ \t \t\tvarprefix));\n+ \t strcat(buf, \") NOTNULL\");\n+ \t return pstrdup(buf);\n+ \t}\n+ }\n+ \n+ /* ----------\n+ * Build a string of proname(args)\n+ * ----------\n+ */\n+ strcpy(buf, proname);\n+ strcat(buf, \"(\");\n+ sep = \"\";\n+ foreach (l, expr->args) {\n+ strcat(buf, sep); sep = \", \";\n+ \tstrcat(buf, get_rule_expr(rtable, rt_index, lfirst(l), varprefix));\n+ }\n+ strcat(buf, \")\");\n+ \n+ /* ----------\n+ * Copy the function call string into allocated space and return it\n+ * ----------\n+ */\n+ return pstrdup(buf);\n+ }\n+ \n+ \n+ /* ----------\n+ * get_tle_expr\t\t\t\t- A target list expression is a bit\n+ *\t\t\t\t\t different from a normal expression.\n+ *\t\t\t\t\t If the target column has an\n+ *\t\t\t\t\t an atttypmod, the parser usually\n+ *\t\t\t\t\t puts a padding-/cut-function call\n+ *\t\t\t\t\t around the expression itself. We\n+ *\t\t\t\t\t we must get rid of it, otherwise\n+ *\t\t\t\t\t dump/reload/dump... would blow up\n+ *\t\t\t\t\t the expressions.\n+ * ----------\n+ */\n+ static char *\n+ get_tle_expr(List *rtable, int rt_index, TargetEntry *tle, bool varprefix)\n+ {\n+ HeapTuple\t\tproctup;\n+ Form_pg_proc\tprocStruct;\n+ Expr\t\t*expr;\n+ Func\t\t*func;\n+ Const\t\t*second_arg;\n+ \n+ /* ----------\n+ * Check if the result has an atttypmod and if the\n+ * expression in the targetlist entry is a function call\n+ * ----------\n+ */\n+ if (tle->resdom->restypmod < 0) {\n+ \treturn get_rule_expr(rtable, rt_index, tle->expr, varprefix);\n+ }\n+ if (nodeTag(tle->expr) != T_Expr) {\n+ \treturn get_rule_expr(rtable, rt_index, tle->expr, varprefix);\n+ }\n+ expr = (Expr *)(tle->expr);\n+ if (expr->opType != FUNC_EXPR) {\n+ \treturn get_rule_expr(rtable, rt_index, tle->expr, varprefix);\n+ }\n+ \n+ func = (Func *)(expr->oper);\n+ \n+ /* ----------\n+ * Get the functions pg_proc tuple\n+ * ----------\n+ */\n+ proctup = SearchSysCacheTuple(PROOID,\n+ \t\tObjectIdGetDatum(func->funcid), 0, 0, 0);\n+ if (!HeapTupleIsValid(proctup))\n+ \telog(ERROR, \"cache lookup for proc %d failed\", func->funcid);\n+ \n+ procStruct = (Form_pg_proc) GETSTRUCT(proctup);\n+ \n+ /* ----------\n+ * It must be a function with two arguments where the first\n+ * is of the same type as the return value and the second is\n+ * an int4.\n+ * ----------\n+ */\n+ if (procStruct->pronargs != 2) {\n+ \treturn get_rule_expr(rtable, rt_index, tle->expr, varprefix);\n+ }\n+ if (procStruct->prorettype != procStruct->proargtypes[0]) {\n+ \treturn get_rule_expr(rtable, rt_index, tle->expr, varprefix);\n+ }\n+ if (procStruct->proargtypes[1] != INT4OID) {\n+ \treturn get_rule_expr(rtable, rt_index, tle->expr, varprefix);\n+ }\n+ \n+ /* ----------\n+ * Finally (to be totally safe) the second argument must be a\n+ * const and match the value in the results atttypmod.\n+ * ----------\n+ */\n+ second_arg = (Const *)nth(1, expr->args);\n+ if (nodeTag((Node *)second_arg) != T_Const) {\n+ \treturn get_rule_expr(rtable, rt_index, tle->expr, varprefix);\n+ }\n+ if ((int4)(second_arg->constvalue) != tle->resdom->restypmod) {\n+ \treturn get_rule_expr(rtable, rt_index, tle->expr, varprefix);\n+ }\n+ \n+ /* ----------\n+ * Whow - got it. Now get rid of the padding function\n+ * ----------\n+ */\n+ return get_rule_expr(rtable, rt_index, lfirst(expr->args), varprefix);\n+ }\n+ \n+ \n+ /* ----------\n+ * get_const_expr\t\t\t- Make a string representation\n+ *\t\t\t\t\t with the type cast out of a Const\n+ * ----------\n+ */\n+ char *\n+ get_const_expr(Const *constval)\n+ {\n+ HeapTuple\t\ttypetup;\n+ TypeTupleForm\ttypeStruct;\n+ FmgrInfo\t\tfinfo_output;\n+ char\t\t*extval;\n+ bool\t\tisnull = FALSE;\n+ char\t\tbuf[8192];\n+ \n+ if (constval->constisnull)\n+ \treturn \"NULL\";\n+ \n+ typetup = SearchSysCacheTuple(TYPOID,\n+ \t\tObjectIdGetDatum(constval->consttype), 0, 0, 0);\n+ if (!HeapTupleIsValid(typetup))\n+ \telog(ERROR, \"cache lookup of type %d failed\", constval->consttype);\n+ \n+ typeStruct = (TypeTupleForm) GETSTRUCT(typetup);\n+ \n+ fmgr_info(typeStruct->typoutput, &finfo_output);\n+ extval = (char *)(*fmgr_faddr(&finfo_output))(constval->constvalue,\n+ \t\t&isnull, -1);\n+ \n+ sprintf(buf, \"'%s'::%s\", extval, nameout(&(typeStruct->typname)));\n+ return pstrdup(buf);\n+ }\n+ \n+ \n+ /* ----------\n+ * get_relation_name\t\t\t- Get a relation name by Oid\n+ * ----------\n+ */\n+ static char *\n+ get_relation_name(Oid relid)\n+ {\n+ HeapTuple\t\tclasstup;\n+ Form_pg_class\tclassStruct;\n+ \n+ classtup = SearchSysCacheTuple(RELOID,\n+ \t\tObjectIdGetDatum(relid), 0, 0, 0);\n+ if (!HeapTupleIsValid(classtup))\n+ \telog(ERROR, \"cache lookup of relation %d failed\", relid);\n+ \n+ classStruct = (Form_pg_class) GETSTRUCT(classtup);\n+ return nameout(&(classStruct->relname));\n+ }\n+ \n+ \n+ /* ----------\n+ * get_attribute_name\t\t\t- Get an attribute name by it's\n+ *\t\t\t\t\t relations Oid and it's attnum\n+ * ----------\n+ */\n+ static char *\n+ get_attribute_name(Oid relid, int2 attnum)\n+ {\n+ HeapTuple\t\tatttup;\n+ AttributeTupleForm\tattStruct;\n+ \n+ atttup = SearchSysCacheTuple(ATTNUM,\n+ \t\tObjectIdGetDatum(relid), (Datum)attnum, 0, 0);\n+ if (!HeapTupleIsValid(atttup))\n+ \telog(ERROR, \"cache lookup of attribute %d in relation %d failed\", \n+ \t\t\tattnum, relid);\n+ \n+ attStruct = (AttributeTupleForm) GETSTRUCT(atttup);\n+ return nameout(&(attStruct->attname));\n+ }\n+ \n+ \n+ /* ----------\n+ * check_if_rte_used\t\t\t- Check a targetlist or qual\n+ *\t\t\t\t\t if a given rangetable entry\n+ *\t\t\t\t\t is used in it\n+ * ----------\n+ */\n+ static bool\n+ check_if_rte_used(int rt_index, Node *node, int sup)\n+ {\n+ if (node == NULL)\n+ return FALSE;\n+ \n+ switch(nodeTag(node)) {\n+ \tcase T_TargetEntry:\n+ \t\t{\n+ \t\t\tTargetEntry\t*tle = (TargetEntry *)node;\n+ \n+ \t\t\treturn check_if_rte_used(rt_index, \n+ \t\t\t\t(Node *)(tle->expr), sup);\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_Aggreg:\n+ \t\t{\n+ \t\t\tAggreg\t\t*agg = (Aggreg *)node;\n+ \t\t\treturn check_if_rte_used(rt_index, \n+ \t\t\t\t(Node *)(agg->target), sup);\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_GroupClause:\n+ \t\t{\n+ \t\t\tGroupClause\t*grp = (GroupClause *)node;\n+ \t\t\treturn check_if_rte_used(rt_index, \n+ \t\t\t\t(Node *)(grp->entry), sup);\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_Expr:\n+ \t\t{\n+ \t\t\tExpr\t\t*expr = (Expr *)node;\n+ \t\t\treturn check_if_rte_used(rt_index, \n+ \t\t\t\t(Node *)(expr->args), sup);\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_Var:\n+ \t\t{\n+ \t\t\tVar\t\t*var = (Var *)node;\n+ \t\t\treturn (var->varno == rt_index && var->varlevelsup == sup);\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_List:\n+ \t\t{\n+ \t\t\tList\t\t*l;\n+ \n+ \t\t\tforeach (l, (List *)node) {\n+ \t\t\t if (check_if_rte_used(rt_index, lfirst(l), sup))\n+ \t\t\t \treturn TRUE;\n+ \t\t\t}\n+ \t\t\treturn FALSE;\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_SubLink:\n+ \t\t{\n+ \t\t\tSubLink\t\t*sublink = (SubLink *)node;\n+ \t\t\tQuery\t\t*query = (Query *)sublink->subselect;\n+ \n+ \t\t\tif (check_if_rte_used(rt_index, (Node *)(query->qual), sup + 1))\n+ \t\t\t return TRUE;\n+ \n+ \t\t\tif (check_if_rte_used(rt_index, (Node *)(sublink->lefthand), sup))\n+ \t\t\t return TRUE;\n+ \n+ \t\t\treturn FALSE;\n+ \t\t}\n+ \t\tbreak;\n+ \n+ \tcase T_Const:\n+ \t\treturn FALSE;\n+ \t\tbreak;\n+ \n+ default:\n+ \t\telog(ERROR, \"get_ruledef of %s: unknown node type %d in check_if_rte_used()\",\n+ \t\t\trulename, nodeTag(node));\n+ \t\tbreak;\n+ }\n+ \n+ return FALSE;\n+ }\n+ \n+ \ndiff -crN src.orig/bin/initdb/initdb.sh src/bin/initdb/initdb.sh\n*** src.orig/bin/initdb/initdb.sh\tFri Aug 14 19:09:08 1998\n--- src/bin/initdb/initdb.sh\tWed Aug 19 20:52:38 1998\n***************\n*** 436,441 ****\n--- 436,474 ----\n echo \"REVOKE ALL on pg_shadow FROM public\" | \\\n \tpostgres $PGSQL_OPT template1 > /dev/null\n \n+ echo \"creating view pg_rule\"\n+ echo \"CREATE TABLE xpg_rule (\t\t\\\n+ \t rulename\tname,\t\t\\\n+ \t definition\ttext);\" | postgres $PGSQL_OPT template1 > /dev/null\n+ #move it into pg_rule\n+ echo \"UPDATE pg_class SET relname = 'pg_rule' WHERE relname = 'xpg_rule';\" |\\\n+ \tpostgres $PGSQL_OPT template1 > /dev/null\n+ echo \"UPDATE pg_type SET typname = 'pg_rule' WHERE typname = 'xpg_rule';\" |\\\n+ \tpostgres $PGSQL_OPT template1 > /dev/null\n+ mv $PGDATA/base/template1/xpg_rule $PGDATA/base/template1/pg_rule\n+ \n+ echo \"CREATE RULE _RETpg_rule AS ON SELECT TO pg_rule DO INSTEAD\t\\\n+ \t SELECT rulename, pg_get_ruledef(rulename) AS definition\t\\\n+ \t FROM pg_rewrite;\" | postgres $PGSQL_OPT template1 > /dev/null\n+ \n+ echo \"creating view pg_view\"\n+ echo \"CREATE TABLE xpg_view (\t\t\\\n+ \t viewname\tname,\t\t\\\n+ \t definition\ttext);\" | postgres $PGSQL_OPT template1 > /dev/null\n+ #move it into pg_view\n+ echo \"UPDATE pg_class SET relname = 'pg_view' WHERE relname = 'xpg_view';\" |\\\n+ \tpostgres $PGSQL_OPT template1 > /dev/null\n+ echo \"UPDATE pg_type SET typname = 'pg_view' WHERE typname = 'xpg_view';\" |\\\n+ \tpostgres $PGSQL_OPT template1 > /dev/null\n+ mv $PGDATA/base/template1/xpg_view $PGDATA/base/template1/pg_view\n+ \n+ echo \"CREATE RULE _RETpg_view AS ON SELECT TO pg_view DO INSTEAD\t\\\n+ \t SELECT relname AS viewname, \t\t\t\t\\\n+ \t pg_get_viewdef(relname) AS definition\t\t\\\n+ \t FROM pg_class WHERE relhasrules AND\t\t\t\\\n+ \t pg_get_viewdef(relname) != 'Not a view';\" | \\\n+ \tpostgres $PGSQL_OPT template1 > /dev/null\n+ \n echo \"loading pg_description\"\n echo \"copy pg_description from '$TEMPLATE_DESCR'\" | \\\n \tpostgres $PGSQL_OPT template1 > /dev/null\ndiff -crN src.orig/include/catalog/pg_proc.h src/include/catalog/pg_proc.h\n*** src.orig/include/catalog/pg_proc.h\tWed Aug 19 10:36:33 1998\n--- src/include/catalog/pg_proc.h\tWed Aug 19 20:17:56 1998\n***************\n*** 2033,2038 ****\n--- 2033,2044 ----\n /* for multi-byte support */\n DATA(insert OID = 1039 ( getdatabaseencoding\t PGUID 11 f t f 0 f 19 \"0\" 100 0 0 100 foo bar ));\n \n+ /* System-view support functions */\n+ DATA(insert OID = 1640 ( pg_get_ruledef\t PGUID 11 f t f 1 f 25 \"19\" 100 0 0 100 foo bar ));\n+ DESCR(\"source text of a rule\");\n+ DATA(insert OID = 1641 ( pg_get_viewdef\t PGUID 11 f t f 1 f 25 \"19\" 100 0 0 100 foo bar ));\n+ DESCR(\"select statement of a view\");\n+ \n /*\n * prototypes for functions pg_proc.c\n */\n", "msg_date": "Wed, 19 Aug 1998 22:10:28 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": true, "msg_subject": "Patch adding pg_rule and pg_view" } ]
[ { "msg_contents": "[Please reply to me directly as I only read this list sporadically.]\n\nHas anybody thought about doing the work to fully implement r-trees\nfor all of the geometric types? In particular, I'd be interested in\nbeing able to index `point's rather than `box'es, and have the\noptimizer decide to use the index for queries of the form `coord @\ncircle(coord2, some-radius)' or `coord @ box(coord2, coord3)'.\n\n-GAWollman\n\n--\nGarrett A. Wollman | O Siem / We are all family / O Siem / We're all the same\[email protected] | O Siem / The fires of freedom \nOpinions not those of| Dance in the burning flame\nMIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick\n", "msg_date": "Wed, 19 Aug 1998 17:17:49 -0400 (EDT)", "msg_from": "Garrett Wollman <[email protected]>", "msg_from_op": true, "msg_subject": "More complete indexing for geometric types?" } ]
[ { "msg_contents": "subscribe\n\n", "msg_date": "Wed, 19 Aug 1998 16:28:56 -0500", "msg_from": "Silvestre Dorador <[email protected]>", "msg_from_op": true, "msg_subject": "(no subject)" } ]
[ { "msg_contents": "Hi,\n\nI vote to make them builtins too.\n\n\tKeith.\n\nBruce Momjian <[email protected]>\n> \n> > If nobody votes against, I would like to make them builtins\n> > as pg_get_ruledef() and pg_get_viewdef() and then setup the\n> > appropriate views (pg_rule and pg_view) in template1 by\n> > initdb like we do it with pg_user. It cannot break anything,\n> > except that a rule action the two functions cannot handle\n> > will make the new views unusable. But it would be a really\n> > powerful possibility for pg_dump or just useful to see what\n> > that damn event qual and parsetree's in pg_rewrite came from.\n> > \n> > Comments?\n> > \n> \n> Go, Jan, go.\n> \n\n", "msg_date": "Thu, 20 Aug 1998 00:06:49 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Rules and views (was Re: [HACKERS] Rules: 2nd patch)" } ]
[ { "msg_contents": "\n> Just tried latest cvs and initdb hangs:\n> initdb: creating template database in /usr/local/pgsql/data/base/template1\n> \n> Creating global classes in /base\n> \n> Adding template1 database to pg_database...\n> \n> vacuuming template1\n> creating public pg_user view\n> Hangup\n> \n> Do I need 'make distclean' first ?\n> \n> \tOleg\n\nNo, just a make clean. There is a problem with loading pg_description\nfrom initdb, and I think I have the fix. Will post when it is updated.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 20 Aug 1998 01:43:45 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] weird problem with latest cvs" }, { "msg_contents": "> > Creating global classes in /base\n> >\n> > Adding template1 database to pg_database...\n> >\n> > vacuuming template1\n> > creating public pg_user view\n> > Hangup\n> >\n> > Do I need 'make distclean' first ?\n> >\n> > Oleg\n>\n> No, just a make clean. There is a problem with loading pg_description\n> from initdb, and I think I have the fix. Will post when it is updated.\n>\n>\n> --\n> Bruce Momjian | 830 Blythe Avenue\n\n Sorry, but it happens between the two echos for pg_user and\n description. So it must be the pg_user creation that fails.\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, 20 Aug 1998 10:55:26 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] weird problem with latest cvs" }, { "msg_contents": "Bruce,\n\nvacuum still hangs up after you patch the cvs:\nWe are initializing the database system with username postgres (uid=505).\nThis user will own all the files and must also own the server process.\n\nCreating Postgres database system directory /usr/local/pgsql/data\n\nCreating Postgres database system directory /usr/local/pgsql/data/base\n\nCreating template database in /usr/local/pgsql/data/base/template1\n\nCreating global classes in /base\n\nAdding template1 database to pg_database...\n\nvacuuming template1\ncreating public pg_user view\nHangup\n\n\n\tOleg\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": "Thu, 20 Aug 1998 22:03:33 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] weird problem with latest cvs" }, { "msg_contents": "> Bruce,\n> \n> vacuum still hangs up after you patch the cvs:\n> We are initializing the database system with username postgres (uid=505).\n> This user will own all the files and must also own the server process.\n> \n> Creating Postgres database system directory /usr/local/pgsql/data\n> \n> Creating Postgres database system directory /usr/local/pgsql/data/base\n> \n> Creating template database in /usr/local/pgsql/data/base/template1\n> \n> Creating global classes in /base\n> \n> Adding template1 database to pg_database...\n> \n> vacuuming template1\n> creating public pg_user view\n> Hangup\n\nOK, comment out the pg_user stuff and the rest of the initdb file, and\nrun it. You should then be able to start the postmaster and run psql on\nthe template1 database. See what works and what doesn't.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 20 Aug 1998 14:06:59 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] weird problem with latest cvs" } ]
[ { "msg_contents": "I did a cvsup and a fresh recompile this morning. But I still get \n\nERROR: fmgr_info: function 683: cache lookup failed\n\nfrom initdb. Guess I have to dig into it more deeply.\n\nIs anyone else running postgresql with glibc2.0.7 on Linux?\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Thu, 20 Aug 1998 07:58:07 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "initdb problem" }, { "msg_contents": "> I did a cvsup and a fresh recompile this morning. But I still get \n> \n> ERROR: fmgr_info: function 683: cache lookup failed\n> \n> from initdb. Guess I have to dig into it more deeply.\n> \n> Is anyone else running postgresql with glibc2.0.7 on Linux?\n> \n\nJust a quick question. Are people doing a make clean when updating via\ncvs. My patch changed lots of system tables.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 20 Aug 1998 19:06:43 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "On Thu, Aug 20, 1998 at 07:06:43PM -0400, Bruce Momjian wrote:\n> Just a quick question. Are people doing a make clean when updating via\n> cvs. My patch changed lots of system tables.\n\nYes, I do.\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Sat, 22 Aug 1998 18:09:34 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "\nOn 22-Aug-98 Michael Meskes wrote:\n> On Thu, Aug 20, 1998 at 07:06:43PM -0400, Bruce Momjian wrote:\n>> Just a quick question. Are people doing a make clean when updating via\n>> cvs. My patch changed lots of system tables.\n> \n> Yes, I do.\n\n<aolmode>\nMe Too!\n</aolmode>\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] flame-mail: /dev/null\n # include <std/disclaimers.h> TEAM-OS2\n Online Searchable Campground Listings http://www.camping-usa.com\n \"There is no outfit less entitled to lecture me about bloat\n than the federal government\" -- Tony Snow\n==========================================================================\n\n\n", "msg_date": "Sun, 23 Aug 1998 09:13:51 -0400 (EDT)", "msg_from": "Vince Vielhaber <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "> On Thu, Aug 20, 1998 at 07:06:43PM -0400, Bruce Momjian wrote:\n> > Just a quick question. Are people doing a make clean when updating via\n> > cvs. My patch changed lots of system tables.\n> \n> Yes, I do.\n\nOK, it appears people are still having initdb problems after my patch. \nI have received several reports of problems. Someone reported a\nregression test problem with contraints.sql. I could reproduce it here,\nand fixed it.\n\nThe other problems with initdb itself are more difficult. People seem\nto have a variety of initdb failures, and I am at a loss to find a\ncause.\n\nI realize this is a major problem, and I want to fix it as soon as I\ncan. I am running BSDI under Intel, and everything works fine, so I am\nreally confused.\n\nFirst, people have to do a 'make clean', 'make', and 'initdb' after my\npatch, but people are already doing that.\n\nKeith Parks <[email protected]> reported problems right away, and\nI tried to recommend solutions. His most recent change was to blow away\nhis entire cvs tree and re-download it, on the assumption that it was\nnot matching the main cvs tree somehow. Keith, did that fix the\nproblem?\n\nI have just done the same, to make sure I am in sync, and everything\nstill works as it should.\n\nWhat platform are people using. What failures? Are they consistent? \nCan someone give me telnet access to a machine that does not work?\n\nMarc, does postgresql.org machine do initdb properly?\n\nPlease report problems to me directly, and I will keep trying to find\nthe cause.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 14:17:45 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "On Sun, 23 Aug 1998, Bruce Momjian wrote:\n\n> Date: Sun, 23 Aug 1998 14:17:45 -0400 (EDT)\n> From: Bruce Momjian <[email protected]>\n> To: Michael Meskes <[email protected]>\n> Cc: [email protected]\n> Subject: Re: [HACKERS] initdb problem\n> \n> > On Thu, Aug 20, 1998 at 07:06:43PM -0400, Bruce Momjian wrote:\n> > > Just a quick question. Are people doing a make clean when updating via\n> > > cvs. My patch changed lots of system tables.\n> > \n> > Yes, I do.\n> \n> OK, it appears people are still having initdb problems after my patch. \n> I have received several reports of problems. Someone reported a\n> regression test problem with contraints.sql. I could reproduce it here,\n> and fixed it.\n> \n> The other problems with initdb itself are more difficult. People seem\n> to have a variety of initdb failures, and I am at a loss to find a\n> cause.\n> \n> I realize this is a major problem, and I want to fix it as soon as I\n> can. I am running BSDI under Intel, and everything works fine, so I am\n> really confused.\n> \n> First, people have to do a 'make clean', 'make', and 'initdb' after my\n> patch, but people are already doing that.\n> \n\nYes, I did this.\n\n> Keith Parks <[email protected]> reported problems right away, and\n> I tried to recommend solutions. His most recent change was to blow away\n> his entire cvs tree and re-download it, on the assumption that it was\n> not matching the main cvs tree somehow. Keith, did that fix the\n> problem?\n> \n\nHmm, probably I'll also try re-download cvs.\n\n> I have just done the same, to make sure I am in sync, and everything\n> still works as it should.\n> \n> What platform are people using. What failures? Are they consistent? \n> Can someone give me telnet access to a machine that does not work?\n> \n\nLinux 2.1.117, libc-5.4.46, egcs-2.91.50. My development computer is\nin home and I can't give you telnet account :-) \nBTW, what's the best way to have several version of postgres on the\nsame computer ? \n\n> Marc, does postgresql.org machine do initdb properly?\n> \n> Please report problems to me directly, and I will keep trying to find\n> the cause.\n> \n> -- \n> Bruce Momjian | 830 Blythe Avenue\n> [email protected] | Drexel Hill, Pennsylvania 19026\n> + If your life is a hard drive, | (610) 353-9879(w)\n> + Christ can be your backup. | (610) 853-3000(h)\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, 23 Aug 1998 23:52:03 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "> What platform are people using. What failures? Are they consistent? \n> Can someone give me telnet access to a machine that does not work?\n\nI would also be interested in hearing the platforms that DO work.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 17:46:04 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "Bruce,\n\nJust re-downladed cvs and compiled on Linux x86 2.0.35, gcc 2.7.2.3\ninitd seems runs ok now, regression test fails on:\n\noidint2 .. failed\noidint4 .. failed\noidname .. failed\n.........\ngeometry .. failed\n........\nconstraints .. failed\n........\ncreate_index .. failed\nsanity_check .. failed\n.........\nselect .. failed\nselect_into .. failed\nselect_distinct .. failed\nselect_distinct_on .. failed\n.........\naggregates .. failed\n.........\nrandom .. failed\nportals .. failed\nmisc .. failed\n.........\nbtree_index .. failed\n.........\nselect_views .. failed\nalter_table .. failed\nportals_p2 .. failed\nrun_ruletest.sql .. ./regress.sh: sql/run_ruletest.sql.sql: No such file or directory\ndiff: expected/run_ruletest.sql.out: No such file or directory\ndiff: results/run_ruletest.sql.out: No such file or directory\nok\nsetup_ruletest.sql .. ./regress.sh: sql/setup_ruletest.sql.sql: No such file or directory\ndiff: expected/setup_ruletest.sql.out: No such file or directory\ndiff: results/setup_ruletest.sql.out: No such file or directory\nok\nACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out\nrm regress.o\n\n\tOleg\nOn Sun, 23 Aug 1998, Bruce Momjian wrote:\n\n> Date: Sun, 23 Aug 1998 17:46:04 -0400 (EDT)\n> From: Bruce Momjian <[email protected]>\n> To: Bruce Momjian <[email protected]>\n> Cc: [email protected], [email protected]\n> Subject: Re: [HACKERS] initdb problem\n> \n> > What platform are people using. What failures? Are they consistent? \n> > Can someone give me telnet access to a machine that does not work?\n> \n> I would also be interested in hearing the platforms that DO work.\n> \n> -- \n> Bruce Momjian | 830 Blythe Avenue\n> [email protected] | Drexel Hill, Pennsylvania 19026\n> + If your life is a hard drive, | (610) 353-9879(w)\n> + Christ can be your backup. | (610) 853-3000(h)\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": "Mon, 24 Aug 1998 02:26:46 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "> Bruce,\n> \n> Just re-downladed cvs and compiled on Linux x86 2.0.35, gcc 2.7.2.3\n> initd seems runs ok now, regression test fails on:\n\nThis is GREAT news. I was feeling guilt about breaking the source tree.\n\nPerhaps CVS has some problem with the size of the change I made. Not\nsure.\n\nIf someone else who is having trouble tries re-downloading the whole\ntree, and it works, we can recommend this as the solution.\n \n\n> \n> oidint2 .. failed\n> oidint4 .. failed\n> oidname .. failed\n\nYou get these because I removed these types in the patch. I have asked\nThomas to fix this.\n\n> .........\n> geometry .. failed\n> ........\n> constraints .. failed\n> ........\n> create_index .. failed\n> sanity_check .. failed\n> .........\n> select .. failed\n> select_into .. failed\n> select_distinct .. failed\n> select_distinct_on .. failed\n> .........\n> aggregates .. failed\n> .........\n> random .. failed\n> portals .. failed\n> misc .. failed\n> .........\n> btree_index .. failed\n> .........\n> select_views .. failed\n> alter_table .. failed\n> portals_p2 .. failed\n> run_ruletest.sql .. ./regress.sh: sql/run_ruletest.sql.sql: No such file or directory\n> diff: expected/run_ruletest.sql.out: No such file or directory\n> diff: results/run_ruletest.sql.out: No such file or directory\n> ok\n> setup_ruletest.sql .. ./regress.sh: sql/setup_ruletest.sql.sql: No such file or directory\n> diff: expected/setup_ruletest.sql.out: No such file or directory\n> diff: results/setup_ruletest.sql.out: No such file or directory\n> ok\n> ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out\n\nI get the same problems. regress/checkresults shows the differences are\nminor and expected. The last stuff is because some stuff was renamed,\nand I assume Thomas will have it working soon.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 20:24:58 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "On Sun, Aug 23, 1998 at 11:52:03PM +0400, Oleg Bartunov wrote:\n> > What platform are people using. What failures? Are they consistent? \n> > Can someone give me telnet access to a machine that does not work?\n> > \n> \n> Linux 2.1.117, libc-5.4.46, egcs-2.91.50. My development computer is\n> in home and I can't give you telnet account :-) \n\nI still have the same problem: \n\nERROR: fmgr_info: function 683: cache lookup failed\n\nERROR: fmgr_info: function 683: cache lookup failed\n \nI'm using Linux-2.1.117, glibc 2.0.7, gcc-2.7.2.3.\n\nAnd once again now telnet account as we're talking about my private notebook\nonly connected to the internet occassionally vie modem.\n\n> BTW, what's the best way to have several version of postgres on the\n> same computer ? \n\nI'm interested in this too. I have the Debian prepackaged versoin of 6.3.2\nand the development version. Seems to work fine, but then I only run one of\nthem. To start the other I stop the one running.\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Mon, 24 Aug 1998 07:52:27 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": ">OK, it appears people are still having initdb problems after my patch. \n>I have received several reports of problems. Someone reported a\n>regression test problem with contraints.sql. I could reproduce it here,\n>and fixed it.\n\nThe constraints test is working now on my FreeBSD box. Thanks.\n\nAnother problem I'm having is vacuum seems not working. Is this a\nknown problem?\n\nregression=> vacuum;\npqReadData() -- backend closed the channel unexpectedly.\n\tThis probably means the backend terminated abnormally before or while processing the request.\nWe have lost the connection to the backend, so further processing is impossible. Terminating.\n\nAnother things I'm troubled with are that some regression tests make\nthe backend dump core on my LinuxPPC box.\n\n$ grep -i pqread results/*\n\nresults/btree_index.out:pqReadData() -- backend closed the channel unexpectedly.\nresults/constraints.out:pqReadData() -- backend closed the channel unexpectedly.\nresults/create_function_1.out:pqReadData() -- backend closed the channel unexpectedly.\nresults/create_function_2.out:pqReadData() -- backend closed the channel unexpectedly.\nresults/sanity_check.out:pqReadData() -- backend closed the channel unexpectedly.\nresults/select_views.out:pqReadData() -- backend closed the channel unexpectedly.\nresults/triggers.out:pqReadData() -- backend closed the channel unexpectedly.\n\nThese were ok on FreeBSD except the sanity_check test(vacuum dumped\ncore). I will look into these.\n--\nTatsuo Ishii\[email protected]\n", "msg_date": "Mon, 24 Aug 1998 15:42:25 +0900", "msg_from": "[email protected]", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem " }, { "msg_contents": "On Mon, Aug 24, 1998 at 02:26:46AM +0400, Oleg Bartunov wrote:\n> Just re-downladed cvs and compiled on Linux x86 2.0.35, gcc 2.7.2.3\n> initd seems runs ok now, regression test fails on:\n\nI still cannot initdb. Since I have the same kernel and gcc, what library do\nyou use? I hve glibc 2.0.7.\n\nMichael\n\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Mon, 24 Aug 1998 10:28:15 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "> >OK, it appears people are still having initdb problems after my patch. \n> >I have received several reports of problems. Someone reported a\n> >regression test problem with contraints.sql. I could reproduce it here,\n> >and fixed it.\n> \n> The constraints test is working now on my FreeBSD box. Thanks.\n> \n> Another problem I'm having is vacuum seems not working. Is this a\n> known problem?\n> \n> regression=> vacuum;\n> pqReadData() -- backend closed the channel unexpectedly.\n> \tThis probably means the backend terminated abnormally before or while processing the request.\n> We have lost the connection to the backend, so further processing is impossible. Terminating.\n> \n> Another things I'm troubled with are that some regression tests make\n> the backend dump core on my LinuxPPC box.\n\nI don't have this problem here. However, the missing alignment on new\nmulti-key indexes may be the cause. I am fixing that today.\n\n> \n> $ grep -i pqread results/*\n> \n> results/btree_index.out:pqReadData() -- backend closed the channel unexpectedly.\n> results/constraints.out:pqReadData() -- backend closed the channel unexpectedly.\n> results/create_function_1.out:pqReadData() -- backend closed the channel unexpectedly.\n> results/create_function_2.out:pqReadData() -- backend closed the channel unexpectedly.\n> results/sanity_check.out:pqReadData() -- backend closed the channel unexpectedly.\n> results/select_views.out:pqReadData() -- backend closed the channel unexpectedly.\n> results/triggers.out:pqReadData() -- backend closed the channel unexpectedly.\n> \n> These were ok on FreeBSD except the sanity_check test(vacuum dumped\n> core). I will look into these.\n> --\n> Tatsuo Ishii\n> [email protected]\n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 24 Aug 1998 10:19:32 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" } ]
[ { "msg_contents": "Maybe someone gets an idea by looking at the stack trace at the moment of\nthe error message:\n\n(gdb) where\n#0 fmgr_info (procedureId=683, finfo=0x82154f4) at fmgr.c:179\n#1 0x8162739 in CatalogCacheInitializeCache (cache=0x8215478, \n relation=0x81f03b0) at catcache.c:217\n#2 0x8163e3a in SearchSysCache (cache=0x8215478, v1=135759431, v2=1, \n v3=3221222512, v4=0) at catcache.c:837\n#3 0x8169076 in SearchSysCacheTuple (cacheId=8, key1=135759431, key2=1, \n key3=3221222512, key4=0) at syscache.c:508\n#4 0x8096869 in TypeCreate (typeName=0x82136a0 \"pg_inherits\", \n relationOid=16536, internalSize=4, externalSize=4, typeType=99 'c', \n typDelim=44 ',', inputProcedure=0x8178647 \"int4in\", \n outputProcedure=0x817863f \"int4out\", receiveProcedure=0x8178647 \"int4in\", \n sendProcedure=0x817863f \"int4out\", elementTypeName=0x0, \n defaultTypeValue=0x817863d \"-\", passedByValue=1 '\\001', alignment=105 'i')\n at pg_type.c:408\n#5 0x808e7ec in addNewRelationType (typeName=0x82136a0 \"pg_inherits\", \n new_rel_oid=16536) at heap.c:724\n#6 0x808e8c9 in heap_create_with_catalog (relname=0x82136a0 \"pg_inherits\", \n tupdesc=0x82137a8, relkind=114 'r') at heap.c:798\n#7 0x8089fae in Int_yyparse () at bootparse.y:182\n#8 0x808c4d4 in BootstrapMain (argc=6, argv=0xbffffb18) at bootstrap.c:426\n#9 0x80c8103 in main (argc=7, argv=0xbffffb14) at main.c:100\n\nThe structure cache points to starts with:\n\n$7 = {relationId = 1255, indexId = 0, cc_relname = 0x819d780 \"pg_proc\", \n cc_indname = 0x819d760 \"pg_proc_proname_narg_type_index\", \n cc_iscanfunc = 0x8092760 <ProcedureNameIndexScan>, cc_tupdesc = 0x81f03f8, \n id = 8, cc_ntup = 0, cc_maxtup = 300, cc_nkeys = 3, cc_size = 500, cc_key\n= {\n 1, 7, 10, 0}, cc_klen = {32, 2, 32, 0}, cc_skey = {{sk_flags = 0, \n sk_attno = 1, sk_procedure = 62, sk_func = {\n fn_addr = 0x815bbb0 <nameeq>, fn_plhandler = 0, fn_oid = 62, \n fn_nargs = 2}, sk_nargs = 2, sk_argument = 0}, {sk_flags = 0, \n sk_attno = 7, sk_procedure = 63, sk_func = {\n fn_addr = 0x8158c60 <int2eq>, fn_plhandler = 0, fn_oid = 63, \n fn_nargs = 2}, sk_nargs = 2, sk_argument = 0}, {sk_flags = 0, \n sk_attno = 10, sk_procedure = 683, sk_func = {fn_addr = 0, \n fn_plhandler = 0, fn_oid = 683, fn_nargs = 0}, sk_nargs = 0, \n sk_argument = 0}, {sk_flags = 0, sk_attno = 0, sk_procedure = 0, \n sk_func = {fn_addr = 0, fn_plhandler = 0, fn_oid = 0, fn_nargs = 0}, \n sk_nargs = 0, sk_argument = 0}}, cc_next = 0x8213a78, \n cc_lrulist = 0x82153d8, cc_cache = {0x8215d10, 0x8215d18, 0x8215d20, \n 0x8215d28, 0x8215d30, 0x8215d38, 0x8215d40, 0x8215d48, 0x8215d50,\n...\n\nI am surprised that cache->cc_skey contains an addr and a number of\narguments in sk_func for each function except 683 that causes the error\nmessage. \n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Thu, 20 Aug 1998 09:24:31 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "initdb problem again" }, { "msg_contents": "What bugs me is how the initdb and regression tests can run fine on\nBSDI, but fail other places.\n\n> Maybe someone gets an idea by looking at the stack trace at the moment of\n> the error message:\n> \n> (gdb) where\n> #0 fmgr_info (procedureId=683, finfo=0x82154f4) at fmgr.c:179\n> #1 0x8162739 in CatalogCacheInitializeCache (cache=0x8215478, \n> relation=0x81f03b0) at catcache.c:217\n> #2 0x8163e3a in SearchSysCache (cache=0x8215478, v1=135759431, v2=1, \n> v3=3221222512, v4=0) at catcache.c:837\n> #3 0x8169076 in SearchSysCacheTuple (cacheId=8, key1=135759431, key2=1, \n> key3=3221222512, key4=0) at syscache.c:508\n> #4 0x8096869 in TypeCreate (typeName=0x82136a0 \"pg_inherits\", \n> relationOid=16536, internalSize=4, externalSize=4, typeType=99 'c', \n> typDelim=44 ',', inputProcedure=0x8178647 \"int4in\", \n> outputProcedure=0x817863f \"int4out\", receiveProcedure=0x8178647 \"int4in\", \n> sendProcedure=0x817863f \"int4out\", elementTypeName=0x0, \n> defaultTypeValue=0x817863d \"-\", passedByValue=1 '\\001', alignment=105 'i')\n> at pg_type.c:408\n> #5 0x808e7ec in addNewRelationType (typeName=0x82136a0 \"pg_inherits\", \n> new_rel_oid=16536) at heap.c:724\n> #6 0x808e8c9 in heap_create_with_catalog (relname=0x82136a0 \"pg_inherits\", \n> tupdesc=0x82137a8, relkind=114 'r') at heap.c:798\n> #7 0x8089fae in Int_yyparse () at bootparse.y:182\n> #8 0x808c4d4 in BootstrapMain (argc=6, argv=0xbffffb18) at bootstrap.c:426\n> #9 0x80c8103 in main (argc=7, argv=0xbffffb14) at main.c:100\n> \n> The structure cache points to starts with:\n> \n> $7 = {relationId = 1255, indexId = 0, cc_relname = 0x819d780 \"pg_proc\", \n> cc_indname = 0x819d760 \"pg_proc_proname_narg_type_index\", \n> cc_iscanfunc = 0x8092760 <ProcedureNameIndexScan>, cc_tupdesc = 0x81f03f8, \n> id = 8, cc_ntup = 0, cc_maxtup = 300, cc_nkeys = 3, cc_size = 500, cc_key\n> = {\n> 1, 7, 10, 0}, cc_klen = {32, 2, 32, 0}, cc_skey = {{sk_flags = 0, \n> sk_attno = 1, sk_procedure = 62, sk_func = {\n> fn_addr = 0x815bbb0 <nameeq>, fn_plhandler = 0, fn_oid = 62, \n> fn_nargs = 2}, sk_nargs = 2, sk_argument = 0}, {sk_flags = 0, \n> sk_attno = 7, sk_procedure = 63, sk_func = {\n> fn_addr = 0x8158c60 <int2eq>, fn_plhandler = 0, fn_oid = 63, \n> fn_nargs = 2}, sk_nargs = 2, sk_argument = 0}, {sk_flags = 0, \n> sk_attno = 10, sk_procedure = 683, sk_func = {fn_addr = 0, \n> fn_plhandler = 0, fn_oid = 683, fn_nargs = 0}, sk_nargs = 0, \n> sk_argument = 0}, {sk_flags = 0, sk_attno = 0, sk_procedure = 0, \n> sk_func = {fn_addr = 0, fn_plhandler = 0, fn_oid = 0, fn_nargs = 0}, \n> sk_nargs = 0, sk_argument = 0}}, cc_next = 0x8213a78, \n> cc_lrulist = 0x82153d8, cc_cache = {0x8215d10, 0x8215d18, 0x8215d20, \n> 0x8215d28, 0x8215d30, 0x8215d38, 0x8215d40, 0x8215d48, 0x8215d50,\n> ...\n> \n> I am surprised that cache->cc_skey contains an addr and a number of\n> arguments in sk_func for each function except 683 that causes the error\n> message. \n> \n> Michael\n> -- \n> Michael Meskes\t\t\[email protected], [email protected]\n> Go SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 20 Aug 1998 14:04:00 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem again" } ]
[ { "msg_contents": "Hello all,\n\nI have a strange problem that I can't understand.\nI have been my PostgreSQL-6.3.2 on Linux-ELF-2.0.34 working without any problem for many\nmonths. This morning I can't DELETE anymore.\nIf I try to delete a row from any table I have this message:\n\nPGexec() -- Request has sent to backend, but backend closed the\nchannel before responding.\nThis probably means the backend terminated abnormally before or while\nprocessing the request.\n\nand then the backend dies.\n\nI tried every statement as:\nINSERT\nUPDATE\nSELECT\nDROP TABLE\nand all of them works but DELETE,\n\nI tried also VACUUM without success.\n\nPLEASE help me !!\n\nBest regards,\n Jose' mailto:[email protected]\n\n\n", "msg_date": "Thu, 20 Aug 1998 13:08:34 +0200", "msg_from": "Sferacarta Software <[email protected]>", "msg_from_op": true, "msg_subject": "DELETE statement KILL backend" }, { "msg_contents": "\n Hello all,\n\n I have a strange problem that I can't understand.\n I have been my PostgreSQL-6.3.2 on Linux-ELF-2.0.34 working without any problem for many\n months. This morning I can't DELETE anymore.\n If I try to delete a row from any table I have this message:\n\n PGexec() -- Request has sent to backend, but backend closed the\n channel before responding.\n This probably means the backend terminated abnormally before or while\n processing the request.\n\n and then the backend dies.\n\n I tried every statement as:\n INSERT\n UPDATE\n SELECT\n DROP TABLE\n and all of them works but DELETE,\n\n I tried also VACUUM without success.\n\n PLEASE help me !!\n\n Best regards,\n Jose' mailto:[email protected]\n\n\n", "msg_date": "Fri, 21 Aug 1998 18:00:23 +0200", "msg_from": "Sferacarta Software <[email protected]>", "msg_from_op": true, "msg_subject": "DELETE statement KILL backend <AGAIN>" } ]
[ { "msg_contents": "Hi hackers.\n\nI grabbed the latest CVS from this morning and did a clean build\nand initdb.\n\nThings look a little broken as I get a SIGSEGV when trying to \ncreate a table.\n\nAny idea what went wrong?\n\nKeith.\n\nProgram received signal SIGSEGV, Segmentation fault.\n0xe016e6b4 in _wordcopy_fwd_aligned ()\n(gdb) bt\n#0 0xe016e6b4 in _wordcopy_fwd_aligned ()\n#1 0xe011d62c in memmove ()\n#2 0x26ad0 in DataFill (data=0x1af964 \"\", tupleDesc=0x4, value=0xefffce3c,\n nulls=0xefffce40 \"\", infomask=0xefffcbc6, bit=0x1af958 \"\\003\")\n at heaptuple.c:208\n#3 0x27abc in index_formtuple (tupleDescriptor=0x15b710, value=0xefffce3c,\n null=0xefffce40 \"\") at indextuple.c:78\n#4 0x3ab8c in btinsert (rel=0x1b0510, datum=0xefffce3c, nulls=0xefffce40 \"\",\n ht_ctid=0x1b04a8, heapRel=0xefffcc8f) at nbtree.c:358\n#5 0xd5700 in fmgr_c (finfo=0xefffcd20, values=0xefffcd30, isNull=0xefffcd17 \n\"\")\n at fmgr.c:115\n#6 0xd5a10 in fmgr (procedureId=331) at fmgr.c:286\n#7 0x33ab8 in index_insert (relation=0x1b0510, datum=0xefffce3c,\n nulls=0xefffce40 \"\", heap_t_ctid=0x1b04a8, heapRel=0x158410) at \nindexam.c:190\n#8 0x4782c in CatalogIndexInsert (idescs=0xefffcef8, nIndices=3,\n heapRelation=0x158410, heapTuple=0x1b0490) at indexing.c:162\n#9 0x44bb8 in AddNewAttributeTuples (new_rel_oid=18144, tupdesc=0x15b910)\n at heap.c:588\n#10 0x44e5c in heap_create_with_catalog (relname=0x159290 \"dummy2\",\n tupdesc=0x15b930, relkind=114 'r') at heap.c:805\n#11 0x4bc6c in DefineRelation (stmt=0x159350, relkind=114 'r') at creatinh.c:140\n#12 0xb0618 in ProcessUtility (parsetree=0x159350, dest=Remote) at utility.c:176\n#13 0xaedfc in pg_exec_query_dest (\n query_string=0xefffd1a0 \" create table dummy2 (dummy2 int);\", dest=Remote)\n at postgres.c:654\n#14 0xaed2c in pg_exec_query (\n query_string=0xefffd1a0 \" create table dummy2 (dummy2 int);\") at \npostgres.c:602\n#15 0xafcb8 in PostgresMain (argc=1159168, argv=0xeffff1a0, real_argc=10,\n real_argv=0xeffffd84) at postgres.c:1429\n#16 0x98b9c in DoBackend (port=0xfd400) at postmaster.c:1412\n#17 0x985d8 in BackendStartup (port=0x15cc00) at postmaster.c:1191\n#18 0x97c04 in ServerLoop () at postmaster.c:725\n#19 0x9775c in PostmasterMain (argc=0, argv=0xeffffd84) at postmaster.c:534\n#20 0x6c15c in main (argc=10, argv=0xeffffd84) at main.c:93\n\n\n", "msg_date": "Thu, 20 Aug 1998 12:09:49 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Broken PostgreSQL (latest CVS)" }, { "msg_contents": ">\n> Hi hackers.\n>\n> I grabbed the latest CVS from this morning and did a clean build\n> and initdb.\n>\n> Things look a little broken as I get a SIGSEGV when trying to\n> create a table.\n\n I noticed them too (but I thought it was a flaw since they\n where gone (up to now) after a 'make install' and 'initdb').\n\n>\n> Any idea what went wrong?\n>\n> Keith.\n>\n> Program received signal SIGSEGV, Segmentation fault.\n> 0xe016e6b4 in _wordcopy_fwd_aligned ()\n> (gdb) bt\n> #0 0xe016e6b4 in _wordcopy_fwd_aligned ()\n> #1 0xe011d62c in memmove ()\n> #2 0x26ad0 in DataFill (data=0x1af964 \"\", tupleDesc=0x4, value=0xefffce3c,\n> nulls=0xefffce40 \"\", infomask=0xefffcbc6, bit=0x1af958 \"\\003\")\n> at heaptuple.c:208\n> #3 0x27abc in index_formtuple (tupleDescriptor=0x15b710, value=0xefffce3c,\n> null=0xefffce40 \"\") at indextuple.c:78\n\n Looks like the tuple desctiptor given to index_formtuple() is\n corrupted somewhere before the call to memmove() in\n DataFill() line 208.\n\n I think it must have happened inside of DataFill() or\n something DataFill() called, because at the time of failure,\n the on-stack variable tupleDescriptor of index_formtuple()\n looks still good - so I assume index_formtuple() handed the\n correct value to DataFill() at line 78 and it has been\n corrupted after.\n\n BTW: I love gdb.\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, 20 Aug 1998 16:01:27 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Broken PostgreSQL (latest CVS)" }, { "msg_contents": "> >\n> > Hi hackers.\n> >\n> > I grabbed the latest CVS from this morning and did a clean build\n> > and initdb.\n> >\n> > Things look a little broken as I get a SIGSEGV when trying to\n> > create a table.\n> \n> I noticed them too (but I thought it was a flaw since they\n> where gone (up to now) after a 'make install' and 'initdb').\n> \n> >\n> > Any idea what went wrong?\n> >\n> > Keith.\n> >\n> > Program received signal SIGSEGV, Segmentation fault.\n> > 0xe016e6b4 in _wordcopy_fwd_aligned ()\n> > (gdb) bt\n> > #0 0xe016e6b4 in _wordcopy_fwd_aligned ()\n> > #1 0xe011d62c in memmove ()\n> > #2 0x26ad0 in DataFill (data=0x1af964 \"\", tupleDesc=0x4, value=0xefffce3c,\n> > nulls=0xefffce40 \"\", infomask=0xefffcbc6, bit=0x1af958 \"\\003\")\n> > at heaptuple.c:208\n> > #3 0x27abc in index_formtuple (tupleDescriptor=0x15b710, value=0xefffce3c,\n> > null=0xefffce40 \"\") at indextuple.c:78\n> \n> Looks like the tuple desctiptor given to index_formtuple() is\n> corrupted somewhere before the call to memmove() in\n> DataFill() line 208.\n> \n> I think it must have happened inside of DataFill() or\n> something DataFill() called, because at the time of failure,\n> the on-stack variable tupleDescriptor of index_formtuple()\n> looks still good - so I assume index_formtuple() handed the\n> correct value to DataFill() at line 78 and it has been\n> corrupted after.\n> \n> BTW: I love gdb.\n\nOK, I have just applied another patch to fix the problem I was seeing\nwith vacuum analyze.\n\nThe problem was in catalog/index.c::UpdateStats(). First, this was\nbeing called during initialization, but was using the cache. I had to\nput an IsBootstrapProcessingMode() test, and add a sequential scan. \nSecond, there was no WriteBuffer() after the modification of the record,\nand that caused problems. I assume the old code was so kludgy that they\nsomehow got the block written by accident.\n\nThe manifestation of the problem was the at the pg_class.relhasindex\nrecord was not being set, and therefore the pg_description index was not\ngetting updated, and vacuum was complaining.\n\nAdding syscache calls is tricky because it is hard to know if a function\nis called during bootstrap.\n\nPlease do a clean compile and new initdb, and let me know if anyone has\nany more problems. I still have the patch file I used, and have\nconsulted it to see what the cause it. In this case, there never was a\nWriteBuffer() call where it should have been.\n\nIt is possible there is some other missing code that has been tickled by\nmy changes.\n\n\ninitdb runs fine here now under BSDI. Of course, it ran fine earlier\ntoo, with just the vacuum analyze problem.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 20 Aug 1998 11:23:24 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Broken PostgreSQL (latest CVS)" }, { "msg_contents": "> Looks like the tuple desctiptor given to index_formtuple() is\n> corrupted somewhere before the call to memmove() in\n> DataFill() line 208.\n> \n> I think it must have happened inside of DataFill() or\n> something DataFill() called, because at the time of failure,\n> the on-stack variable tupleDescriptor of index_formtuple()\n> looks still good - so I assume index_formtuple() handed the\n> correct value to DataFill() at line 78 and it has been\n> corrupted after.\n> \n> BTW: I love gdb.\n\nThis is happening during initdb? Hope the new code fixes that. \n\nBTW, it does pass the regression tests on my machine, so I figured\nit was safe.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 20 Aug 1998 11:33:11 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Broken PostgreSQL (latest CVS)" }, { "msg_contents": "I think my new fixes may have fixed this too. Destruction of indexes\nwas causing major corruption in random areas.\n\n\n> Hi hackers.\n> \n> I grabbed the latest CVS from this morning and did a clean build\n> and initdb.\n> \n> Things look a little broken as I get a SIGSEGV when trying to \n> create a table.\n> \n> Any idea what went wrong?\n> \n> Keith.\n> \n> Program received signal SIGSEGV, Segmentation fault.\n> 0xe016e6b4 in _wordcopy_fwd_aligned ()\n> (gdb) bt\n> #0 0xe016e6b4 in _wordcopy_fwd_aligned ()\n> #1 0xe011d62c in memmove ()\n> #2 0x26ad0 in DataFill (data=0x1af964 \"\", tupleDesc=0x4, value=0xefffce3c,\n> nulls=0xefffce40 \"\", infomask=0xefffcbc6, bit=0x1af958 \"\\003\")\n> at heaptuple.c:208\n> #3 0x27abc in index_formtuple (tupleDescriptor=0x15b710, value=0xefffce3c,\n> null=0xefffce40 \"\") at indextuple.c:78\n> #4 0x3ab8c in btinsert (rel=0x1b0510, datum=0xefffce3c, nulls=0xefffce40 \"\",\n> ht_ctid=0x1b04a8, heapRel=0xefffcc8f) at nbtree.c:358\n> #5 0xd5700 in fmgr_c (finfo=0xefffcd20, values=0xefffcd30, isNull=0xefffcd17 \n> \"\")\n> at fmgr.c:115\n> #6 0xd5a10 in fmgr (procedureId=331) at fmgr.c:286\n> #7 0x33ab8 in index_insert (relation=0x1b0510, datum=0xefffce3c,\n> nulls=0xefffce40 \"\", heap_t_ctid=0x1b04a8, heapRel=0x158410) at \n> indexam.c:190\n> #8 0x4782c in CatalogIndexInsert (idescs=0xefffcef8, nIndices=3,\n> heapRelation=0x158410, heapTuple=0x1b0490) at indexing.c:162\n> #9 0x44bb8 in AddNewAttributeTuples (new_rel_oid=18144, tupdesc=0x15b910)\n> at heap.c:588\n> #10 0x44e5c in heap_create_with_catalog (relname=0x159290 \"dummy2\",\n> tupdesc=0x15b930, relkind=114 'r') at heap.c:805\n> #11 0x4bc6c in DefineRelation (stmt=0x159350, relkind=114 'r') at creatinh.c:140\n> #12 0xb0618 in ProcessUtility (parsetree=0x159350, dest=Remote) at utility.c:176\n> #13 0xaedfc in pg_exec_query_dest (\n> query_string=0xefffd1a0 \" create table dummy2 (dummy2 int);\", dest=Remote)\n> at postgres.c:654\n> #14 0xaed2c in pg_exec_query (\n> query_string=0xefffd1a0 \" create table dummy2 (dummy2 int);\") at \n> postgres.c:602\n> #15 0xafcb8 in PostgresMain (argc=1159168, argv=0xeffff1a0, real_argc=10,\n> real_argv=0xeffffd84) at postgres.c:1429\n> #16 0x98b9c in DoBackend (port=0xfd400) at postmaster.c:1412\n> #17 0x985d8 in BackendStartup (port=0x15cc00) at postmaster.c:1191\n> #18 0x97c04 in ServerLoop () at postmaster.c:725\n> #19 0x9775c in PostmasterMain (argc=0, argv=0xeffffd84) at postmaster.c:534\n> #20 0x6c15c in main (argc=10, argv=0xeffffd84) at main.c:93\n> \n> \n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 21 Aug 1998 00:49:42 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Broken PostgreSQL (latest CVS)" } ]
[ { "msg_contents": "Hi all,\n\ninitdb seems to run without problems on my system but after starting\nthe postmaster I start to see some problems.\n\nA simple \"select * from pg_user;\" gives an error:-\n\n\tERROR: Relation pg_user does not have attribute usename\n\nOK pg_user is a VIEW/RULE but it is interesting that initdb\ncreates a table in the process of creating the view.\n\nIf I try to create a table myself the backend dies as before\nwith a SIGSEGV. (see thread [HACKERS] Broken PostgreSQL (latest CVS) )\n\nHere's what's happening with the select from pg_user.\n\nKeith.\n\nProgram received signal SIGHUP, Hangup.\n0xe00f4f20 in __kill ()\n(gdb) bt\n#0 0xe00f4f20 in __kill ()\n#1 0xd4bd0 in elog (lev=-1,\n fmt=0xefffac50 \"ERROR: Relation pg_user does not have attribute usename\\n\")\n at elog.c:181\n#2 0x92428 in make_var (pstate=0x1, relid=17184, refname=0x15baf0 \"pg_user\",\n attrname=0x15b330 \"usename\") at parse_node.c:232\n#3 0x939c0 in expandAll (pstate=0x159690, relname=0x15b330 \"usename\",\n refname=0x15baf0 \"pg_user\", this_resno=0x159690) at parse_relation.c:267\n#4 0x95690 in ExpandAllTables (pstate=0x159690) at parse_target.c:816\n#5 0x94e84 in transformTargetList (pstate=0x159690, targetlist=0x15bbd0)\n at parse_target.c:347\n#6 0x8838c in transformSelectStmt (pstate=0x159690, stmt=0x1596d0) at \nanalyze.c:828\n#7 0x876b0 in transformStmt (pstate=0x159690, parseTree=0x1596d0) at \nanalyze.c:190\n#8 0x8740c in parse_analyze (pl=0x15bb30, parentParseState=0x0) at analyze.c:76\n#9 0x8e624 in parser (str=0x0, typev=0x0, nargs=0) at parser.c:64\n#10 0xaea24 in pg_parse_and_plan (\n query_string=0xefffd1a0 \" select * from pg_user;\", typev=0x0, nargs=0,\n queryListP=0xefffd0bc, dest=Remote) at postgres.c:401\n#11 0xaee08 in pg_exec_query_dest (\n query_string=0xefffd1a0 \" select * from pg_user;\", dest=Remote)\n at postgres.c:617\n#12 0xaede4 in pg_exec_query (query_string=0xefffd1a0 \" select * from pg_user;\")\n at postgres.c:602\n#13 0xafd70 in PostgresMain (argc=1159168, argv=0xeffff1a0, real_argc=10,\n real_argv=0xeffffd84) at postgres.c:1429\n#14 0x98c54 in DoBackend (port=0xfd400) at postmaster.c:1412\n#15 0x98690 in BackendStartup (port=0x15cc00) at postmaster.c:1191\n#16 0x97cbc in ServerLoop () at postmaster.c:725\n#17 0x97814 in PostmasterMain (argc=0, argv=0xeffffd84) at postmaster.c:534\n#18 0x6c214 in main (argc=10, argv=0xeffffd84) at main.c:93\n(gdb) list parse_node.c:232\n227\n228 vnum = refnameRangeTablePosn(pstate, refname, &sublevels_up);\n229\n230 attid = get_attnum(relid, attrname);\n231 if (attid == InvalidAttrNumber)\n232 elog(ERROR, \"Relation %s does not have attribute %s\",\n233 refname, attrname);\n234 vartypeid = get_atttype(relid, attid);\n235 type_mod = get_atttypmod(relid, attid);\n236 \n\n\nBruce Momjian <[email protected]>\n> \n> What bugs me is how the initdb and regression tests can run fine on\n> BSDI, but fail other places.\n> \n\n", "msg_date": "Thu, 20 Aug 1998 21:52:50 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem again" }, { "msg_contents": "> Hi all,\n> \n> initdb seems to run without problems on my system but after starting\n> the postmaster I start to see some problems.\n> \n> A simple \"select * from pg_user;\" gives an error:-\n> \n> \tERROR: Relation pg_user does not have attribute usename\n> \n> OK pg_user is a VIEW/RULE but it is interesting that initdb\n> creates a table in the process of creating the view.\n> \n> If I try to create a table myself the backend dies as before\n> with a SIGSEGV. (see thread [HACKERS] Broken PostgreSQL (latest CVS) )\n> \n> Here's what's happening with the select from pg_user.\n> \n> Keith.\n\n\nOK, I am committing a fix for index destruction. That may help some\npeople.\n\nNot sure why the initdb is behaving differently on different platforms,\nespecially when it works here. I will keep looking.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 20 Aug 1998 18:09:22 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem again" } ]
[ { "msg_contents": "Are people still having problems with initdb. I have fixed all the\nproblems I can reproduce here.\n\nIf you are still having trouble, let me know. If you sent a backtrace\nto the list, let me know if it is still valid.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 21 Aug 1998 00:43:27 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "initdb problems" } ]
[ { "msg_contents": "In last week's episode, I wrote:\n> I have dealt with this by splitting libpq-fe.h into two files, leaving\n> only exportable information in libpq-fe.h and moving the internals into\n> a new file libpq-int.h. This should solve Ewan's problem and reduce\n> application-code namespace pollution in general.\n> \n> (If I were really being fascist about this I would've moved the\n> definitions of struct pg_conn and friends into libpq-int.h, leaving\n> only an opaque \"struct pg_conn\" declaration to be seen by applications.\n> But I'm afraid that that will break too many applications. Perhaps we\n> can take that step in some future release.)\n\nToday I am wondering whether it wouldn't be a good idea to just go ahead\nand move those struct declarations into libpq-int.h. Then a pointer to\nPGconn would be truly an opaque type for applications; all they'd see is\n\n\ttypedef struct pg_conn * PGconn;\n\nBasically this would force applications to use the accessor functions\nas recommended in the documentation, and not touch fields of a PGconn\nobject directly. (Ditto for PGresult.)\n\nI think it is a real good idea to do this eventually, because it will\nhelp ensure that applications don't assume things they shouldn't about\nwhat is in a PGconn, and it will allow us to modify the PGconn structure\nwithout breaking binary compatibility of applications across libpq\nreleases. This is a critical consideration now that libpq is released\nas a shared library on Unix and will be available in DLL form for\nWindows. People tend to think that they can update shared libraries\nwithout recompiling the programs that use the libraries.\n\nWhat occurs to me today is that if we intend to do it eventually, we\nmay as well do it *now*. Waiting will just give more programmers the\nopportunity to write bad code, I think. And we are going to break\nbinary compatibility of libpq in 6.4 anyway --- the contents of PGconn\nhave changed since last time. So anyone who's not relying on the\naccessor functions is already in trouble.\n\nThe downside is that we will probably break at least some applications\nat source-code level. They weren't playing by the rules, but they'll\nbe annoyed anyway. (Anyone who's too lazy to fix their code can just\nimport libpq-int.h instead of libpq-fe.h, but one hopes not too many\npeople will take that way out.)\n\nI know that both psql and libpgtcl are not playing entirely by the rules,\nand will need to be fixed. I can handle that. I'm not volunteering\nto fix any code outside the distribution, however.\n\nComments? Any strong reasons *not* to do this?\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 21 Aug 1998 10:19:58 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Convert PGconn, PGresult to opaque types?" }, { "msg_contents": "> In last week's episode, I wrote:\n> > I have dealt with this by splitting libpq-fe.h into two files, leaving\n> > only exportable information in libpq-fe.h and moving the internals into\n> > a new file libpq-int.h. This should solve Ewan's problem and reduce\n> > application-code namespace pollution in general.\n> > \n> > (If I were really being fascist about this I would've moved the\n> > definitions of struct pg_conn and friends into libpq-int.h, leaving\n> > only an opaque \"struct pg_conn\" declaration to be seen by applications.\n> > But I'm afraid that that will break too many applications. Perhaps we\n> > can take that step in some future release.)\n> \n> Today I am wondering whether it wouldn't be a good idea to just go ahead\n> and move those struct declarations into libpq-int.h. Then a pointer to\n> PGconn would be truly an opaque type for applications; all they'd see is\n> \n> \ttypedef struct pg_conn * PGconn;\n> \n> Basically this would force applications to use the accessor functions\n> as recommended in the documentation, and not touch fields of a PGconn\n> object directly. (Ditto for PGresult.)\n\nI am scared about external stuff like php. If they use it, and we\nrelease something that doesn't work with their stuff, we are cooked\nuntil they upgrade.\n\nNot really sure what the advantage would be, aside from cleanliness.\n\n> \n> I think it is a real good idea to do this eventually, because it will\n> help ensure that applications don't assume things they shouldn't about\n> what is in a PGconn, and it will allow us to modify the PGconn structure\n> without breaking binary compatibility of applications across libpq\n> releases. This is a critical consideration now that libpq is released\n> as a shared library on Unix and will be available in DLL form for\n> Windows. People tend to think that they can update shared libraries\n> without recompiling the programs that use the libraries.\n> \n> What occurs to me today is that if we intend to do it eventually, we\n> may as well do it *now*. Waiting will just give more programmers the\n> opportunity to write bad code, I think. And we are going to break\n> binary compatibility of libpq in 6.4 anyway --- the contents of PGconn\n> have changed since last time. So anyone who's not relying on the\n> accessor functions is already in trouble.\n> \n> The downside is that we will probably break at least some applications\n> at source-code level. They weren't playing by the rules, but they'll\n> be annoyed anyway. (Anyone who's too lazy to fix their code can just\n> import libpq-int.h instead of libpq-fe.h, but one hopes not too many\n> people will take that way out.)\n> \n> I know that both psql and libpgtcl are not playing entirely by the rules,\n> and will need to be fixed. I can handle that. I'm not volunteering\n> to fix any code outside the distribution, however.\n> \n> Comments? Any strong reasons *not* to do this?\n> \n> \t\t\tregards, tom lane\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 21:21:56 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Convert PGconn, PGresult to opaque types?" }, { "msg_contents": "Bruce Momjian wrote:\n> > Basically this would force applications to use the accessor functions\n> > as recommended in the documentation, and not touch fields of a PGconn\n> > object directly. (Ditto for PGresult.)\n> \n> I am scared about external stuff like php. If they use it, and we\n> release something that doesn't work with their stuff, we are cooked\n> until they upgrade.\n> \n> Not really sure what the advantage would be, aside from cleanliness.\n\nThe cleaness allows us to change the interals without breaking \"external\nstuff\".\nI think Tom is aiming for thread-safeness which can't be done as long as\nexternal stuff insists on accessing global structs inside libpq.\nSometimes we have to break thing to make them work better.\n\n\tregards,\n-- \n---------------------------------------------\nG�ran Thyni, sysadm, JMS Bildbasen, Kiruna\n", "msg_date": "Mon, 24 Aug 1998 14:50:51 +0200", "msg_from": "Goran Thyni <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Convert PGconn, PGresult to opaque types?" }, { "msg_contents": "Goran Thyni <[email protected]> writes:\n> Bruce Momjian wrote:\n>>>> Basically this would force applications to use the accessor functions\n>>>> as recommended in the documentation, and not touch fields of a PGconn\n>>>> object directly. (Ditto for PGresult.)\n>> \n>> I am scared about external stuff like php. If they use it, and we\n>> release something that doesn't work with their stuff, we are cooked\n>> until they upgrade.\n\nBut if they are using any direct references to fields of the PGconn\nstruct, their stuff *already* won't work with 6.4. Admittedly it'd\nmost likely only take a recompile to fix, and not code changes\n(however trivial). But if they'd been using only the documented API,\nie using the accessor functions and not directly touching the struct,\nthen a new shared library or DLL could be plopped right in without even\na recompile of calling applications.\n\nIs the PHP source code available? It wouldn't take much work to check\nwhether it will compile without a definition for struct pg_conn.\n\n> I think Tom is aiming for thread-safeness which can't be done as long as\n> external stuff insists on accessing global structs inside libpq.\n\nThis is not a thread-safeness issue, it's an issue of being able to\npromise binary compatibility across versions. Before the days of shared\nlibraries, source-code compatibility across versions was Good Enough,\nbecause users had to rebuild their apps anyway to drop in a new version\nof a library. Nowadays, people who don't even *have* the source of an\napp still expect that they can shove in a new version of a shared library\nthat the app depends on. And that's a good thing, if it fixes some bugs\nor adds new features; but it only works if the library's API is fully\nbinary compatible across releases. Hiding all but the simplest, most\nstable structs is a necessary restriction if you hope to achieve that.\n\nI made the wrong choice on this years ago with libjpeg (in self-defense,\nthat was before anyone had heard of shared libraries for Unix): I\nexposed as part of the library's API a large parameter struct that I\nknew would need to change with every new library version. At the time\nit didn't seem like a problem, but I've learned to regret it. I see\npeople complaining all the time that their apps compiled against\nlibjpeg v6a stop working when they drop in v6b instead. Learn\nfrom my bad example ;-)\n\nBasically my feeling is that we will want to do this eventually, and\nthe pain level can only get worse the longer we put it off.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 24 Aug 1998 10:22:35 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [INTERFACES] Re: [HACKERS] Convert PGconn,\n\tPGresult to opaque types?" }, { "msg_contents": ">>>>> \"TL\" == Tom Lane <[email protected]> writes:\n\n (sorry, attributions are lost here)\n \n >>>>> Basically this would force applications to use the accessor functions\n >>>>> as recommended in the documentation, and not touch fields of a PGconn\n >>>>> object directly. (Ditto for PGresult.)\n >>> \n >>> I am scared about external stuff like php. If they use it, and we\n >>> release something that doesn't work with their stuff, we are cooked\n >>> until they upgrade.\n TL> \n TL> But if they are using any direct references to fields of the PGconn\n TL> struct, their stuff *already* won't work with 6.4. Admittedly it'd\n TL> most likely only take a recompile to fix, and not code changes\n TL> (however trivial). But if they'd been using only the documented API,\n TL> ie using the accessor functions and not directly touching the struct,\n TL> then a new shared library or DLL could be plopped right in without even\n TL> a recompile of calling applications.\n TL> \n TL> Is the PHP source code available? It wouldn't take much work to check\n TL> whether it will compile without a definition for struct pg_conn.\n\nThe PHP source is available from http://www.php.net/. From a quick\nlook through it, it does access the PGconn structure directly. Stuff\nlike (this is from the file php3.0.2a/functions/pgsql.c):\n\n lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, 8192))\n\nHowever, the whole PostgreSQL-specific stuff is only 1400 lines worth,\nand the PHP guys are reputed to very active, so I don't think a change\nshould pose too much of a problem if they are forewarned.\n\n[I have CCed the PHP/PostgreSQL module developers]\n\n-- \nEric Marsden\nemarsden @ mail.dotcom.fr\nIt's elephants all the way down\n", "msg_date": "24 Aug 1998 16:54:46 +0200", "msg_from": "Eric Marsden <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] Convert PGconn, PGresult to opaque types?" }, { "msg_contents": "> Goran Thyni <[email protected]> writes:\n> > Bruce Momjian wrote:\n> >>>> Basically this would force applications to use the accessor functions\n> >>>> as recommended in the documentation, and not touch fields of a PGconn\n> >>>> object directly. (Ditto for PGresult.)\n> >> \n> >> I am scared about external stuff like php. If they use it, and we\n> >> release something that doesn't work with their stuff, we are cooked\n> >> until they upgrade.\n> \n> But if they are using any direct references to fields of the PGconn\n> struct, their stuff *already* won't work with 6.4. Admittedly it'd\n> most likely only take a recompile to fix, and not code changes\n> (however trivial). But if they'd been using only the documented API,\n> ie using the accessor functions and not directly touching the struct,\n> then a new shared library or DLL could be plopped right in without even\n> a recompile of calling applications.\n> \n> Is the PHP source code available? It wouldn't take much work to check\n> whether it will compile without a definition for struct pg_conn.\n> \n> > I think Tom is aiming for thread-safeness which can't be done as long as\n> > external stuff insists on accessing global structs inside libpq.\n> \n> This is not a thread-safeness issue, it's an issue of being able to\n> promise binary compatibility across versions. Before the days of shared\n> libraries, source-code compatibility across versions was Good Enough,\n> because users had to rebuild their apps anyway to drop in a new version\n> of a library. Nowadays, people who don't even *have* the source of an\n> app still expect that they can shove in a new version of a shared library\n> that the app depends on. And that's a good thing, if it fixes some bugs\n> or adds new features; but it only works if the library's API is fully\n> binary compatible across releases. Hiding all but the simplest, most\n> stable structs is a necessary restriction if you hope to achieve that.\n> \n> I made the wrong choice on this years ago with libjpeg (in self-defense,\n> that was before anyone had heard of shared libraries for Unix): I\n> exposed as part of the library's API a large parameter struct that I\n> knew would need to change with every new library version. At the time\n> it didn't seem like a problem, but I've learned to regret it. I see\n> people complaining all the time that their apps compiled against\n> libjpeg v6a stop working when they drop in v6b instead. Learn\n> from my bad example ;-)\n> \n> Basically my feeling is that we will want to do this eventually, and\n> the pain level can only get worse the longer we put it off.\n> \n\nI am convinced. Hide the structure members, and lets go through beta\nlike that. If we have problems, we can supply a patch to expose the\nstructure members, with the knowledge there will be no workaround patch\nfor 6.5. They have to fix it by then.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 24 Aug 1998 11:34:41 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] Re: [HACKERS] Convert PGconn,\n\tPGresult to opaque types?" }, { "msg_contents": "\n\nOn 24 Aug 1998, Eric Marsden wrote:\n\n> >>>>> \"TL\" == Tom Lane <[email protected]> writes:\n> \n> (sorry, attributions are lost here)\n> \n> >>>>> Basically this would force applications to use the accessor functions\n> >>>>> as recommended in the documentation, and not touch fields of a PGconn\n> >>>>> object directly. (Ditto for PGresult.)\n> >>> \n> >>> I am scared about external stuff like php. If they use it, and we\n> >>> release something that doesn't work with their stuff, we are cooked\n> >>> until they upgrade.\n> TL> \n> TL> But if they are using any direct references to fields of the PGconn\n> TL> struct, their stuff *already* won't work with 6.4. Admittedly it'd\n> TL> most likely only take a recompile to fix, and not code changes\n> TL> (however trivial). But if they'd been using only the documented API,\n> TL> ie using the accessor functions and not directly touching the struct,\n> TL> then a new shared library or DLL could be plopped right in without even\n> TL> a recompile of calling applications.\n> TL> \n> TL> Is the PHP source code available? It wouldn't take much work to check\n> TL> whether it will compile without a definition for struct pg_conn.\n> \n> The PHP source is available from http://www.php.net/. From a quick\n> look through it, it does access the PGconn structure directly. Stuff\n> like (this is from the file php3.0.2a/functions/pgsql.c):\n> \n> lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, 8192))\n\nShouldn't be a problem. In this case, pgsql is is pointer to a struct\n\ntypedef struct pgLofp {\n PGconn *conn;\n int lofd;\n} pgLofp;\n\nso, pgsql->conn is a pointer to a PGconn struct to pass to lo_read, but\nthe code doesn't touch or refer anywhere to the members of that struct.\n\nAnyway, I'll try to keep an eye on what's happening on pgsql-hackers list.\n\n> However, the whole PostgreSQL-specific stuff is only 1400 lines worth,\n> and the PHP guys are reputed to very active, so I don't think a change\n> should pose too much of a problem if they are forewarned.\n\nJouni Ahto\n\n", "msg_date": "Mon, 24 Aug 1998 19:47:21 +0300 (EEST)", "msg_from": "Jouni Ahto <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] Convert PGconn, PGresult to opaque types?" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n> I am convinced. Hide the structure members, and lets go through beta\n> like that. If we have problems, we can supply a patch to expose the\n> structure members, with the knowledge there will be no workaround patch\n> for 6.5. They have to fix it by then.\n\nActually, the \"patch\" will just be to #include libpq-int.h along with\nlipq-fe.h. I arranged for libpq-int.h to be one of the installed header\nfiles, with the idea that some people would rather do that than fix\ntheir code properly. It's their choice: if they want to depend on libpq\ninternals and have a greater risk of their code breaking across\nreleases, they can. I just want to discourage that a little bit, and\nmake it real clear what's considered supported API and what's considered\ninternal detail.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 24 Aug 1998 17:52:20 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [INTERFACES] Re: [HACKERS] Convert PGconn,\n\tPGresult to opaque types?" } ]
[ { "msg_contents": "Bruce,\n\n I'll send the patch itself directly to you. It's a bigger one\n and I don't want to waste bandwidth on the list. Would you\n please apply that one and forget the two others I posted\n recently? The first rules patch (that is already applied) is\n O.K.\n\n This is the final state of the rule system for 6.4 after the\n patch is applied:\n\n Rewrite rules on relation level work fine now.\n\n Event qualifications on insert/update/delete rules work\n fine now.\n\n I added the new keyword OLD to reference the CURRENT\n tuple. CURRENT will be removed in 6.5.\n\n Update rules can reference NEW and OLD in the rule\n qualification and the actions.\n\n Insert/update/delete rules on views can be established to\n let them behave like real tables.\n\n For insert/update/delete rules multiple actions are\n supported now. The actions can also be surrounded by\n parantheses to make psql happy. Multiple actions are\n required if update to a view requires updates to multiple\n tables.\n\n Regular users are permitted to create/drop rules on\n tables they have RULE permissions for\n (DefineQueryRewrite() is now able to get around the\n access restrictions on pg_rewrite). This enables view\n creation for regular users too. This required an extra\n boolean parameter to pg_parse_and_plan() that tells to\n set skipAcl on all rangetable entries of the resulting\n queries. There is a new function\n pg_exec_query_acl_override() that could be used by\n backend utilities to use this facility.\n\n All rule actions (not only views) inherit the permissions\n of the event relations owner. Sample: User A creates\n tables T1 and T2, creates rules that log\n INSERT/UPDATE/DELETE on T1 in T2 (like in the regression\n tests for rules I created) and grants ALL but RULE on T1\n to user B. User B can now fully access T1 and the\n logging happens in T2. But user B cannot access T2 at\n all, only the rule actions can. And due to missing RULE\n permissions on T1, user B cannot disable logging.\n\n Rules on the attribute level are disabled (they don't\n work properly and since regular users are now permitted\n to create rules I decided to disable them).\n\n Rules on select must have exactly one action that is a\n select (so select rules must be a view definition).\n\n UPDATE NEW/OLD rules are disabled (still broken, but\n triggers can do it).\n\n There are two new system views (pg_rule and pg_view) that\n show the definition of the rules or views so the db admin\n can see what the users do. They use two new functions\n pg_get_ruledef() and pg_get_viewdef() that are builtins.\n\n The functions pg_get_ruledef() and pg_get_viewdef() could\n be used to implement rule and view support in pg_dump.\n\n PostgreSQL is now the only database system I know, that\n has rewrite rules on the query level. All others (where I\n found a rule statement at all) use stored database\n procedures or the like (triggers as we call them) for\n active rules (as some call them).\n\n Future of the rule system:\n\n The now disabled parts of the rule system (attribute\n level, multiple actions on select and update new stuff)\n require a complete new rewrite handler from scratch. The\n old one is too badly wired up.\n\n After 6.4 I'll start to work on a new rewrite handler,\n that fully supports the attribute level rules, multiple\n actions on select and update new. This will be available\n for 6.5 so we get full rewrite rule capabilities.\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, 21 Aug 1998 16:29:25 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": true, "msg_subject": "Rules for 6.4 finished" }, { "msg_contents": "> This is the final state of the rule system for 6.4 after the\n> patch is applied:\n\nThis is all neat stuff Jan. Thanks for working on it...\n\n - Tom\n", "msg_date": "Fri, 21 Aug 1998 15:08:28 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules for 6.4 finished" }, { "msg_contents": ">\n> > This is the final state of the rule system for 6.4 after the\n> > patch is applied:\n>\n> This is all neat stuff Jan. Thanks for working on it...\n>\n> - Tom\n\n After playing around now with all that for a while I think\n the only thing missing are some more attributes in the new\n views. Currently the views are:\n\n view pg_rule (\n rulename name, -- name of the rule in pg_rewrite\n definition text) -- SQL statement that defines the rule\n\n view pg_view (\n viewname name, -- name of the view in pg_class\n definition text) -- SELECT statement that defines the view\n\n For pg_rule it would be nice to show up the event relations\n name and it's owners name. So one can select only the rules\n belonging to a specific table or all the rules one user had\n created. (this is already possible by joining with\n pg_rewrite, pg_class and pg_user, but having the attributes\n in pg_rule is easier)\n\n For pg_view again the owners name would be nice.\n\n Adding them would only require little changes to initdb.sh,\n so I left them out until a discussion showed up all the\n attributes that should be there.\n\n Another topic is if we should create some more system views\n at initdb time. I would find views telling ownership and\n other information readable instead of Oid's very useful. As\n for pg_rule and pg_view it would be possible to create a view\n that describes the definition of an index instead of some\n cryptic numbers. And another one for real tables where\n indices and views are omitted would also be useful.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#======================================== [email protected] (Jan Wieck) #\n\n\n", "msg_date": "Fri, 21 Aug 1998 18:09:04 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Rules for 6.4 finished" }, { "msg_contents": "Patch applied.\n\n\n> Bruce,\n> \n> I'll send the patch itself directly to you. It's a bigger one\n> and I don't want to waste bandwidth on the list. Would you\n> please apply that one and forget the two others I posted\n> recently? The first rules patch (that is already applied) is\n> O.K.\n> \n> This is the final state of the rule system for 6.4 after the\n> patch is applied:\n> \n> Rewrite rules on relation level work fine now.\n> \n> Event qualifications on insert/update/delete rules work\n> fine now.\n> \n> I added the new keyword OLD to reference the CURRENT\n> tuple. CURRENT will be removed in 6.5.\n> \n> Update rules can reference NEW and OLD in the rule\n> qualification and the actions.\n> \n> Insert/update/delete rules on views can be established to\n> let them behave like real tables.\n> \n> For insert/update/delete rules multiple actions are\n> supported now. The actions can also be surrounded by\n> parantheses to make psql happy. Multiple actions are\n> required if update to a view requires updates to multiple\n> tables.\n> \n> Regular users are permitted to create/drop rules on\n> tables they have RULE permissions for\n> (DefineQueryRewrite() is now able to get around the\n> access restrictions on pg_rewrite). This enables view\n> creation for regular users too. This required an extra\n> boolean parameter to pg_parse_and_plan() that tells to\n> set skipAcl on all rangetable entries of the resulting\n> queries. There is a new function\n> pg_exec_query_acl_override() that could be used by\n> backend utilities to use this facility.\n> \n> All rule actions (not only views) inherit the permissions\n> of the event relations owner. Sample: User A creates\n> tables T1 and T2, creates rules that log\n> INSERT/UPDATE/DELETE on T1 in T2 (like in the regression\n> tests for rules I created) and grants ALL but RULE on T1\n> to user B. User B can now fully access T1 and the\n> logging happens in T2. But user B cannot access T2 at\n> all, only the rule actions can. And due to missing RULE\n> permissions on T1, user B cannot disable logging.\n> \n> Rules on the attribute level are disabled (they don't\n> work properly and since regular users are now permitted\n> to create rules I decided to disable them).\n> \n> Rules on select must have exactly one action that is a\n> select (so select rules must be a view definition).\n> \n> UPDATE NEW/OLD rules are disabled (still broken, but\n> triggers can do it).\n> \n> There are two new system views (pg_rule and pg_view) that\n> show the definition of the rules or views so the db admin\n> can see what the users do. They use two new functions\n> pg_get_ruledef() and pg_get_viewdef() that are builtins.\n> \n> The functions pg_get_ruledef() and pg_get_viewdef() could\n> be used to implement rule and view support in pg_dump.\n> \n> PostgreSQL is now the only database system I know, that\n> has rewrite rules on the query level. All others (where I\n> found a rule statement at all) use stored database\n> procedures or the like (triggers as we call them) for\n> active rules (as some call them).\n> \n> Future of the rule system:\n> \n> The now disabled parts of the rule system (attribute\n> level, multiple actions on select and update new stuff)\n> require a complete new rewrite handler from scratch. The\n> old one is too badly wired up.\n> \n> After 6.4 I'll start to work on a new rewrite handler,\n> that fully supports the attribute level rules, multiple\n> actions on select and update new. This will be available\n> for 6.5 so we get full rewrite rule capabilities.\n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 21:25:28 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules for 6.4 finished" }, { "msg_contents": "> Bruce,\n> \n> I'll send the patch itself directly to you. It's a bigger one\n> and I don't want to waste bandwidth on the list. Would you\n> please apply that one and forget the two others I posted\n> recently? The first rules patch (that is already applied) is\n> O.K.\n> \n> This is the final state of the rule system for 6.4 after the\n> patch is applied:\n> \n> Rewrite rules on relation level work fine now.\n> \n> Event qualifications on insert/update/delete rules work\n> fine now.\n> \n> I added the new keyword OLD to reference the CURRENT\n> tuple. CURRENT will be removed in 6.5.\n> \n> Update rules can reference NEW and OLD in the rule\n> qualification and the actions.\n> \n> Insert/update/delete rules on views can be established to\n> let them behave like real tables.\n> \n> For insert/update/delete rules multiple actions are\n> supported now. The actions can also be surrounded by\n> parantheses to make psql happy. Multiple actions are\n> required if update to a view requires updates to multiple\n> tables.\n> \n> Regular users are permitted to create/drop rules on\n> tables they have RULE permissions for\n> (DefineQueryRewrite() is now able to get around the\n> access restrictions on pg_rewrite). This enables view\n> creation for regular users too. This required an extra\n> boolean parameter to pg_parse_and_plan() that tells to\n> set skipAcl on all rangetable entries of the resulting\n> queries. There is a new function\n> pg_exec_query_acl_override() that could be used by\n> backend utilities to use this facility.\n> \n> All rule actions (not only views) inherit the permissions\n> of the event relations owner. Sample: User A creates\n> tables T1 and T2, creates rules that log\n> INSERT/UPDATE/DELETE on T1 in T2 (like in the regression\n> tests for rules I created) and grants ALL but RULE on T1\n> to user B. User B can now fully access T1 and the\n> logging happens in T2. But user B cannot access T2 at\n> all, only the rule actions can. And due to missing RULE\n> permissions on T1, user B cannot disable logging.\n> \n> Rules on the attribute level are disabled (they don't\n> work properly and since regular users are now permitted\n> to create rules I decided to disable them).\n> \n> Rules on select must have exactly one action that is a\n> select (so select rules must be a view definition).\n> \n> UPDATE NEW/OLD rules are disabled (still broken, but\n> triggers can do it).\n> \n> There are two new system views (pg_rule and pg_view) that\n> show the definition of the rules or views so the db admin\n> can see what the users do. They use two new functions\n> pg_get_ruledef() and pg_get_viewdef() that are builtins.\n> \n> The functions pg_get_ruledef() and pg_get_viewdef() could\n> be used to implement rule and view support in pg_dump.\n> \n> PostgreSQL is now the only database system I know, that\n> has rewrite rules on the query level. All others (where I\n> found a rule statement at all) use stored database\n> procedures or the like (triggers as we call them) for\n> active rules (as some call them).\n> \n> Future of the rule system:\n> \n> The now disabled parts of the rule system (attribute\n> level, multiple actions on select and update new stuff)\n> require a complete new rewrite handler from scratch. The\n> old one is too badly wired up.\n> \n> After 6.4 I'll start to work on a new rewrite handler,\n> that fully supports the attribute level rules, multiple\n> actions on select and update new. This will be available\n> for 6.5 so we get full rewrite rule capabilities.\n\nI appreciate you taking care of this for us. Thanks.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 21:27:13 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules for 6.4 finished" }, { "msg_contents": "> >\n> > > This is the final state of the rule system for 6.4 after the\n> > > patch is applied:\n> >\n> > This is all neat stuff Jan. Thanks for working on it...\n> >\n> > - Tom\n> \n> After playing around now with all that for a while I think\n> the only thing missing are some more attributes in the new\n> views. Currently the views are:\n> \n> view pg_rule (\n> rulename name, -- name of the rule in pg_rewrite\n> definition text) -- SQL statement that defines the rule\n> \n> view pg_view (\n> viewname name, -- name of the view in pg_class\n> definition text) -- SELECT statement that defines the view\n> \n> For pg_rule it would be nice to show up the event relations\n> name and it's owners name. So one can select only the rules\n> belonging to a specific table or all the rules one user had\n> created. (this is already possible by joining with\n> pg_rewrite, pg_class and pg_user, but having the attributes\n> in pg_rule is easier)\n> \n> For pg_view again the owners name would be nice.\n> \n> Adding them would only require little changes to initdb.sh,\n> so I left them out until a discussion showed up all the\n> attributes that should be there.\n> \n> Another topic is if we should create some more system views\n> at initdb time. I would find views telling ownership and\n> other information readable instead of Oid's very useful. As\n> for pg_rule and pg_view it would be possible to create a view\n> that describes the definition of an index instead of some\n> cryptic numbers. And another one for real tables where\n> indices and views are omitted would also be useful.\n\nYes, these are good ideas.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 21:27:57 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules for 6.4 finished" }, { "msg_contents": "> > Another topic is if we should create some more system views\n> > at initdb time. I would find views telling ownership and\n> > other information readable instead of Oid's very useful. As\n> > for pg_rule and pg_view it would be possible to create a view\n> > that describes the definition of an index instead of some\n> > cryptic numbers. And another one for real tables where\n> > indices and views are omitted would also be useful.\n>\n> Yes, these are good ideas.\n>\n> --\n> Bruce Momjian | 830 Blythe Avenue\n\n I'm running into some naming problems while doing so. Having\n pg_table, pg_view etc. as views lets a users assume pg_index\n would be one too where to get some information. But pg_index\n already exists.\n\n Should I name all of them pgv_... ?\n\n Other databases have many views starting with DBA or SYS on\n the other hand. For now I'll start naming them pgv_..., we\n could rename them before applying the patch.\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, 26 Aug 1998 11:37:18 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Rules for 6.4 finished" }, { "msg_contents": "> I'm running into some naming problems while doing so. Having\n> pg_table, pg_view etc. as views lets a users assume pg_index\n> would be one too where to get some information. But pg_index\n> already exists.\n> \n> Should I name all of them pgv_... ?\n> \n> Other databases have many views starting with DBA or SYS on\n> the other hand. For now I'll start naming them pgv_..., we\n> could rename them before applying the patch.\n\nI recall that there are some places in the code (maybe only in the\nclient-side drivers?) which check explicitly for a \"pg_%\" pattern to\ndecide if a table or resource is a system table.\n\nHow about \"pg_index_v\", for example?\n\n - Tom\n", "msg_date": "Wed, 26 Aug 1998 13:04:03 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules for 6.4 finished" }, { "msg_contents": "This is true. It would be cleaner, though, if we could check for an\nattribute in pg_class. I do not recall one for that purpose.\n\nThomas G. Lockhart wrote:\n\n> > I'm running into some naming problems while doing so. Having\n> > pg_table, pg_view etc. as views lets a users assume pg_index\n> > would be one too where to get some information. But pg_index\n> > already exists.\n> >\n> > Should I name all of them pgv_... ?\n> >\n> > Other databases have many views starting with DBA or SYS on\n> > the other hand. For now I'll start naming them pgv_..., we\n> > could rename them before applying the patch.\n>\n> I recall that there are some places in the code (maybe only in the\n> client-side drivers?) which check explicitly for a \"pg_%\" pattern to\n> decide if a table or resource is a system table.\n>\n> How about \"pg_index_v\", for example?\n>\n> - Tom\n\n\n\n", "msg_date": "Wed, 26 Aug 1998 11:12:25 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules for 6.4 finished" }, { "msg_contents": "> > > Another topic is if we should create some more system views\n> > > at initdb time. I would find views telling ownership and\n> > > other information readable instead of Oid's very useful. As\n> > > for pg_rule and pg_view it would be possible to create a view\n> > > that describes the definition of an index instead of some\n> > > cryptic numbers. And another one for real tables where\n> > > indices and views are omitted would also be useful.\n> >\n> > Yes, these are good ideas.\n> >\n> > --\n> > Bruce Momjian | 830 Blythe Avenue\n> \n> I'm running into some naming problems while doing so. Having\n> pg_table, pg_view etc. as views lets a users assume pg_index\n> would be one too where to get some information. But pg_index\n> already exists.\n> \n> Should I name all of them pgv_... ?\n> \n> Other databases have many views starting with DBA or SYS on\n> the other hand. For now I'll start naming them pgv_..., we\n> could rename them before applying the patch.\n\nPerhaps pg_view_*. pgv_ is bad because the system only protects 'pg_'\nfrom modification by the user, and psql does not dump out those table\nnames.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 26 Aug 1998 12:25:26 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules for 6.4 finished" }, { "msg_contents": "> This is true. It would be cleaner, though, if we could check for an\n> attribute in pg_class. I do not recall one for that purpose.\n\nI don't think there is one.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 26 Aug 1998 13:18:57 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules for 6.4 finished" } ]
[ { "msg_contents": "\nHi Gregor...\n\n\tI believe we are compliant, up to at least the year 2039, when\nUnix has its \"problems\". Thomas would be better at answering this,\nthough, as he knows the 'date/time' code the best...\n\n\tUnix, in general, doesn't fall under the Y2K problem, since its\ndates are represented in seconds since epoch...which hits its limit aroudn\nthe year 2039, and I elieve all our dates are represented as the full\nyear (1998), not the partial (98)...\n\n\n On Fri, 21 Aug 1998, Gregor Notten wrote:\n\n> Hello Marc,\n> \n> I'm planning to start using PostgreSQL in the near future. But one thing\n> I need to know:\n> \n> Is PostgreSQL 'year 2000 compliant'?\n> \n> Can you give me an answer to this question? Thank you in advance.\n> \n> Regards,\n> Gregor Notten\n> \n\n", "msg_date": "Fri, 21 Aug 1998 12:59:16 -0400 (EDT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL + year 2000" }, { "msg_contents": "> I believe we are compliant, up to at least the year 2039, when\n> Unix has its \"problems\". Thomas would be better at answering this,\n> though, as he knows the 'date/time' code the best...\n\nThe date/time types are completely system-independent, and have no\nknowledge of Y2K (other than one type using Jan 1, 2000 as \"time zero\").\nThe date/time mathematics are based on astonomical algorithms which are\ngood from 4013BC to far into the future. All date/time types do use the\nsystem to obtain \"time now\", so if your underlying system breaks then\nthis will too. I'm not aware of any Y2K problems in my underlying OS\n(Linux) and I suspect other Unices will be similarly happy.\n\nPerhaps some old PC hardware systems have Y2K problems which would\ntranslate into Unix boot problems, but I don't know, just wondering.\n\nAnyway, there isn't anything inside Postgres which would contribute to\nthe most glaring Y2K problems, like years stored with only two digits.\nThere is some code which tries to \"do the right thing\" if given a\ntwo-digit year as _input_; it assumes any two digit year smaller than 70\nis actually after 2000:\n\npostgres=> select datetime '98-01-01'\npostgres-> union select '80-01-01'\npostgres-> union select '70-01-01'\npostgres-> union select '60-01-01';\n----------------------------\nThu Jan 01 00:00:00 1970 GMT\nTue Jan 01 00:00:00 1980 GMT\nThu Jan 01 00:00:00 1998 GMT\nThu Jan 01 00:00:00 2060\n(4 rows)\n\n - Tom\n", "msg_date": "Sat, 22 Aug 1998 01:52:00 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: PostgreSQL + year 2000" } ]
[ { "msg_contents": "\nBruce Momjian <[email protected]>\n\n> \n> > I did a cvsup and a fresh recompile this morning. But I still get \n> > \n> > ERROR: fmgr_info: function 683: cache lookup failed\n> > \n> > from initdb. Guess I have to dig into it more deeply.\n> > \n> > Is anyone else running postgresql with glibc2.0.7 on Linux?\n> > \n> \n> Just a quick question. Are people doing a make clean when updating via\n> cvs. My patch changed lots of system tables.\n\nI have religously been doing a rm -rf data and initdb each time.\n\nKeith.\n\n", "msg_date": "Fri, 21 Aug 1998 18:09:53 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem" } ]
[ { "msg_contents": "Bruce Momjian <[email protected]>\n> \n> Are people still having problems with initdb. I have fixed all the\n> problems I can reproduce here.\n> \n> If you are still having trouble, let me know. If you sent a backtrace\n> to the list, let me know if it is still valid.\n\nGrabbed the latest from CVS when I got home from work (18:00 BST)\n\nBuilt and initdb'd and heres what I get.\n\n[postgres@sparclinux pgsql]$ rm -rf data\n[postgres@sparclinux pgsql]$ initdb\n\nWe are initializing the database system with username postgres (uid=900).\nThis user will own all the files and must also own the server process.\n\nCreating Postgres database system directory /usr/local/pgsql/data\n\nCreating Postgres database system directory /usr/local/pgsql/data/base\n\nCreating template database in /usr/local/pgsql/data/base/template1\n\nCreating global classes in /base\n\nAdding template1 database to pg_database...\n\nVacuuming template1\nCreating public pg_user view\nLoading pg_description\n[postgres@sparclinux pgsql]$ startpm\n+ postmaster -B 96 -i -d 2 -o -e -D /usr/local/pgsql/data\n[postgres@sparclinux pgsql]$ psql template1\nWelcome to the POSTGRESQL interactive sql monitor:\n Please read the file COPYRIGHT for copyright terms of POSTGRESQL\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: template1\n\ntemplate1=> create table dummy ( dummy int );\npqReadData() -- backend closed the channel unexpectedly.\n This probably means the backend terminated abnormally before or while \nprocessing the request.\nWe have lost the connection to the backend, so further processing is impossible. \n Terminating.\n[postgres@sparclinux pgsql]$ \n\ngdb shows the following backtrace.\n\nProgram received signal SIGSEGV, Segmentation fault.\n0xe016e6b4 in _wordcopy_fwd_aligned ()\n(gdb) where\n#0 0xe016e6b4 in _wordcopy_fwd_aligned ()\n#1 0xe011d62c in memmove ()\n#2 0x26ad0 in DataFill (data=0x1afa24 \"\", tupleDesc=0x4, value=0xefffce3c,\n nulls=0xefffce40 \"\", infomask=0xefffcbc6, bit=0x1afa18 \"\\003\")\n at heaptuple.c:208\n#3 0x27abc in index_formtuple (tupleDescriptor=0x15b710, value=0xefffce3c,\n null=0xefffce40 \"\") at indextuple.c:78\n#4 0x3ab8c in btinsert (rel=0x1b0510, datum=0xefffce3c, nulls=0xefffce40 \"\",\n ht_ctid=0x1b04a8, heapRel=0x3d) at nbtree.c:358\n#5 0xd57e0 in fmgr_c (finfo=0xefffcd20, values=0xefffcd30, isNull=0xefffcd17 \n\"\")\n at fmgr.c:115\n#6 0xd5af0 in fmgr (procedureId=331) at fmgr.c:286\n#7 0x33ab8 in index_insert (relation=0x1b0510, datum=0xefffce3c,\n nulls=0xefffce40 \"\", heap_t_ctid=0x1b04a8, heapRel=0x158410) at \nindexam.c:190\n#8 0x478fc in CatalogIndexInsert (idescs=0xefffcef8, nIndices=3,\n heapRelation=0x158410, heapTuple=0x1b0490) at indexing.c:162\n#9 0x44bb8 in AddNewAttributeTuples (new_rel_oid=18112, tupdesc=0x15b910)\n at heap.c:588\n#10 0x44e5c in heap_create_with_catalog (relname=0x159290 \"dummy\",\n tupdesc=0x15b930, relkind=114 'r') at heap.c:805\n#11 0x4bd48 in DefineRelation (stmt=0x159350, relkind=114 'r') at creatinh.c:140\n#12 0xb06f8 in ProcessUtility (parsetree=0x159350, dest=Remote) at utility.c:176\n#13 0xaeedc in pg_exec_query_dest (\n query_string=0xefffd1a0 \"create table dummy ( dummy int );\", dest=Remote)\n at postgres.c:654\n#14 0xaee0c in pg_exec_query (\n query_string=0xefffd1a0 \"create table dummy ( dummy int );\") at \npostgres.c:602\n#15 0xafd98 in PostgresMain (argc=1160192, argv=0xeffff1a0, real_argc=10,\n real_argv=0xeffffd84) at postgres.c:1429\n#16 0x98c88 in DoBackend (port=0xfd800) at postmaster.c:1412\n#17 0x986c4 in BackendStartup (port=0x15c000) at postmaster.c:1191\n#18 0x97cf0 in ServerLoop () at postmaster.c:725\n#19 0x97848 in PostmasterMain (argc=0, argv=0xeffffd84) at postmaster.c:534\n#20 0x6c248 in main (argc=10, argv=0xeffffd84) at main.c:93\n(gdb)\n\nThe \"pg_user\" problem is still there too:-\n\ntemplate1=> select * from pg_user;\nERROR: Relation pg_user does not have attribute usename\ntemplate1=> \n\nSorry I can't be more help than this :-(\n\nKeith.\n\n", "msg_date": "Fri, 21 Aug 1998 21:45:19 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problems" } ]
[ { "msg_contents": "I've had this problem a number of times. Before I tell you what I did to\nsolve this problem, let me warn you that I am a novice at DBs (PostgreSQL is\nmy first database).\n\nIn my experience, the problem seems to be caused by a lot of data being put\ninto the database. We are using the database to ingest real-time data 24\nhours a day/7 days a week. The data comes in about every three minutes.\nWhile I was not able to identify what the exact cause has been, I have\nnoticed that before the problem becomes critical (before the backend\nterminates abnormally), the (number of) indexes do not correspond to the\nactual table. That leads me to believe that the indexes do not get created\non all occasions. After some time, the table's internal indexes may be come\ncorrupted, and vacuuming does no good.\n\nWhen trying to fix this, I first delete the index, then recreate it., then\nvacuum. If that doesn't work, then I drop the table, create the index,\nreload the data, and then vacuum the table.\n\nI would be curious to see if anyone else has had this type of problem and\nwhat their solutions were.\n\nI can provide the scripts to check the database to the newsgroup or to you\ndirectly, if desired.\n\nDavid\n\n\n-----Original Message-----\nFrom: Sferacarta Software <[email protected]>\nTo: [email protected] <[email protected]>\nDate: Friday, August 21, 1998 10:57 AM\nSubject: [GENERAL] DELETE statement KILL backend <AGAIN>\n\n\n>\n> Hello all,\n>\n> I have a strange problem that I can't understand.\n> I have been my PostgreSQL-6.3.2 on Linux-ELF-2.0.34 working without any\nproblem for many\n> months. This morning I can't DELETE anymore.\n> If I try to delete a row from any table I have this message:\n>\n> PGexec() -- Request has sent to backend, but backend closed the\n> channel before responding.\n> This probably means the backend terminated abnormally before or while\n> processing the request.\n>\n> and then the backend dies.\n>\n> I tried every statement as:\n> INSERT\n> UPDATE\n> SELECT\n> DROP TABLE\n> and all of them works but DELETE,\n>\n> I tried also VACUUM without success.\n>\n> PLEASE help me !!\n>\n> Best regards,\n> Jose' mailto:[email protected]\n>\n>\n>\n\n", "msg_date": "Fri, 21 Aug 1998 17:01:25 -0500", "msg_from": "\"David Ben-Yaacov\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [GENERAL] DELETE statement KILL backend <AGAIN>" }, { "msg_contents": "Hello David,\n\nThanks to reply to my answer.\n\nDBY> I've had this problem a number of times. Before I tell you what I did to\nDBY> solve this problem, let me warn you that I am a novice at DBs (PostgreSQL is\nDBY> my first database).\n\nDBY> In my experience, the problem seems to be caused by a lot of data being put\nDBY> into the database.\nUnfortunately this isn't my case.\nDBY> We are using the database to ingest real-time data 24\nDBY> hours a day/7 days a week. The data comes in about every three minutes.\nDBY> While I was not able to identify what the exact cause has been, I have\nDBY> noticed that before the problem becomes critical (before the backend\nDBY> terminates abnormally), the (number of) indexes do not correspond to the\nDBY> actual table. That leads me to believe that the indexes do not get created\nDBY> on all occasions. After some time, the table's internal indexes may be come\nDBY> corrupted, and vacuuming does no good.\nI have this problem on every table, those with index and those\nwithout.\n\nRight now, if I create a table without indexes and then I \"DELETE FROM\ntable\" the backend dies immediately.\n\nDBY> When trying to fix this, I first delete the index, then recreate it., then\nDBY> vacuum. If that doesn't work, then I drop the table, create the index,\nDBY> reload the data, and then vacuum the table.\n\nDBY> I would be curious to see if anyone else has had this type of problem and\nDBY> what their solutions were.\nMe too.\n\nDBY> I can provide the scripts to check the database to the newsgroup or to you\nDBY> directly, if desired.\nI'm not sure if this can solve my problem, anyway send me it.\nThanks for all,\nJose'\n\nDBY> -----Original Message-----\nDBY> From: Sferacarta Software <[email protected]>\nDBY> To: [email protected] <[email protected]>\nDBY> Date: Friday, August 21, 1998 10:57 AM\nDBY> Subject: [GENERAL] DELETE statement KILL backend <AGAIN>\n\n\n>>\n>> Hello all,\n>>\n>> I have a strange problem that I can't understand.\n>> I have been my PostgreSQL-6.3.2 on Linux-ELF-2.0.34 working without any\nDBY> problem for many\n>> months. This morning I can't DELETE anymore.\n>> If I try to delete a row from any table I have this message:\n>>\n>> PGexec() -- Request has sent to backend, but backend closed the\n>> channel before responding.\n>> This probably means the backend terminated abnormally before or while\n>> processing the request.\n>>\n>> and then the backend dies.\n>>\n>> I tried every statement as:\n>> INSERT\n>> UPDATE\n>> SELECT\n>> DROP TABLE\n>> and all of them works but DELETE,\n>>\n>> I tried also VACUUM without success.\n>>\n>> PLEASE help me !!\n>>\n>> Best regards,\n>> Jose' mailto:[email protected]\n>>\n>>\n>>\n\n\n\n\nBest regards,\n Sferacarta mailto:[email protected]\n\n\n", "msg_date": "Mon, 24 Aug 1998 09:54:23 +0200", "msg_from": "Sferacarta Software <[email protected]>", "msg_from_op": false, "msg_subject": "Re[2]: [GENERAL] DELETE statement KILL backend <AGAIN>" } ]
[ { "msg_contents": "In the current snapshot it looks like both PGDATA and PG_DATA are\nreferenced. Is this a mistake or is the snapshot really old? The\npatch below fixes it.\n\nCheers,\nBrook\n\n===========================================================================\n--- bin/initdb/initdb.sh.orig Mon Apr 6 02:05:52 1998\n+++ bin/initdb/initdb.sh Wed Jun 10 13:13:18 1998\n@@ -286,7 +286,7 @@\n #----------------------------------------------------------------------------\n \n if [ $template_only -eq 0 ]; then\n- echo \"Creating global classes in $PG_DATA/base\"\n+ echo \"Creating global classes in $PGDATA/base\"\n echo \"Running: postgres $BACKENDARGS template1\"\n \n cat $GLOBAL \\\n", "msg_date": "Fri, 21 Aug 1998 17:08:42 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": true, "msg_subject": "PGDATA usage in initdb.sh" }, { "msg_contents": "> In the current snapshot it looks like both PGDATA and PG_DATA are\n> referenced. Is this a mistake or is the snapshot really old? The\n> patch below fixes it.\n\nOld mistake that is just in printing, so no one noticed. Fixed.\n\n> \n> Cheers,\n> Brook\n> \n> ===========================================================================\n> --- bin/initdb/initdb.sh.orig Mon Apr 6 02:05:52 1998\n> +++ bin/initdb/initdb.sh Wed Jun 10 13:13:18 1998\n> @@ -286,7 +286,7 @@\n> #----------------------------------------------------------------------------\n> \n> if [ $template_only -eq 0 ]; then\n> - echo \"Creating global classes in $PG_DATA/base\"\n> + echo \"Creating global classes in $PGDATA/base\"\n> echo \"Running: postgres $BACKENDARGS template1\"\n> \n> cat $GLOBAL \\\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 21 Aug 1998 19:23:16 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PGDATA usage in initdb.sh" } ]
[ { "msg_contents": "\nCan someone comment on this? Is is a bug?\n\n\n> ============================================================================\n> POSTGRESQL BUG REPORT TEMPLATE\n> ============================================================================\n> \n> \n> Your name\t\t: Sergey E. Levov\t\n> Your email address\t: [email protected]\n> \n> \n> System Configuration\n> ---------------------\n> Architecture (example: Intel Pentium) \t: Intel Pentium Pro\n> \n> Operating System (example: Linux 2.0.26 ELF) \t: FreeBSD 2.2.5\n> \n> PostgreSQL version (example: PostgreSQL-6.3.2) : PostgreSQL-6.3.2\n> \n> Compiler used (example: gcc 2.7.2)\t\t: gcc 2.7.2.1\n> \n> \n> Please enter a FULL description of your problem:\n> ------------------------------------------------\n> When I declare cursor for select statement without \"ORDER BY\" clause\n> ( select * from <tablename> ), and then attempt to fetch record after\n> last record in table, or even just give \"fetch all\" command,\n> all the following \"fetch\" commands, regardless direction, will return \n> an empty result sets.\n> If \"SELECT\" statement has \"ORDER BY\" clause, all works well.\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> Try the following sequence of SQL operators:\n> \n> begin\n> declare mycurs cursor for select * from pg_user\n> fetch all in mycurs - OK\n> fetch backward all in mycurs\t- fails\n> move backward all in mycurs\n> fetch all in mycurs\t\t- fails\n> close mycurs\n> \n> declare mycurs cursor for select * from pg_user order by usename\n> fetch all in mycurs\t\t- OK\n> fetch backward all in mycurs\t- OK\n> move backward all in mycurs\n> fetch all in mycurs\t\t- OK\n> \n> \n> Regards,\n> Sergey Levov ([email protected])\n> \n> \n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 21 Aug 1998 22:32:23 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [BUGS] bug in \"fetch\" command?" }, { "msg_contents": "> Can someone comment on this? Is is a bug?\n\nI was a bit suprised to see this behavior. I am guessing that it is a\nbug. Does anyone else think so? I last tested and noticed this a week or\ntwo ago when writing docs...\n\n - Tom\n\n> > Please enter a FULL description of your problem:\n> > ------------------------------------------------\n> > When I declare cursor for select statement without \"ORDER BY\" clause\n> > ( select * from <tablename> ), and then attempt to fetch record \n> > after last record in table, or even just give \"fetch all\" command,\n> > all the following \"fetch\" commands, regardless direction, will \n> > return an empty result sets.\n> > If \"SELECT\" statement has \"ORDER BY\" clause, all works well.\n> > Try the following sequence of SQL operators:\n> >\n> > begin\n> > declare mycurs cursor for select * from pg_user\n> > fetch all in mycurs - OK\n> > fetch backward all in mycurs - fails\n> > move backward all in mycurs\n> > fetch all in mycurs - fails\n> > close mycurs\n> >\n> > declare mycurs cursor for select * from pg_user order by usename\n> > fetch all in mycurs - OK\n> > fetch backward all in mycurs - OK\n> > move backward all in mycurs\n> > fetch all in mycurs - OK\n", "msg_date": "Sat, 03 Oct 1998 15:47:00 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: [BUGS] bug in \"fetch\" command?" } ]
[ { "msg_contents": "Problem with libpq in PostgreSQL 6.3.2:\n\nI have a query that combines 2 tables, each with a column named id:\n\nselect a.*, b.* from organisation as a, individual as b\n where a.contact = b.id\n\nI am finding that libpq is unable to distinguish between the two id columns,\nbecause the 'a.' and 'b.' are apparently dropped by the backend before the\ndata is returned. I could get the columns by number, or by explicitly\nrenaming columns, but that would require an awkward lack of flexibility\nin the application.\n\nIs this easy to fix? Is it desirable to fix it from the project's point\nof view? I know that column headings would be more awkward, but the\nfront end could easily strip those...\n\n-- \nOliver Elphick [email protected]\nIsle of Wight http://www.lfix.co.uk/oliver\n PGP key from public servers; key ID 32B8FAA1\n ========================================\n \"For yourselves know perfectly that the day of the Lord\n so cometh as a thief in the night. For when they shall\n say, Peace and safety; then sudden destruction cometh \n upon them, as travail upon a woman with child; and \n they shall not escape.\" I Thessalonians 5:2,3 \n\n\n", "msg_date": "Sat, 22 Aug 1998 17:58:02 +0100", "msg_from": "\"Oliver Elphick\" <[email protected]>", "msg_from_op": true, "msg_subject": "Can I distinguish identically named columns in joined tables?" } ]
[ { "msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> > > But...returning to Insight as of Sept.1st. Once I get settled\n> > > in, I should be to stay late a couple of evenings and get my\n> > > old patches up-to-date.\n> > \n> > The only thing I am concerned about is that beta is September 1. I\n> > would rather not dump lots of new patches in after the beta starts. Do\n> > we need to start beta after the 1st? Not sure how to handle this.\n> \n> The variable-block size patch would be nice, but I don't think it is\n> a big enough feature to hold up the release. Many great things are\n> already there, Tom's type conversions, your indexing OR's, etc...\n> \n> Seems best to save my stuff for 6.5. That'll give me time to get\n> familiar with the code again and up to speed.\n\nAgain, I think we need rows to span multiple blocks. That would be\nprefered.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 18:22:32 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] What I'm working on" } ]
[ { "msg_contents": "> > I have been thinking about the blocksize patch, and I now think it is\n> > good we never installed it. I think we need to enable rows to span more\n> > than one block. That is what commercial databases do, and I think this\n> > is a much more general solution to the problem than increasing the block\n> > size.\n>\n> \tHrmmm...what does one gain over the other though? The way I saw\n> it (sorry Darren, don't mean to oversimplify it), but making the blocksize\n> changeable was largely a matter of Darren making sure that all the\n> dependencies were covered through the code. What is making a row span\n> multiple blocks going to give us? Truly variable length \"blocksizes\"?\n\nWould theoretically remove the postgres maximum size limit on a tuple and\nmake it limited by the OS file-size limit.\n\nRight now max-tuple-size and blocksize are the same, with the blocksize\nbeing changable only at compile-time. With the outdated patch that I\nhave, this would change to run-time. Would be less important if chaining\nexisted, but might be a decent stop-gap feature until then.\n\nI know that Oracle has chaining and they warn that it does have an effect\non performance since a second (or more) tuple fetch has to be done. But\nit that's what someone needs for big tuples, that's the price then.\n\nI'll have more opinions after next week.\n\nDarren\n\n\n", "msg_date": "Sun, 23 Aug 1998 22:07:12 -0400", "msg_from": "\"Stupor Genius\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] What I'm working on" } ]
[ { "msg_contents": "With the 6.4 beta just over a week away, here are the open items I see\nfor 6.4. We actually have fewer than usual, so that is a good thing. \nMany of the latter ones are fairly rare bugs.\n\n---------------------------------------------------------------------------\n\n\nchange pg args for platforms that don't support argv changes\n\t(setproctitle()?, sendmail hack?)\npermissions on indexes: what do they do? should it be prevented?\nman pages/sgml synchronization (dump out man pages as postscript?)\ncidr/IP address type\nlow level locking - status?\nimprove reporting of syntax errors by showing location of error in query\nclean up username and indentifier length problems\nlarge object improvements\nuse index with constants on functions\nallow chainging of pages to allow >8k tuples\nSERIAL type auto-creates sequence\nfix problem when DEFAULT string for CHAR() is not same as column\nremove PARSEDEBUG defines if not longer needed\nSELECT oid @ oid @ oid FROM pg_user fails with parser error, not function error\nCONSTRAINT does not pg_dump properly, paren problem\ndouble-quotes from pg_dump of field names\ndocument/trigger/rule so changes to pg_shadow create pg_pwd\nlarge objects issues\nimprove group handling\nre-assign resno's for rewrite system\norder by mis-ordering result(Tom Lane/HPUX)\nhave psql dump out rules text with new function\nAllow IN in DEFAULT section\nmake identifiers 31 in scanner\ncnf-ify still can exhaust memory\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 23 Aug 1998 22:08:34 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Open 6.4 items" }, { "msg_contents": "On Sun, 23 Aug 1998, Bruce Momjian wrote:\n\n> With the 6.4 beta just over a week away, here are the open items I see\n> for 6.4. We actually have fewer than usual, so that is a good thing. \n> Many of the latter ones are fairly rare bugs.\n> \n> ---------------------------------------------------------------------------\n> \n> \n> large object improvements\n> large objects issues\n+ Some JDBC Stuff\n\nI've been held up over the last 4 weeks with other things, but I'm putting\nmost of this week aside to get these ready for the beta\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": "Mon, 24 Aug 1998 08:34:24 +0100 (GMT)", "msg_from": "Peter T Mount <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> man pages/sgml synchronization (dump out man pages as postscript?)\n\nI'll need the sgml docs to firm up two weeks before release (Sept 15?)\nto give time to generate hardcopy. The admin guide will be the last\nconverted, and it has the release notes and installation procedure which\nneed to be updated. Can we think about how to do the release notes and\ninstallation for this release? I would suggest having a short readme on\nhow to install and read the docs, and have the detailed installation\nprocedure in sgml->html/hardcopy.\n\n> improve reporting syntax errors by showing location of error in query\n\nWe haven't had this in previous releases. Not required for v6.4, right?\n\n> use index with constants on functions\n\nWe haven't had this in previous releases. I know how to do it, I think,\nbut am not seeing when I could get to it. How important is it??\n\n> allow chainging of pages to allow >8k tuples\n\nOne week before beta freeze. Won't be in v6.4, right?\n\n> SERIAL type auto-creates sequence\n\nI won't have time to do this for v6.4. It's not quite the same as the\nPRIMARY KEY parser solution, since the sequence must be created _before_\nthe main portion of the CREATE TABLE command is executed, rather than\nafter. We should go through the high-level parser routines and allow all\nof them to return multiple parse trees; at the moment I've got a\nspecial-case workaround implemented for the PRIMARY KEY code which\ndoesn't generalize very well.\n\n> fix problem when DEFAULT string for CHAR() is not same as column\n\nWho is pursuing this? Where does the problem come from?\n\n> remove PARSEDEBUG defines if not longer needed\n\nYeah, yeah :)\n\n> double-quotes from pg_dump of field names\n\nI have some patches for this, but have not had time to test yet.\n\n> Allow IN in DEFAULT section\n\nAlready done and in the cvs tree:\npostgres=> create table t (i int, check (i in (1, 2, 3)));\nCREATE\n\nI fixed NOT LIKE and NOT IN at the same time...\n\n - Tom\n", "msg_date": "Mon, 24 Aug 1998 15:27:59 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": " > SERIAL type auto-creates sequence\n\n I won't have time to do this for v6.4. It's not quite the same as the\n PRIMARY KEY parser solution, since the sequence must be created _before_\n the main portion of the CREATE TABLE command is executed, rather than\n after. We should go through the high-level parser routines and allow all\n of them to return multiple parse trees; at the moment I've got a\n special-case workaround implemented for the PRIMARY KEY code which\n doesn't generalize very well.\n\nActually, sequences can be defined _either_ before or after the\ntable. See below.\n\nCheers,\nBrook\n\n===========================================================================\n-- create id sequence before table\ndrop sequence id_sequence_before;\ncreate sequence id_sequence_before start 1;\n\n-- create table\ndrop table id_table;\ncreate table id_table\n(\n id_before\tint4\t\tdefault nextval ('id_sequence_before'),\n id_after\tint4\t\tdefault nextval ('id_sequence_after'),\n name\t\ttext\n);\n\n-- create id sequence after table\ndrop sequence id_sequence_after;\ncreate sequence id_sequence_after start 1;\n\n-- populate table\ninsert into id_table (name) values ('one');\ninsert into id_table (name) values ('two');\ninsert into id_table (name) values ('three');\n\nselect * from id_table;\n===========================================================================\nid_before|id_after|name \n---------+--------+-----\n 1| 1|one \n 2| 2|two \n 3| 3|three\n(3 rows)\n===========================================================================\n", "msg_date": "Mon, 24 Aug 1998 10:04:36 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n> With the 6.4 beta just over a week away, here are the open items I see\n> for 6.4. We actually have fewer than usual, so that is a good thing. \n\nI had a few other things on my list:\n\n* make PGconn,PGresult truly opaque to applications (per recent discussion)\n* libpgtcl is missing any way to access PQerrorMessage!?\n* remove writable fields in static PQconninfoOptions for thread safety\n* bring libpq.sgml documentation fully up to speed\n\n(I'm willing to do the above four, but am not promising that the doco\nwill get done before Sept 1. I think Thomas indicated that Sept 15\nis OK for docs?)\n\n* put UNLISTEN in standard backend, fix libpgtcl listen support to use it\n\nI would really like to see this in 6.4, because I need UNLISTEN in my\napplications. Thomas had volunteered to add the needed parser support\nfor UNLISTEN (the execution function already exists, it just needs a\nstatement that can call it). As far as I've heard he hasn't gotten to\nit yet. I can fix libpgtcl but do not want to touch it unless the\nunderlying backend support is there.\n\n* psql: control-c ought to stop lengthy output\n* psql's \\z output truncates table names at 16 chars\n* psql and libpgtcl insert unexpected backslashes in output data\n\nI was going to work on these but it's looking like they will not make\nthe Sept 1 cut. Anyone else want to do them?\n\n\n> change pg args for platforms that don't support argv changes\n> \t(setproctitle()?, sendmail hack?)\n\nI'd like to see this in there too, and will work on it if no one else\ndoes, but I rather doubt I can get to it by Sept 1. Maybe this will\nhave to wait for 6.5, or 6.4.1, or something.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 24 Aug 1998 21:01:18 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items " }, { "msg_contents": "> > man pages/sgml synchronization (dump out man pages as postscript?)\n> \n> I'll need the sgml docs to firm up two weeks before release (Sept 15?)\n> to give time to generate hardcopy. The admin guide will be the last\n> converted, and it has the release notes and installation procedure which\n> need to be updated. Can we think about how to do the release notes and\n> installation for this release? I would suggest having a short readme on\n> how to install and read the docs, and have the detailed installation\n> procedure in sgml->html/hardcopy.\n\nYep. Remember Marc's rule that you can't add features after beta\nstarts, but you can be fixing things. That buys us a lot of time.\n\n> \n> > improve reporting syntax errors by showing location of error in query\n> \n> We haven't had this in previous releases. Not required for v6.4, right?\n\nNot required. Again, there are NEW items. If they don't get fixed,\nthey are moved to the TODO list.\n\n> \n> > use index with constants on functions\n> \n> We haven't had this in previous releases. I know how to do it, I think,\n> but am not seeing when I could get to it. How important is it??\n\nProbably too large for 6.4 at this point.\n\n> \n> > allow chainging of pages to allow >8k tuples\n> \n> One week before beta freeze. Won't be in v6.4, right?\n\nRight.\n\n> \n> > SERIAL type auto-creates sequence\n> \n> I won't have time to do this for v6.4. It's not quite the same as the\n> PRIMARY KEY parser solution, since the sequence must be created _before_\n> the main portion of the CREATE TABLE command is executed, rather than\n> after. We should go through the high-level parser routines and allow all\n> of them to return multiple parse trees; at the moment I've got a\n> special-case workaround implemented for the PRIMARY KEY code which\n> doesn't generalize very well.\n\nThis would be nice to have for 6.4. Someone mentioned you can create\nthe sequence before the table, so maybe we can jam it in. If it is not\n100% correct, we have a month to make it correct, right?\n\n> \n> > fix problem when DEFAULT string for CHAR() is not same as column\n> \n> Who is pursuing this? Where does the problem come from?\n\nI am attaching the posting describing the problem. If anyone wants to\nsee the actual problem reports for any item, let me know. I can send\nyou my entire mailbox of 70 items if you wish.\n\n> \n> > remove PARSEDEBUG defines if not longer needed\n> \n> Yeah, yeah :)\n\nRemember, I suggested a way you could keep them with more eligant\ndefines. Any comments?\n\n> \n> > double-quotes from pg_dump of field names\n> \n> I have some patches for this, but have not had time to test yet.\n\nCool. Let the beta testers test it!\n\n> \n> > Allow IN in DEFAULT section\n> \n> Already done and in the cvs tree:\n> postgres=> create table t (i int, check (i in (1, 2, 3)));\n> CREATE\n> \n> I fixed NOT LIKE and NOT IN at the same time...\n\nGreat.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)", "msg_date": "Mon, 24 Aug 1998 22:58:56 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> Bruce Momjian <[email protected]> writes:\n> > With the 6.4 beta just over a week away, here are the open items I see\n> > for 6.4. We actually have fewer than usual, so that is a good thing. \n> \n> I had a few other things on my list:\n> \n> * make PGconn,PGresult truly opaque to applications (per recent discussion)\n> * libpgtcl is missing any way to access PQerrorMessage!?\n> * remove writable fields in static PQconninfoOptions for thread safety\n> * bring libpq.sgml documentation fully up to speed\n> \n> (I'm willing to do the above four, but am not promising that the doco\n> will get done before Sept 1. I think Thomas indicated that Sept 15\n> is OK for docs?)\n\nSounds good to me.\n\n> \n> * put UNLISTEN in standard backend, fix libpgtcl listen support to use it\n> \n> I would really like to see this in 6.4, because I need UNLISTEN in my\n> applications. Thomas had volunteered to add the needed parser support\n> for UNLISTEN (the execution function already exists, it just needs a\n> statement that can call it). As far as I've heard he hasn't gotten to\n> it yet. I can fix libpgtcl but do not want to touch it unless the\n> underlying backend support is there.\n> \n> * psql: control-c ought to stop lengthy output\n> * psql's \\z output truncates table names at 16 chars\n> * psql and libpgtcl insert unexpected backslashes in output data\n> \n> I was going to work on these but it's looking like they will not make\n> the Sept 1 cut. Anyone else want to do them?\n\nNot really sure anyone else knows those areas. I am surprised by the\npsql \\z. Of course, if you add the \"features\" now, you can fix the bugs\nduring beta.\n\n> \n> \n> > change pg args for platforms that don't support argv changes\n> > \t(setproctitle()?, sendmail hack?)\n> \n> I'd like to see this in there too, and will work on it if no one else\n> does, but I rather doubt I can get to it by Sept 1. Maybe this will\n> have to wait for 6.5, or 6.4.1, or something.\n\nAgain, can be done later. Will be a problem without the fix.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 24 Aug 1998 23:56:30 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> > man pages/sgml synchronization (dump out man pages as postscript?)\n> \n> I'll need the sgml docs to firm up two weeks before release (Sept 15?)\n> to give time to generate hardcopy. The admin guide will be the last\n> converted, and it has the release notes and installation procedure which\n> need to be updated. Can we think about how to do the release notes and\n> installation for this release? I would suggest having a short readme on\n> how to install and read the docs, and have the detailed installation\n> procedure in sgml->html/hardcopy.\n\nI wanted to comment on this. Are you going sgml crazy? :-) (We need\nmore humor here.)\n\nDo we have to sgml everything? Perhaps we can add an sgml mode to psql\nlike the html mode we have?\n\nI think some things that are referenced only occasionally or on screen\nare better left as flat text files. Why not just let them pull it up\nwith more or vi?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 24 Aug 1998 23:59:12 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> Do we have to sgml everything? Perhaps we can add an sgml mode to \n> psql like the html mode we have?\n\nNo, we don't have to sgml everything. But, it makes the difference\nbetween flat text files and true documentation. Not everyone wants to\nbother writing it, but it really makes the difference between hacker\ncode and a usable system imho.\n\n> I think some things that are referenced only occasionally or on screen\n> are better left as flat text files. Why not just let them pull it up\n> with more or vi?\n\nThat is possible. But why are fundamental things like installation\ninstructions or release notes better left as flat files? Can't quite see\nwhy a user would think so. We can choose what docs we write and maintain\nfor the system, and we can choose how we make them look. It maybe isn't\ntoo suprising how little interest people have in writing documentation,\nbut I'm the wrong person to ask whether sgml is the right way to go.\n\nI'm currently listing 326 source and product files of documentation\nresources in the Postgres system (a few files are obsolete with\nconversion to sgml). This does not including html output files. There\nare 50 README files. There are over 88 man pages. These are all\nunstructured docs, with no clear organization. How should someone\nremember which README to look in? Or what man page to try?? It's a\nvolume of information which needs organizing and structuring into a\npredictable presentation for a user. I'm using as my model for\ndocumentation those I've found useful over the years. None of them\nstruck me as something better left as a flat text file.\n\nAnyway, that's my $0.02...\n\n - Tom\n", "msg_date": "Tue, 25 Aug 1998 06:13:22 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> > Do we have to sgml everything? Perhaps we can add an sgml mode to \n> > psql like the html mode we have?\n> \n> No, we don't have to sgml everything. But, it makes the difference\n> between flat text files and true documentation. Not everyone wants to\n> bother writing it, but it really makes the difference between hacker\n> code and a usable system imho.\n\nI am concerned about people installing on systems that don't have\ngraphic monitors or can print postscript. What do we tell them?\n\n> \n> > I think some things that are referenced only occasionally or on screen\n> > are better left as flat text files. Why not just let them pull it up\n> > with more or vi?\n> \n> That is possible. But why are fundamental things like installation\n> instructions or release notes better left as flat files? Can't quite see\n> why a user would think so. We can choose what docs we write and maintain\n> for the system, and we can choose how we make them look. It maybe isn't\n> too suprising how little interest people have in writing documentation,\n> but I'm the wrong person to ask whether sgml is the right way to go.\n> \n> I'm currently listing 326 source and product files of documentation\n> resources in the Postgres system (a few files are obsolete with\n> conversion to sgml). This does not including html output files. There\n> are 50 README files. There are over 88 man pages. These are all\n> unstructured docs, with no clear organization. How should someone\n> remember which README to look in? Or what man page to try?? It's a\n> volume of information which needs organizing and structuring into a\n> predictable presentation for a user. I'm using as my model for\n> documentation those I've found useful over the years. None of them\n> struck me as something better left as a flat text file.\n> \n> Anyway, that's my $0.02...\n\nOK. As long as we can generate flat too for those that can't use fancy\nstuff. Certainly it is better than flat files if both are available for\nnovices trying to get started.\n\nI agree we have TONS of stuff that needs serious organization. But I\nalso like to have the stuff availble in quick format like man pages and\nascii files that I can grep and pull up quickly.\n\npsql has the \\h help command because it gives people information in a\nhandy way. Man pages are the same. 'more INSTALL' may be the same?\n\nRight now, we have great docs that someone can sit down and read as a\nbook, chapter by chapter. For people who are in the middle of\nsomething, psql \\h or man or 'more INSTALL' may be easier, and no one is\nreally going to sit down and study those, I think. Maybe I am wrong.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 25 Aug 1998 02:26:58 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> > > SERIAL type auto-creates sequence\n> This would be nice to have for 6.4. Someone mentioned you can create\n> the sequence before the table, so maybe we can jam it in. If it is not\n> 100% correct, we have a month to make it correct, right?\n\npostgres=> create table s (x text, i serial);\nNOTICE: CREATE TABLE will create implicit sequence s_i_seq for SERIAL\ncolumn s.i\nCREATE\npostgres=> insert into s values ('one');\nINSERT 894455 1\npostgres=> insert into s values ('two');\nINSERT 894456 1\npostgres=> insert into s values ('three');\nINSERT 894457 1\npostgres=> select * from s;\nx |i\n-----+-\none |1\ntwo |2\nthree|3\n(3 rows)\n\n> > > remove PARSEDEBUG defines if not longer needed\n> Remember, I suggested a way you could keep them with more eligant\n> defines. Any comments?\n\nWell, I think that at least most of them should come out of the code\naltogether. The more elegant solution probably leads to code clutter\nalso, just a bit more readable since it indents with the rest of the\ncode.\n\n> > > double-quotes from pg_dump of field names\n> > I have some patches for this, but have not had time to test yet.\n> Cool. Let the beta testers test it!\n\nHmm. So that would make them alpha testers, right? :) Might be OK for\nthis one, if someone is willing to try it. I'd hate to make a change and\nthen forget about it though. Tatsuo?\n\n - Tom\n", "msg_date": "Tue, 25 Aug 1998 06:28:35 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": ">> > > double-quotes from pg_dump of field names\n>> > I have some patches for this, but have not had time to test yet.\n>> Cool. Let the beta testers test it!\n>\n>Hmm. So that would make them alpha testers, right? :) Might be OK for\n>this one, if someone is willing to try it. I'd hate to make a change and\n>then forget about it though. Tatsuo?\n\nYou could send me the patch. I also have another problem with 6.3.2\npg_dump regarding 8bit or Upper case letters handling and some fixes\nfor that. I would like to merge the fixes into 6.4.\n--\nTatsuo Ishii\[email protected]\n", "msg_date": "Tue, 25 Aug 1998 16:05:23 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items " }, { "msg_contents": "> You could send me the patch. I also have another problem with 6.3.2\n> pg_dump regarding 8bit or Upper case letters handling and some fixes\n> for that. I would like to merge the fixes into 6.4.\n\nOK, here is the patch. However, I've also already committed the patch to\nthe CVS source tree; hope that doesn't make it more difficult for you.\n\nThanks.\n\n - Tom", "msg_date": "Tue, 25 Aug 1998 15:19:53 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> > > SERIAL type auto-creates sequence\n> > I won't have time to do this for v6.4.\n> This would be nice to have, so maybe we can jam it in. If it is not\n> 100% correct, we have a month to make it correct, right?\n\nOK, I've committed the SERIAL type support to the CVS tree:\n\npostgres=> create table test (x text, s serial);\nNOTICE: CREATE TABLE will create implicit sequence test_s_seq for\nSERIAL column test.s\nNOTICE: CREATE TABLE/UNIQUE will create implicit index test_s_key for\ntable test\nCREATE\npostgres=> insert into test values ('one');\nINSERT 894781 1\npostgres=> insert into test values ('two');\nINSERT 894782 1\npostgres=> insert into test values ('three');\nINSERT 894783 1\npostgres=> select * from test;\nx |s\n-----+-\none |1\ntwo |2\nthree|3\n(3 rows)\n\npostgres=> \\d\n\nDatabase = postgres\n +------------------+----------------------------------+----------+\n | Owner | Relation | Type |\n +------------------+----------------------------------+----------+\n | postgres | test | table |\n | postgres | test_s_key | index |\n | postgres | test_s_seq | sequence |\n +------------------+----------------------------------+----------+\npostgres=> select * from test;\nx |s\n-----+-\none |1\ntwo |2\nthree|3\n(3 rows)\n\npostgres=> \\d\npqReadData() -- backend closed the channel unexpectedly.\n\nWhoops! Don't know why this is causing trouble, but it seems to be\nreproducible. Will look at it some more...\n\n - Tom\n", "msg_date": "Tue, 25 Aug 1998 15:32:43 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> > > > SERIAL type auto-creates sequence\n> > This would be nice to have for 6.4. Someone mentioned you can create\n> > the sequence before the table, so maybe we can jam it in. If it is not\n> > 100% correct, we have a month to make it correct, right?\n> \n> postgres=> create table s (x text, i serial);\n> NOTICE: CREATE TABLE will create implicit sequence s_i_seq for SERIAL\n> column s.i\n> CREATE\n> postgres=> insert into s values ('one');\n> INSERT 894455 1\n> postgres=> insert into s values ('two');\n> INSERT 894456 1\n> postgres=> insert into s values ('three');\n> INSERT 894457 1\n> postgres=> select * from s;\n> x |i\n> -----+-\n> one |1\n> two |2\n> three|3\n> (3 rows)\n\nGreat.\n\n> \n> > > > remove PARSEDEBUG defines if not longer needed\n> > Remember, I suggested a way you could keep them with more eligant\n> > defines. Any comments?\n> \n> Well, I think that at least most of them should come out of the code\n> altogether. The more elegant solution probably leads to code clutter\n> also, just a bit more readable since it indents with the rest of the\n> code.\n\nOK. I just redid parse_target.c, so I hope you can merge in your stuff.\n\n> \n> > > > double-quotes from pg_dump of field names\n> > > I have some patches for this, but have not had time to test yet.\n> > Cool. Let the beta testers test it!\n> \n> Hmm. So that would make them alpha testers, right? :) Might be OK for\n> this one, if someone is willing to try it. I'd hate to make a change and\n> then forget about it though. Tatsuo?\n\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 25 Aug 1998 13:31:31 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> postgres=> select * from test;\n> x |s\n> -----+-\n> one |1\n> two |2\n> three|3\n> (3 rows)\n> \n> postgres=> \\d\n> pqReadData() -- backend closed the channel unexpectedly.\n> \n> Whoops! Don't know why this is causing trouble, but it seems to be\n> reproducible. Will look at it some more...\n\nWhile you are in there, how does \\d show sequences. I have \\d table\nshowing the indexes. Can it show sequences too?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 25 Aug 1998 13:55:07 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> > > man pages/sgml synchronization (dump out man pages as postscript?)\n> >\n> > I'll need the sgml docs to firm up two weeks before release (Sept 15?)\n> > to give time to generate hardcopy. The admin guide will be the last\n> > converted, and it has the release notes and installation procedure which\n> > need to be updated. Can we think about how to do the release notes and\n> > installation for this release? I would suggest having a short readme on\n> > how to install and read the docs, and have the detailed installation\n> > procedure in sgml->html/hardcopy.\n> \n> Yep. Remember Marc's rule that you can't add features after beta\n> starts, but you can be fixing things. That buys us a lot of time.\n\nNot to point out the obvious, but that's what beta traditionally *means*...\n'feature complete'.\n\nNick\n", "msg_date": "Tue, 25 Aug 1998 15:50:43 -0400", "msg_from": "Nick Bastin <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "On Tue, 25 Aug 1998, Nick Bastin wrote:\n\n> Bruce Momjian wrote:\n> > \n> > > > man pages/sgml synchronization (dump out man pages as postscript?)\n> > >\n> > > I'll need the sgml docs to firm up two weeks before release (Sept 15?)\n> > > to give time to generate hardcopy. The admin guide will be the last\n> > > converted, and it has the release notes and installation procedure which\n> > > need to be updated. Can we think about how to do the release notes and\n> > > installation for this release? I would suggest having a short readme on\n> > > how to install and read the docs, and have the detailed installation\n> > > procedure in sgml->html/hardcopy.\n> > \n> > Yep. Remember Marc's rule that you can't add features after beta\n> > starts, but you can be fixing things. That buys us a lot of time.\n> \n> Not to point out the obvious, but that's what beta traditionally *means*...\n> 'feature complete'.\n\n\tYa, we know that...:) Bruce is trying make fun of me *sniffle*\n*grin* Once we go beta, I tend to be quite...anal(?) about adding\nanything unless 100% absolutely necessary, so the idea is to sneak as many\nnew features as possible in before it goes beta, even if they are buggy,\ncause then \"the feature is there, just has a few bugs to fix\" *grin*\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Tue, 25 Aug 1998 18:41:17 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "At 11:26 PM -0700 8/24/98, Bruce Momjian wrote:\n>> That is possible. But why are fundamental things like installation\n>> instructions or release notes better left as flat files? Can't quite see\n>\n>OK. As long as we can generate flat too for those that can't use fancy\n>stuff. Certainly it is better than flat files if both are available for\n>novices trying to get started.\n>\nMy $.02. Having just built a new server I like the fact that most packages\n(gcc, apache, perl) have a top-level INSTALL and README file. They are\nflat files so you can look at them before you have installed anything. I\nlike the convention.\n\nMore specifically you shouldn't have to install anything to read the\nINSTALL file.\n\nSignature failed Preliminary Design Review.\nFeasibility of a new signature is currently being evaluated.\[email protected], or [email protected]\n\n\n", "msg_date": "Tue, 25 Aug 1998 17:13:34 -0700", "msg_from": "\"Henry B. Hotz\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> > > Yep. Remember Marc's rule that you can't add features after beta\n> > > starts, but you can be fixing things. That buys us a lot of time.\n> > \n> > Not to point out the obvious, but that's what beta traditionally *means*...\n> > 'feature complete'.\n> \n> \tYa, we know that...:) Bruce is trying make fun of me *sniffle*\n> *grin* Once we go beta, I tend to be quite...anal(?) about adding\n> anything unless 100% absolutely necessary, so the idea is to sneak as many\n> new features as possible in before it goes beta, even if they are buggy,\n> cause then \"the feature is there, just has a few bugs to fix\" *grin*\n\nGood analysis.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 25 Aug 1998 23:03:48 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "On Tue, 25 Aug 1998, Bruce Momjian wrote:\n\n> > > > Yep. Remember Marc's rule that you can't add features after beta\n> > > > starts, but you can be fixing things. That buys us a lot of time.\n> > > \n> > > Not to point out the obvious, but that's what beta traditionally *means*...\n> > > 'feature complete'.\n> > \n> > \tYa, we know that...:) Bruce is trying make fun of me *sniffle*\n> > *grin* Once we go beta, I tend to be quite...anal(?) about adding\n> > anything unless 100% absolutely necessary, so the idea is to sneak as many\n> > new features as possible in before it goes beta, even if they are buggy,\n> > cause then \"the feature is there, just has a few bugs to fix\" *grin*\n> \n> Good analysis.\n\n\tWe've worked together for much much to long for us not to have a\npretty good \"feel\" for each other :) Produce some good work, no? :)\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Wed, 26 Aug 1998 00:44:00 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> > > \tYa, we know that...:) Bruce is trying make fun of me *sniffle*\n> > > *grin* Once we go beta, I tend to be quite...anal(?) about adding\n> > > anything unless 100% absolutely necessary, so the idea is to sneak as many\n> > > new features as possible in before it goes beta, even if they are buggy,\n> > > cause then \"the feature is there, just has a few bugs to fix\" *grin*\n> > \n> > Good analysis.\n> \n> \tWe've worked together for much much to long for us not to have a\n> pretty good \"feel\" for each other :) Produce some good work, no? :)\n> \n\nYou bet. Very good work, and getting better every day.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 26 Aug 1998 00:47:32 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Open 6.4 items]" }, { "msg_contents": "On Tue, 25 Aug 1998, Thomas G. Lockhart wrote:\n\n> > > > SERIAL type auto-creates sequence\n> > > I won't have time to do this for v6.4.\n> > This would be nice to have, so maybe we can jam it in. If it is not\n> > 100% correct, we have a month to make it correct, right?\n> \n> OK, I've committed the SERIAL type support to the CVS tree:\n> \n> postgres=> create table test (x text, s serial);\n> NOTICE: CREATE TABLE will create implicit sequence test_s_seq for\n> SERIAL column test.s\n> NOTICE: CREATE TABLE/UNIQUE will create implicit index test_s_key for\n> table test\n> CREATE\n\nI've just tried this (using a CVS tree from Friday), and got this:\n\npeter=> create table test (x text, s serial);\nNOTICE: CREATE TABLE will create implicit sequence test_s_seq for SERIAL\ncolumn test.s\nNOTICE: CREATE TABLE/UNIQUE will create implicit index test_s_key for\ntable test\nERROR: pg_aclcheck: class \"test_s_seq\" not found\n\n\\d shows that nothing is created. Any ideas?\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": "Sun, 30 Aug 1998 11:55:03 +0100 (GMT)", "msg_from": "Peter T Mount <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "Works fine _if_ the user has database creation privileges:\n\ntgl=> create table test (x text, s serial);\nNOTICE: CREATE TABLE will create implicit sequence test_s_seq for SERIAL\ncolumn test.s\nNOTICE: CREATE TABLE/UNIQUE will create implicit index test_s_key for\ntable test\nCREATE\n\nThis statement internally expands to roughly the following:\ncreate table test (x text, s int4 default nextval('test_s_seq'));\ncreate unique index test_s_key on test (s);\ncreate sequence test_s_seq;\n\nIf the user has no database creation privileges, then apparently there\nis some checking which insists that the sequence referenced in the\nimplicit default clause actually exists:\n\ntgl=> create table test (x text, i int default nextval('test_s_seq'));\nERROR: pg_aclcheck: class \"test_s_seq\" not found\n\nSo, it looks like the sequence should internally be created before the\ntable, though in some cases it doesn't matter. I was concerned that this\nmight be the case, and the parser is not at the moment configured to\nallow this. Should be able to fix it up, or have just limited SERIAL\nsupport for the v6.4 release :(\n\n - Tom\n", "msg_date": "Sun, 30 Aug 1998 18:40:52 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> Works fine _if_ the user has database creation privileges:\n\nCan I ask why sequence creation is related to database CREATION. Seems\nvery strange to me.\n\n\n> \n> tgl=> create table test (x text, s serial);\n> NOTICE: CREATE TABLE will create implicit sequence test_s_seq for SERIAL\n> column test.s\n> NOTICE: CREATE TABLE/UNIQUE will create implicit index test_s_key for\n> table test\n> CREATE\n> \n> This statement internally expands to roughly the following:\n> create table test (x text, s int4 default nextval('test_s_seq'));\n> create unique index test_s_key on test (s);\n> create sequence test_s_seq;\n> \n> If the user has no database creation privileges, then apparently there\n> is some checking which insists that the sequence referenced in the\n> implicit default clause actually exists:\n> \n> tgl=> create table test (x text, i int default nextval('test_s_seq'));\n> ERROR: pg_aclcheck: class \"test_s_seq\" not found\n> \n> So, it looks like the sequence should internally be created before the\n> table, though in some cases it doesn't matter. I was concerned that this\n> might be the case, and the parser is not at the moment configured to\n> allow this. Should be able to fix it up, or have just limited SERIAL\n> support for the v6.4 release :(\n> \n> - Tom\n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sun, 30 Aug 1998 17:11:21 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Open 6.4 items" }, { "msg_contents": "> > Works fine _if_ the user has database creation privileges:\n> Can I ask why sequence creation is related to database CREATION. \n> Seems very strange to me.\n\nI'd guess that it is related to being allowed to put entries into\nwhatever supports sequences (a view or table?). If you created the\ndatabase you get some other privileges too??\n\n> > tgl=> create table test (x text,\n> > tgl-> i int default nextval('test_s_seq'));\n> > ERROR: pg_aclcheck: class \"test_s_seq\" not found\n> > it looks like the sequence should internally be created before the\n> > table, though in some cases it doesn't matter. I was concerned that \n> > this might be the case, and the parser is not at the moment \n> > configured to allow this.\n\n - Tom\n", "msg_date": "Sun, 30 Aug 1998 23:07:07 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 items" } ]
[ { "msg_contents": "I have found a minor problem with current configure.in.\n\n[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LONG_INT_64)],\n\nthis line produces something like:\n\n echo \"$ac_t\"\"yes\" 1>&6 cat >> confdefs.h <<\\EOF\n\nand would append garbage \"yes cat\" to confdefs.h. Of course the result \nconfdefs.h is not syntactically correct therefore following tests\nusing confdefs.h would all fail.\nTo avoid the problem, we could switch the order of AC_MSG_RESULT and\nAC_DEFINE (see attached patch). This happend on my LinuxPPC box.\n--\nTatsuo Ishii\[email protected]\n-------------------------------------------------------------------\n*** configure.in.orig\tMon Aug 24 12:34:26 1998\n--- configure.in\tMon Aug 24 12:31:50 1998\n***************\n*** 596,602 ****\n main() {\n exit(! does_int64_work());\n }],\n! \t[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LONG_LONG_INT_64)],\n \tAC_MSG_RESULT(no),\n \tAC_MSG_RESULT(assuming not on target machine))\n \n--- 596,602 ----\n main() {\n exit(! does_int64_work());\n }],\n! \t[AC_DEFINE(HAVE_LONG_LONG_INT_64) AC_MSG_RESULT(yes)],\n \tAC_MSG_RESULT(no),\n \tAC_MSG_RESULT(assuming not on target machine))\n \n", "msg_date": "Mon, 24 Aug 1998 12:51:36 +0900", "msg_from": "[email protected]", "msg_from_op": true, "msg_subject": "minor problem with detecting int64 in configure" }, { "msg_contents": "[email protected] writes:\n> I have found a minor problem with current configure.in.\n> [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LONG_INT_64)],\n> this line produces something like:\n> echo \"$ac_t\"\"yes\" 1>&6 cat >> confdefs.h <<\\EOF\n> and would append garbage \"yes cat\" to confdefs.h.\n\nOops. My bad. Patcher please note that the HAVE_LONG_LONG_INT_64\ntest needs the same fix.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 24 Aug 1998 10:43:59 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] minor problem with detecting int64 in configure " }, { "msg_contents": "> [email protected] writes:\n> > I have found a minor problem with current configure.in.\n> > [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LONG_INT_64)],\n> > this line produces something like:\n> > echo \"$ac_t\"\"yes\" 1>&6 cat >> confdefs.h <<\\EOF\n> > and would append garbage \"yes cat\" to confdefs.h.\n> \n> Oops. My bad. Patcher please note that the HAVE_LONG_LONG_INT_64\n> test needs the same fix.\n\nDone. Autoconf done.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 24 Aug 1998 11:42:55 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] minor problem with detecting int64 in configure" } ]
[ { "msg_contents": "Bruce Momjian wrote:\n> \n> > Vadim Mikheev <[email protected]> writes:\n> > > In UPDATE backend inserts index tuple for new version of heap tuple\n> > > and adjusts all index scans affected by this insertion.\n> > > Something is wrong in nbtscan.c:_bt_adjscans()...\n> \n> I assume this has been fixed, right?\n\nYes.\n\nVadim\n", "msg_date": "Mon, 24 Aug 1998 12:12:56 +0800", "msg_from": "Vadim Mikheev <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Bogus \"Non-functional update\" notices" } ]
[ { "msg_contents": ">> In summary, the capability to span would be the next resort after someone\n>> has maxed out their blocksize. Each OS would have a different blocksize\n>> max...an AIX driver breaks when going past 16k...don't know about others.\n>> \n>> I'd say make the blocksize a run-time variable and then do the spanning.\n>\n>If we could query to find the file system block size at runtime in a\n>portable way, that would help us pick the best block size, no?\n\nNo, I would really not suggest that. Having one default page size is really the \nbest thing. If we have chaining, making the default 4k is probably a good thing.\nMost commercial DBMS's have a tuneable blocksize with a 2k or 4k default.\n\nYou usually have tables so different, that specifying one optimal blocksize would not\nbe possible.\n\nThe chained row performance hit could be equalled out by implementing good read ahead.\nThe consecutive pages would already be read when they are needed. A good OS\ndoes this anyway.\n\nDoing tests with dd show, that the blocksize does have a performance impact\nwhen doing IO on a file system file. Even if the OS does the read ahead in an\nappropriate blocksize, there are a lot more system calls with small block sizes.\nWhere the blocksize does show dramatically is on raw devices.\n\nSo for IO reasons the blocksize should be large (on my box 64k or 256k).\nBut, such large blocks have a negative effect on buffer cache hit ratio.\nUsually you say:\nOLTP system --> small block size to maximize buffer usage and simultaneous access\nDSS/OLAP systems --> large block size to maximize sequential scan performance\n\nConclusio:\nThe size of a block is always a trade off between IO bandwidth and memory usage.\nTherefore having it a tuneable parameter per instance or database is best.\n\nAndreas\n\n", "msg_date": "Mon, 24 Aug 1998 13:52:23 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "AW: [HACKERS] What I'm working on" } ]
[ { "msg_contents": "\n\nBruce Momjian wrote:\n\n> Did we fix this yet?\n>\n> > While testing my 6.4 patch to allow functions/expressions to be\n> > specified in the ORDER/GROUP BY clause (and not in the target list) I\n> > came across a nasty little bug. A segmentation fault gets thrown\n> > somewhere in replace_agg_clause() when using aggregates, in combination\n> > with a function or expression. (I am still tracking down the\n> > offending lines of code. Sorry, the Linux/GCC environment is still new\n> > to me.)\n> >\n> > I backed out my patch, and discovered the bug was still present. The\n> > bug does not exist in version 6.3.2. Here is an example:\n> >\n> > -- This crashes the backend\n> > select upper(a) as x, count(k) from t group by x;\n> >\n> > -- This works fine\n> > select upper(a) as x, count(a) from t group by x;\n> >\n> > Notice how in the first query, (the one that does not work) upper() has\n> > a different argument than count(). And in the second query (the one\n> > that works) upper() has the same argument as count(). When using\n> > count(*) it will always fail.\n> >\n> > This is the the pattern that I have observed. If the arguments in the\n> > aggregate and non-aggregate functions are the same, it runs; if the\n> > arguments in the aggregate and non-aggregate functions are different, it\n> > crashes.\n> >\n> > I have attached a test script for anyone able to help with (or verify)\n> > this problem.\n> >\n> >\n> >\n>\n> > create table t (\n> > j integer,\n> > k integer,\n> > a varchar\n> > );\n> > insert into t values (1, 1, 'a');\n> > insert into t values (2, 2, 'b');\n> > insert into t values (2, 3, 'c');\n> > insert into t values (3, 4, 'A');\n> > insert into t values (3, 5, 'B');\n> > insert into t values (3, 6, 'C');\n> > insert into t values (4, 7, 'a');\n> > insert into t values (4, 8, 'b');\n> > insert into t values (4, 9, 'c');\n> > insert into t values (4, 0, 'a');\n> >\n> > -- OK\n> > select upper(a) as x, count(a) from t group by x;\n> >\n> > -- OK\n> > select k/2 as x, max(k) from t group by x;\n> >\n> > -- OK\n> > -- select k as x, max(j) from t group by x;\n> >\n> > -- OK\n> > select upper(a) as x, count(k), count(a) from t group by x;\n> >\n> > -- CRASH\n> > select k/2 as x, max(j) from t group by x;\n> >\n> > -- CRASH\n> > select upper(a) as x, count(k) from t group by x;\n> >\n> > -- CRASH\n> > select upper(a) as x, count(xmin) from t group by x;\n> >\n> > -- CRASH\n> > select upper(a) as x, count(oid) from t group by x;\n> >\n> > -- CRASH\n> > select upper(a) as x, count(*) from t group by x;\n\nIt seems that the last case has corrected itself.\n\n select upper(a) as x, count(*) from t group by x\n WORKS\n\nThe other conditions are still a problem. In general, as long as the\nargument in the grouped function is used somewhere else in the target list\nthere is no problem.\n\n select func(x), x, aggfunc(y) group by func\n WORKS\n\n select func(x), aggfunc(y) group by func\n CRASHES\n\n", "msg_date": "Mon, 24 Aug 1998 08:24:06 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] 6.4 Aggregate Bug" }, { "msg_contents": "> \n> \n> Bruce Momjian wrote:\n> \n> > Did we fix this yet?\n> >\n> > > While testing my 6.4 patch to allow functions/expressions to be\n> > > specified in the ORDER/GROUP BY clause (and not in the target list) I\n> > > came across a nasty little bug. A segmentation fault gets thrown\n> > > somewhere in replace_agg_clause() when using aggregates, in combination\n> > > with a function or expression. (I am still tracking down the\n> > > offending lines of code. Sorry, the Linux/GCC environment is still new\n> > > to me.)\n> > >\n> > > I backed out my patch, and discovered the bug was still present. The\n> > > bug does not exist in version 6.3.2. Here is an example:\n> > >\n> > > -- This crashes the backend\n> > > select upper(a) as x, count(k) from t group by x;\n> > >\n> > > -- This works fine\n> > > select upper(a) as x, count(a) from t group by x;\n> > >\n> > > Notice how in the first query, (the one that does not work) upper() has\n> > > a different argument than count(). And in the second query (the one\n> > > that works) upper() has the same argument as count(). When using\n> > > count(*) it will always fail.\n> > >\n> > > This is the the pattern that I have observed. If the arguments in the\n> > > aggregate and non-aggregate functions are the same, it runs; if the\n> > > arguments in the aggregate and non-aggregate functions are different, it\n> > > crashes.\n> > >\n> > > I have attached a test script for anyone able to help with (or verify)\n> > > this problem.\n> > >\n> > >\n> > >\n> >\n> > > create table t (\n> > > j integer,\n> > > k integer,\n> > > a varchar\n> > > );\n> > > insert into t values (1, 1, 'a');\n> > > insert into t values (2, 2, 'b');\n> > > insert into t values (2, 3, 'c');\n> > > insert into t values (3, 4, 'A');\n> > > insert into t values (3, 5, 'B');\n> > > insert into t values (3, 6, 'C');\n> > > insert into t values (4, 7, 'a');\n> > > insert into t values (4, 8, 'b');\n> > > insert into t values (4, 9, 'c');\n> > > insert into t values (4, 0, 'a');\n> > >\n> > > -- OK\n> > > select upper(a) as x, count(a) from t group by x;\n> > >\n> > > -- OK\n> > > select k/2 as x, max(k) from t group by x;\n> > >\n> > > -- OK\n> > > -- select k as x, max(j) from t group by x;\n> > >\n> > > -- OK\n> > > select upper(a) as x, count(k), count(a) from t group by x;\n> > >\n> > > -- CRASH\n> > > select k/2 as x, max(j) from t group by x;\n> > >\n> > > -- CRASH\n> > > select upper(a) as x, count(k) from t group by x;\n> > >\n> > > -- CRASH\n> > > select upper(a) as x, count(xmin) from t group by x;\n> > >\n> > > -- CRASH\n> > > select upper(a) as x, count(oid) from t group by x;\n> > >\n> > > -- CRASH\n> > > select upper(a) as x, count(*) from t group by x;\n> \n> It seems that the last case has corrected itself.\n> \n> select upper(a) as x, count(*) from t group by x\n> WORKS\n> \n> The other conditions are still a problem. In general, as long as the\n> argument in the grouped function is used somewhere else in the target list\n> there is no problem.\n> \n> select func(x), x, aggfunc(y) group by func\n> WORKS\n> \n> select func(x), aggfunc(y) group by func\n> CRASHES\n> \n> \n\nAdded to TODO:\n\n* select upper(usename), count(usesysid) from pg_shadow group by 1 fails\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 28 Aug 1998 23:48:48 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] 6.4 Aggregate Bug" }, { "msg_contents": "> Added to TODO:\n> \n> * select upper(usename), count(usesysid) from pg_shadow group by 1 fails\n\nFixed. Was broken by new HAVING code...\n\nI see another problems in HAVING:\n\n1.\ndrop table x;\ncreate table x (a int, b int, c int);\ninsert into x values (1,1,0);\ninsert into x values (1,1,1);\nselect a, min (b) from x group by a having min(b) > c;\n-- a|min\n-- -+---\n-- 1| 1\n-- (1 row)\ndelete from x;\nvacuum x;\ninsert into x values (1,1,1);\ninsert into x values (1,1,0);\nselect a, min (b) from x group by a having min(b) > c;\n-- a|min\n-- -+---\n-- (0 rows)\n\nUsing C-column is illegal!\n\n2.\nvac=> select a, min (b) from x group by a having min(b) > 0 or a = 0;\n ^^^^^^^^\nERROR: This could have been done in a where clause!!\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nNo, couldn't! Using GroupBy expr in having must be allowed.\n\nI'm going to change HAVING behaviour...\n\nAlso, could someone test is HAVING without aggregates\ndisallowed or not:\n\nselect a, min (b) from x group by a having a = 0;\n\n- ???\n\nVadim\n", "msg_date": "Tue, 08 Sep 1998 14:40:16 +0800", "msg_from": "Vadim Mikheev <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] 6.4 Aggregate Bug and HAVING problems..." } ]
[ { "msg_contents": "It currently looks like all developers are on a platform where USE_LOCALE is defined.\n\nIf it is not defined (e.g. on AIX) I get all sorts of \nFunction argument assignment between types \"unsigned char*\" and \"char*\" is not allowed.\n\nI gather unsigned char's are only supposed to show up in a USE_LOCALE environment.\n\nbackend/util/adt/varlena.c\nbackend/commands/copy.c\ninclude/utils/builtins.h\n\nAndreas\n\n", "msg_date": "Mon, 24 Aug 1998 14:54:08 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "USE_LOCALE and unsigned char *" }, { "msg_contents": "> It currently looks like all developers are on a platform where USE_LOCALE is defined.\n> \n> If it is not defined (e.g. on AIX) I get all sorts of \n> Function argument assignment between types \"unsigned char*\" and \"char*\" is not allowed.\n> \n> I gather unsigned char's are only supposed to show up in a USE_LOCALE environment.\n> \n> backend/util/adt/varlena.c\n> backend/commands/copy.c\n> include/utils/builtins.h\n> \n> Andreas\n\n\n\n\nI #ifdef USE_LOCALE around varlena.c, but I don't see the other ones. \nSend in some patches, OK?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 2 Sep 1998 19:18:26 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] USE_LOCALE and unsigned char *" }, { "msg_contents": "At 7:18 PM 98.9.2 -0400, Bruce Momjian wrote:\n>> It currently looks like all developers are on a platform where USE_LOCALE is\n>>defined.\n>> \n>> If it is not defined (e.g. on AIX) I get all sorts of \n>> Function argument assignment between types \"unsigned char*\" and \"char*\" is\n>>not allowed.\n>> \n>> I gather unsigned char's are only supposed to show up in a USE_LOCALE\n>>environment.\n>> \n>> backend/util/adt/varlena.c\n>> backend/commands/copy.c\n>> include/utils/builtins.h\n>> \n>> Andreas\n>\n>\n>\n>\n>I #ifdef USE_LOCALE around varlena.c, but I don't see the other ones. \n>Send in some patches, OK?\n\nI think I am responsible of some of \"unisigned char problems.\"\nI will look into these as soon as I confirm Bruce's fix works\nfor LinuxPPC. Ok?\n\n--\nTatsuo Ishii\[email protected]\n\n", "msg_date": "Thu, 3 Sep 1998 09:37:03 +0900", "msg_from": "[email protected] (Tatsuo Ishii)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] USE_LOCALE and unsigned char *" }, { "msg_contents": "> >> It currently looks like all developers are on a platform where \n> >> USE_LOCALE is defined.\n> >> If it is not defined (e.g. on AIX) I get all sorts of\n> >> Function argument assignment between types \"unsigned char*\" and \n> >> \"char*\" is not allowed.\n> I think I am responsible of some of \"unisigned char problems.\"\n> I will look into these as soon as I confirm Bruce's fix works\n> for LinuxPPC. Ok?\n\nfwiw, gcc seems much more tolerant of this. I never compile with the\nUSE_LOCALE features (unless trying to debug timezone complaints :) and\nmy builds don't barf^H^H^H^Hfail.\n\n - Tom\n", "msg_date": "Thu, 03 Sep 1998 02:52:48 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] USE_LOCALE and unsigned char *" }, { "msg_contents": ">>> It currently looks like all developers are on a platform where USE_LOCALE is\n>>>defined.\n>>> \n>>> If it is not defined (e.g. on AIX) I get all sorts of \n>>> Function argument assignment between types \"unsigned char*\" and \"char*\" is\n>>>not allowed.\n>>> \n>>> I gather unsigned char's are only supposed to show up in a USE_LOCALE\n>>>environment.\n>>> \n>>> backend/util/adt/varlena.c\n>>> backend/commands/copy.c\n>>> include/utils/builtins.h\n>>> \n>>> Andreas\n>>\n>>\n>>\n>>\n>>I #ifdef USE_LOCALE around varlena.c, but I don't see the other ones. \n>>Send in some patches, OK?\n>\n>I think I am responsible of some of \"unisigned char problems.\"\n>I will look into these as soon as I confirm Bruce's fix works\n>for LinuxPPC. Ok?\n\nI looked into above three files. So far I couldn't find any problem\nwith them. maybe I should look for another file?\n--\nTatsuo Ishii\[email protected]\n", "msg_date": "Thu, 03 Sep 1998 18:17:50 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] USE_LOCALE and unsigned char * " } ]
[ { "msg_contents": ">\n> select func(x), aggfunc(y) group by func\n> CRASHES\n>\n\nI think this should be disallowed syntax. Note that func is a system generated label \nin this case, that's probably why the parser does not complain. The syntax has to be:\n\nselect func(x), aggfunc(y) group by func(x); -- or\n\nselect func(x) as func, aggfunc(y) group by func;\n\nAndreas\n\n", "msg_date": "Mon, 24 Aug 1998 15:00:51 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "AW: [HACKERS] 6.4 Aggregate Bug" }, { "msg_contents": "\n\nAndreas Zeugswetter wrote:\n\n> >\n> > select func(x), aggfunc(y) group by func\n> > CRASHES\n> >\n>\n> I think this should be disallowed syntax. Note that func is a system generated label\n> in this case, that's probably why the parser does not complain. The syntax has to be:\n>\n> select func(x), aggfunc(y) group by func(x); -- or\n>\n> select func(x) as func, aggfunc(y) group by func;\n>\n\nTo my knowledge postgres has always allowed this syntax. IMO is seems harmless to\ncontinue. In any case, all of these syntax permutations will crash the backend in using\n6.4.\n\n", "msg_date": "Mon, 24 Aug 1998 09:42:53 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: [HACKERS] 6.4 Aggregate Bug" } ]
[ { "msg_contents": "Marc,\n\nI just down loaded the snapshot twice now with a size of 3407872.\nEach time I gunzip it I get an \"unexpected end of file\". Am I getting\nthe whole file, or is there a problem with the snapshot.\n\n\n\n", "msg_date": "Mon, 24 Aug 1998 10:05:51 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": true, "msg_subject": "Current snapshot" }, { "msg_contents": "On Mon, 24 Aug 1998, David Hartwig wrote:\n\n> Marc,\n> \n> I just down loaded the snapshot twice now with a size of 3407872.\n> Each time I gunzip it I get an \"unexpected end of file\". Am I getting\n> the whole file, or is there a problem with the snapshot.\n\n\tprobably a problem with the snapshot...try out tonights, I've\nswitched to nightly snapshots with us so close to the beta...\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Tue, 25 Aug 1998 18:41:50 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Current snapshot" } ]
[ { "msg_contents": "subscribe\n\n", "msg_date": "Mon, 24 Aug 1998 15:25:32 +0100", "msg_from": "John Reynolds <[email protected]>", "msg_from_op": true, "msg_subject": "subscribe" } ]
[ { "msg_contents": ">In my experience, the problem seems to be caused by a lot of data being put\n>into the database. We are using the database to ingest real-time data 24\n>hours a day/7 days a week. The data comes in about every three minutes.\n>While I was not able to identify what the exact cause has been, I have\n>noticed that before the problem becomes critical (before the backend\n>terminates abnormally), the (number of) indexes do not correspond to the\n>actual table. That leads me to believe that the indexes do not get created\n>on all occasions. After some time, the table's internal indexes may be come\n>corrupted, and vacuuming does no good.\n>\n>When trying to fix this, I first delete the index, then recreate it., then\n>vacuum. If that doesn't work, then I drop the table, create the index,\n>reload the data, and then vacuum the table.\n>\n>I would be curious to see if anyone else has had this type of problem and\n>what their solutions were.\n\nSame with us here, we use a really big database, but in my experience, it\nhappend only when I killed (with SIGTERM, but anyway) a single postgres\nprocess that made an \"endless\" query. I think that some internal tables are\nleft over in the data/base directory tree, and postgres tends to get\nconfused about them.\nNot sure about this anyway.\n\nDROP/CREATE INDEX didn't solve this, I always did a DROP DATABASE and a\ncomplete reload of all data, and then it worked fine again.\n\n", "msg_date": "Mon, 24 Aug 1998 18:17:23 +0100", "msg_from": "Florian Wunderlich <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [GENERAL] DELETE statement KILL backend <AGAIN>" }, { "msg_contents": "Hello Florian,\n\nThanks for your reply.\n\nluned�, 24 agosto 98, you wrote:\n\n>>In my experience, the problem seems to be caused by a lot of data being put\n>>into the database. We are using the database to ingest real-time data 24\n>>hours a day/7 days a week. The data comes in about every three minutes.\n>>While I was not able to identify what the exact cause has been, I have\n>>noticed that before the problem becomes critical (before the backend\n>>terminates abnormally), the (number of) indexes do not correspond to the\n>>actual table. That leads me to believe that the indexes do not get created\n>>on all occasions. After some time, the table's internal indexes may be come\n>>corrupted, and vacuuming does no good.\n>>\n>>When trying to fix this, I first delete the index, then recreate it., then\n>>vacuum. If that doesn't work, then I drop the table, create the index,\n>>reload the data, and then vacuum the table.\n>>\n>>I would be curious to see if anyone else has had this type of problem and\n>>what their solutions were.\n\nFW> Same with us here, we use a really big database, but in my experience, it\nFW> happend only when I killed (with SIGTERM, but anyway) a single postgres\nFW> process that made an \"endless\" query. I think that some internal tables are\nFW> left over in the data/base directory tree, and postgres tends to get\nFW> confused about them.\nFW> Not sure about this anyway.\n\nI want to say something about this stuff to hackers;\nI see that temporary files are created in the same directory of data\nand this generate a few of confusion, often I find files like\npg_psort# or pg_vlock and I'm not sure if I can safety remove them or not.\nMay I suggest to have a tmp directory on data/base/dbname/tmp\ndirectory tree to these files ?\n\nFW> DROP/CREATE INDEX didn't solve this, I always did a DROP DATABASE and a\nFW> complete reload of all data, and then it worked fine again.\n\nYour is a good tip Florian but I think it's not very professional, I\ncan't imagine me removing and re-creating the database every time I\nhave a problem with it. I can't believe that PostgreSQL is like\nM$-Windows that I have to re-install every time I have a problem.\n\nAnyway DROP DATABASE statement doesn't work for me, the postmaster gives me the same\nerror message before die.\nThanks anyway for your tips Florian.\n\nBest regards,\n Jose' mailto:[email protected]\n\n\n", "msg_date": "Tue, 25 Aug 1998 11:10:29 +0200", "msg_from": "Sferacarta Software <[email protected]>", "msg_from_op": false, "msg_subject": "Re[2]: [GENERAL] DELETE statement DOESN'T WORK ANYMORE" }, { "msg_contents": "> I want to say something about this stuff to hackers;\n> I see that temporary files are created in the same directory of data\n> and this generate a few of confusion, often I find files like\n> pg_psort# or pg_vlock and I'm not sure if I can safety remove them or not.\n> May I suggest to have a tmp directory on data/base/dbname/tmp\n> directory tree to these files ?\n\nAdded to TODO.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 25 Aug 1998 13:37:40 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re[2]: [GENERAL] DELETE statement DOESN'T WORK ANYMORE" } ]
[ { "msg_contents": "> Bruce,\n> \n> It does not seem to be an initdb problem per se, as the initdb\n> proceeds normally and I end up with a database that works to some\n> extent.\n> \n> If you have seen my recent posts and backtraces you will see that,\n> after initdb'ing, I connect to the template1 database and do a\n> \"select * from pg_user;\" is get an error.\n> \n> template1=> select * from pg_user;\n> ERROR: Relation pg_user does not have attribute usename\n> template1=> \n> \n> If I attempt to create a table I get a core dump.\n> \n> It smells of an alignment problem (I'm on SPARC/Linux) as the\n> error is in a system call memmove() and the library call where\n> it bombs is _wordcopy_fwd_aligned ().\n\nOK.\n\nI have fixed the bootstrap process so it properly assignes attalign\nvalues. It was not need with single-key indexes, but is needed now.\n\nAlso, I found many cases where system columns where missing\npg_attribute.attalign values. The values where ' '. The system has no\nidea what to do with such a value.\n\nWould someone check a running 6.3.2 system and let me know if there are\nany blank attalign values? It think you will find that there are. The\ncurrent patch fixes that.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 24 Aug 1998 15:18:28 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "On Mon, Aug 24, 1998 at 03:18:28PM -0400, Bruce Momjian wrote:\n> Would someone check a running 6.3.2 system and let me know if there are\n> any blank attalign values? It think you will find that there are. The\n> current patch fixes that.\n\necho \"select * from pg_attribute where attalign != 'i' and attalign !=\n'c'and attalign != 'd' and attalign!='s';\"|psql template1\n\ngives:\n\nattrelid|attname |atttypid|attdisbursion|attlen|attnum|attnelems|attcacheoff|atttypmod|attbyval|attisset|attalign|attnotnull|atthasdef\n--------+--------------+--------+-------------+------+------+---------+-----------+---------+--------+--------+--------+----------+---------\n 16536|inhrel | 26| 0| 4| 1| 0| -1| -1|t |f | |f |f \n 16536|inhparent | 26| 0| 4| 2| 0| -1| -1|t |f | |f |f \n 16536|inhseqno | 23| 0| 4| 3| 0| -1| -1|t |f | |f |f \n 16547|indexrelid | 26| 0| 4| 1| 0| -1| -1|t |f | |f |f \n 16547|indrelid | 26| 0| 4| 2| 0| -1| -1|t |f | |f |f \n 16547|indproc | 26| 0| 4| 3| 0| -1| -1|t |f | |f |f \n 16547|indkey | 22| 0| 16| 4| 0| -1| -1|f |f | |f |f \n 16547|indclass | 30| 0| 32| 5| 0| -1| -1|f |f | |f |f \n 16547|indisclustered| 16| 0| 1| 6| 0| -1| -1|t |f | |f |f \n 16547|indislossy | 16| 0| 1| 7| 0| -1| -1|t |f | |f |f \n 16547|indhaskeytype | 16| 0| 1| 8| 0| -1| -1|t |f | |f |f \n 16547|indisunique | 16| 0| 1| 9| 0| -1| -1|t |f | |f |f \n 16547|indpred | 25| 0| -1| 10| 0| -1| -1|f |f | |f |f \n 16565|verrelid | 26| 0| 4| 1| 0| -1| -1|t |f | |f |f \n 16565|verbaseid | 26| 0| 4| 2| 0| -1| -1|t |f | |f |f \n 16565|vertime | 23| 0| 4| 3| 0| -1| -1|t |f | |f |f \n 16577|starelid | 26| 0| 4| 1| 0| -1| -1|t |f | |f |f \n 16577|staattnum | 21| 0| 2| 2| 0| -1| -1|t |f | |f |f \n 16577|staop | 26| 0| 4| 3| 0| -1| -1|t |f | |f |f \n 16577|stalokey | 25| 0| -1| 4| 0| -1| -1|f |f | |f |f \n 16577|stahikey | 25| 0| -1| 5| 0| -1| -1|f |f | |f |f \n 16590|oprname | 19| 0| 32| 1| 0| -1| -1|f |f | |f |f \n 16590|oprowner | 26| 0| 4| 2| 0| -1| -1|t |f | |f |f \n 16590|oprprec | 21| 0| 2| 3| 0| -1| -1|t |f | |f |f \n 16590|oprkind | 18| 0| 1| 4| 0| -1| -1|t |f | |f |f \n 16590|oprisleft | 16| 0| 1| 5| 0| -1| -1|t |f | |f |f \n 16590|oprcanhash | 16| 0| 1| 6| 0| -1| -1|t |f | |f |f \n 16590|oprleft | 26| 0| 4| 7| 0| -1| -1|t |f | |f |f \n 16590|oprright | 26| 0| 4| 8| 0| -1| -1|t |f | |f |f \n 16590|oprresult | 26| 0| 4| 9| 0| -1| -1|t |f | |f |f \n 16590|oprcom | 26| 0| 4| 10| 0| -1| -1|t |f | |f |f \n 16590|oprnegate | 26| 0| 4| 11| 0| -1| -1|t |f | |f |f \n 16590|oprlsortop | 26| 0| 4| 12| 0| -1| -1|t |f | |f |f \n 16590|oprrsortop | 26| 0| 4| 13| 0| -1| -1|t |f | |f |f \n 16590|oprcode | 24| 0| 4| 14| 0| -1| -1|t |f | |f |f \n 16590|oprrest | 24| 0| 4| 15| 0| -1| -1|t |f | |f |f \n 16590|oprjoin | 24| 0| 4| 16| 0| -1| -1|t |f | |f |f \n 16614|opcname | 19| 0| 32| 1| 0| -1| -1|f |f | |f |f \n 16614|opcdeftype | 26| 0| 4| 2| 0| -1| -1|t |f | |f |f \n 16624|amname | 19| 0| 32| 1| 0| -1| -1|f |f | |f |f \n 16624|amowner | 26| 0| 4| 2| 0| -1| -1|t |f | |f |f \n 16624|amkind | 18| 0| 1| 3| 0| -1| -1|t |f | |f |f \n 16624|amstrategies | 21| 0| 2| 4| 0| -1| -1|t |f | |f |f \n 16624|amsupport | 21| 0| 2| 5| 0| -1| -1|t |f | |f |f \n 16624|amgettuple | 24| 0| 4| 6| 0| -1| -1|t |f | |f |f \n 16624|aminsert | 24| 0| 4| 7| 0| -1| -1|t |f | |f |f \n 16624|amdelete | 24| 0| 4| 8| 0| -1| -1|t |f | |f |f \n 16624|amgetattr | 24| 0| 4| 9| 0| -1| -1|t |f | |f |f \n 16624|amsetlock | 24| 0| 4| 10| 0| -1| -1|t |f | |f |f \n 16624|amsettid | 24| 0| 4| 11| 0| -1| -1|t |f | |f |f \n 16624|amfreetuple | 24| 0| 4| 12| 0| -1| -1|t |f | |f |f \n 16624|ambeginscan | 24| 0| 4| 13| 0| -1| -1|t |f | |f |f \n 16624|amrescan | 24| 0| 4| 14| 0| -1| -1|t |f | |f |f \n 16624|amendscan | 24| 0| 4| 15| 0| -1| -1|t |f | |f |f \n 16624|ammarkpos | 24| 0| 4| 16| 0| -1| -1|t |f | |f |f \n 16624|amrestrpos | 24| 0| 4| 17| 0| -1| -1|t |f | |f |f \n 16624|amopen | 24| 0| 4| 18| 0| -1| -1|t |f | |f |f \n 16624|amclose | 24| 0| 4| 19| 0| -1| -1|t |f | |f |f \n 16624|ambuild | 24| 0| 4| 20| 0| -1| -1|t |f | |f |f \n 16624|amcreate | 24| 0| 4| 21| 0| -1| -1|t |f | |f |f \n 16624|amdestroy | 24| 0| 4| 22| 0| -1| -1|t |f | |f |f \n 16654|amopid | 26| 0| 4| 1| 0| -1| -1|t |f | |f |f \n 16654|amopclaid | 26| 0| 4| 2| 0| -1| -1|t |f | |f |f \n 16654|amopopr | 26| 0| 4| 3| 0| -1| -1|t |f | |f |f \n 16654|amopstrategy | 21| 0| 2| 4| 0| -1| -1|t |f | |f |f \n 16654|amopselect | 24| 0| 4| 5| 0| -1| -1|t |f | |f |f \n 16654|amopnpages | 24| 0| 4| 6| 0| -1| -1|t |f | |f |f \n 16838|amid | 26| 0| 4| 1| 0| -1| -1|t |f | |f |f \n 16838|amopclaid | 26| 0| 4| 2| 0| -1| -1|t |f | |f |f \n 16838|amproc | 26| 0| 4| 3| 0| -1| -1|t |f | |f |f \n 16838|amprocnum | 21| 0| 2| 4| 0| -1| -1|t |f | |f |f \n 16901|lanname | 19| 0| 32| 1| 0| -1| -1|f |f | |f |f \n 16901|lanispl | 16| 0| 1| 2| 0| -1| -1|t |f | |f |f \n 16901|lanpltrusted | 16| 0| 1| 3| 0| -1| -1|t |f | |f |f \n 16901|lanplcallfoid | 26| 0| 4| 4| 0| -1| -1|t |f | |f |f \n 16901|lancompiler | 25| 0| -1| 5| 0| -1| -1|f |f | |f |f \n 16914|parproid | 26| 0| 4| 1| 0| -1| -1|t |f | |f |f \n 16914|parnum | 21| 0| 2| 2| 0| -1| -1|t |f | |f |f \n 16914|parbound | 18| 0| 1| 3| 0| -1| -1|t |f | |f |f \n 16914|partype | 26| 0| 4| 4| 0| -1| -1|t |f | |f |f \n 16978|aggname | 19| 0| 32| 1| 0| -1| -1|f |f | |f |f \n 16978|aggowner | 26| 0| 4| 2| 0| -1| -1|t |f | |f |f \n 16978|aggtransfn1 | 24| 0| 4| 3| 0| -1| -1|t |f | |f |f \n 16978|aggtransfn2 | 24| 0| 4| 4| 0| -1| -1|t |f | |f |f \n 16978|aggfinalfn | 24| 0| 4| 5| 0| -1| -1|t |f | |f |f \n 16978|aggbasetype | 26| 0| 4| 6| 0| -1| -1|t |f | |f |f \n 16978|aggtranstype1 | 26| 0| 4| 7| 0| -1| -1|t |f | |f |f \n 16978|aggtranstype2 | 26| 0| 4| 8| 0| -1| -1|t |f | |f |f \n 16978|aggfinaltype | 26| 0| 4| 9| 0| -1| -1|t |f | |f |f \n 16978|agginitval1 | 25| 0| -1| 10| 0| -1| -1|f |f | |f |f \n 16978|agginitval2 | 25| 0| -1| 11| 0| -1| -1|f |f | |f |f \n 17030|iplrel | 26| 0| 4| 1| 0| -1| -1|t |f | |f |f \n 17030|iplipl | 26| 0| 4| 2| 0| -1| -1|t |f | |f |f \n 17030|iplseqno | 23| 0| 4| 3| 0| -1| -1|t |f | |f |f \n 17041|inhproname | 19| 0| 32| 1| 0| -1| -1|f |f | |f |f \n 17041|inhargrel | 26| 0| 4| 2| 0| -1| -1|t |f | |f |f \n 17041|inhdefrel | 26| 0| 4| 3| 0| -1| -1|t |f | |f |f \n 17041|inhproc | 26| 0| 4| 4| 0| -1| -1|t |f | |f |f \n 17053|rulename | 19| 0| 32| 1| 0| -1| -1|f |f | |f |f \n 17053|ev_type | 18| 0| 1| 2| 0| -1| -1|t |f | |f |f \n 17053|ev_class | 26| 0| 4| 3| 0| -1| -1|t |f | |f |f \n 17053|ev_attr | 21| 0| 2| 4| 0| -1| -1|t |f | |f |f \n 17053|is_instead | 16| 0| 1| 5| 0| -1| -1|t |f | |f |f \n 17053|ev_qual | 25| 0| -1| 6| 0| -1| -1|f |f | |f |f \n 17053|ev_action | 25| 0| -1| 7| 0| -1| -1|f |f | |f |f \n 17068|relname | 19| 0| 32| 1| 0| -1| -1|f |f | |f |f \n 17068|listenerpid | 23| 0| 4| 2| 0| -1| -1|t |f | |f |f \n 17068|notification | 23| 0| 4| 3| 0| -1| -1|t |f | |f |f \n 17079|objoid | 26| 0| 4| 1| 0| -1| -1|t |f | |f |f \n 17079|description | 25| 0| -1| 2| 0| -1| -1|f |f | |f |f \n 17089|mkoidname | 911| 0| 36| 1| 0| -1| -1|f |f | |f |f \n 17092|mkoidint2 | 810| 0| 6| 1| 0| -1| -1|f |f | |f |f \n 17095|attrelid | 26| 0| 4| 1| 0| -1| -1|t |f | |f |f \n 17101|proname | 19| 0| 32| 1| 0| -1| -1|f |f | |f |f \n 17104|prosrc | 25| 0| -1| 1| 0| -1| -1|f |f | |f |f \n 17110|typname | 19| 0| 32| 1| 0| -1| -1|f |f | |f |f \n 17116|relname | 19| 0| 32| 1| 0| -1| -1|f |f | |f |f \n 17129|objoid | 26| 0| 4| 1| 0| -1| -1|t |f | |f |f \n(118 rows)\n\nEOF\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Tue, 25 Aug 1998 09:01:11 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "> On Mon, Aug 24, 1998 at 03:18:28PM -0400, Bruce Momjian wrote:\n> > Would someone check a running 6.3.2 system and let me know if there are\n> > any blank attalign values? It think you will find that there are. The\n> > current patch fixes that.\n> \n> echo \"select * from pg_attribute where attalign != 'i' and attalign !=\n> 'c'and attalign != 'd' and attalign!='s';\"|psql template1\n\nYikes. Good thing that is fixed now.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 25 Aug 1998 13:32:27 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem" } ]
[ { "msg_contents": "Seems like there is some problem with cvs and people seeing all my\nchanges, causing initdb problems.\n\nThe only solution that has worked for two people is to re-download the\nentire cvs tree.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 24 Aug 1998 15:59:48 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "initdb problems" } ]
[ { "msg_contents": "Bruce,\n\nI've done a \"cvs update\" of my tree since your changes.\n\nFirstly, configure.in seems to have reverted to it's original state\nwhere the HAVE_LONG* stuff was broken.\n\nI've fixed that in my source and run autoconf so that I could build.\n\nSecondly the problem seems to be exactly the same as before.\n\n\"select * from pg_user\" returns:-\n\ntemplate1=> select * from pg_user;\nERROR: Relation pg_user does not have attribute usename\n\nCreating a table gives a core dump:-\n\ntemplate1=> create table dummy ( dummy int);\npqReadData() -- backend closed the channel unexpectedly.\n This probably means the backend terminated abnormally before or while \nprocessing the request.\nWe have lost the connection to the backend, so further processing is impossible. \n Terminating.\n[postgres@sparclinux pgsql]$\n\nI'm currently building with \"-g\" so that I can take a look at what's\nhappening.\n\nBTW: I've recently switched from cvsup to cvs and my local tree was\nfetched afresh at the weekend. (have done several \"cvs update\"s since)\n\nI'll let you know the results.\n\nKeith.\n\n\nBruce Momjian <[email protected]>\n> \n> Seems like there is some problem with cvs and people seeing all my\n> changes, causing initdb problems.\n> \n> The only solution that has worked for two people is to re-download the\n> entire cvs tree.\n\n", "msg_date": "Mon, 24 Aug 1998 22:43:19 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problems" }, { "msg_contents": "> Bruce,\n> \n> I've done a \"cvs update\" of my tree since your changes.\n> \n> Firstly, configure.in seems to have reverted to it's original state\n> where the HAVE_LONG* stuff was broken.\n> \n> I've fixed that in my source and run autoconf so that I could build.\n\nOK, I am not dealing with configure.in again on this int64 stuff. If\nsomeone wants to submit a patch to fix it, go ahead. No, \"Just make it\nlook like ...\".\n\n\n> \n> Secondly the problem seems to be exactly the same as before.\n> \n> \"select * from pg_user\" returns:-\n> \n> template1=> select * from pg_user;\n> ERROR: Relation pg_user does not have attribute usename\n> \n> Creating a table gives a core dump:-\n\nSee if pg_attribute has any empty attalign values, = ' '.\n\n> \n> template1=> create table dummy ( dummy int);\n> pqReadData() -- backend closed the channel unexpectedly.\n> This probably means the backend terminated abnormally before or while \n> processing the request.\n> We have lost the connection to the backend, so further processing is impossible. \n> Terminating.\n> [postgres@sparclinux pgsql]$\n> \n> I'm currently building with \"-g\" so that I can take a look at what's\n> happening.\n> \n> BTW: I've recently switched from cvsup to cvs and my local tree was\n> fetched afresh at the weekend. (have done several \"cvs update\"s since)\n> \n> I'll let you know the results.\n> \n> Keith.\n> \n> \n> Bruce Momjian <[email protected]>\n> > \n> > Seems like there is some problem with cvs and people seeing all my\n> > changes, causing initdb problems.\n> > \n> > The only solution that has worked for two people is to re-download the\n> > entire cvs tree.\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 24 Aug 1998 18:03:20 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problems" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n>> Firstly, configure.in seems to have reverted to it's original state\n>> where the HAVE_LONG* stuff was broken.\n\n> OK, I am not dealing with configure.in again on this int64 stuff. If\n> someone wants to submit a patch to fix it, go ahead. No, \"Just make it\n> look like ...\".\n\nIt's weird, I see the entries in \"cvs log configure.in\" saying that you\nfixed it in updates 1.184 and 1.185, but there's no difference between\n1.183 and 1.185:\n\n$ cvs diff -r1.183 -r1.185 configure.in\nIndex: configure.in\n===================================================================\nRCS file: /usr/local/cvsroot/pgsql/src/configure.in,v\nretrieving revision 1.183\nretrieving revision 1.185\ndiff -r1.183 -r1.185\n$\n\nI hope this was just pilot error on your part, and not a symptom of\na cvs bug :-(\n\nAnyway, here's a patch from the way that configure.in looks as of right\nnow, 1.185.\n\n(It looks like the reason I messed up the int64 tests is that I copied\nand pasted the HAVE_DBL_MIN_PROBLEM test, which was also broken...\nfixed here.)\n\n\t\t\tregards, tom lane\n\n*** src/configure.in.orig\tMon Aug 24 11:38:13 1998\n--- src/configure.in\tMon Aug 24 21:08:01 1998\n***************\n*** 522,528 ****\n #endif\n main() { double d = DBL_MIN; if (d != DBL_MIN) exit(-1); else exit(0); }],\n \tAC_MSG_RESULT(yes),\n! \t[AC_MSG_RESULT(no) AC_DEFINE(HAVE_DBL_MIN_PROBLEM)],\n \tAC_MSG_RESULT(assuming ok on target machine))\n \n dnl Check to see if we have a working 64-bit integer type.\n--- 522,528 ----\n #endif\n main() { double d = DBL_MIN; if (d != DBL_MIN) exit(-1); else exit(0); }],\n \tAC_MSG_RESULT(yes),\n! \t[AC_DEFINE(HAVE_DBL_MIN_PROBLEM) AC_MSG_RESULT(no)],\n \tAC_MSG_RESULT(assuming ok on target machine))\n \n dnl Check to see if we have a working 64-bit integer type.\n***************\n*** 559,565 ****\n main() {\n exit(! does_int64_work());\n }],\n! \t[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LONG_INT_64)],\n \tAC_MSG_RESULT(no),\n \tAC_MSG_RESULT(assuming not on target machine))\n \n--- 559,565 ----\n main() {\n exit(! does_int64_work());\n }],\n! \t[AC_DEFINE(HAVE_LONG_INT_64) AC_MSG_RESULT(yes)],\n \tAC_MSG_RESULT(no),\n \tAC_MSG_RESULT(assuming not on target machine))\n \n***************\n*** 596,602 ****\n main() {\n exit(! does_int64_work());\n }],\n! \t[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LONG_LONG_INT_64)],\n \tAC_MSG_RESULT(no),\n \tAC_MSG_RESULT(assuming not on target machine))\n \n--- 596,602 ----\n main() {\n exit(! does_int64_work());\n }],\n! \t[AC_DEFINE(HAVE_LONG_LONG_INT_64) AC_MSG_RESULT(yes)],\n \tAC_MSG_RESULT(no),\n \tAC_MSG_RESULT(assuming not on target machine))\n \n", "msg_date": "Mon, 24 Aug 1998 21:19:12 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problems " }, { "msg_contents": "> Bruce Momjian <[email protected]> writes:\n> >> Firstly, configure.in seems to have reverted to it's original state\n> >> where the HAVE_LONG* stuff was broken.\n> \n> > OK, I am not dealing with configure.in again on this int64 stuff. If\n> > someone wants to submit a patch to fix it, go ahead. No, \"Just make it\n> > look like ...\".\n> \n> It's weird, I see the entries in \"cvs log configure.in\" saying that you\n> fixed it in updates 1.184 and 1.185, but there's no difference between\n> 1.183 and 1.185:\n> \n> $ cvs diff -r1.183 -r1.185 configure.in\n> Index: configure.in\n> ===================================================================\n> RCS file: /usr/local/cvsroot/pgsql/src/configure.in,v\n> retrieving revision 1.183\n> retrieving revision 1.185\n> diff -r1.183 -r1.185\n> $\n> \n> I hope this was just pilot error on your part, and not a symptom of\n> a cvs bug :-(\n> \n> Anyway, here's a patch from the way that configure.in looks as of right\n> now, 1.185.\n> \n> (It looks like the reason I messed up the int64 tests is that I copied\n> and pasted the HAVE_DBL_MIN_PROBLEM test, which was also broken...\n> fixed here.)\n> \n\nI think I applied a patch, then reversed it manually trying to fix the\nother section. Patch applied and config run.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Mon, 24 Aug 1998 22:35:09 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problems" }, { "msg_contents": "> I see the entries in \"cvs log configure.in\" saying that you\n> fixed it in updates 1.184 and 1.185, but there's no difference between\n> 1.183 and 1.185:\n\nAre you using anonymous CVS, or CVSup? Also, have you done a full\ncheckout, or an update? If you haven't tried a full checkout, you\nshould; sometimes the tags seem to get messed up...\n\nI haven't actually tried the tree recently, since I've got other\nprojects going which need a running system :/\n\n - Tom\n", "msg_date": "Tue, 25 Aug 1998 03:16:47 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problems" } ]
[ { "msg_contents": "> I am applying another patch to fix missing alignment information. \n> Please try this and let me know.\n> \n> \n> > On Sun, Aug 23, 1998 at 11:52:03PM +0400, Oleg Bartunov wrote:\n> > > > What platform are people using. What failures? Are they consistent? \n> > > > Can someone give me telnet access to a machine that does not work?\n> > > > \n> > > \n> > > Linux 2.1.117, libc-5.4.46, egcs-2.91.50. My development computer is\n> > > in home and I can't give you telnet account :-) \n> > \n> > I still have the same problem: \n> > \n> > ERROR: fmgr_info: function 683: cache lookup failed\n> > \n> > ERROR: fmgr_info: function 683: cache lookup failed\n> > \n> > I'm using Linux-2.1.117, glibc 2.0.7, gcc-2.7.2.3.\n> > \n> > And once again now telnet account as we're talking about my private notebook\n> > only connected to the internet occassionally vie modem.\n> > \n> > > BTW, what's the best way to have several version of postgres on the\n> > > same computer ? \n> > \n> > I'm interested in this too. I have the Debian prepackaged versoin of 6.3.2\n> > and the development version. Seems to work fine, but then I only run one of\n> > them. To start the other I stop the one running.\n\nOK. I did a little checking:\n\t\n\t#$ cd /pg/include/catalog/\n\t#$ grep 683 *.h\n\t#$ grep 682 *.h\n\t#$ grep 681 *.h\n\tpg_proc.h:DATA(insert OID = 681 ( oid8gt PGUID\n\t11 f t f 2 f 16 \"30 30\" 100 0 0 100 foo bar ));\n\n\t#$ sql test\n\tseleWelcome to the POSTGRESQL interactive sql monitor:\n\t Please read the file COPYRIGHT for copyright terms of POSTGRESQL\n\t\n\t type \\? for help on slash commands\n\t type \\q to quit\n\t type \\g or terminate with semicolon to execute query\n\t You are currently connected to the database: test\n\t\n\tctest=> select * from pg_proc where oid = 683\n\ttest-> \\g\n\tproname|proowner|prolang|proisinh|proistrusted|proiscachable|pronargs|proretset|prorettype|proargtypes|probyte_pct|properbyte_cpu|propercall_cpu|prooutin_ratio|prosrc|probin\n\t-------+--------+-------+--------+------------+-------------+--------+---------+----------+-----------+-----------+--------------+--------------+--------------+------+------\n\t(0 rows)\n\n\nYour system is complaining about a lookup of 683. Part of the problem\nis that there is no reference to that number in the system catalog\nstuff, nor on my running system. Now I will say that 681 is one of the\nnew functions I added to allow indexing of the oid8 field. My guess is\nthat somewhere you have something with that number in your source, and\nit should not be there.\n\nTry reproducing my 'grep' and see if you get anything. If you do, the\nsomehow you have an old copy of the source.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 25 Aug 1998 00:53:21 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "I should be clear. This 'grep' was done in pgsql/src/include/catalog\ndirectory.\n\n> OK. I did a little checking:\n> \t\n> \t#$ cd /pg/include/catalog/\n> \t#$ grep 683 *.h\n> \t#$ grep 682 *.h\n> \t#$ grep 681 *.h\n> \tpg_proc.h:DATA(insert OID = 681 ( oid8gt PGUID\n> \t11 f t f 2 f 16 \"30 30\" 100 0 0 100 foo bar ));\n> \n> \t#$ sql test\n> \tseleWelcome to the POSTGRESQL interactive sql monitor:\n> \t Please read the file COPYRIGHT for copyright terms of POSTGRESQL\n> \t\n> \t type \\? for help on slash commands\n> \t type \\q to quit\n> \t type \\g or terminate with semicolon to execute query\n> \t You are currently connected to the database: test\n> \t\n> \tctest=> select * from pg_proc where oid = 683\n> \ttest-> \\g\n> \tproname|proowner|prolang|proisinh|proistrusted|proiscachable|pronargs|proretset|prorettype|proargtypes|probyte_pct|properbyte_cpu|propercall_cpu|prooutin_ratio|prosrc|probin\n> \t-------+--------+-------+--------+------------+-------------+--------+---------+----------+-----------+-----------+--------------+--------------+--------------+------+------\n> \t(0 rows)\n> \n> \n> Your system is complaining about a lookup of 683. Part of the problem\n> is that there is no reference to that number in the system catalog\n> stuff, nor on my running system. Now I will say that 681 is one of the\n> new functions I added to allow indexing of the oid8 field. My guess is\n> that somewhere you have something with that number in your source, and\n> it should not be there.\n> \n> Try reproducing my 'grep' and see if you get anything. If you do, the\n> somehow you have an old copy of the source.\n> \n> -- \n> Bruce Momjian | 830 Blythe Avenue\n> [email protected] | Drexel Hill, Pennsylvania 19026\n> + If your life is a hard drive, | (610) 353-9879(w)\n> + Christ can be your backup. | (610) 853-3000(h)\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 25 Aug 1998 01:02:36 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "On Tue, Aug 25, 1998 at 12:53:21AM -0400, Bruce Momjian wrote:\n> OK. I did a little checking:\n> \t\n> \t#$ cd /pg/include/catalog/\n> \t#$ grep 683 *.h\n> \t#$ grep 682 *.h\n> \t#$ grep 681 *.h\n> \tpg_proc.h:DATA(insert OID = 681 ( oid8gt PGUID\n> \t11 f t f 2 f 16 \"30 30\" 100 0 0 100 foo bar ));\n\nExactly the same results for me.\n\n> \t#$ sql test\n> \tseleWelcome to the POSTGRESQL interactive sql monitor:\n> \t Please read the file COPYRIGHT for copyright terms of POSTGRESQL\n> \t\n> \t type \\? for help on slash commands\n> \t type \\q to quit\n> \t type \\g or terminate with semicolon to execute query\n> \t You are currently connected to the database: test\n> \t\n> \tctest=> select * from pg_proc where oid = 683\n> \ttest-> \\g\n> \tproname|proowner|prolang|proisinh|proistrusted|proiscachable|pronargs|proretset|prorettype|proargtypes|probyte_pct|properbyte_cpu|propercall_cpu|prooutin_ratio|prosrc|probin\n> \t-------+--------+-------+--------+------------+-------------+--------+---------+----------+-----------+-----------+--------------+--------------+--------------+------+------\n> \t(0 rows)\n\nCannot check that since it is initdb that fails.\n\n> that somewhere you have something with that number in your source, and\n> it should not be there.\n\nI grep through the whole source tree and all I found is:\n\n#define F_OID8EQ 683\n\nin ./include/fmgr.h\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Tue, 25 Aug 1998 14:28:01 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "> On Tue, Aug 25, 1998 at 12:53:21AM -0400, Bruce Momjian wrote:\n> > OK. I did a little checking:\n> > \t\n> > \t#$ cd /pg/include/catalog/\n> > \t#$ grep 683 *.h\n> > \t#$ grep 682 *.h\n> > \t#$ grep 681 *.h\n> > \tpg_proc.h:DATA(insert OID = 681 ( oid8gt PGUID\n> > \t11 f t f 2 f 16 \"30 30\" 100 0 0 100 foo bar ));\n> \n> Exactly the same results for me.\n> \n> > \t#$ sql test\n> > \tseleWelcome to the POSTGRESQL interactive sql monitor:\n> > \t Please read the file COPYRIGHT for copyright terms of POSTGRESQL\n> > \t\n> > \t type \\? for help on slash commands\n> > \t type \\q to quit\n> > \t type \\g or terminate with semicolon to execute query\n> > \t You are currently connected to the database: test\n> > \t\n> > \tctest=> select * from pg_proc where oid = 683\n> > \ttest-> \\g\n> > \tproname|proowner|prolang|proisinh|proistrusted|proiscachable|pronargs|proretset|prorettype|proargtypes|probyte_pct|properbyte_cpu|propercall_cpu|prooutin_ratio|prosrc|probin\n> > \t-------+--------+-------+--------+------------+-------------+--------+---------+----------+-----------+-----------+--------------+--------------+--------------+------+------\n> > \t(0 rows)\n> \n> Cannot check that since it is initdb that fails.\n> \n> > that somewhere you have something with that number in your source, and\n> > it should not be there.\n> \n> I grep through the whole source tree and all I found is:\n> \n> #define F_OID8EQ 683\n> \n> in ./include/fmgr.h\n\nThat is the problem. I don't have an fmgr.h file in include, just in\nbackend/fmgr.h. It is finding an old one first. It was not a problem\nas long as no one made changes to the system tables, but I did.\n\nThat is why the clean cvsup worked for people. How the fmgr.h file got\ninto include, I have no idea.\n\nThe only 683 I get from the source are labels in gram.c.\n\nRemove the file and recompile.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 25 Aug 1998 13:45:33 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "On Tue, Aug 25, 1998 at 01:45:33PM -0400, Bruce Momjian wrote:\n> That is the problem. I don't have an fmgr.h file in include, just in\n> backend/fmgr.h. It is finding an old one first. It was not a problem\n> as long as no one made changes to the system tables, but I did.\n> \n> That is why the clean cvsup worked for people. How the fmgr.h file got\n> into include, I have no idea.\n> \n> The only 683 I get from the source are labels in gram.c.\n> \n> Remove the file and recompile.\n\nI did and it works! Thanks a lot. I also tried the ecpg examples. Two ran\nfine, but the perftest.pgc example gets:\n\npostgres@feivel:~/pgsql/src/interfaces/ecpg.mm/test$ ./perftest\nI needed 14 seconds and 618584 microseconds for the insert test.\nsql error Error: ERROR: fmgr_info: function 28261: cache lookup failed\n\n line 19.\n\nline 19 is exec sql vacuum.\n\nBTW the UNLISTEN symbol is undefined in gram.y and here's a minor patch to\nbe able to compile ecpg:\n\ndiff -rc ecpg/preproc/preproc.y ecpg.mm/preproc/preproc.y\n*** ecpg/preproc/preproc.y Wed Aug 26 06:42:50 1998\n--- ecpg.mm/preproc/preproc.y Wed Aug 26 08:17:24 1998\n***************\n*** 641,647 ****\n %type <str> join_using where_clause relation_expr row_op sub_type\n %type <str> opt_column_list insert_rest InsertStmt OptimizableStmt\n %type <str> columnList DeleteStmt LockStmt UpdateStmt CursorStmt\n! %type <str> NotifyStmt columnElem copy_dirn SubUnion c_expr\n %type <str> copy_delimiter ListenStmt CopyStmt copy_file_name opt_binary\n %type <str> opt_with_copy FetchStmt opt_direction fetch_how_many opt_portal_name\n %type <str> ClosePortalStmt DestroyStmt VacuumStmt opt_verbose\n--- 641,647 ----\n %type <str> join_using where_clause relation_expr row_op sub_type\n %type <str> opt_column_list insert_rest InsertStmt OptimizableStmt\n %type <str> columnList DeleteStmt LockStmt UpdateStmt CursorStmt\n! %type <str> NotifyStmt columnElem copy_dirn SubUnion c_expr UnlistenStmt\n %type <str> copy_delimiter ListenStmt CopyStmt copy_file_name opt_binary\n %type <str> opt_with_copy FetchStmt opt_direction fetch_how_many opt_portal_name\n %type <str> ClosePortalStmt DestroyStmt VacuumStmt opt_verbose\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Wed, 26 Aug 1998 08:35:04 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "> On Tue, Aug 25, 1998 at 01:45:33PM -0400, Bruce Momjian wrote:\n> > That is the problem. I don't have an fmgr.h file in include, just in\n> > backend/fmgr.h. It is finding an old one first. It was not a problem\n> > as long as no one made changes to the system tables, but I did.\n> > \n> > That is why the clean cvsup worked for people. How the fmgr.h file got\n> > into include, I have no idea.\n> > \n> > The only 683 I get from the source are labels in gram.c.\n> > \n> > Remove the file and recompile.\n> \n> I did and it works! Thanks a lot. I also tried the ecpg examples. Two ran\n> fine, but the perftest.pgc example gets:\n> \n> postgres@feivel:~/pgsql/src/interfaces/ecpg.mm/test$ ./perftest\n> I needed 14 seconds and 618584 microseconds for the insert test.\n> sql error Error: ERROR: fmgr_info: function 28261: cache lookup failed\n> \n> line 19.\n> \n> line 19 is exec sql vacuum.\n> \n> BTW the UNLISTEN symbol is undefined in gram.y and here's a minor patch to\n> be able to compile ecpg:\n\nPatch applied. I just did a grep, and not 28261 was not found in\n/pgsql/src/include/catalog, so I assume some old binary is refering to\nit.\n\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 26 Aug 1998 12:37:27 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem" } ]
[ { "msg_contents": "Since 6.4. is nearing I'd like to see the ecpg patches make it into the\narchive, so everyone can test the latest changes.\n\nSo I resend them. Note that this version is my source against the current\nsource tree. So it includes the other patches. Please do only apply this\none.\n\nMichael\n\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux!", "msg_date": "Tue, 25 Aug 1998 09:03:36 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "ECPG patches" }, { "msg_contents": "\nApplied...\n\nOn Tue, 25 Aug 1998, Michael Meskes wrote:\n\n> Since 6.4. is nearing I'd like to see the ecpg patches make it into the\n> archive, so everyone can test the latest changes.\n> \n> So I resend them. Note that this version is my source against the current\n> source tree. So it includes the other patches. Please do only apply this\n> one.\n> \n> Michael\n> \n> -- \n> Michael Meskes\t\t\[email protected], [email protected]\n> Go SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n> \n\n", "msg_date": "Tue, 25 Aug 1998 07:55:31 -0400 (EDT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] ECPG patches" } ]
[ { "msg_contents": "Can someone please apply this portability patch to genbki.sh ? (Mark or \nBruce?)\nIt fixes a problem when cpp gives a warning when precompiling /dev/null \nlike:\n\"/dev/null\", line 1: 1506-229 (W) File is empty.\nThis leads to a hangup when doing the description load during initdb,\nsince stderr also ends up in the global1.description and \nlocal1_template1.description\n\nstderr has to be redirected to /dev/null:\n\n*** genbki.sh.ori\tTue Aug 21 18:18:03 1998\n--- genbki.sh\tTue Aug 25 \n10:32:19 1998\n***************\n*** 24,30 ****\n >/tmp/genbki.tmp\n \n \n PATH=$PATH:/lib:/usr/ccs/lib:/usr/ccs/lbin\t\t# to find cpp\n! cpp \n/dev/null >/dev/null\n if [ \"$?\" -ne 0 ]\n then\techo \"Can't find cpp. \n Exiting.\" 1>&2\n \texit 1\n--- 24,30 ----\n >/tmp/genbki.tmp\n \n \n PATH=$PATH:/lib:/usr/ccs/lib:/usr/ccs/lbin\t\t# to find cpp\n! cpp \n/dev/null >/dev/null 2>&1\n if [ \"$?\" -ne 0 ]\n then\techo \"Can't find cpp. \n Exiting.\" 1>&2\n \texit 1\n\n\n", "msg_date": "Tue, 25 Aug 1998 10:55:11 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "Portability bug in genbki.sh --> initdb hangup" }, { "msg_contents": "Applied. The patch you sent had an unusual wrap problem, but I added\nthe 2>&1.\n\n\n> Can someone please apply this portability patch to genbki.sh ? (Mark or \n> Bruce?)\n> It fixes a problem when cpp gives a warning when precompiling /dev/null \n> like:\n> \"/dev/null\", line 1: 1506-229 (W) File is empty.\n> This leads to a hangup when doing the description load during initdb,\n> since stderr also ends up in the global1.description and \n> local1_template1.description\n> \n> stderr has to be redirected to /dev/null:\n> \n> *** genbki.sh.ori\tTue Aug 21 18:18:03 1998\n> --- genbki.sh\tTue Aug 25 \n> 10:32:19 1998\n> ***************\n> *** 24,30 ****\n> >/tmp/genbki.tmp\n> \n> \n> PATH=$PATH:/lib:/usr/ccs/lib:/usr/ccs/lbin\t\t# to find cpp\n> ! cpp \n> /dev/null >/dev/null\n> if [ \"$?\" -ne 0 ]\n> then\techo \"Can't find cpp. \n> Exiting.\" 1>&2\n> \texit 1\n> --- 24,30 ----\n> >/tmp/genbki.tmp\n> \n> \n> PATH=$PATH:/lib:/usr/ccs/lib:/usr/ccs/lbin\t\t# to find cpp\n> ! cpp \n> /dev/null >/dev/null 2>&1\n> if [ \"$?\" -ne 0 ]\n> then\techo \"Can't find cpp. \n> Exiting.\" 1>&2\n> \texit 1\n> \n> \n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 25 Aug 1998 13:35:58 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Portability bug in genbki.sh --> initdb hangup" } ]
[ { "msg_contents": "vacuum still doesn't work for me.\n\nI did a regresion test and found the sanity_check test failed. The\nresult shows that the backend died while doing vacuum. I destroyed and\nre-created the regression database. Vacuum for a fresh database seems\nworking.\n\nNext I ran each test one by one manually to see when vacuum began to\nfail.\n\nVacuuming after the boolean test was ok but after the char test the\nbackend died.\n\nHere is a backtrace of the backend.\n\ngdb ../../backend/postgres ../../../../data/base/regression/postgres.core\nGDB is free software and you are welcome to distribute copies of it\n under certain conditions; type \"show copying\" to see the conditions.\nThere is absolutely no warranty for GDB; type \"show warranty\" for details.\nGDB 4.16 (i386-unknown-freebsd), \nCopyright 1996 Free Software Foundation, Inc...\nCore was generated by `postgres'.\nProgram terminated with signal 6, Abort trap.\nCannot access memory at address 0x20105080.\n#0 0x201c4b61 in ?? ()\n(gdb) where\n#0 0x201c4b61 in ?? ()\n#1 0x201c43d3 in ?? ()\n#2 0xcee08 in ExcAbort (excP=0xf9800, detail=0, data=0x0, \n message=0xd20ce \"!(0 < (size) && (size) <= (0xfffffff))\") at excabort.c:26\n#3 0xced67 in ExcUnCaught (excP=0xf9800, detail=0, data=0x0, \n message=0xd20ce \"!(0 < (size) && (size) <= (0xfffffff))\") at exc.c:173\n#4 0xcedba in ExcRaise (excP=0xf9800, detail=0, data=0x0, \n message=0xd20ce \"!(0 < (size) && (size) <= (0xfffffff))\") at exc.c:190\n#5 0xce5ef in ExceptionalCondition (\n conditionName=0xd20ce \"!(0 < (size) && (size) <= (0xfffffff))\", \n exceptionP=0xf9800, detail=0x11d85c \"size=0 [0x0]\", \n fileName=0xd20b8 \"mcxt.c\", lineNumber=228) at assert.c:73\n#6 0xd2140 in MemoryContextAlloc (context=0x1320ac, size=0) at mcxt.c:227\n#7 0xd23b2 in palloc (size=0) at palloc.c:69\n#8 0xde02 in GetIndexValue (tuple=0x210850d8, hTupDesc=0x12d250, attOff=0, \n attrNums=0x21054bbc, fInfo=0x13ae10, attNull=0xefbfaa8f \"\")\n at indexam.c:386\n#9 0x222e8 in FormIndexDatum (numberOfAttributes=1, \n attributeNumber=0x21054bbc, heapTuple=0x210850d8, heapDescriptor=0x12d250, \n datum=0x19fe90, nullv=0x1a16d0 \"\\220#\\032\", fInfo=0x13ae10) at index.c:1284\n#10 0x2f45d in vc_rpfheap (vacrelstats=0x12e850, onerel=0x132b10, \n vacuum_pages=0xefbfac44, fraged_pages=0xefbfac38, nindices=3, \n Irel=0x1a16b0) at vacuum.c:1146\n#11 0x2e1b7 in vc_vacone (relid=1249, analyze=0, va_cols=0x0) at vacuum.c:552\n#12 0x2d911 in vc_vacuum (VacRelP=0x0, analyze=0 '\\000', va_cols=0x0)\n at vacuum.c:256\n#13 0x2d72e in vacuum (vacrel=0x0, verbose=0, analyze=0 '\\000', va_spec=0x0)\n at vacuum.c:159\n#14 0xa6337 in ProcessUtility (parsetree=0x12d630, dest=Remote)\n at utility.c:634\n#15 0xa3442 in pg_exec_query_dest (query_string=0xefbfad6c \"vacuum;\", \n dest=Remote, aclOverride=0) at postgres.c:706\n#16 0xa3334 in pg_exec_query (query_string=0xefbfad6c \"vacuum;\")\n at postgres.c:644\n#17 0xa496b in PostgresMain (argc=6, argv=0xefbfcde4, real_argc=4, \n real_argv=0xefbfd6b8) at postgres.c:1481\n#18 0x8c0f4 in DoBackend (port=0x131000) at postmaster.c:1412\n#19 0x8bb56 in BackendStartup (port=0x131000) at postmaster.c:1191\n#20 0x8b046 in ServerLoop () at postmaster.c:725\n#21 0x8a92b in PostmasterMain (argc=4, argv=0xefbfd6b8) at postmaster.c:534\n#22 0x4bfc7 in main (argc=4, argv=0xefbfd6b8) at main.c:93\n\n\n", "msg_date": "Tue, 25 Aug 1998 18:59:54 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": true, "msg_subject": "vacuum problem" }, { "msg_contents": "Tatsuo Ishii <[email protected]> writes:\n\n> vacuum still doesn't work for me.\n> \n> I did a regresion test and found the sanity_check test failed. The\n> result shows that the backend died while doing vacuum. I destroyed and\n> re-created the regression database. Vacuum for a fresh database seems\n> working.\n\nDid a \"cvs update\" today, dumped my existing databases with pg_dump,\nbuilt and installed the new system. On a newly created database, with\nno tables defined, vacuum works (or, at least, claims to). For a\nproduction database with lots of tables, indices and sequences, the\nfollowing happens:\n\nnhh=> vacuum;\nERROR: fmgr_info: function 28261: cache lookup failed\n\n-tih\n-- \nPopularity is the hallmark of mediocrity. --Niles Crane, \"Frasier\"\n", "msg_date": "26 Aug 1998 12:54:10 +0200", "msg_from": "Tom Ivar Helbekkmo <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vacuum problem" }, { "msg_contents": "Tatsuo Ishii <[email protected]> writes:\n\n> vacuum still doesn't work for me.\n> \n> I did a regresion test and found the sanity_check test failed. The\n> result shows that the backend died while doing vacuum. I destroyed and\n> re-created the regression database. Vacuum for a fresh database seems\n> working.\n\nDid a \"cvs update\" today, dumped my existing databases with pg_dump,\nbuilt and installed the new system. On a newly created database, with\nno tables defined, vacuum works (or, at least, claims to). For a\nproduction database with lots of tables, indices and sequences, the\nfollowing happens:\n\nnhh=> vacuum;\nERROR: fmgr_info: function 28261: cache lookup failed\n\n-tih\n-- \nPopularity is the hallmark of mediocrity. --Niles Crane, \"Frasier\"\n", "msg_date": "26 Aug 1998 22:46:38 +0200", "msg_from": "Tom Ivar Helbekkmo <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vacuum problem" }, { "msg_contents": "> Tatsuo Ishii <[email protected]> writes:\n> \n> > vacuum still doesn't work for me.\n> > \n> > I did a regresion test and found the sanity_check test failed. The\n> > result shows that the backend died while doing vacuum. I destroyed and\n> > re-created the regression database. Vacuum for a fresh database seems\n> > working.\n> \n> Did a \"cvs update\" today, dumped my existing databases with pg_dump,\n> built and installed the new system. On a newly created database, with\n> no tables defined, vacuum works (or, at least, claims to). For a\n> production database with lots of tables, indices and sequences, the\n> following happens:\n> \n> nhh=> vacuum;\n> ERROR: fmgr_info: function 28261: cache lookup failed\n\nI can find no mention of that number anywhere in the sources. Can you?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 26 Aug 1998 21:09:12 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vacuum problem" }, { "msg_contents": "> > nhh=> vacuum;\n> > ERROR: fmgr_info: function 28261: cache lookup failed\n> \n> I can find no mention of that number anywhere in the sources.\n\nIsn't that OID above the system-reserved range (which goes to ~20000)?\nSo Tom's db is having trouble finding a function which he had defined\nhimself??\n\n - Tom\n", "msg_date": "Thu, 27 Aug 1998 03:36:08 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vacuum problem" }, { "msg_contents": "> > > nhh=> vacuum;\n> > > ERROR: fmgr_info: function 28261: cache lookup failed\n> > \n> > I can find no mention of that number anywhere in the sources.\n> \n> Isn't that OID above the system-reserved range (which goes to ~20000)?\n> So Tom's db is having trouble finding a function which he had defined\n> himself??\n> \n> - Tom\n> \n\nOK, this helps. It shows an error in the function DataFill that someone\nelse complained about. Working on it now.\n\nThe multi-key index of bootstrap is proving harder than I thought.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 27 Aug 1998 00:35:11 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vacuum problem" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n\n> OK, this helps. It shows an error in the function DataFill that\n> someone else complained about. Working on it now.\n\nGreat, Bruce! Let me know if you want me to test something -- I've\ngot a completely repeatable situation here, knowing precisely the\nsteps I've taken to cause this to happen.\n\n-tih\n-- \nPopularity is the hallmark of mediocrity. --Niles Crane, \"Frasier\"\n", "msg_date": "27 Aug 1998 07:12:10 +0200", "msg_from": "Tom Ivar Helbekkmo <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vacuum problem" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n\n> OK, this helps. It shows an error in the function DataFill that\n> someone else complained about. Working on it now.\n\nGreat, Bruce! Let me know if you want me to test something -- I've\ngot a completely repeatable situation here, knowing precisely the\nsteps I've taken to cause this to happen.\n\n-tih\n-- \nPopularity is the hallmark of mediocrity. --Niles Crane, \"Frasier\"\n", "msg_date": "27 Aug 1998 07:12:36 +0200", "msg_from": "Tom Ivar Helbekkmo <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vacuum problem" }, { "msg_contents": ">> > > nhh=> vacuum;\n>> > > ERROR: fmgr_info: function 28261: cache lookup failed\n>> > \n>> > I can find no mention of that number anywhere in the sources.\n>> \n>> Isn't that OID above the system-reserved range (which goes to ~20000)?\n>> So Tom's db is having trouble finding a function which he had defined\n>> himself??\n>> \n>> - Tom\n>> \n>\n>OK, this helps. It shows an error in the function DataFill that someone\n>else complained about. Working on it now.\n>\n>The multi-key index of bootstrap is proving harder than I thought.\n\nThis morning I did cvsup to see if vacuum works. recompiled everything \nand did initdb. But I got core dump of shell in the middle of\nprocessing.\n\nLooked like creating pg_user failing. So I did following command by hand:\n\necho \"CREATE RULE _RETpg_user AS ON SELECT TO pg_user DO INSTEAD\nSELECT usename, usesysid, usecreate -odb, usetrace, usesuper,\nusecatupd, '********'::text as passwd, valuntil FROM pg_shadow;\" |\npostgres -F -Q -D/usr/mgr/t-ishii/src/PostgreSQL/anonCVS/data template1\nPOSTGRES backend interactive interface\n$Revision: 1.86 $ $Date: 1998/08/25 21:34:04 $\n> ERROR: cannot find attribute 1 of relation pg_user\nERROR: cannot find attribute 1 of relation pg_user\n\nRemoving sources and getting whole source tree doesn't help.\nThis is FreeBSD 2.2.6. I will check on different platform.\n--\nTatsuo Ishii\[email protected]\n", "msg_date": "Thu, 27 Aug 1998 14:17:50 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] vacuum problem " }, { "msg_contents": "> \n> Looked like creating pg_user failing. So I did following command by hand:\n> \n> echo \"CREATE RULE _RETpg_user AS ON SELECT TO pg_user DO INSTEAD\n> SELECT usename, usesysid, usecreate -odb, usetrace, usesuper,\n> usecatupd, '********'::text as passwd, valuntil FROM pg_shadow;\" |\n> postgres -F -Q -D/usr/mgr/t-ishii/src/PostgreSQL/anonCVS/data template1\n> POSTGRES backend interactive interface\n> $Revision: 1.86 $ $Date: 1998/08/25 21:34:04 $\n> > ERROR: cannot find attribute 1 of relation pg_user\n> ERROR: cannot find attribute 1 of relation pg_user\n> \n> Removing sources and getting whole source tree doesn't help.\n> This is FreeBSD 2.2.6. I will check on different platform.\n\nThat is bizarre. You are running FreeBSD, and me BSDI. Seems like they\nshould behave the same.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 27 Aug 1998 01:35:01 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vacuum problem" }, { "msg_contents": ">> Looked like creating pg_user failing. So I did following command by hand:\n>> \n>> echo \"CREATE RULE _RETpg_user AS ON SELECT TO pg_user DO INSTEAD\n>> SELECT usename, usesysid, usecreate -odb, usetrace, usesuper,\n>> usecatupd, '********'::text as passwd, valuntil FROM pg_shadow;\" |\n>> postgres -F -Q -D/usr/mgr/t-ishii/src/PostgreSQL/anonCVS/data template1\n>> POSTGRES backend interactive interface\n>> $Revision: 1.86 $ $Date: 1998/08/25 21:34:04 $\n>> > ERROR: cannot find attribute 1 of relation pg_user\n>> ERROR: cannot find attribute 1 of relation pg_user\n>> \n>> Removing sources and getting whole source tree doesn't help.\n>> This is FreeBSD 2.2.6. I will check on different platform.\n>\n>That is bizarre. You are running FreeBSD, and me BSDI. Seems like they\n>should behave the same.\n\nI think so too. I don't know why.\n\nBTW, I tried the same source on my LinuxPPC box. This time initdb ran\nfine. Then I did the regression test. All of tests failed and the\nerror messages are quite similar. Any idea?\n\nresults/boolean.out:ERROR: cannot find attribute 1 of relation booltbl1\nresults/boolean.out:ERROR: cannot find attribute 1 of relation booltbl2\nresults/char.out:ERROR: cannot find attribute 1 of relation char_tbl\nresults/int2.out:ERROR: cannot find attribute 1 of relation int2_tbl\nresults/name.out:ERROR: cannot find attribute 1 of relation name_tbl\nresults/strings.out:ERROR: cannot find attribute 1 of relation char_tbl\nresults/strings.out:ERROR: cannot find attribute 1 of relation text_tbl\nresults/strings.out:ERROR: cannot find attribute 1 of relation varchar_tbl\nresults/text.out:ERROR: cannot find attribute 1 of relation text_tbl\nresults/varchar.out:ERROR: cannot find attribute 1 of relation varchar_tbl\n--\nTatsuo Ishii\[email protected]\n", "msg_date": "Thu, 27 Aug 1998 15:11:52 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] vacuum problem " }, { "msg_contents": "> BTW, I tried the same source on my LinuxPPC box. This time initdb ran\n> fine. Then I did the regression test. All of tests failed and the\n> error messages are quite similar. Any idea?\n> \n> results/boolean.out:ERROR: cannot find attribute 1 of relation booltbl1\n\nCould this have something to do with the resdomno (sp?) attribute\nrenumbering done to help with views?\n\n - Tom\n", "msg_date": "Thu, 27 Aug 1998 13:30:34 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vacuum problem" }, { "msg_contents": "> > > nhh=> vacuum;\n> > > ERROR: fmgr_info: function 28261: cache lookup failed\n> > \n> > I can find no mention of that number anywhere in the sources.\n> \n> Isn't that OID above the system-reserved range (which goes to ~20000)?\n> So Tom's db is having trouble finding a function which he had defined\n> himself??\n\nThis should all be fixed now.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 28 Aug 1998 00:58:49 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vacuum problem" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n\n> This should all be fixed now.\n\nLooks that way to me. Thanks!\n\nBy the way, PostgreSQL somehow seems to have become significantly\nfaster for my use sometime over the last month or two. For the select\nand update queries I regularly execute, which generally involve two\nor three tables and ditto indices, I'm seeing what feels like twice\nthe speed of what I got before -- and I've been increasing the amount\nof data in my tables without any schema changes or index additions!\n\n-tih\n-- \nPopularity is the hallmark of mediocrity. --Niles Crane, \"Frasier\"\n", "msg_date": "28 Aug 1998 09:38:05 +0200", "msg_from": "Tom Ivar Helbekkmo <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vacuum problem" }, { "msg_contents": "> By the way, PostgreSQL somehow seems to have become significantly\n> faster for my use sometime over the last month or two. For the select\n> and update queries I regularly execute, which generally involve two\n> or three tables and ditto indices, I'm seeing what feels like twice\n> the speed of what I got before -- and I've been increasing the amount\n> of data in my tables without any schema changes or index additions!\n\nWithout knowing the real reason, I'm going to jump in and have the type\ncoersion code take credit for this *grin*.\n\nIn particular, it _may_ do a better job of matching up indices with\nqueries.\n\nAre there other reasons why things may have gotten faster?\n\nIt's about the time to start working on release notes (Bruce?), and\nperhaps this could be quantified and mentioned...\n\nbtw, the release notes are in sgml (doc/src/sgml/release.sgml) and all\nprevious notes and detailed change lists I could find have been put into\nthere. The notes for the next release can look very similar to what is\nthere already, and there is already a section set aside for it.\n\n - Tom\n", "msg_date": "Fri, 28 Aug 1998 14:06:36 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vacuum problem" }, { "msg_contents": "> > By the way, PostgreSQL somehow seems to have become significantly\n> > faster for my use sometime over the last month or two. For the select\n> > and update queries I regularly execute, which generally involve two\n> > or three tables and ditto indices, I'm seeing what feels like twice\n> > the speed of what I got before -- and I've been increasing the amount\n> > of data in my tables without any schema changes or index additions!\n> \n> Without knowing the real reason, I'm going to jump in and have the type\n> coersion code take credit for this *grin*.\n> \n> In particular, it _may_ do a better job of matching up indices with\n> queries.\n\nSo, you want to take credit for it. :-)\n\nYou can. There is nothing I did to speed things up except to remove man\nsequential scans of system tables from the code. I can't imagine that\ncausing the speedups he is reporting.\n\n> \n> Are there other reasons why things may have gotten faster?\n\nIt would be interesting to see if the old code did not use indexes, and\nthe new stuff does, and if type conversion was needed in those queries.\n\n> \n> It's about the time to start working on release notes (Bruce?), and\n> perhaps this could be quantified and mentioned...\n\nYes, this weekend, perhaps tomorrow. I know people are waiting. Once I\ndo it, I have to add every additional change, and that is a pain, so I\nwait until near the end.\n\nCan you work on the regression tests? My oidname,... removal is a\nproblem.\n\n> \n> btw, the release notes are in sgml (doc/src/sgml/release.sgml) and all\n> previous notes and detailed change lists I could find have been put into\n> there. The notes for the next release can look very similar to what is\n> there already, and there is already a section set aside for it.\n\nOK, I see it. Looks like I am going to have to learn sgml. I have no\nway of viewing it, so I will have to do my best, and you can tell me how\nit looks. Is there an sgml->something conversion tool I can use for\ntesting?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 28 Aug 1998 10:25:17 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [DOCS] Re: [HACKERS] vacuum problem" }, { "msg_contents": "> OK, I see it. Looks like I am going to have to learn sgml. I have no\n> way of viewing it, so I will have to do my best, and you can tell me \n> how it looks. Is there an sgml->something conversion tool I can use \n> for testing?\n\nWell, you are allowed to not learn sgml. As you can see from the current\nrelease.sgml file, there are a _very_ few tags used to mark up your\nprevious release notes. And you can choose to ignore those.\n\nFor example, in previous releases you have built a \"one-line-per\" list\nof changes. Those I have laid into the release notes without\nmodification, just bracketing them with a \"<programlisting>\" tag to have\nthem come through unchanged.\n\nThe written introduction you did for the last big release was put into\nsgml as a section (probably a \"<sect2>\" tag) and then the paragraphs\nwere just started with the \"<para>\" tag.\n\nAnd again, I'm happy to mark them up from your usual plain-text file.\n\nAnother option, if you don't want or need to try sgml in the privacy of\nyour own home :) is to use the installation on hub.org. It works, and a\ncvs checkout of the tree (which you have already done), a \"configure\",\nand then a \"doc/src/sgml/make postgres.html\" is sufficient to build the\nfull html docs. I've left out one or two one-time trivial setup steps,\nbut I wanted to give you an idea of how easy it can be.\n\nWhat I'd like to do is tie the cvs tree to an automatic update of the\npages on the web site, which would let you check things in and then see\na doc rebuild soon after. Been thinking about it, but haven't done it\nyet :(\n\n - Tom\n", "msg_date": "Sat, 29 Aug 1998 15:14:39 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [DOCS] Re: [HACKERS] vacuum problem" }, { "msg_contents": "> Can you work on the regression tests? My oidname,... removal is a\n> problem.\n\nSure. I've stayed away 'til now since I am working on the ODBC interface\nand the docs (and the serial type :).\n\nIf it looks like things will build, then I'll do another cvs checkout\nand try things out.\n\n - Tom\n", "msg_date": "Sat, 29 Aug 1998 16:22:40 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [DOCS] Re: [HACKERS] vacuum problem" }, { "msg_contents": "> > Can you work on the regression tests? My oidname,... removal is a\n> > problem.\n> \n> Sure. I've stayed away 'til now since I am working on the ODBC interface\n> and the docs (and the serial type :).\n\nODBC. I didn't realize you were in that area. Docs?\n\n> \n> If it looks like things will build, then I'll do another cvs checkout\n> and try things out.\n\nNo problem reports for several days.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sat, 29 Aug 1998 14:09:07 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [DOCS] Re: [HACKERS] vacuum problem" }, { "msg_contents": "> ODBC. I didn't realize you were in that area.\n\nI wasn't :) The next version of ApplixWare on Linux is likely to have an\nODBC interface, and I got a beta copy. Took a bit of work to figure out\nhow it all was supposed to work (and _lots_ of help from the authors) to\nget it running natively on Linux. Will be in the v6.4 release...\n\n> Docs?\n\nJose', Oliver, and myself will (likely) have a full set of reference\npages for SQL commands in the next release. Still a good bit of\ntranscription work remains to get fully into sgml from Jose's original\nflat files.\n\n> No problem reports for several days.\n\nOK. Let me get the ODBC stuff in sync first, though if we are trying for\na Sept. 1 beta I can put that aside for now.\n\nByron, how should we try re-integrating the ODBC code? I have made no\nchanges which will affect the WIN32 port (unless there is small bad\nbehavior with truncating the DSN file name if it has trailing blanks as\nwas the case with ApplixWare).\n\nI did change the location of odbcinst.ini if under Unix and if\n -DODBCINST=$(POSTGRESDIR)\n(for example) is defined at compile-time, as it is for my new Makefile.\nThat way the installation-wide parameters are in a location available to\nthe installer. No change if the value is not defined; things would still\nlook in /etc/odbcinst.ini as before.\n\n - Tom\n", "msg_date": "Sat, 29 Aug 1998 21:44:06 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [DOCS] Re: [HACKERS] vacuum problem" }, { "msg_contents": "> > OK, I see it. Looks like I am going to have to learn sgml. I have no\n> > way of viewing it, so I will have to do my best, and you can tell me \n> > how it looks. Is there an sgml->something conversion tool I can use \n> > for testing?\n> \n> Well, you are allowed to not learn sgml. As you can see from the current\n> release.sgml file, there are a _very_ few tags used to mark up your\n> previous release notes. And you can choose to ignore those.\n> \n> For example, in previous releases you have built a \"one-line-per\" list\n> of changes. Those I have laid into the release notes without\n> modification, just bracketing them with a \"<programlisting>\" tag to have\n> them come through unchanged.\n> \n> The written introduction you did for the last big release was put into\n> sgml as a section (probably a \"<sect2>\" tag) and then the paragraphs\n> were just started with the \"<para>\" tag.\n> \n> And again, I'm happy to mark them up from your usual plain-text file.\n> \n> Another option, if you don't want or need to try sgml in the privacy of\n> your own home :) is to use the installation on hub.org. It works, and a\n> cvs checkout of the tree (which you have already done), a \"configure\",\n> and then a \"doc/src/sgml/make postgres.html\" is sufficient to build the\n> full html docs. I've left out one or two one-time trivial setup steps,\n> but I wanted to give you an idea of how easy it can be.\n> \n> What I'd like to do is tie the cvs tree to an automatic update of the\n> pages on the web site, which would let you check things in and then see\n> a doc rebuild soon after. Been thinking about it, but haven't done it\n> yet :(\n\nThomas, as I remember, the HISTORY file is constantly changing up until\nthe final days. PLease let me know when you are ready to cut the docs,\nand I will make sure the HISTORY file is up-to-date, and you can load it\ninto sgml.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sat, 29 Aug 1998 20:10:41 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [DOCS] Re: [HACKERS] vacuum problem" } ]
[ { "msg_contents": "At first I thought this is a portability issue, but then since I got a lot of regression tests\nok on AIX 4.2.1 when starting postmaster without switches, I now think this is a general problem\nof the current CVS tree.\n\nWhen I start postmaster with:\npostmaster -S -o '-B 2048 -F'\n\nsomething seems to get messed up.\npostgres dumps core on the first statement issued through psql.\n\nAny ideas ?\nAndreas\n\n", "msg_date": "Tue, 25 Aug 1998 16:53:09 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "postmaster switches" } ]
[ { "msg_contents": "Hello all,\n\nI have a big problem with PostgreSQL and I don't know how to solve it.\nPostgreSQL doesn't accepts the DELETE FROM table statement anymore, thus I\ncan't work.\n\nFlorian suggested me to DROP the DATABASE and then re-create it again,\n(although it seems to me a strange way to solve the problem) I tried it\nand I discovered that DROP DATABASE doesn't work also.\n\nSeems that all other commands works well like: INSERT, CREATE TABLE,\nSELECT, DROP TABLE, etc. but DELETE/DROP DATABASE.\n\nPlease help me to solve my problem.\n\nMy environment:\n Linux-ELF 2.0.34 (Debian)\n PostgreSQL-6.3.2\n\n \nBest regards,\n Jose' mailto:[email protected]\n\n\n", "msg_date": "Tue, 25 Aug 1998 17:28:43 +0200", "msg_from": "Sferacarta Software <[email protected]>", "msg_from_op": true, "msg_subject": "DATABASE CORRUPTION" } ]
[ { "msg_contents": "> Thanks to some answers you gave me some time back, I've been doing some\n> testing of PostgreSQL under BSD/OS-3.1 in preparation for a project that\n> I'm working on. So far, it all seems to be working fine, apart from one\n> (relatively minor) bug in psql -- it fails to close files it reads for a\n> COPY command, meaning it can keep a multi-megabyte file open for days.\n> The workaround is to do a new connect to the same database after the\n> COPY, at which point the data file gets closed. Maybe you can get that\n> fixed in a future release.\n\nThis is the first I have heard of this. The file commands/copy.c does\nuse a file descriptor cache, but that is really just used for allowing\nmore file opens that the OS permits. Actual opens and closes are\nhappending.\n\nI assume the files you are talking about are the database table files. \nYes, they stay open because the backend may want to use them someday.\n\nIs that a problem?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 25 Aug 1998 13:28:51 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL under BSD/OS" }, { "msg_contents": "> > (relatively minor) bug in psql -- it fails to close files it reads for a\n> > COPY command, meaning it can keep a multi-megabyte file open for days.\n> > The workaround is to do a new connect to the same database after the\n> > COPY, at which point the data file gets closed. Maybe you can get that\n> > fixed in a future release.\n> \n> This is the first I have heard of this. The file commands/copy.c does\n> use a file descriptor cache, but that is really just used for allowing\n> more file opens that the OS permits. Actual opens and closes are\n> happending.\n> \n> I assume the files you are talking about are the database table files. \n> Yes, they stay open because the backend may want to use them someday.\n\nNo, that's not what I meant. Perhaps my attempt to be concise made my\nexplanation unclear. Here's a more complete explanation of the problem.\n\nI am planning to use PostgreSQL to manage some databases that have been\nhandled by completely different software up until now. Therefore, there\nis a lot of data to be extracted from the old databases and loaded into\nPostgreSQL databases.\n\nI do this with C programs which output two principal files: the first is\nan input file for psql which contains various commands to create tables\nand indexes, etc.; the second, much larger, file contains the actual\ndata in a suitable format.\n\nThe first file is input to psql by the \\i command. The last thing in\nthat first file is a SQL COPY command which copies the data from the big\ndata file into the appropriate table. After an hour or so, the data\ninput completes and I can issue psql commands to play with the data to\nsee if it's the way I expect. At this point, psql ought to close the\ndata file that it copied the data from so that I can delete it. As\nthings stand, I have three copies of all the data -- the original\ndatabase (which I can't remove until this process is completed in a few\nweeks); the temporary data file, used as input to psql (which I want to\ndelete since it can be recreated if needed); and the PostgreSQL database\nwhich I have just created.\n\nBut if I remove the temporary file, I don't get any disk space back\nbecause psql still has it open. If I \\connect to the same database,\nthen psql closes the input file, but my contention is that I should not\nhave to do that. I hope this explanation is clear.\n\n-- \nGreg Black <[email protected]>\n\n\n", "msg_date": "Wed, 26 Aug 1998 17:58:01 +1000", "msg_from": "Greg Black <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL under BSD/OS " }, { "msg_contents": "> > > (relatively minor) bug in psql -- it fails to close files it reads for a\n> > > COPY command, meaning it can keep a multi-megabyte file open for days.\n> > > The workaround is to do a new connect to the same database after the\n> > > COPY, at which point the data file gets closed. Maybe you can get that\n> > > fixed in a future release.\n> > \n> > This is the first I have heard of this. The file commands/copy.c does\n> > use a file descriptor cache, but that is really just used for allowing\n> > more file opens that the OS permits. Actual opens and closes are\n> > happending.\n> > \n> > I assume the files you are talking about are the database table files. \n> > Yes, they stay open because the backend may want to use them someday.\n> \n> No, that's not what I meant. Perhaps my attempt to be concise made my\n> explanation unclear. Here's a more complete explanation of the problem.\n> \n> I am planning to use PostgreSQL to manage some databases that have been\n> handled by completely different software up until now. Therefore, there\n> is a lot of data to be extracted from the old databases and loaded into\n> PostgreSQL databases.\n> \n> I do this with C programs which output two principal files: the first is\n> an input file for psql which contains various commands to create tables\n> and indexes, etc.; the second, much larger, file contains the actual\n> data in a suitable format.\n> \n> The first file is input to psql by the \\i command. The last thing in\n> that first file is a SQL COPY command which copies the data from the big\n> data file into the appropriate table. After an hour or so, the data\n> input completes and I can issue psql commands to play with the data to\n> see if it's the way I expect. At this point, psql ought to close the\n> data file that it copied the data from so that I can delete it. As\n> things stand, I have three copies of all the data -- the original\n> database (which I can't remove until this process is completed in a few\n> weeks); the temporary data file, used as input to psql (which I want to\n> delete since it can be recreated if needed); and the PostgreSQL database\n> which I have just created.\n> \n> But if I remove the temporary file, I don't get any disk space back\n> because psql still has it open. If I \\connect to the same database,\n> then psql closes the input file, but my contention is that I should not\n> have to do that. I hope this explanation is clear.\n\n\nOK, the file you are using for COPY is still open. Let me try and find\nthe cause, and I can fix it.\n\nAre you using the COPY command, or psql's \\copy command? After the\ncopy, if you do an 'ls -i data_file', you get the inode number. If you\ngrep 'fstat' what process is holding the file as open? Is it psql or\nthe postgres backend process? During the copy, is it failing or\nsucceeding? I can see a case were a copy failure will not properly\nclose the file.\n\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 26 Aug 1998 12:11:58 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL under BSD/OS" }, { "msg_contents": "> > I do this with C programs which output two principal files: the first is\n> > an input file for psql which contains various commands to create tables\n> > and indexes, etc.; the second, much larger, file contains the actual\n> > data in a suitable format.\n> > \n> > The first file is input to psql by the \\i command. The last thing in\n> > that first file is a SQL COPY command which copies the data from the big\n> > data file into the appropriate table. After an hour or so, the data\n> > input completes and I can issue psql commands to play with the data to\n> > see if it's the way I expect. At this point, psql ought to close the\n> > data file that it copied the data from so that I can delete it. As\n> > things stand, I have three copies of all the data -- the original\n> > database (which I can't remove until this process is completed in a few\n> > weeks); the temporary data file, used as input to psql (which I want to\n> > delete since it can be recreated if needed); and the PostgreSQL database\n> > which I have just created.\n> > \n> > But if I remove the temporary file, I don't get any disk space back\n> > because psql still has it open. If I \\connect to the same database,\n> > then psql closes the input file, but my contention is that I should not\n> > have to do that. I hope this explanation is clear.\n> \n> OK, the file you are using for COPY is still open. Let me try and find\n> the cause, and I can fix it.\n> \n> Are you using the COPY command, or psql's \\copy command?\n\nI've tried to be clear above, showing `\\i' and `SQL COPY command'. No,\nI did not use psql's `\\copy' command.\n\n> After the\n> copy, if you do an 'ls -i data_file', you get the inode number. If you\n> grep 'fstat' what process is holding the file as open? Is it psql or\n> the postgres backend process? \n\nThe command is `postgres'. It has two FDs for the file that was read in\nas the target of the COPY command. If you do `\\connect dbname' in psql,\nthe open files are closed.\n\nBTW, because I didn't have an hour to wait while I did this with the\nreal data, I tried it with a test file with only four rows of data. The\nfirst time, it happened as described. However, after doing the \\connect,\nthe problem did not repeat on the next couple of tries. It was\nconsistent when I was working with a table with 50,000 rows, however.\n\n> During the copy, is it failing or\n> succeeding? I can see a case were a copy failure will not properly\n> close the file.\n\nThe copy completes successfully.\n\n-- \nGreg Black <[email protected]>\n\n\n", "msg_date": "Thu, 27 Aug 1998 12:50:18 +1000", "msg_from": "Greg Black <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL under BSD/OS " }, { "msg_contents": "> > > (relatively minor) bug in psql -- it fails to close files it reads for a\n> > > COPY command, meaning it can keep a multi-megabyte file open for days.\n> > > The workaround is to do a new connect to the same database after the\n> > > COPY, at which point the data file gets closed. Maybe you can get that\n> > > fixed in a future release.\n> > \n> > This is the first I have heard of this. The file commands/copy.c does\n> > use a file descriptor cache, but that is really just used for allowing\n> > more file opens that the OS permits. Actual opens and closes are\n> > happending.\n> > \n> > I assume the files you are talking about are the database table files. \n> > Yes, they stay open because the backend may want to use them someday.\n> \n> No, that's not what I meant. Perhaps my attempt to be concise made my\n> explanation unclear. Here's a more complete explanation of the problem.\n> \n> I am planning to use PostgreSQL to manage some databases that have been\n> handled by completely different software up until now. Therefore, there\n> is a lot of data to be extracted from the old databases and loaded into\n> PostgreSQL databases.\n> \n> I do this with C programs which output two principal files: the first is\n> an input file for psql which contains various commands to create tables\n> and indexes, etc.; the second, much larger, file contains the actual\n> data in a suitable format.\n> \n> The first file is input to psql by the \\i command. The last thing in\n> that first file is a SQL COPY command which copies the data from the big\n> data file into the appropriate table. After an hour or so, the data\n> input completes and I can issue psql commands to play with the data to\n> see if it's the way I expect. At this point, psql ought to close the\n> data file that it copied the data from so that I can delete it. As\n> things stand, I have three copies of all the data -- the original\n> database (which I can't remove until this process is completed in a few\n> weeks); the temporary data file, used as input to psql (which I want to\n> delete since it can be recreated if needed); and the PostgreSQL database\n> which I have just created.\n> \n> But if I remove the temporary file, I don't get any disk space back\n> because psql still has it open. If I \\connect to the same database,\n> then psql closes the input file, but my contention is that I should not\n> have to do that. I hope this explanation is clear.\n\nOK, in pgsql/src/backend/command/copy.c, you should see a function call\nto FreeFile(). That is what is supposed to be called to free the open\nfile. AllocateFile opens the file a few lines above it, in either read\nor write mode.\n\nIf you can, can you put a little printf statement just before the\nFreeFile, and see if it is getting called. You have to look in the\npostmaster log file to see the output of the printf(). If it is getting\ncalled, I have no idea why it would still be holding the file\ndescriptor. If it is not calling that function, I am confused because I\ncan't see how it could get out of that function without calling it.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sat, 29 Aug 1998 00:01:05 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL under BSD/OS" }, { "msg_contents": "> > OK, the file you are using for COPY is still open. Let me try and find\n> > the cause, and I can fix it.\n> > \n> > Are you using the COPY command, or psql's \\copy command?\n> \n> I've tried to be clear above, showing `\\i' and `SQL COPY command'. No,\n> I did not use psql's `\\copy' command.\n> \n> > After the\n> > copy, if you do an 'ls -i data_file', you get the inode number. If you\n> > grep 'fstat' what process is holding the file as open? Is it psql or\n> > the postgres backend process? \n> \n> The command is `postgres'. It has two FDs for the file that was read in\n> as the target of the COPY command. If you do `\\connect dbname' in psql,\n> the open files are closed.\n\nTwo file descriptors. That seems strange to me.\n\nI just tried it on a file with 200000 integers:\n\n\t#$ fstat |grep 'tmp'\n\tpostgres postmaster 29288 27 /tmp 5 -rw-r--r-- 1288895 r\n\tmaillist ema 29265 3 /tmp 6 -rwx------ 622165 r\n\tmaillist sh 29264 3 /tmp 6 -rwx------ 622165 r\n\tmaillist sh 29263 3 /tmp 6 -rwx------ 622165 r\n\tmaillist elm 26332 3 /tmp 6 -rwx------ 622165 r\n\t#$ fstat |grep 'tmp'\n\tmaillist ema 29265 3 /tmp 6 -rwx------ 622165 r\n\tmaillist sh 29264 3 /tmp 6 -rwx------ 622165 r\n\tmaillist sh 29263 3 /tmp 6 -rwx------ 622165 r\n\tmaillist elm 26332 3 /tmp 6 -rwx------ 622165 r\n\nAs you can see, the file with inode 5 in /tmp was open during the copy,\nbut closed after the copy completed. I tried it several times, and it\nworked every time. Now, if I got an error in the COPY, it did not close\nthe file descriptor, as it should. Not quite sure how to fix that, but\nit should be fixed.\n\n> \n> BTW, because I didn't have an hour to wait while I did this with the\n> real data, I tried it with a test file with only four rows of data. The\n> first time, it happened as described. However, after doing the \\connect,\n> the problem did not repeat on the next couple of tries. It was\n> consistent when I was working with a table with 50,000 rows, however.\n> \n> > During the copy, is it failing or\n> > succeeding? I can see a case were a copy failure will not properly\n> > close the file.\n> \n> The copy completes successfully.\n> \n> -- \n> Greg Black <[email protected]>\n> \n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sat, 29 Aug 1998 00:24:10 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL under BSD/OS" }, { "msg_contents": "> OK, in pgsql/src/backend/command/copy.c, you should see a function call\n> to FreeFile(). That is what is supposed to be called to free the open\n> file. AllocateFile opens the file a few lines above it, in either read\n> or write mode.\n> \n> If you can, can you put a little printf statement just before the\n> FreeFile, and see if it is getting called. You have to look in the\n> postmaster log file to see the output of the printf(). If it is getting\n> called, I have no idea why it would still be holding the file\n> descriptor. If it is not calling that function, I am confused because I\n> can't see how it could get out of that function without calling it.\n\nI'm willing to have a look at this in a few weeks, but I don't have time\nto do it now. I'll get back to you when I've got some additional info.\n\n-- \nGreg Black <[email protected]>\n\n\n", "msg_date": "Sat, 29 Aug 1998 18:40:43 +1000", "msg_from": "Greg Black <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL under BSD/OS " }, { "msg_contents": "> > OK, in pgsql/src/backend/command/copy.c, you should see a function call\n> > to FreeFile(). That is what is supposed to be called to free the open\n> > file. AllocateFile opens the file a few lines above it, in either read\n> > or write mode.\n> > \n> > If you can, can you put a little printf statement just before the\n> > FreeFile, and see if it is getting called. You have to look in the\n> > postmaster log file to see the output of the printf(). If it is getting\n> > called, I have no idea why it would still be holding the file\n> > descriptor. If it is not calling that function, I am confused because I\n> > can't see how it could get out of that function without calling it.\n> \n> I'm willing to have a look at this in a few weeks, but I don't have time\n> to do it now. I'll get back to you when I've got some additional info.\n\nI am going to add some code to copy.c so if COPY is called again, and\nthe file descriptor was not closed because of an error somewhere deep in\nthe code, it will close the descriptor before opening a new one. Should\nprevent file descriptor leaking.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sat, 29 Aug 1998 13:22:05 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL under BSD/OS" }, { "msg_contents": "We have a 6.4 beta starting September 1, with final October 1. It is\npossible that somehow there is a problem with 6.3.2 that I am not seeing\nin the current sources. The new code that closes a file descriptor left\nopen from a failed COPY will be in there, so you should try that release\nfirst.\n\n\n> > OK, in pgsql/src/backend/command/copy.c, you should see a function call\n> > to FreeFile(). That is what is supposed to be called to free the open\n> > file. AllocateFile opens the file a few lines above it, in either read\n> > or write mode.\n> > \n> > If you can, can you put a little printf statement just before the\n> > FreeFile, and see if it is getting called. You have to look in the\n> > postmaster log file to see the output of the printf(). If it is getting\n> > called, I have no idea why it would still be holding the file\n> > descriptor. If it is not calling that function, I am confused because I\n> > can't see how it could get out of that function without calling it.\n> \n> I'm willing to have a look at this in a few weeks, but I don't have time\n> to do it now. I'll get back to you when I've got some additional info.\n> \n> -- \n> Greg Black <[email protected]>\n> \n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sat, 29 Aug 1998 14:16:46 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL under BSD/OS" } ]
[ { "msg_contents": "[This arrived to my mail box, and as it's not really a Java problem, I'm\nforwarding it to the hackers list]\n\nOn Tue, 25 Aug 1998, Bart N. Locanthi wrote:\n\n> hi, i just snarfed postgresql.snapshot.tar.gz from ftp.postgresql.org. \n> \n> it's dated 8/22/1998 with size 3,407,872 bytes, and gunzip gets an\n> unexpected EOF when uncompressing the file. \n\nI remember seeing some mail yesterday about this, but as I use CVS, I\nwouldn't see this problem.\n\nhackers: Any ideas (or has it already been fixed?)\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": "Tue, 25 Aug 1998 18:33:13 +0100 (GMT)", "msg_from": "Peter T Mount <[email protected]>", "msg_from_op": true, "msg_subject": "Re: incomplete snapshot file" } ]
[ { "msg_contents": "Bruce Momjian <[email protected]>\n\n> \n> > On Mon, Aug 24, 1998 at 03:18:28PM -0400, Bruce Momjian wrote:\n> > > Would someone check a running 6.3.2 system and let me know if there are\n> > > any blank attalign values? It think you will find that there are. The\n> > > current patch fixes that.\n> > \n> > echo \"select * from pg_attribute where attalign != 'i' and attalign !=\n> > 'c'and attalign != 'd' and attalign!='s';\"|psql template1\n> \n> Yikes. Good thing that is fixed now.\n> \n\nAnother interesting thing?\n\n(appologies for the width)\n\nI would half expected attalign to be 'd' for all these.\n\nI'm not sure how the values get there though!!\n\nKeith.\n\ntemplate1=> select * from pg_attribute where attlen = 32;\nattrelid|attname \n|atttypid|attdisbursion|attlen|attnum|attnelems|attcacheoff|atttypmod|attbyval|a\nttisset|attalign|attnotnull|atthasdef\n--------+-----------+--------+-------------+------+------+---------+-----------+\n---------+--------+--------+--------+----------+---------\n 1247|typname | 19| 0| 32| 1| 0| -1| \n -1|f |f |i |f |f\n 1262|datname | 19| 0| 32| 1| 0| -1| \n -1|f |f |i |f |f\n 1255|proname | 19| 0| 32| 1| 0| -1| \n -1|f |f |i |f |f\n 1255|proargtypes| 30| 0| 32| 10| 0| -1| \n -1|f |f |i |f |f\n 1260|usename | 19| 0| 32| 1| 0| -1| \n -1|f |f |i |f |f\n 1261|groname | 19| 0| 32| 1| 0| -1| \n -1|f |f |i |f |f\n 1249|attname | 19| 0| 32| 2| 0| -1| \n -1|f |f |i |f |f\n 1259|relname | 19| 0| 32| 1| 0| -1| \n -1|f |f |i |f |f\n 1216|rcname | 19| 0| 32| 2| 0| -1| \n -1|f |f |i |f |f\n 1219|tgname | 19| 0| 32| 2| 0| -1| \n -1|f |f |i |f |f\n 16548|indclass | 30| 0| 32| 5| 0| -1| \n -1|f |f |i |f |f\n 16590|oprname | 19| 0| 32| 1| 0| -1| \n -1|f |f |d |f |f\n 16614|opcname | 19| 0| 32| 1| 0| -1| \n -1|f |f |d |f |f\n 16624|amname | 19| 0| 32| 1| 0| -1| \n -1|f |f |d |f |f\n 16869|lanname | 19| 0| 32| 1| 0| -1| \n -1|f |f |d |f |f\n 16946|aggname | 19| 0| 32| 1| 0| -1| \n -1|f |f |d |f |f\n 17013|inhproname | 19| 0| 32| 1| 0| -1| \n -1|f |f |d |f |f\n 17025|rulename | 19| 0| 32| 1| 0| -1| \n -1|f |f |d |f |f\n 17040|relname | 19| 0| 32| 1| 0| -1| \n -1|f |f |d |f |f\n 17061|attname | 19| 0| 32| 2| 0| -1| \n -1|f |f |i |f |f\n 17073|proname | 19| 0| 32| 1| 0| -1| \n -1|f |f |i |f |f\n 17073|proargtypes| 30| 0| 32| 3| 0| -1| \n -1|f |f |i |f |f\n 17082|typname | 19| 0| 32| 1| 0| -1| \n -1|f |f |i |f |f\n 17088|relname | 19| 0| 32| 1| 0| -1| \n -1|f |f |i |f |f\n 17184|usename | 19| 0| 32| 1| 0| -1| \n -1|f |f |d |f |f\n 17248|rulename | 19| 0| 32| 1| 0| -1| \n -1|f |f |d |f |f\n 17312|viewname | 19| 0| 32| 1| 0| -1| \n -1|f |f |d |f |f\n\n", "msg_date": "Tue, 25 Aug 1998 19:18:46 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "> Bruce Momjian <[email protected]>\n> \n> > \n> > > On Mon, Aug 24, 1998 at 03:18:28PM -0400, Bruce Momjian wrote:\n> > > > Would someone check a running 6.3.2 system and let me know if there are\n> > > > any blank attalign values? It think you will find that there are. The\n> > > > current patch fixes that.\n> > > \n> > > echo \"select * from pg_attribute where attalign != 'i' and attalign !=\n> > > 'c'and attalign != 'd' and attalign!='s';\"|psql template1\n> > \n> > Yikes. Good thing that is fixed now.\n> > \n> \n> Another interesting thing?\n> \n> (appologies for the width)\n> \n> I would half expected attalign to be 'd' for all these.\n> \n> I'm not sure how the values get there though!!\n\nCan you research what the proper value should be. We have char/varchar\nset to 'i', but others set to 'd'. What should be the proper value. Is\n'd' and 'i' alignment the same on our supported platforms. Does a char\nfield of length 32 align on int, but a double align on double differently.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 27 Aug 1998 13:29:53 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" } ]
[ { "msg_contents": "Hi All,\n\nMy problems seem to be getting worse!!\n\nYesterday I was only getting a crash when I tried to create a table.\n\nToday, with the latest from cvs I'm getting a crash on a simple select.\n\nHere's the backtrace:-\n\nProgram received signal SIGSEGV, Segmentation fault.\n0x95564 in transformTargetList (pstate=0x15c790, targetlist=0x15ec10)\n at parse_target.c:583\n583 attrname = \nstrVal(lfirst(att->attrs));\n(gdb) bt\n#0 0x95564 in transformTargetList (pstate=0x15c790, targetlist=0x15ec10)\n at parse_target.c:583\n#1 0x885f4 in transformSelectStmt (pstate=0x15c790, stmt=0x15c7d0) at \nanalyze.c:867\n#2 0x877a8 in transformStmt (pstate=0x15c790, parseTree=0x15c7d0) at \nanalyze.c:190\n#3 0x87504 in parse_analyze (pl=0x15eb50, parentParseState=0x0) at analyze.c:76\n#4 0x8e8fc in parser (str=0x0, typev=0x0, nargs=0) at parser.c:64\n#5 0xaef60 in pg_parse_and_plan (\n query_string=0xefffd1a0 \" select * from pg_class;\", typev=0x0, nargs=0,\n queryListP=0xefffd0bc, dest=Remote, aclOverride=0 '\\000') at postgres.c:402\n#6 0xaf420 in pg_exec_query_dest (\n query_string=0xefffd1a0 \" select * from pg_class;\", dest=Remote,\n aclOverride=0 '\\000') at postgres.c:668\n#7 0xaf3d4 in pg_exec_query (query_string=0xefffd1a0 \" select * from \npg_class;\")\n at postgres.c:643\n#8 0xb0388 in PostgresMain (argc=1169408, argv=0xeffff1a0, real_argc=10,\n real_argv=0xeffffd84) at postgres.c:1480\n#9 0x98f7c in DoBackend (port=0xff400) at postmaster.c:1412\n#10 0x989b8 in BackendStartup (port=0x15fc00) at postmaster.c:1191\n#11 0x97fe4 in ServerLoop () at postmaster.c:725\n#12 0x97b3c in PostmasterMain (argc=0, argv=0xeffffd84) at postmaster.c:534\n#13 0x6c30c in main (argc=10, argv=0xeffffd84) at main.c:93\n\nFor info, each time I do a cvs update and then copy the entire tree to\nanother machine. The target directory on the other machine is an empty\n/usr/local/pgsql.\n\nI then do a configure/make/make install/initdb before commencing\nany testing.\n\nI'm starting to get worried about my hardware/OS as no-one else\nseems to be reporting similar problems.\n\nFor reference.\n\nSPARC/Linux (Redhat 4.2) running on a SPARCstation IPC.\n\nIs anyone else trying to build the latest source on any SPARC\nhardware with any OS? (Solaris,SunOS)\n\nKeith.\n\nBruce Momjian <[email protected]>\n> \n> Seems like there is some problem with cvs and people seeing all my\n> changes, causing initdb problems.\n> \n> The only solution that has worked for two people is to re-download the\n> entire cvs tree.\n\n", "msg_date": "Tue, 25 Aug 1998 22:10:46 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problems" }, { "msg_contents": "I am applying a patch now. I also got your message about the\nalignments. They should be 'd' as you said. Seems like the bootstrap\nhas it wrong, as it defaults to 'i' for things it could not figure out. \nDidn't matter before, but multi-key indexes require them to be correct. \nShould have something tomorrow.\n\n\n> Hi All,\n> \n> My problems seem to be getting worse!!\n> \n> Yesterday I was only getting a crash when I tried to create a table.\n> \n> Today, with the latest from cvs I'm getting a crash on a simple select.\n> \n> Here's the backtrace:-\n> \n> Program received signal SIGSEGV, Segmentation fault.\n> 0x95564 in transformTargetList (pstate=0x15c790, targetlist=0x15ec10)\n> at parse_target.c:583\n> 583 attrname = \n> strVal(lfirst(att->attrs));\n> (gdb) bt\n> #0 0x95564 in transformTargetList (pstate=0x15c790, targetlist=0x15ec10)\n> at parse_target.c:583\n> #1 0x885f4 in transformSelectStmt (pstate=0x15c790, stmt=0x15c7d0) at \n> analyze.c:867\n> #2 0x877a8 in transformStmt (pstate=0x15c790, parseTree=0x15c7d0) at \n> analyze.c:190\n> #3 0x87504 in parse_analyze (pl=0x15eb50, parentParseState=0x0) at analyze.c:76\n> #4 0x8e8fc in parser (str=0x0, typev=0x0, nargs=0) at parser.c:64\n> #5 0xaef60 in pg_parse_and_plan (\n> query_string=0xefffd1a0 \" select * from pg_class;\", typev=0x0, nargs=0,\n> queryListP=0xefffd0bc, dest=Remote, aclOverride=0 '\\000') at postgres.c:402\n> #6 0xaf420 in pg_exec_query_dest (\n> query_string=0xefffd1a0 \" select * from pg_class;\", dest=Remote,\n> aclOverride=0 '\\000') at postgres.c:668\n> #7 0xaf3d4 in pg_exec_query (query_string=0xefffd1a0 \" select * from \n> pg_class;\")\n> at postgres.c:643\n> #8 0xb0388 in PostgresMain (argc=1169408, argv=0xeffff1a0, real_argc=10,\n> real_argv=0xeffffd84) at postgres.c:1480\n> #9 0x98f7c in DoBackend (port=0xff400) at postmaster.c:1412\n> #10 0x989b8 in BackendStartup (port=0x15fc00) at postmaster.c:1191\n> #11 0x97fe4 in ServerLoop () at postmaster.c:725\n> #12 0x97b3c in PostmasterMain (argc=0, argv=0xeffffd84) at postmaster.c:534\n> #13 0x6c30c in main (argc=10, argv=0xeffffd84) at main.c:93\n> \n> For info, each time I do a cvs update and then copy the entire tree to\n> another machine. The target directory on the other machine is an empty\n> /usr/local/pgsql.\n> \n> I then do a configure/make/make install/initdb before commencing\n> any testing.\n> \n> I'm starting to get worried about my hardware/OS as no-one else\n> seems to be reporting similar problems.\n> \n> For reference.\n> \n> SPARC/Linux (Redhat 4.2) running on a SPARCstation IPC.\n> \n> Is anyone else trying to build the latest source on any SPARC\n> hardware with any OS? (Solaris,SunOS)\n> \n> Keith.\n> \n> Bruce Momjian <[email protected]>\n> > \n> > Seems like there is some problem with cvs and people seeing all my\n> > changes, causing initdb problems.\n> > \n> > The only solution that has worked for two people is to re-download the\n> > entire cvs tree.\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Tue, 25 Aug 1998 23:17:39 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problems" }, { "msg_contents": "> Hi All,\n> \n> My problems seem to be getting worse!!\n> \n> Yesterday I was only getting a crash when I tried to create a table.\n> \n> Today, with the latest from cvs I'm getting a crash on a simple select.\n> \n> Here's the backtrace:-\n\nOK, selects should be fixed now. Also:\n\nselect relname, attname,attalign from pg_class, pg_attribute, pg_type \nwhere atttypid = pg_type.oid and typname = 'name' and pg_class.oid =\nattrelid and attalign != 'd'\n\nnow returns no rows, as it should. Some tricky work, but they are all\ncorrect now. Let's see if that fixes the Sparc problem.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 26 Aug 1998 00:52:39 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problems" } ]
[ { "msg_contents": "I have patched up gram.y by adding a mention of UNLISTEN at the top of\ngram.y. I have also commented out the compile of ecpg because it does\nnot compile.\n\nWhen we get Massimo's fixes, I will back these out. I wanted the tree\nto compile for my changes I am committing now.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 26 Aug 1998 00:54:42 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Massimo patches" }, { "msg_contents": "On Wed, Aug 26, 1998 at 12:54:42AM -0400, Bruce Momjian wrote:\n> I have patched up gram.y by adding a mention of UNLISTEN at the top of\n> gram.y. I have also commented out the compile of ecpg because it does\n> not compile.\n\nPlease put it back in. I just send the necessary patch.\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Wed, 26 Aug 1998 15:31:36 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Massimo patches" }, { "msg_contents": "> On Wed, Aug 26, 1998 at 12:54:42AM -0400, Bruce Momjian wrote:\n> > I have patched up gram.y by adding a mention of UNLISTEN at the top of\n> > gram.y. I have also commented out the compile of ecpg because it does\n> > not compile.\n> \n> Please put it back in. I just send the necessary patch.\n\nEnabled again.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 26 Aug 1998 12:37:47 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Massimo patches" } ]
[ { "msg_contents": "> I have patched up gram.y by adding a mention of UNLISTEN at the top of\n> gram.y. I have also commented out the compile of ecpg because it does\n> not compile.\n\nIt does compile on gcc 2.8.1, so I guess this is a compiler uncompatibility.\nMy xlc AIX compiler won't swallow it either.\nThe best would probably be a configure option --disable-ecpg ?\n\n> When we get Massimo's fixes, I will back these out. I wanted the tree\n> to compile for my changes I am committing now.\n\n\n", "msg_date": "Wed, 26 Aug 1998 09:05:14 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "AW: [HACKERS] Massimo patches" }, { "msg_contents": "On Wed, Aug 26, 1998 at 09:05:14AM +0200, Andreas Zeugswetter wrote:\n> It does compile on gcc 2.8.1, so I guess this is a compiler uncompatibility.\n> My xlc AIX compiler won't swallow it either.\n> The best would probably be a configure option --disable-ecpg ?\n\nWhat kind of problem do we talk about? Please send me more details.\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Wed, 26 Aug 1998 15:41:46 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Massimo patches" } ]
[ { "msg_contents": "Hi,\n\nI again have a problem with initdb. After re-downloading of cvs\nseveral days ago it worked, but yesterday i got the same problem - \nhangup during initdb. This time the trick with re-downloading doesn't\nhelps :-( Are there somebody lucky with current cvs on Linux, libc5 system ?\nCould be the problem that I'm using egcs snapshot instead of gcc 2.7.2\n\n\tRegards,\n\t\tOleg\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": "Wed, 26 Aug 1998 17:50:00 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": true, "msg_subject": "initdb problem with cvs" } ]
[ { "msg_contents": "Hello!\n\nI've now got the psql program working on Win32 too (I think - I haven't\ntested all that much, but it connects and runs easy queries).\nIn order to do this, I had to include getopt.c and getopt.h, since those do\nnot exist on Win32. Is it Ok to include these files in the general\ndistribution? (the version I have is GPL:ed, there might exist others? I\nseem to recall some discussion about GPLed things included?) \nAlso, where should these go? Currently, I have them in bin/psql, but perhaps\nthey fit better in the \"utils\" directory?\n\nI'll send in patches for psql as soon as this is cleared...\n\n//Magnus\n", "msg_date": "Wed, 26 Aug 1998 16:40:15 +0200", "msg_from": "Magnus Hagander <[email protected]>", "msg_from_op": true, "msg_subject": "getopts include?" }, { "msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> Hello!\n> \n> I've now got the psql program working on Win32 too (I think - I haven't\n> tested all that much, but it connects and runs easy queries).\n> In order to do this, I had to include getopt.c and getopt.h, since those do\n> not exist on Win32. Is it Ok to include these files in the general\n> distribution? (the version I have is GPL:ed, there might exist others? I\n> seem to recall some discussion about GPLed things included?) \n> Also, where should these go? Currently, I have them in bin/psql, but perhaps\n> they fit better in the \"utils\" directory?\n> \n> I'll send in patches for psql as soon as this is cleared...\n\npsql for Win32 is real nice. How do we address the getops issue. \nPerhaps we can send you the FreeBSD version, and you can try that. We\ncertainly can ship that one.\n\nI will e-mail him the FreeBSD ones for testing.\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 26 Aug 1998 12:47:11 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] getopts include?" }, { "msg_contents": "On Wed, Aug 26, 1998 at 04:40:15PM +0200, Magnus Hagander wrote:\n> I've now got the psql program working on Win32 too (I think - I haven't\n> tested all that much, but it connects and runs easy queries).\n\nSounds great.\n\n> In order to do this, I had to include getopt.c and getopt.h, since those do\n> not exist on Win32. Is it Ok to include these files in the general\n> distribution? (the version I have is GPL:ed, there might exist others? I\n> seem to recall some discussion about GPLed things included?) \n\nUsing GPLed parts is a problem. AFAIK it forces you to put the whole program\nunder GPL. Not exactly what we want.\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Wed, 26 Aug 1998 20:29:49 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] getopts include?" } ]
[ { "msg_contents": "[email protected] (Jan Wieck)\n> \n> > > Another topic is if we should create some more system views\n> > > at initdb time. I would find views telling ownership and\n> > > other information readable instead of Oid's very useful. As\n> > > for pg_rule and pg_view it would be possible to create a view\n> > > that describes the definition of an index instead of some\n> > > cryptic numbers. And another one for real tables where\n> > > indices and views are omitted would also be useful.\n> >\n> > Yes, these are good ideas.\n> >\n> > --\n> > Bruce Momjian | 830 Blythe Avenue\n> \n> I'm running into some naming problems while doing so. Having\n> pg_table, pg_view etc. as views lets a users assume pg_index\n> would be one too where to get some information. But pg_index\n> already exists.\n> \n> Should I name all of them pgv_... ?\n> \n> Other databases have many views starting with DBA or SYS on\n> the other hand. For now I'll start naming them pgv_..., we\n> could rename them before applying the patch.\n> \n\nJan,\n\nHow about using the plural?\n\npg_views, pg_rules, pg_tables, pg_indexes etc...\n\nIt also seems more natural to me.\n\nKeith.\n\n", "msg_date": "Wed, 26 Aug 1998 16:43:33 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Rules for 6.4 finished" }, { "msg_contents": "> Jan,\n> \n> How about using the plural?\n> \n> pg_views, pg_rules, pg_tables, pg_indexes etc...\n> \n> It also seems more natural to me.\n> \n> Keith.\n\n That's a nice idea - I 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", "msg_date": "Thu, 27 Aug 1998 22:55:00 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Rules for 6.4 finished" } ]
[ { "msg_contents": "Bruce Momjian <[email protected]>\n\n> \n> > Hi All,\n> > \n> > My problems seem to be getting worse!!\n> > \n> > Yesterday I was only getting a crash when I tried to create a table.\n> > \n> > Today, with the latest from cvs I'm getting a crash on a simple select.\n> > \n> > Here's the backtrace:-\n> \n> OK, selects should be fixed now. Also\n\nConfirmed, selects are fine, thanks.\n\n> \n> select relname, attname,attalign from pg_class, pg_attribute, pg_type \n> where atttypid = pg_type.oid and typname = 'name' and pg_class.oid =\n> attrelid and attalign != 'd'\n> \n> now returns no rows, as it should. Some tricky work, but they are all\n> correct now. Let's see if that fixes the Sparc problem.\n\n\nUnfortunately not but... I'm seeing some strange things in gdb.\n(apologies again for the wide post :-( )\n\nAttaching to program `/usr/local/pgsql/bin/postmaster', process 5422\nReading symbols from /lib/libdl.so.1.8.3...done.\nReading symbols from /lib/libm.so.5.0.6...done.\nReading symbols from /usr/lib/libreadline.so.2.0...done.\nReading symbols from /lib/libtermcap.so.2.0.8...done.\nReading symbols from /usr/lib/libncurses.so.3.0...done.\nReading symbols from /lib/libc.so.5.3.12...done.\nReading symbols from /lib/ld-linux.so.1...done.\n0xe00f59c4 in __read ()\n(gdb) break DataFill\nBreakpoint 1 at 0x26b34: file heaptuple.c, line 126.\n(gdb) cont\nContinuing.\n\nBreakpoint 1, DataFill (data=0x1b8438 \"\", tupleDesc=0x160e30, value=0xefffcdf8,\n nulls=0xefffce48 ' ' <repeats 16 times>, \"à\\034 \", infomask=0x1b8430, \nbit=0x0) at heaptuple.c:126\n126 bits8 *bitP = 0;\n(gdb)\nContinuing.\n\nBreakpoint 1, DataFill (data=0x1b1318 \"\", tupleDesc=0x160a70, value=0xefffccdc, \nnulls=0xefffcce0 \" \\026\\0160\",\n infomask=0xefffca66, bit=0x0) at heaptuple.c:126\n126 bits8 *bitP = 0;\n(gdb)\nContinuing.\n\nBreakpoint 1, DataFill (data=0x160618 \"\", tupleDesc=0x1607b0, value=0xefffccdc, \nnulls=0xefffcce0 \" \\026\\0160\",\n infomask=0xefffca66, bit=0x0) at heaptuple.c:126\n126 bits8 *bitP = 0;\n(gdb)\nContinuing.\n\nBreakpoint 1, DataFill (data=0x1b1220 \"\", tupleDesc=0x160610, value=0xefffce14, \nnulls=0xefffce18 \"\",\n infomask=0xefffcb9e, bit=0x1b1218 \"\") at heaptuple.c:126\n126 bits8 *bitP = 0;\n(gdb) step\n130 int numberOfAttributes = tupleDesc->natts;\n(gdb)\n127 int bitmask = 0;\n(gdb)\n133 if (bit != NULL)\n(gdb)\n135 bitP = &bit[-1];\n(gdb)\n136 bitmask = CSIGNBIT;\n(gdb)\n141 for (i = 0; i < numberOfAttributes; i++)\n(gdb)\n143 if (bit != NULL)\n(gdb)\n145 if (bitmask != CSIGNBIT)\n(gdb)\n149 bitP += 1;\n(gdb)\n150 *bitP = 0x0;\n(gdb)\n151 bitmask = 1;\n(gdb)\n154 if (nulls[i] == 'n')\n(gdb)\n160 *bitP |= bitmask;\n(gdb)\n163 switch (att[i]->attlen)\n(gdb) print att[i]->attlen\n$1 = 4\n(gdb) step\n189 *(int32 *) data = (att[i]->attbyval ?\n(gdb)\n193 break;\n(gdb)\n141 for (i = 0; i < numberOfAttributes; i++)\n(gdb)\n143 if (bit != NULL)\n(gdb)\n145 if (bitmask != CSIGNBIT)\n(gdb)\n154 if (nulls[i] == 'n')\n(gdb)\n160 *bitP |= bitmask;\n(gdb)\n163 switch (att[i]->attlen)\n(gdb)\n195 if (att[i]->attlen < sizeof(int32))\n(gdb) print att[i]->attlen\n$2 = 32\n(gdb) step\n198 if (att[i]->attalign == 'd')\n(gdb)\n200 data = (char *) \nDOUBLEALIGN(data);\n(gdb)\n201 memmove(data, \nDatumGetPointer(value[i]),\n(gdb)\n204 }\n(gdb)\n208 memmove(data, \nDatumGetPointer(value[i]),\n(gdb)\n\nProgram received signal SIGSEGV, Segmentation fault.\n0xe016e6b4 in _wordcopy_fwd_aligned () \n\nSo the memmove() at line 201 gets executed OK, no SIGSEGV but how do we get\nto line 208 and call the memmove() again!!\n\nI'm sure I must be missing the obvious but...\n\n194 default:\n195 if (att[i]->attlen < sizeof(int32))\n196 elog(ERROR, \"DataFill: attribute \n%d has len %d\",\n197 i, att[i]->attlen);\n198 if (att[i]->attalign == 'd')\n199 {\n200 data = (char *) \nDOUBLEALIGN(data);\n201 memmove(data, \nDatumGetPointer(value[i]),\n202 att[i]->attlen);\n203 data += att[i]->attlen;\n204 }\n205 else\n206 {\n207 data = (char *) LONGALIGN(data);\n208 memmove(data, \nDatumGetPointer(value[i]),\n209 att[i]->attlen);\n210 data += att[i]->attlen;\n211 }\n212 break; \n\nHelp,\nKeith. \n\n", "msg_date": "Wed, 26 Aug 1998 17:13:09 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problems" }, { "msg_contents": "[Charset ISO-8859-1 unsupported, filtering to ASCII...]\n> Bruce Momjian <[email protected]>\n> \n> > \n> > > Hi All,\n> > > \n> > > My problems seem to be getting worse!!\n> > > \n> > > Yesterday I was only getting a crash when I tried to create a table.\n> > > \n> > > Today, with the latest from cvs I'm getting a crash on a simple select.\n> > > \n> > > Here's the backtrace:-\n> > \n> > OK, selects should be fixed now. Also\n> \n> Confirmed, selects are fine, thanks.\n> \n> > \n> > select relname, attname,attalign from pg_class, pg_attribute, pg_type \n> > where atttypid = pg_type.oid and typname = 'name' and pg_class.oid =\n> > attrelid and attalign != 'd'\n> > \n> > now returns no rows, as it should. Some tricky work, but they are all\n> > correct now. Let's see if that fixes the Sparc problem.\n> \n> \n> Unfortunately not but... I'm seeing some strange things in gdb.\n> (apologies again for the wide post :-( )\n\nI just fixed some more alignment problems in the catalogs. Sorry. \nPlease try again.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 26 Aug 1998 12:44:21 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problems" } ]
[ { "msg_contents": "> > > * Allow views to specify column names outside SELECT statement\n> > \n> > ??? what is meant by that?\n> \n> I have no idea. I am removing it. Does anyone else know what it\n> means?\n> \nI think it was the example from ...\nWell, the syntax was\n CREATE VIEW my_view(column1, column2, column3) AS\n SELECT t1 * m2, c2, j FROM my_table1\n UNION ALL\n SELECT m2, c3, n FROM my_table2;\ninstead of:\n CREATE VIEW my_view AS\n SELECT t1 * m2 AS column1, c2 AS column2, j AS column3 FROM my_table1\n UNION ALL\n SELECT m2, c3, n FROM my_table2;\n \nHope this helps,\n\t-DEJ\n", "msg_date": "Wed, 26 Aug 1998 12:18:17 -0500", "msg_from": "\"Jackson, DeJuan\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: TODO (was: Re: [HACKERS] Problem with parser)" } ]
[ { "msg_contents": "\nIf anyone needs to email me, please DONT email my work's accounts, as\nInternet access is currently down (and won't be up until next week) until \nI've tighened our security (I caught someone downloading stuff they\nshouldn't have ;-) ).\n\nThis affects the following accounts:\n\n\[email protected]\n\[email protected]\n\[email protected]\n\nPlease use my home address below. Thanks.\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": "Wed, 26 Aug 1998 19:28:03 +0100 (GMT)", "msg_from": "Peter T Mount <[email protected]>", "msg_from_op": true, "msg_subject": "EMail Problems" } ]
[ { "msg_contents": "Bruce,\n\nJust noticed the following warning when compiling for the\numpteenth time ;-)\n\n\ngcc -I../../../include -I../../../backend -O2 -Wall -Wmissing-prototypes -g \n-I../.. -c relcache.c -o relcache.o\nrelcache.c:110: warning: multi-character character constant\nrelcache.c:110: warning: overflow in implicit constant conversion\n\nUpon investigation I find what should be a 'd' was a 'd '\n\nHere's a patch.\n\nKeith.\n\n*** ./src/include/catalog/pg_attribute.h.orig Wed Aug 26 19:19:35 1998\n--- ./src/include/catalog/pg_attribute.h Wed Aug 26 19:20:26 1998\n***************\n*** 317,323 ****\n */\n #define Schema_pg_attribute \\\n { 1249, {\"attrelid\"}, 26, 0, 4, 1, 0, -1, -1, '\\001', '\\0', 'i', \n'\\0', '\\0' }, \\\n! { 1249, {\"attname\"}, 19, 0, NAMEDATALEN, 2, 0, -1, -1, '\\0', '\\0', 'd ', \n'\\0', '\\0' }, \\\n { 1249, {\"atttypid\"}, 26, 0, 4, 3, 0, -1, -1, '\\001', '\\0', 'i', \n'\\0', '\\0' }, \\\n { 1249, {\"attdisbursion\"}, 700, 0, 4, 4, 0, -1, -1, '\\0', '\\0', 'i', \n'\\0', '\\0' }, \\\n { 1249, {\"attlen\"}, 21, 0, 2, 5, 0, -1, -1, '\\001', \n'\\0', 's', '\\0', '\\0' }, \\\n--- 317,323 ----\n */\n #define Schema_pg_attribute \\\n { 1249, {\"attrelid\"}, 26, 0, 4, 1, 0, -1, -1, '\\001', '\\0', 'i', \n'\\0', '\\0' }, \\\n! { 1249, {\"attname\"}, 19, 0, NAMEDATALEN, 2, 0, -1, -1, '\\0', '\\0', 'd', \n'\\0', '\\0' }, \\\n { 1249, {\"atttypid\"}, 26, 0, 4, 3, 0, -1, -1, '\\001', '\\0', 'i', \n'\\0', '\\0' }, \\\n { 1249, {\"attdisbursion\"}, 700, 0, 4, 4, 0, -1, -1, '\\0', '\\0', 'i', \n'\\0', '\\0' }, \\\n { 1249, {\"attlen\"}, 21, 0, 2, 5, 0, -1, -1, '\\001', \n'\\0', 's', '\\0', '\\0' }, \\ \n\n", "msg_date": "Wed, 26 Aug 1998 20:27:54 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "pg_attribute typo??" }, { "msg_contents": "> Bruce,\n> \n> Just noticed the following warning when compiling for the\n> umpteenth time ;-)\n> \n> \n> gcc -I../../../include -I../../../backend -O2 -Wall -Wmissing-prototypes -g \n> -I../.. -c relcache.c -o relcache.o\n> relcache.c:110: warning: multi-character character constant\n> relcache.c:110: warning: overflow in implicit constant conversion\n> \n> Upon investigation I find what should be a 'd' was a 'd '\n> \n> Here's a patch.\n> \n\nApplied. Thanks.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Wed, 26 Aug 1998 21:03:42 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pg_attribute typo??" } ]
[ { "msg_contents": "> \n> Massimo, this is a fine set of patches. I want to comment on a few.\n> \n> > > async.patch\n> > > \n> > > \tpathes for debugging and to reduce conflicts and locks between users\n> > > \tof pg_listeners.\n> > \n> > \tAppears to be massive changes since patch created...Not Applied.\n> \n> That is a shame. Sounds like a nice patch. Massimo, I am curious about\n> your comments on my changes to the lock source code. Was it a help?\n> \n> Hard to imagine what has changed since August 21st.\n\nfixed now\n\n> > > lock.patch\n> > > \n> > > \tI have rewritten lock.c cleaning up the code and adding better\n> > > \tassert checking I have also added some fields to the lock and \n> > > \txid tags for better support of user locks. There is also a new\n> > > \tfunction which returns an array of pids owning a lock.\n> > > \tI'm using this code from over six months and it works fine.\n> > \n> > \tApplied...\n> \n> Again, any work on locks is good. Did my changes help?\n\nI'm not completely convinced of the new lock priority. I will study your\ncode and make some test. I suspect it may introduce some deadlocks in the\nlisten/notify code.\n\n> > > ps-status.patch\n> > > \n> > > \tmacros for ps status, used by postgres.c and utility.c.\n> > > \tUnfortunately ps status is system dependent and the current\n> > > \tcode doesn't work on linux. The use of macros confines system\n> > > \tdependency to into one file (ps-status.h). Users of other\n> > > \toperating systems should check this code and submit new macros.\n> > \n> > \tApplied...but...\n> > \n> > \t...is there a reason why we aren't using setproctitle() where\n> > applicable, or is this what you mean with the 'submit new macros' comment?\n> > Or is this totally unrelated? :)\n> \n> I think so. Someone with setproctitle needs to give us code that works\n> on their machine. We can then add a configure check so OS's with the\n> feature can use it. One issue is whether we want the function called\n> for each backend query because it may be too large a performance hit. \n> No idea how to deal with this.\n\nps status is optional. If we can't do it on some OS we simply define empty\nmacros and all is ok. We must however be careful with side effects inside\nps macros in utility.c.\n\n> > > sinval.patch\n> > > \n> > > \tfixes a problem in SI cache which causes table overflow if some\n> > > \tbackend is idle for a long time while other backends keep adding\n> > > \tentries.\n> > > \tIt uses the new signal handling implemented in tprintf.patch.\n> > > \tI have also increacasesed the max number of backends from 32 to 64\n> > > \tand the table size from 1000 to 5000.\n> > > \tI don't know if anybody is working on SI, but until another\n> > > \tsolution is found this patch fixes the problem. I have received\n> > > \tmessages from other people reporting the same problem which I\n> > > \tfixed many months ago.\n> > \n> > \tApplied...\n> \n> I was hoping you would submit this one. Sounds like a needed patch, and\n> something few of use know how to debug.\n\nIs Vadim working on shared cache? Maybe this patch could become obsolete\nin the next version. But for now it is necessary. I had very nasty problems\nwith this.\n\n> > > socket-flock.patch\n> > > \n> > > \tuse advisory locks to check if the unix socket can be deleted.\n> > > \tA running postmaster keeps a lock on that file. A starting\n> > > \tpostmaster exits if the file exists and is locked, otherwise\n> > > \tit deletes the sockets and proceeds.\n> > > \tThis avoid the need to remove manually the file after a postmaster\n> > > \tor system crash.\n> > > \tI don't know if flock is available on any system. If not we could\n> > > \tdefine a HAVE_FLOCK set by configure.\n> > \n> > \tDefinitely applied...\n> \n> This is certainly a great idea. Deleting that lock file is a pain.\n> \n> I am almost certain we are going to need a configure check on this one.\n> flock/lockf() are supported on almost all systems, but usually not both.\n> Perhaps someone with lockf and not flock can give us some code.\n\nYes, this must be checked on every OS. I have only linux to test.\n\n> > > tprintf.patch\n> > > \n> > > \ttprintf.patch\n> > > \n> > > \tadds functions and macros which implement a conditional trace package\n> > > \twith the ability to change flags and numeric options of running\n> > > \tbackends at runtime.\n> > > \tOptions/flags can be specified in the command line and/or read from\n> > > \tthe file pg_options in the data directory.\n> > \n> > \tApplied....\n> > \n> > \tJust curious, but any documentation forthcoming on some of this\n> > stuff? pg_options and the assert stuff are the one that jump to mind...\n> \n> Good idea. If you can give me a comment about it, I can put something\n> in the FAQ under debugging. Sounds like we need manual page update, if\n> that was not already in the patch.\n\nI will write some documentation. Any comments on the new signal handling ?\n\nI would like also to discuss on the different ways used to print debug\nmessages. At the moment we have stdout, stderr, tprintf with syslog and\nelog. Maybe we could establish some standard ways to print messages.\nAnd we could put all the various debug flags and options in pg_options.\n\nI have also another idea. When the postmaster is started it should delete\nall tuples left in pg_listener because all pids refer to processes now dead.\nI'm thinking of doing an ftruncate on all data/*/pg_listener at postmaster\nstartup. This should work because there aren't any indices on that table.\nI'm doing this in the shell script which starts postgres and it semms to\nwork fine. Any comments ?\n\n-- \nMassimo Dal Zotto\n\n+----------------------------------------------------------------------+\n| Massimo Dal Zotto email: [email protected] |\n| Via Marconi, 141 phone: ++39-461-534251 |\n| 38057 Pergine Valsugana (TN) www: http://www.cs.unitn.it/~dz/ |\n| Italy pgp: finger [email protected] |\n+----------------------------------------------------------------------+\n", "msg_date": "Thu, 27 Aug 1998 00:49:11 +0200 (MET DST)", "msg_from": "Massimo Dal Zotto <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [PATCHES] Re: some patches" }, { "msg_contents": "> > > > \txid tags for better support of user locks. There is also a new\n> > > > \tfunction which returns an array of pids owning a lock.\n> > > > \tI'm using this code from over six months and it works fine.\n> > > \n> > > \tApplied...\n> > \n> > Again, any work on locks is good. Did my changes help?\n> \n> I'm not completely convinced of the new lock priority. I will study your\n> code and make some test. I suspect it may introduce some deadlocks in the\n> listen/notify code.\n\nVery possible. listen/notify has a different locking priority.\n\n> \n> > > > ps-status.patch\n> > > > \n> > > > \tmacros for ps status, used by postgres.c and utility.c.\n> > > > \tUnfortunately ps status is system dependent and the current\n> > > > \tcode doesn't work on linux. The use of macros confines system\n> > > > \tdependency to into one file (ps-status.h). Users of other\n> > > > \toperating systems should check this code and submit new macros.\n> > > \n> > > \tApplied...but...\n> > > \n> > > \t...is there a reason why we aren't using setproctitle() where\n> > > applicable, or is this what you mean with the 'submit new macros' comment?\n> > > Or is this totally unrelated? :)\n> > \n> > I think so. Someone with setproctitle needs to give us code that works\n> > on their machine. We can then add a configure check so OS's with the\n> > feature can use it. One issue is whether we want the function called\n> > for each backend query because it may be too large a performance hit. \n> > No idea how to deal with this.\n> \n> ps status is optional. If we can't do it on some OS we simply define empty\n> macros and all is ok. We must however be careful with side effects inside\n> ps macros in utility.c.\n\nYes, good idea to move it out as a macro. It was all over the code.\n\n> > > > \tand the table size from 1000 to 5000.\n> > > > \tI don't know if anybody is working on SI, but until another\n> > > > \tsolution is found this patch fixes the problem. I have received\n> > > > \tmessages from other people reporting the same problem which I\n> > > > \tfixed many months ago.\n> > > \n> > > \tApplied...\n> > \n> > I was hoping you would submit this one. Sounds like a needed patch, and\n> > something few of use know how to debug.\n> \n> Is Vadim working on shared cache? Maybe this patch could become obsolete\n> in the next version. But for now it is necessary. I had very nasty problems\n> with this.\n\nI haven't heard him talking about it recently.\n\n> \n> > > > socket-flock.patch\n> > > > \n> > > > \tuse advisory locks to check if the unix socket can be deleted.\n> > > > \tA running postmaster keeps a lock on that file. A starting\n> > > > \tpostmaster exits if the file exists and is locked, otherwise\n> > > > \tit deletes the sockets and proceeds.\n> > > > \tThis avoid the need to remove manually the file after a postmaster\n> > > > \tor system crash.\n> > > > \tI don't know if flock is available on any system. If not we could\n> > > > \tdefine a HAVE_FLOCK set by configure.\n> > > \n> > > \tDefinitely applied...\n> > \n> > This is certainly a great idea. Deleting that lock file is a pain.\n> > \n> > I am almost certain we are going to need a configure check on this one.\n> > flock/lockf() are supported on almost all systems, but usually not both.\n> > Perhaps someone with lockf and not flock can give us some code.\n> \n> Yes, this must be checked on every OS. I have only linux to test.\n\nYep.\n\n\n> > Good idea. If you can give me a comment about it, I can put something\n> > in the FAQ under debugging. Sounds like we need manual page update, if\n> > that was not already in the patch.\n> \n> I will write some documentation. Any comments on the new signal handling ?\n\nI did not notice that. What new signal handling?\n\n> \n> I would like also to discuss on the different ways used to print debug\n> messages. At the moment we have stdout, stderr, tprintf with syslog and\n> elog. Maybe we could establish some standard ways to print messages.\n> And we could put all the various debug flags and options in pg_options.\n\nYes. We have talked about syslog for ages, but no one has done it. It\nis on the TODO list. Seems like unifying everything to use syslog is\nthe most powerful.\n\n> \n> I have also another idea. When the postmaster is started it should delete\n> all tuples left in pg_listener because all pids refer to processes now dead.\n> I'm thinking of doing an ftruncate on all data/*/pg_listener at postmaster\n> startup. This should work because there aren't any indices on that table.\n> I'm doing this in the shell script which starts postgres and it semms to\n> work fine. Any comments ?\n\n\nYes, they should be deleted. We should probably delete all the old temp/sort\nfiles too. I think you can just delete the table, as long as no backend\nis running. There really is no information kept between postmaster\nstartups that would get out-of-sync if a table had zero length. Try it\nand if it works, go for it.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sat, 29 Aug 1998 00:15:28 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [PATCHES] Re: some patches" } ]
[ { "msg_contents": "I tried to compile postgres 6.3.2 on a Sun sparc ultra 1 with solaris 2.5.1.\nbut did not succeed.\nThe log file looks like:\n\n\ngmake[3]: Entering directory `/opt/pgsql/src/interfaces/ecpg/preproc'\nlex -t pgc.l > pgc.c\n\"pgc.l\":line 26: Error: missing translation value\ngmake[3]: *** [pgc.c] Error 1\nrm pgc.c\ngmake[3]: Leaving directory `/opt/pgsql/src/interfaces/ecpg/preproc'\ngmake[2]: *** [all] Error 2\ngmake[2]: Leaving directory `/opt/pgsql/src/interfaces/ecpg'\ngmake[1]: *** [all] Error 2\ngmake[1]: Leaving directory `/opt/pgsql/src/interfaces'\ngmake: *** [all] Error 2\n\n\n\n\n I hope somebody can give me some advice to solve the problem.\n\nThanks by atention :).\nRenato Mattosinho\[email protected]\n\n\n", "msg_date": "Wed, 26 Aug 1998 20:36:43 -0300", "msg_from": "\"Renato A de O Mattosinho\" <[email protected]>", "msg_from_op": true, "msg_subject": "Problem with Solaris 2.5.1" } ]
[ { "msg_contents": ">> > * Allow views to specify column names outside SELECT statement\n>> \n>> ??? what is meant by that?\n>\n>I have no idea. I am removing it. Does anyone else know what it means?\n\nIt probably means:\ncreate view myview (name, salary, hours) as select lname, currsal, whours from wages;\n\nAndreas\n\n\n", "msg_date": "Thu, 27 Aug 1998 09:05:39 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "AW: TODO (was: Re: [HACKERS] Problem with parser)" }, { "msg_contents": "> >> > * Allow views to specify column names outside SELECT statement\n> >> \n> >> ??? what is meant by that?\n> >\n> >I have no idea. I am removing it. Does anyone else know what it means?\n> \n> It probably means:\n> create view myview (name, salary, hours) as select lname, currsal, whours from wages;\n\nAdded to TODO:\n\n\t* CREATE VIEW myview (name) AS SELECT lname FROM wages fails \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 27 Aug 1998 13:01:21 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: TODO (was: Re: [HACKERS] Problem with parser)" }, { "msg_contents": ">\n> >> > * Allow views to specify column names outside SELECT statement\n> >>\n> >> ??? what is meant by that?\n> >\n> >I have no idea. I am removing it. Does anyone else know what it means?\n>\n> It probably means:\n> create view myview (name, salary, hours) as select lname, currsal, whours from wages;\n>\n> Andreas\n\n But that doesn't have to do anything with the rewrite system.\n It has to do with the view creation step on setting up the\n instead rule for view selection. There the AS clauses have to\n be moved into the target list. The rewrite system doesn't\n know if this rule is something that builds up a view.\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, 27 Aug 1998 22:41:16 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: AW: TODO (was: Re: [HACKERS] Problem with parser)" } ]
[ { "msg_contents": "I got the following error repeatedly from my postgres (6.3) server:\n\n NOTICE: SIAssignBackendID: discarding tag 2147422478\n FATAL 1: Backend cache invalidation initialization failed\n\n The database houses substantial amount of information but not too much,\nand is accessed via the psql C interface and ODBC. I try to vacuum every\nnight, but one DB is not vacuumed that often. Any ideas what could be\nwrong? After rebooting, the problem disappeared.\n\n Thanks in advance for any pointers.\n\nPaul.\n", "msg_date": "Thu, 27 Aug 1998 11:42:21 +0300", "msg_from": "Paul Bagyenda <[email protected]>", "msg_from_op": true, "msg_subject": "Error in postgres server" } ]
[ { "msg_contents": "Hello,\n\nI have problem with compiling of libpgtcl in current snapshot of PGSQL.\nI think, there is a problem with compatibility of Tcl versions 7.x and\n8.x.\n\nsystem=Linux 2.0.35, RedHat 5.1, Tcl 8.0.2\n\nfollowing items are from notes in Tcl 8.0\n- Tcl_CreateFileHandler and Tcl_DeleteFileHandler now take Unix fd's and\nare only supported on the Unix platform.\n\n- The C APIs for creating channel drivers have changed as part\nof the new notifier implementation. The Tcl_File interfaces have\nbeen removed. Tcl_GetChannelFile has been replaced with\nTcl_GetChannelHandle. Tcl_MakeFileChannel now takes\na platform-specific file handle. \n\nlibpgtcl uses Tcl_File interfaces when compiling with Tcl >= 7.6. Simply\nreversing the condition doesn't help.\n\nIs anybody working on this problem? Or must we use Tcl 7.6?\n\n\t\t\t\tThank you\n\t\t\t\t\tDan Horak\n", "msg_date": "Thu, 27 Aug 1998 13:48:16 +0200", "msg_from": "Horak Daniel <[email protected]>", "msg_from_op": true, "msg_subject": "libpgtcl and Tcl 8.0" }, { "msg_contents": "Horak Daniel <[email protected]> writes:\n> following items are from notes in Tcl 8.0\n> - The C APIs for creating channel drivers have changed as part\n\nAgain? Sheesh.\n\n> Is anybody working on this problem? Or must we use Tcl 7.6?\n\nI'm not going to do anything about it in the immediate future.\nDo you want to submit patches? Please do not break the Tcl 7.6 support.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 27 Aug 1998 09:21:51 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] libpgtcl and Tcl 8.0 " } ]
[ { "msg_contents": "I still get\n\nERROR: fmgr_info: function 28261: cache lookup failed\n\nin my first vacuum call.\n\nBruce, if you need a test case, go into pgsql/src/interfaces/ecpg/test and\ntype 'make all'. Afterwards executing perftest gives you this output\neverytime. Yes, you need a DB named mm for this. :-)\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Thu, 27 Aug 1998 14:56:01 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "Still getting ERROR: fmgr_info: function 28261: cache lookup faile" }, { "msg_contents": "> I still get\n> \n> ERROR: fmgr_info: function 28261: cache lookup failed\n> \n> in my first vacuum call.\n> \n> Bruce, if you need a test case, go into pgsql/src/interfaces/ecpg/test and\n> type 'make all'. Afterwards executing perftest gives you this output\n> everytime. Yes, you need a DB named mm for this. :-)\n> \n\nIs this fixed now.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 28 Aug 1998 01:01:50 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Still getting ERROR: fmgr_info: function 28261: cache\n\tlookup faile" }, { "msg_contents": "On Fri, Aug 28, 1998 at 01:01:50AM -0400, Bruce Momjian wrote:\n> > I still get\n> > \n> > ERROR: fmgr_info: function 28261: cache lookup failed\n> > \n> > in my first vacuum call.\n> > \n> > Bruce, if you need a test case, go into pgsql/src/interfaces/ecpg/test and\n> > type 'make all'. Afterwards executing perftest gives you this output\n> > everytime. Yes, you need a DB named mm for this. :-)\n> > \n> \n> Is this fixed now.\n\nI don't know as I reported earlier. I'm not able to do anything because the\nbackend's response starts with 'K' which is not defined in libpq.\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Fri, 28 Aug 1998 15:41:32 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Still getting ERROR: fmgr_info: function 28261: cache\n\tlookup faile" } ]
[ { "msg_contents": "\nAfter seeing the work done to implement SERIAL types (automatic creation\nof sequences) would it not be possible to do the same thing with FOREIGN\nKEYs by automatically creating 2 triggers for each FOREIGN KEY statement?\n\nCan someone with more intimate knowledge of the parser/grammar sections of\nthe code comment on this?\n\n-- \n| Matthew N. Dodd |This space | '78 Datsun 280Z | FreeBSD/NetBSD/Sprite/VMS |\n| [email protected] |is for rent| '84 Volvo 245DL | ix86,sparc,m68k,pmax,vax |\n| http://www.jurai.net/~winter | Are you k-rad elite enough for my webpage? |\n\n", "msg_date": "Thu, 27 Aug 1998 17:45:21 -0400 (EDT)", "msg_from": "\"Matthew N. Dodd\" <[email protected]>", "msg_from_op": true, "msg_subject": "FOREIGN KEY revisited" }, { "msg_contents": "> After seeing the work done to implement SERIAL types (automatic \n> creation of sequences) would it not be possible to do the same thing \n> with FOREIGN KEYs by automatically creating 2 triggers for each \n> FOREIGN KEY statement?\n\nIt's possible, I suppose, if the code which the triggers execute can be\ncompletely generic (so it is only the equivalent of some \"CREATE\nTRIGGER\" SQL code which must be executed for a new foreign key).\n\nThe SERIAL type built on the work I had done to implement PRIMARY KEY\nand was pretty trivial to do. However, primary keys are cleaner than the\nserial type because the underlying implementation for keys just created\na unique index, which Postgres guarantees to remove if the table is\ndestroyed. For the serial type, a sequence is created which is _not_\ntied directly to the table, and which does _not_ get automatically\ndestroyed if the table is destroyed.\n\nHmm, speaking of the serial type, I wonder if I could declare a trigger\nto clean up sequences when I destroy a table...\n\nBack to your question: Postgres probably does not remove trigger\nfunctions if a table is destroyed, but that isn't a problem if the\ntrigger function is generic code which will be reused anyway.\n\nVadim has been thinking about how to do foreign keys, but I can't\nremember if it was via triggers or some other means.\n\n - Tom\n", "msg_date": "Fri, 28 Aug 1998 06:53:57 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] FOREIGN KEY revisited" }, { "msg_contents": "On Fri, 28 Aug 1998, Thomas G. Lockhart wrote:\n> Back to your question: Postgres probably does not remove trigger\n> functions if a table is destroyed, but that isn't a problem if the\n> trigger function is generic code which will be reused anyway.\n\nEven if you could create a trigger to remove the triggers used to\nimplement FOREIGN KEYs, how would you remove the trigger that removes the\ntriggers? :)\n\nWhat is needed is some way of identifying a particular trigger with a\ntable and dropping it if the table goes away.\n\nThis could be sufficiently genericized to allow any dependant object to be\nremoved when its dependancy is droped.\n\n> Vadim has been thinking about how to do foreign keys, but I can't\n> remember if it was via triggers or some other means.\n\nI'm the lone PostgreSQL advocate at a rather large backbone provider. I'd\nlove to keep using postgres, but lack of FOREIGN KEYs is probably the\nbiggest nail in the coffin. Oracle would be overkill for this project but\nit would make DB maintainence much easier as I wouldn't have to keep track\nof all these triggers I'm using to implement FOREIGN KEYs. The\napplications that use the DB are considered 'hostile' and I need to do all\nthe constraint checking I can to make sure users don't do stupid things so\nnot using FOREIGN KEYs isn't a solution.\n\n-- \n| Matthew N. Dodd |This space | '78 Datsun 280Z | FreeBSD/NetBSD/Sprite/VMS |\n| [email protected] |is for rent| '84 Volvo 245DL | ix86,sparc,m68k,pmax,vax |\n| http://www.jurai.net/~winter | Are you k-rad elite enough for my webpage? |\n\n", "msg_date": "Fri, 28 Aug 1998 02:58:08 -0400 (EDT)", "msg_from": "\"Matthew N. Dodd\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] FOREIGN KEY revisited" }, { "msg_contents": "Thomas G. Lockhart wrote:\n> \n> Back to your question: Postgres probably does not remove trigger\n> functions if a table is destroyed, but that isn't a problem if the\n> trigger function is generic code which will be reused anyway.\n\nBoth functions in spi/refint.c are generic ones. They should be\npart of core system, not of contrib, to be used for FOREIGN KEY\nin CREATE TABLE...\nNo problems with using them.\n\n> \n> Vadim has been thinking about how to do foreign keys, but I can't\n> remember if it was via triggers or some other means.\n ^^^^^^^^^^^^\nNo. Via indices. \n\nVadim\n", "msg_date": "Fri, 28 Aug 1998 15:31:55 +0800", "msg_from": "Vadim Mikheev <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] FOREIGN KEY revisited" } ]
[ { "msg_contents": "Bruce Momjian <[email protected]>\n> \n> > Bruce Momjian <[email protected]>\n> > \n> > > \n> > > > On Mon, Aug 24, 1998 at 03:18:28PM -0400, Bruce Momjian wrote:\n> > > > > Would someone check a running 6.3.2 system and let me know if there \nare\n> > > > > any blank attalign values? It think you will find that there are. \nThe\n> > > > > current patch fixes that.\n> > > > \n> > > > echo \"select * from pg_attribute where attalign != 'i' and attalign !=\n> > > > 'c'and attalign != 'd' and attalign!='s';\"|psql template1\n> > > \n> > > Yikes. Good thing that is fixed now.\n> > > \n> > \n> > Another interesting thing?\n> > \n> > (appologies for the width)\n> > \n> > I would half expected attalign to be 'd' for all these.\n> > \n> > I'm not sure how the values get there though!!\n> \n> Can you research what the proper value should be. We have char/varchar\n> set to 'i', but others set to 'd'. What should be the proper value. Is\n> 'd' and 'i' alignment the same on our supported platforms. Does a char\n> field of length 32 align on int, but a double align on double differently.\n\nBruce,\n\nI'm probably not the best person to explain this or determine what the\ncorrect values are. I'm not sure I even understand how things work\nmyself.\n\nI think we require the alignment definitions because we are storing\ntuples as structures on disk and reading and writing them as raw\ndata. Hence, when we read from disk into one of the FormData structs\nwe need to ensure that the data reads in with the correct alignment.\n\n(If you declare a struct in C it may occupy more bytes than you\n imagine due to alignment.)\n \nReading by 'C' book here.\n\n\tDon't assume, however, that the size of a structure is the sum\n\tof the sizes of it's members. Because of alignment requirements\n\tfor different objects, there may be \"holes\" in a structure.\n\tThus, for instance, if a char is one bye and an int four bytes,\n\tthe structure\n\t\n\t\tstruct {\n\t\t\tchar c;\n\t\t\tint i;\n\t\t};\n\t\t\n\tmight well require eight bytes not five.\n\t\nI guess we need to ensure that if we write this struct to disk we \nput the bytes <char><pad><pad><pad><int><int><int><int> into the\nblock.\n\nWhen we read the data back into the structure we get a valid alignment.\n\nI think this padding works by adding bytes to the previous field so that\nwhen the current field is written is is on the right boundary.\n\nDoes this make sense, or am I barking up the wrong tree?\n\nKeith.\n\n\n \n\n", "msg_date": "Thu, 27 Aug 1998 22:49:39 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "> I think this padding works by adding bytes to the previous field so that\n> when the current field is written is is on the right boundary.\n> \n> Does this make sense, or am I barking up the wrong tree?\n\nYou are correct. I just don't know what the alignment issues are of\ndouble vs. int for our various character types.\n\nThis is more of an academic question, because your Sparc problem is\nprobably not that, but something else that I can reproduce now.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 27 Aug 1998 20:24:20 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": ">\n> > I think this padding works by adding bytes to the previous field so that\n> > when the current field is written is is on the right boundary.\n> >\n> > Does this make sense, or am I barking up the wrong tree?\n>\n> You are correct. I just don't know what the alignment issues are of\n> double vs. int for our various character types.\n>\n> This is more of an academic question, because your Sparc problem is\n> probably not that, but something else that I can reproduce now.\n>\n>\n> --\n> Bruce Momjian | 830 Blythe Avenue\n\nHi all,\n\n I don't know if this is really related to the initdb problem\n discussion (haven't followed it enough). But seems so because\n it fixes a damn problem during index tuple insertion on\n CREATE TABLE into pg_attribute_relid_attnum_index.\n\n Anyway - this bug was really hard to find. During startup the\n relcache reads in some prepared information about index\n strategies from a file and then reinitializes the function\n pointers inside the scanKey data. But for sake it assumed\n single attribute index tuples (hasn't that changed recently).\n Thus not all the strategies scanKey entries where initialized\n properly, resulting in invalid addresses for the btree\n comparision functions.\n\n With the patch at the end the regression tests passed\n excellent except for the sanity_check that crashed at vacuum\n and the misc test where the select unique1 from onek2 outputs\n the two rows in different order.\n\n Bruce, could you please apply 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*** relcache.c.orig\tFri Aug 28 05:03:02 1998\n--- relcache.c\tFri Aug 28 05:02:12 1998\n***************\n*** 1982,1991 ****\n #define SMD(i)\tstrat[0].strategyMapData[i].entry[0]\n \n \t\t/* have to reinit the function pointers in the strategy maps */\n! \t\tfor (i = 0; i < am->amstrategies; i++)\n \t\t\tfmgr_info(SMD(i).sk_procedure,\n \t\t\t\t\t &(SMD(i).sk_func));\n! \t\tSMD(i).sk_nargs = SMD(i).sk_func.fn_nargs;\n \n \n \t\t/*\n--- 1982,1992 ----\n #define SMD(i)\tstrat[0].strategyMapData[i].entry[0]\n \n \t\t/* have to reinit the function pointers in the strategy maps */\n! \t\tfor (i = 0; i < am->amstrategies * relform->relnatts; i++) {\n \t\t\tfmgr_info(SMD(i).sk_procedure,\n \t\t\t\t\t &(SMD(i).sk_func));\n! \t\t\tSMD(i).sk_nargs = SMD(i).sk_func.fn_nargs;\n! \t\t}\n \n \n \t\t/*\n", "msg_date": "Fri, 28 Aug 1998 05:24:18 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "> \n> Hi all,\n> \n> I don't know if this is really related to the initdb problem\n> discussion (haven't followed it enough). But seems so because\n> it fixes a damn problem during index tuple insertion on\n> CREATE TABLE into pg_attribute_relid_attnum_index.\n> \n> Anyway - this bug was really hard to find. During startup the\n> relcache reads in some prepared information about index\n> strategies from a file and then reinitializes the function\n> pointers inside the scanKey data. But for sake it assumed\n> single attribute index tuples (hasn't that changed recently).\n> Thus not all the strategies scanKey entries where initialized\n> properly, resulting in invalid addresses for the btree\n> comparision functions.\n> \n> With the patch at the end the regression tests passed\n> excellent except for the sanity_check that crashed at vacuum\n> and the misc test where the select unique1 from onek2 outputs\n> the two rows in different order.\n> \n> Bruce, could you please apply it?\nJan, this is great. It would have taken me a long time to find this. \nWhy my platform did not fail is a real mystery.\n\nPatch applied. I am looking at the vacuum problem now.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Thu, 27 Aug 1998 23:37:08 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" }, { "msg_contents": "> Jan, this is great. It would have taken me a long time to find this.\n> Why my platform did not fail is a real mystery.\n>\n> Patch applied. I am looking at the vacuum problem now.\n>\n> --\n> Bruce Momjian | 830 Blythe Avenue\n\nBruce,\n\n Seems that the addresses that where assigned when\n pg_internal.init is created (don't know exactly when this\n happens) are the same as they should be later (when it is\n read into). I absolutely don't know why they are different\n between these two situations at all, it are all addresses\n from builtin functions, and the postgres image is allways the\n same one. So I'm a little confused about it. But these are\n the facts gdb told me.\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, 28 Aug 1998 05:52:45 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] initdb problem" } ]
[ { "msg_contents": "I will, of course, be running pgindent on the source just before beta.\n\nI would also like to change a few of list macro names that I can never\nremember, and I am sure others have the same problem.\n\n---------------------------------------------------------------------------\n\nlappend is good\n\nlcons should be ladd (adds to the front of the list, while lappend adds to end \n\nnconc should be lconcat, because it concats two lists\n\nlconsi becomes ladd_int\n\nlappendi becomes lappend_int\n\nnreverse becomes lreverse\n\nset_difference becomes set_difference_int\n\n---------------------------------------------------------------------------\n\nWhat do people think?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 28 Aug 1998 00:51:00 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "list macro names" }, { "msg_contents": "> I would also like to change a few of list macro names that I can never\n> remember, and I am sure others have the same problem.\n> lappend is good\n> lcons should be ladd (adds to the front of the list, while lappend adds to end\n> nconc should be lconcat, because it concats two lists\n> lconsi becomes ladd_int\n> lappendi becomes lappend_int\n> nreverse becomes lreverse\n\nAck! As you know from looking at the comments in the code, the original\nPostgres was apparently written in Lisp. All of the list-oriented\nbehaviors and conventions date from that time.\n\nI've spent quite a bit of time with the parser especially, and would\nlike to not have to learn other obscure names. Why bother changing them;\nthe new names can't _that_ much clearer unless we move to Cobol. Let's\nsee...\n\nlappendi becomes append_list_and_integer\n...\n\nBesides, I'm now working on a large project in Lisp, so this stuff seems\nmore normal than it did before.\n\nIn case I'm being to subtle: I'd strongly prefer leaving these things\nalone for now :)\n\n - Tom\n", "msg_date": "Fri, 28 Aug 1998 06:10:35 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] list macro names" }, { "msg_contents": "> \n> I will, of course, be running pgindent on the source just before beta.\n> \n> I would also like to change a few of list macro names that I can never\n> remember, and I am sure others have the same problem.\n> \n> ---------------------------------------------------------------------------\n> \n> lappend is good\n> \n> lcons should be ladd (adds to the front of the list, while lappend adds to end \nBut 'cons' is the absolute standard lisp nomemclature for this. And all these\noperations are part of the lispish heritage of postgres.\n\n> nconc should be lconcat, because it concats two lists\n> \n> lconsi becomes ladd_int\n\nAnd this adds an integer arithemetically or listwise? Not less confusing, just\na different confusion.\n\n> lappendi becomes lappend_int\n> \n> nreverse becomes lreverse\n> \n> set_difference becomes set_difference_int\n\nWhy is this more clear?\n\nWhat is next, Hungarian notation?\n\n> What do people think?\n\nI think we should not rework code that everyone is getting used to unless\nthere is some functional reason.\n\n-dg\n\nDavid Gould [email protected] 510.628.3783 or 510.305.9468 \nInformix Software (No, really) 300 Lakeside Drive Oakland, CA 94612\n - If simplicity worked, the world would be overrun with insects. -\n", "msg_date": "Fri, 28 Aug 1998 10:13:12 -0700 (PDT)", "msg_from": "[email protected] (David Gould)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] list macro names" }, { "msg_contents": "> > \n> > I will, of course, be running pgindent on the source just before beta.\n> > \n> > I would also like to change a few of list macro names that I can never\n> > remember, and I am sure others have the same problem.\n> > \n> > ---------------------------------------------------------------------------\n> > \n> > lappend is good\n> > \n> > lcons should be ladd (adds to the front of the list, while lappend adds to end \n> But 'cons' is the absolute standard lisp nomemclature for this. And all these\n> operations are part of the lispish heritage of postgres.\n> \n> > nconc should be lconcat, because it concats two lists\n> > \n> > lconsi becomes ladd_int\n> \n> And this adds an integer arithemetically or listwise? Not less confusing, just\n> a different confusion.\n> \n> > lappendi becomes lappend_int\n> > \n> > nreverse becomes lreverse\n> > \n> > set_difference becomes set_difference_int\n> \n> Why is this more clear?\n> \n> What is next, Hungarian notation?\n> \n> > What do people think?\n> \n> I think we should not rework code that everyone is getting used to unless\n> there is some functional reason.\n> \n> -dg\n> \n> David Gould [email protected] 510.628.3783 or 510.305.9468 \n> Informix Software (No, really) 300 Lakeside Drive Oakland, CA 94612\n> - If simplicity worked, the world would be overrun with insects. -\n> \n\nOK, I seem to the only one who wants the change. They stay as is.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Sat, 29 Aug 1998 00:25:31 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] list macro names" } ]
[ { "msg_contents": "Thanks to Jan, we now have initdb hopefully working on all platforms. \nSeems there was some single-key dependency in the catalog cache code\nthat I never found.\n\nI have just fixed the vacuum problem, so I can now vacuum the regression\ndatabase without error. The problem there was that the vacuum code was\ngetting the pg_index tuple for each relation it was vacuuming from the\nsystem cache, and just keeping the pointer while it did the vacuum. My\nmegapatch change was to find the heap tuple and use that, but I was\nunlocking the tuple. I tried making a copy of the cache tuple inside\nthe function while it was used, then pfree it. The code was later using\nthat pointer outside that function. I just removed the pfree so the\ntuple is free'ed at the end of the transaction. (Vadim, memory\nallocated in vc_mkindesc() isn't part of some global vacuum memory\ncontext that doesn't get free'ed, is it?)\n\nThe problem where fmgr.h was in src/include had already been identified.\n\nSo, looks like all the strange errors I introduced with my megapatch\nhopefully are gone. Please tell me if you have having any more\nproblems.\n\nSorry to have broken so much.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 28 Aug 1998 00:58:26 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "initdb/vacuum fixes" } ]
[ { "msg_contents": "\nI am getting a huge number of regression failures in the past few days,\nperhaps 80% failure when run.\n\nIt may be related to some patches installed. Anyone else seeing it. \nThe actual checkresults don't look too bad, though.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 28 Aug 1998 01:08:49 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "regression failures" }, { "msg_contents": "> \n> \n> I am getting a huge number of regression failures in the past few days,\n> perhaps 80% failure when run.\n> \n> It may be related to some patches installed. Anyone else seeing it. \n> The actual checkresults don't look too bad, though.\n\n Seen them too.\n\n The elog() messages have one more whitespace between ERROR\n and the message text itself. checkresults takes care about\n that.\n\n> \n> -- \n> Bruce Momjian | 830 Blythe Avenue\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": "Fri, 28 Aug 1998 07:56:26 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] regression failures" }, { "msg_contents": "> > \n> > \n> > I am getting a huge number of regression failures in the past few days,\n> > perhaps 80% failure when run.\n> > \n> > It may be related to some patches installed. Anyone else seeing it. \n> > The actual checkresults don't look too bad, though.\n> \n> Seen them too.\n> \n> The elog() messages have one more whitespace between ERROR\n> and the message text itself. checkresults takes care about\n> that.\n\nAh, I see. checkresults uses 'diff -uw', so it does not see the space\nchange from \"ERROR: text\" to \"ERROR: text\", but the report of ok/failed\ndoes sees the space. The two space was removed by Massimo patch as part\nof the the tprintf additions.\n\nI have changed regress.sh to do a 'diff -w' rather than just a diff, so\nit will properly report failure and success. I feel better. I was\ngoing to research the failures today.\n\nDo people like the removal of the extra space after the colon, so there\nis only one space now?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\n + If your life is a hard drive, | (610) 353-9879(w)\n + Christ can be your backup. | (610) 853-3000(h)\n", "msg_date": "Fri, 28 Aug 1998 10:19:50 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] regression failures]" } ]
[ { "msg_contents": "I just cvsup'ed the latest changes, recompiled and initdb'ed. When trying\ncreatuser or 'psql template1' I get \n\npostgres@feivel:~/pgsql/src/interfaces/ecpg.mm/test$ psql template1\nConnection to database 'template1' failed.\nunknown protocol character 'K' read from backend. (The protocol character\nis the first character the backend sends in response to a query it\nreceives).\n\nOops.\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Fri, 28 Aug 1998 09:06:29 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "New problem" } ]