threads
listlengths
1
2.99k
[ { "msg_contents": "I just compiled up the current snapshot for a test under netbsd\n1.3.2/i386. Everything works except the followng:\n\nint8 .. failed <-- seems like large numbers show as negative\ngeometry .. failed <-- seems like roundoff differences\nunion .. failed <-- all differences have extra rows\n\nPerhaps these are all \"well-known\" problems, but if any details on\nfailures would help, let me know. If the geometry errors really are\nroundoffs, I'll be glad to make a netbsd \"expected\" file before the\nfinal release.\n\nCheers,\nBrook\n", "msg_date": "Wed, 9 Sep 1998 11:30:48 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": true, "msg_subject": "regression test errors: netbsd 1.3.2/i386" }, { "msg_contents": "Brook Milligan wrote:\n> \n> I just compiled up the current snapshot for a test under netbsd\n> 1.3.2/i386. Everything works except the followng:\n> \n> int8 .. failed <-- seems like large numbers show as negative\n\nYour system is apparently not yet supported for 8 byte integers. If you\nwant netbsd to be supported, you need to figure out if you have support\nfor those in your compiler (gcc seems to have it across several\nprocessors) and you need i/o support for them in printf/scanf.\n\nconfigure tries to detect these automatically so look at what configure\ntries to do and see why it missed for your system.\n\n> union .. failed <-- all differences have extra rows\n\n? Do other people see a problem with unions?\n\n - Tom\n", "msg_date": "Thu, 10 Sep 1998 01:19:10 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] regression test errors: netbsd 1.3.2/i386" }, { "msg_contents": " > I just compiled up the current snapshot for a test under netbsd\n > 1.3.2/i386. Everything works except the followng:\n > \n > int8 .. failed <-- seems like large numbers show as negative\n\n Your system is apparently not yet supported for 8 byte integers. If you\n want netbsd to be supported, you need to figure out if you have support\n for those in your compiler (gcc seems to have it across several\n processors) and you need i/o support for them in printf/scanf.\n\n configure tries to detect these automatically so look at what configure\n tries to do and see why it missed for your system.\n\nConfigure does check (and passes), but doesn't seem to record anything\nabout the int8 tests. As a result, config.h (and hence int8.h) knows\nnothing about the results of the configure test. The patches below\nget configure to record the tests in config.h. With these patches (to\nlast night's snapshot) the int8 regression test passes on netbsd\n1.3.2/i386. I'm actually surprised they work without these patches\nfor anyone, really.\n\nCheers,\nBrook\n\n===========================================================================\n--- configure.in.orig\tThu Sep 10 01:00:35 1998\n+++ configure.in\tThu Sep 10 15:21:36 1998\n@@ -572,6 +572,7 @@\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+AC_SUBST(HAVE_LONG_INT_64)\n \n AC_MSG_CHECKING(whether 'long long int' is 64 bits using %lld)\n AC_TRY_RUN([#include <stdio.h>\n@@ -609,6 +610,7 @@\n \t[AC_DEFINE(HAVE_LONG_LONG_INT_64_lld) AC_MSG_RESULT(yes)],\n \tAC_MSG_RESULT(no),\n \tAC_MSG_RESULT(assuming not on target machine))\n+AC_SUBST(HAVE_LONG_LONG_INT_64_lld)\n \n AC_MSG_CHECKING(whether 'long long int' is 64 bits using %qd)\n AC_TRY_RUN([#include <stdio.h>\n@@ -646,6 +648,7 @@\n \t[AC_DEFINE(HAVE_LONG_LONG_INT_64_qd) AC_MSG_RESULT(yes)],\n \tAC_MSG_RESULT(no),\n \tAC_MSG_RESULT(assuming not on target machine))\n+AC_SUBST(HAVE_LONG_LONG_INT_64_qd)\n \n dnl Checks for library functions.\n AC_PROG_GCC_TRADITIONAL\n===========================================================================\n--- include/config.h.in.orig\tWed Aug 26 01:01:16 1998\n+++ include/config.h.in\tThu Sep 10 15:22:45 1998\n@@ -222,8 +222,11 @@\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+/* Set to 1 if type \"long long int\" works with %lld and is 64 bits */\n+#undef HAVE_LONG_LONG_INT_64_lld\n+\n+/* Set to 1 if type \"long long int\" works with %qd and is 64 bits */\n+#undef HAVE_LONG_LONG_INT_64_qd\n \n /*\n * Code below this point should not require changes\n", "msg_date": "Thu, 10 Sep 1998 17:13:07 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] regression test errors: netbsd 1.3.2/i386" }, { "msg_contents": " > I just compiled up the current snapshot for a test under netbsd\n > 1.3.2/i386. Everything works except the followng:\n > \n > union .. failed <-- all differences have extra rows\n\n ? Do other people see a problem with unions?\n\nStill having problems with unions from last night's snapshot. The\ndiffs are below in case they can help pinpoint the problem. Does no\none see anything like these additional zeros?\n\nCheers,\nBrook\n\n===========================================================================\n--- expected/union.out\tFri May 29 07:22:42 1998\n+++ results/union.out\tThu Sep 10 16:51:42 1998\n@@ -122,7 +122,10 @@\n -34.84 \n -1.2345678901234e-200\n 0 \n-(5 rows)\n+0 \n+0 \n+0 \n+(8 rows)\n \n QUERY: SELECT f1 AS ten FROM FLOAT8_TBL\n UNION ALL\n@@ -131,15 +134,19 @@\n ---------------------\n 0 \n -34.84 \n+0 \n+0 \n -1004.3 \n -1.2345678901234e+200\n -1.2345678901234e-200\n 0 \n -34.84 \n+0 \n+0 \n -1004.3 \n -1.2345678901234e+200\n -1.2345678901234e-200\n-(10 rows)\n+(14 rows)\n \n QUERY: SELECT f1 AS nine FROM FLOAT8_TBL\n UNION\n@@ -153,9 +160,11 @@\n -34.84 \n -1.2345678901234e-200\n 0 \n+0 \n+0 \n 123456 \n 2147483647 \n-(9 rows)\n+(11 rows)\n \n QUERY: SELECT f1 AS ten FROM FLOAT8_TBL\n UNION ALL\n@@ -164,6 +173,8 @@\n ---------------------\n 0 \n -34.84 \n+0 \n+0 \n -1004.3 \n -1.2345678901234e+200\n -1.2345678901234e-200\n@@ -172,7 +183,7 @@\n -123456 \n 2147483647 \n -2147483647 \n-(10 rows)\n+(12 rows)\n \n QUERY: SELECT f1 AS five FROM FLOAT8_TBL\n WHERE f1 BETWEEN -1e6 AND 1e6\n@@ -185,8 +196,9 @@\n -34.84\n -1.2345678901234e-200\n 0\n+ 0\n 123456\n-(5 rows)\n+(6 rows)\n \n QUERY: SELECT f1 AS five FROM VARCHAR_TBL\n UNION\n", "msg_date": "Thu, 10 Sep 1998 17:15:56 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] regression test errors: netbsd 1.3.2/i386" }, { "msg_contents": "I made some more int8 fixes today, so make sure you have tested the\ncurrent version before rooting around.\n\n> > I just compiled up the current snapshot for a test under netbsd\n> > 1.3.2/i386. Everything works except the followng:\n> > \n> > int8 .. failed <-- seems like large numbers show as negative\n> \n> Your system is apparently not yet supported for 8 byte integers. If you\n> want netbsd to be supported, you need to figure out if you have support\n> for those in your compiler (gcc seems to have it across several\n> processors) and you need i/o support for them in printf/scanf.\n> \n> configure tries to detect these automatically so look at what configure\n> tries to do and see why it missed for your system.\n> \n> Configure does check (and passes), but doesn't seem to record anything\n> about the int8 tests. As a result, config.h (and hence int8.h) knows\n> nothing about the results of the configure test. The patches below\n> get configure to record the tests in config.h. With these patches (to\n> last night's snapshot) the int8 regression test passes on netbsd\n> 1.3.2/i386. I'm actually surprised they work without these patches\n> for anyone, really.\n\nYes, I forgot to rename some stuff in config.h. I did that today.\n\n> \n> Cheers,\n> Brook\n> \n> ===========================================================================\n> --- configure.in.orig\tThu Sep 10 01:00:35 1998\n> +++ configure.in\tThu Sep 10 15:21:36 1998\n> @@ -572,6 +572,7 @@\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> +AC_SUBST(HAVE_LONG_INT_64)\n> \n> AC_MSG_CHECKING(whether 'long long int' is 64 bits using %lld)\n> AC_TRY_RUN([#include <stdio.h>\n> @@ -609,6 +610,7 @@\n> \t[AC_DEFINE(HAVE_LONG_LONG_INT_64_lld) AC_MSG_RESULT(yes)],\n> \tAC_MSG_RESULT(no),\n> \tAC_MSG_RESULT(assuming not on target machine))\n> +AC_SUBST(HAVE_LONG_LONG_INT_64_lld)\n> \n> AC_MSG_CHECKING(whether 'long long int' is 64 bits using %qd)\n> AC_TRY_RUN([#include <stdio.h>\n> @@ -646,6 +648,7 @@\n> \t[AC_DEFINE(HAVE_LONG_LONG_INT_64_qd) AC_MSG_RESULT(yes)],\n> \tAC_MSG_RESULT(no),\n> \tAC_MSG_RESULT(assuming not on target machine))\n> +AC_SUBST(HAVE_LONG_LONG_INT_64_qd)\n> \n> dnl Checks for library functions.\n> AC_PROG_GCC_TRADITIONAL\n> ===========================================================================\n> --- include/config.h.in.orig\tWed Aug 26 01:01:16 1998\n> +++ include/config.h.in\tThu Sep 10 15:22:45 1998\n> @@ -222,8 +222,11 @@\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> +/* Set to 1 if type \"long long int\" works with %lld and is 64 bits */\n> +#undef HAVE_LONG_LONG_INT_64_lld\n> +\n> +/* Set to 1 if type \"long long int\" works with %qd and is 64 bits */\n> +#undef HAVE_LONG_LONG_INT_64_qd\n> \n> /*\n> * Code below this point should not require changes\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, 10 Sep 1998 19:47:40 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] regression test errors: netbsd 1.3.2/i386" } ]
[ { "msg_contents": "I have come across a situation with 6.4 which has rendered at least some\nof my home made data types unusable. Specifically, the data type,\naccntnum, is a General Ledger account number type. (i.e. 9999-99\nformat) It is stored internally as an 4 byte integer; it is used\nexternally as a string and passed by reference internally. An IP data\ntype may be handled in a similar way. I had no problems at 6.3.2.\n\nAnyway, as pqlib reads the string sent to it by the backend (a la psql),\nit must first read the length of each string. The problem is that the\nlength of the string for accntnum in some outrageously large number\nwhich ultimately hangs psql. BTW, atttypemod = -1 and typlen = 4 in\nthe FE.\n\nDid something changed in the way a string is constructed on the BE\nbefore sending to the FE to cause this?\n\nHave the basic semantics changed (intentionally or unintentionally) for\nthe establishment of data types?\n\nAny assistance is appreciated.\n\n\n\n\n", "msg_date": "Wed, 09 Sep 1998 16:55:22 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": true, "msg_subject": "vlen in libpq using user defined data type" }, { "msg_contents": "> I have come across a situation with 6.4 which has rendered at least some\n> of my home made data types unusable. Specifically, the data type,\n> accntnum, is a General Ledger account number type. (i.e. 9999-99\n> format) It is stored internally as an 4 byte integer; it is used\n> externally as a string and passed by reference internally. An IP data\n> type may be handled in a similar way. I had no problems at 6.3.2.\n> \n> Anyway, as pqlib reads the string sent to it by the backend (a la psql),\n> it must first read the length of each string. The problem is that the\n> length of the string for accntnum in some outrageously large number\n> which ultimately hangs psql. BTW, atttypemod = -1 and typlen = 4 in\n> the FE.\n> \n> Did something changed in the way a string is constructed on the BE\n> before sending to the FE to cause this?\n> \n> Have the basic semantics changed (intentionally or unintentionally) for\n> the establishment of data types?\n\nJust reported today by another user. Tom Lane is working on this.\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, 9 Sep 1998 17:38:36 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vlen in libpq using user defined data type" }, { "msg_contents": "David Hartwig <[email protected]> writes:\n> Anyway, as pqlib reads the string sent to it by the backend (a la psql),\n> it must first read the length of each string. The problem is that the\n> length of the string for accntnum in some outrageously large number\n> which ultimately hangs psql. BTW, atttypemod = -1 and typlen = 4 in\n> the FE.\n\nIs this fixed by the patch I sent in last night? Your description does\nnot sound like what I would expect. The bug I fixed was that PQfsize()\nwould return 65535 instead of -1 for a varlen field. But neither libpq\nnor psql make use of that value (which is why I hadn't noticed it was\nbroken). Are you using some other frontend code that does depend on\nPQfsize to return the right thing?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 10 Sep 1998 10:25:52 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] vlen in libpq using user defined data type " }, { "msg_contents": "\n\nTom Lane wrote:\n\n> David Hartwig <[email protected]> writes:\n> > Anyway, as pqlib reads the string sent to it by the backend (a la psql),\n> > it must first read the length of each string. The problem is that the\n> > length of the string for accntnum in some outrageously large number\n> > which ultimately hangs psql. BTW, atttypemod = -1 and typlen = 4 in\n> > the FE.\n>\n> Is this fixed by the patch I sent in last night? Your description does\n> not sound like what I would expect. The bug I fixed was that PQfsize()\n> would return 65535 instead of -1 for a varlen field. But neither libpq\n> nor psql make use of that value (which is why I hadn't noticed it was\n> broken). Are you using some other frontend code that does depend on\n> PQfsize to return the right thing?\n>\n\nI am using psql. I put some debug statements in libpq get this far. If I\ndidn't mention it earlier, I put some log messages in my output function and\nit shows no problems. All the other functionality of my date type seems to\nwork. Specifically, the index look up via the WHERE clause, and the input\nfunction. work fine,\n\nI just tried the patch without success. I didn't think this was my problem\nbut it was worth a try. Hacking away...\n\nDoes anyone know where (and/or how) the PQfsize is derived in the backend?\n\n", "msg_date": "Thu, 10 Sep 1998 11:51:27 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] vlen in libpq using user defined data type" }, { "msg_contents": "Problem resolve. Hacker malfunction.\n\nDavid Hartwig wrote:\n\n> Tom Lane wrote:\n>\n> > David Hartwig <[email protected]> writes:\n> > > Anyway, as pqlib reads the string sent to it by the backend (a la psql),\n> > > it must first read the length of each string. The problem is that the\n> > > length of the string for accntnum in some outrageously large number\n> > > which ultimately hangs psql. BTW, atttypemod = -1 and typlen = 4 in\n> > > the FE.\n> >\n> > Is this fixed by the patch I sent in last night? Your description does\n> > not sound like what I would expect. The bug I fixed was that PQfsize()\n> > would return 65535 instead of -1 for a varlen field. But neither libpq\n> > nor psql make use of that value (which is why I hadn't noticed it was\n> > broken). Are you using some other frontend code that does depend on\n> > PQfsize to return the right thing?\n> >\n>\n> I am using psql. I put some debug statements in libpq get this far. If I\n> didn't mention it earlier, I put some log messages in my output function and\n> it shows no problems. All the other functionality of my date type seems to\n> work. Specifically, the index look up via the WHERE clause, and the input\n> function. work fine,\n>\n> I just tried the patch without success. I didn't think this was my problem\n> but it was worth a try. Hacking away...\n>\n> Does anyone know where (and/or how) the PQfsize is derived in the backend?\n\n\n\n", "msg_date": "Thu, 10 Sep 1998 17:03:43 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] vlen in libpq using user defined data type" } ]
[ { "msg_contents": "> Bruce Momjian\n> \n> Applied. Let's see if this fixes the pg_user problem.\n> \n\nI'm not sure the pg_user problem is related to the _ret/_RET\ntranslation but I have my fingers crossed for you.\n\nIt's strange but a week ago I seemed to have ALL the problems\nnow PostgreSQL works without any major problems on my system.\n\nI get exactly 3 regression failures.\n\n1) float8, SIGFPE, but expected.\n2) geometry, precision error at the lowest level.\n3) run_ruletest, postgres/pgsql username.\n\nFYI: SPARC/Linux (Redhat 4.2)\n\nKeith.\n\n", "msg_date": "Thu, 10 Sep 1998 00:05:42 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [PATCHES] Re: [HACKERS] Patch for initdb" } ]
[ { "msg_contents": "I broke it, I'm guilty :-(. Here's the fix.\n\nIn view of recent discussions about eliminating the fixed limit\non tuple sizes, a better long-term solution would be to increase\nthe width of field size values from 2 bytes to 4 in the FE/BE\nprotocol. I suspect we will end up doing that someday, so maybe\nwe should bite the bullet and do it now as part of the \"2.0\" FE/BE\nprotocol revision. On the other hand, we did promise a few weeks ago\nthat we were done changing the FE/BE protocol for 6.4. Comments?\n\n\t\t\tregards, tom lane\n\n\n*** src/interfaces/libpq/fe-exec.c.orig\tWed Sep 9 22:01:38 1998\n--- src/interfaces/libpq/fe-exec.c\tWed Sep 9 22:45:53 1998\n***************\n*** 541,546 ****\n--- 541,556 ----\n \t\t\tPQclear(result);\n \t\t\treturn EOF;\n \t\t}\n+ \t\t/*\n+ \t\t * Since pqGetInt treats 2-byte integers as unsigned, we need to\n+ \t\t * coerce the special value \"-1\" to signed form. (-1 is sent for\n+ \t\t * variable-length fields.) Formerly, libpq effectively did a\n+ \t\t * sign-extension on the 2-byte value by storing it in a signed short.\n+ \t\t * Now we only coerce the single value 65535 == -1; values\n+ \t\t * 32768..65534 are taken as valid field lengths.\n+ \t\t */\n+ \t\tif (typlen == 0xFFFF)\n+ \t\t\ttyplen = -1;\n \t\tresult->attDescs[i].name = strdup(typName);\n \t\tresult->attDescs[i].typid = typid;\n \t\tresult->attDescs[i].typlen = typlen;\n***************\n*** 1488,1494 ****\n \tif (strncmp(res->cmdStatus, \"INSERT \", 7) != 0)\n \t\treturn \"\";\n \n! \t/*\n \t * The cmdStatus string looks like\n \t * INSERT oid count\\0\n \t * In order to be able to return an ordinary C string without\n--- 1498,1504 ----\n \tif (strncmp(res->cmdStatus, \"INSERT \", 7) != 0)\n \t\treturn \"\";\n \n! \t/*----------\n \t * The cmdStatus string looks like\n \t * INSERT oid count\\0\n \t * In order to be able to return an ordinary C string without\n***************\n*** 1498,1503 ****\n--- 1508,1514 ----\n \t * INSERT oid count\\0oid\\0\n \t * ^ our return value points here\n \t * Pretty klugy eh? This routine should've just returned an Oid value.\n+ \t *----------\n \t */\n \n \tslen = strlen(res->cmdStatus);\n", "msg_date": "Wed, 09 Sep 1998 23:02:36 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "fix for libpq choking on varlen fields" }, { "msg_contents": "patch applied.\n\n\n> I broke it, I'm guilty :-(. Here's the fix.\n> \n> In view of recent discussions about eliminating the fixed limit\n> on tuple sizes, a better long-term solution would be to increase\n> the width of field size values from 2 bytes to 4 in the FE/BE\n> protocol. I suspect we will end up doing that someday, so maybe\n> we should bite the bullet and do it now as part of the \"2.0\" FE/BE\n> protocol revision. On the other hand, we did promise a few weeks ago\n> that we were done changing the FE/BE protocol for 6.4. Comments?\n> \n> \t\t\tregards, tom lane\n> \n> \n> *** src/interfaces/libpq/fe-exec.c.orig\tWed Sep 9 22:01:38 1998\n> --- src/interfaces/libpq/fe-exec.c\tWed Sep 9 22:45:53 1998\n> ***************\n> *** 541,546 ****\n> --- 541,556 ----\n> \t\t\tPQclear(result);\n> \t\t\treturn EOF;\n> \t\t}\n> + \t\t/*\n> + \t\t * Since pqGetInt treats 2-byte integers as unsigned, we need to\n> + \t\t * coerce the special value \"-1\" to signed form. (-1 is sent for\n> + \t\t * variable-length fields.) Formerly, libpq effectively did a\n> + \t\t * sign-extension on the 2-byte value by storing it in a signed short.\n> + \t\t * Now we only coerce the single value 65535 == -1; values\n> + \t\t * 32768..65534 are taken as valid field lengths.\n> + \t\t */\n> + \t\tif (typlen == 0xFFFF)\n> + \t\t\ttyplen = -1;\n> \t\tresult->attDescs[i].name = strdup(typName);\n> \t\tresult->attDescs[i].typid = typid;\n> \t\tresult->attDescs[i].typlen = typlen;\n> ***************\n> *** 1488,1494 ****\n> \tif (strncmp(res->cmdStatus, \"INSERT \", 7) != 0)\n> \t\treturn \"\";\n> \n> ! \t/*\n> \t * The cmdStatus string looks like\n> \t * INSERT oid count\\0\n> \t * In order to be able to return an ordinary C string without\n> --- 1498,1504 ----\n> \tif (strncmp(res->cmdStatus, \"INSERT \", 7) != 0)\n> \t\treturn \"\";\n> \n> ! \t/*----------\n> \t * The cmdStatus string looks like\n> \t * INSERT oid count\\0\n> \t * In order to be able to return an ordinary C string without\n> ***************\n> *** 1498,1503 ****\n> --- 1508,1514 ----\n> \t * INSERT oid count\\0oid\\0\n> \t * ^ our return value points here\n> \t * Pretty klugy eh? This routine should've just returned an Oid value.\n> + \t *----------\n> \t */\n> \n> \tslen = strlen(res->cmdStatus);\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, 10 Sep 1998 11:09:38 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] fix for libpq choking on varlen fields" } ]
[ { "msg_contents": "I have found BSDI used %qd for long long, while gnulibc used %Ld. I\nhave changed HAVE_LONG_LONG_INT_64 to be HAVE_LONG_LONG_INT_64_Ld and\nadded HAVE_LONG_LONG_INT_64_qd, and added the proper changes.\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, 9 Sep 1998 23:35:44 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "added long long to BSDI" }, { "msg_contents": "> I have found BSDI used %qd for long long, while gnulibc used %Ld. I\n> have changed HAVE_LONG_LONG_INT_64 to be HAVE_LONG_LONG_INT_64_Ld and\n> added HAVE_LONG_LONG_INT_64_qd, and added the proper changes.\n\nBut the code no longer uses \"%Ld\", using \"%lld\" instead to be compatible\nwith both gnu and with AIX. Is that still the case? If so, then perhaps\nwe should have a different name...\n\nGood news on BSDI though. We have the 64-bit ints for ~6 platforms now?\n>From what I can recall, Linux/i86, Linux/sparc, Linux/alpha, Unix/alpha,\nBSDI/i86, and AIX are supported? How about FreeBSD? Any other platforms?\n\n - Tom\n", "msg_date": "Thu, 10 Sep 1998 05:01:41 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] added long long to BSDI" }, { "msg_contents": "> > I have found BSDI used %qd for long long, while gnulibc used %Ld. I\n> > have changed HAVE_LONG_LONG_INT_64 to be HAVE_LONG_LONG_INT_64_Ld and\n> > added HAVE_LONG_LONG_INT_64_qd, and added the proper changes.\n> \n> But the code no longer uses \"%Ld\", using \"%lld\" instead to be compatible\n> with both gnu and with AIX. Is that still the case? If so, then perhaps\n> we should have a different name...\n> \n> Good news on BSDI though. We have the 64-bit ints for ~6 platforms now?\n> >From what I can recall, Linux/i86, Linux/sparc, Linux/alpha, Unix/alpha,\n> BSDI/i86, and AIX are supported? How about FreeBSD? Any other platforms?\n\nOK, I can change the name and code, but the configure test used %Ld, and\nthe code used %lld. Sure you want to change 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": "Thu, 10 Sep 1998 01:03:36 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] added long long to BSDI" }, { "msg_contents": "Bruce Momjian <[email protected]> wrote:\n> I have found BSDI used %qd for long long, while gnulibc used %Ld. I\n> have changed HAVE_LONG_LONG_INT_64 to be HAVE_LONG_LONG_INT_64_Ld and\n> added HAVE_LONG_LONG_INT_64_qd, and added the proper changes.\n\nJust to add to the confusion, the SCO UDK (used in UnixWare and Open Server) \nuses %lld for long long.\n\nFortunately, it will also accept %Ld, so we don't have to add another \nHAC\bVE_LONG_LONG_INT_64 variant.\n-- \n____ | Billy G. Allie | Domain....: [email protected]\n| /| | 7436 Hartwell | Compuserve: 76337,2061\n|-/-|----- | Dearborn, MI 48126| MSN.......: [email protected]\n|/ |LLIE | (313) 582-1540 | \n\n\n", "msg_date": "Thu, 10 Sep 1998 01:04:25 -0400", "msg_from": "\"Billy G. Allie\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] added long long to BSDI " }, { "msg_contents": "> OK, I can change the name and code, but the configure test used %Ld, \n> and the code used %lld. Sure you want to change it?\n\nAh, I'd forgotten about the configure test (someone else did that one,\nTom Lane I think?). That should be changed to \"%lld\" also.\n\nCan you do that?\n\n - Tom\n", "msg_date": "Thu, 10 Sep 1998 05:28:40 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] added long long to BSDI" }, { "msg_contents": "> > OK, I can change the name and code, but the configure test used %Ld, \n> > and the code used %lld. Sure you want to change it?\n> \n> Ah, I'd forgotten about the configure test (someone else did that one,\n> Tom Lane I think?). That should be changed to \"%lld\" also.\n> \n> Can you do that?\n> \n> - Tom\n> \n\nDoing it 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, 10 Sep 1998 01:35:54 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] added long long to BSDI" } ]
[ { "msg_contents": "cidr/IP address type(Tom Helbekkmo)\nrewrite system(Jan)\nforeign key?(Vadim)\n\nchange pg args for platforms that don't support argv changes\n\t(setproctitle()?, sendmail hack?)\nfix problem when DEFAULT string for CHAR() is not same as column\nhave psql dump out rules text with new function\ncnf-ify still can exhaust memory\npermissions on indexes: what do they do? should it be prevented?\nman pages/sgml synchronization (dump out man pages as postscript?)\nremove PARSEDEBUG defines if not longer needed\nlow level locking - status?\nimprove reporting of syntax errors by showing location of error in query\nuse index with constants on functions\nallow chainging of pages to allow >8k tuples\nSELECT oid @ oid @ oid FROM pg_user fails with parser error, not function error\ndocument/trigger/rule so changes to pg_shadow create pg_pwd\nlarge objects orphanage\nimprove group handling\nno min/max for oid type\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, 10 Sep 1998 01:04:05 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "open 6.4 items" }, { "msg_contents": "> fix problem when DEFAULT string for CHAR() is not same as column\n\nI think I fixed that a while ago. I've forgotten which file was\ninvolved, but I no longer see the symptom on my system.\n\n> man pages/sgml synchronization (dump out man pages as postscript?)\n\nWe should synchronize the man pages and sgml for this release, if\npossible, and then commit to using the sgml sources for man pages for\nv6.5. After v6.4 is released, man pages (but not sgml) are frozen until\nthey can be generated from the sgml.\n\n> remove PARSEDEBUG defines if not longer needed\n\nOK. You really want those gone, don't you!\n\n> use index with constants on functions\n\nNot likely for v6.4. On my list for v6.5.\n\n> SELECT oid @ oid @ oid FROM pg_user fails with parser error, not \n> function error\n\nWhat is the issue with this? The parser doesn't know how to group the\narguments and operators, so barfs. The only operators which have\nexplicit precedence are the plain standard ones (+,-,*,/ for math and\n=,<,> for comparisons, and |,: for who-knows-what). Everything else\nfalls into the same precedence, higher than the comparison operators and\nlower than the math ones. This includes, for example, \"<=\" which should\nbe the same precedence as the other comparison ops, but has higher\nprecedence at the moment.\n\n> no min/max for oid type\n\nDoes this still need to be on the list? The guy who asked for it\nactually needed something else...\n\n - Tom\n", "msg_date": "Thu, 10 Sep 1998 05:53:57 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] open 6.4 items" }, { "msg_contents": "> > fix problem when DEFAULT string for CHAR() is not same as column\n> \n> I think I fixed that a while ago. I've forgotten which file was\n> involved, but I no longer see the symptom on my system.\n\nRemoved.\n\n> \n> > man pages/sgml synchronization (dump out man pages as postscript?)\n> \n> We should synchronize the man pages and sgml for this release, if\n> possible, and then commit to using the sgml sources for man pages for\n> v6.5. After v6.4 is released, man pages (but not sgml) are frozen until\n> they can be generated from the sgml.\n\nOK.\n\n> \n> > remove PARSEDEBUG defines if not longer needed\n> \n> OK. You really want those gone, don't you!\n\nI can move it to the TODO list, OK? :-)\n\n> \n> > use index with constants on functions\n> \n> Not likely for v6.4. On my list for v6.5.\n\nOK.\n\n> \n> > SELECT oid @ oid @ oid FROM pg_user fails with parser error, not \n> > function error\n> \n> What is the issue with this? The parser doesn't know how to group the\n> arguments and operators, so barfs. The only operators which have\n> explicit precedence are the plain standard ones (+,-,*,/ for math and\n> =,<,> for comparisons, and |,: for who-knows-what). Everything else\n> falls into the same precedence, higher than the comparison operators and\n> lower than the math ones. This includes, for example, \"<=\" which should\n> be the same precedence as the other comparison ops, but has higher\n> precedence at the moment.\n\nShould I move this to the TODO list now?\n\n> \n> > no min/max for oid type\n> \n> Does this still need to be on the list? The guy who asked for it\n> actually needed something else...\n\nI can move some of the items off now, rather than wait until just before\n6.4 to be released to move them. 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": "Thu, 10 Sep 1998 02:15:50 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] open 6.4 items" }, { "msg_contents": "On Thu, 10 Sep 1998, Bruce Momjian wrote:\n\n> large objects orphanage\n\nI thought we were in beta?\n\nI didn't have this ready in time for the beta, so I thought it wasn't\ngoing to get in to 6.4.\n\nThere isn't much more to do for it though. I'm just finishing off the\ndocumentation for JDBC at the moment, so I can return to it shortly.\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": "Thu, 10 Sep 1998 07:23:32 +0100 (GMT)", "msg_from": "Peter T Mount <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] open 6.4 items" }, { "msg_contents": "> > > remove PARSEDEBUG defines if not longer needed\n> > OK. You really want those gone, don't you!\n> I can move it to the TODO list, OK? :-)\n\nNo, leave it on the v6.4 FixIt list. This is the start of that list,\nright?\n\n> > > SELECT oid @ oid @ oid FROM pg_user fails with parser error, not\n> > > function error\n> Should I move this to the TODO list now?\n\nWell, I don't know how you would fix it without rewriting the parser or\nchanging the associativity of generic operators. I would suggest leaving\nit off the ToDo list altogether, unless someone can suggest a viable\nsolution. The example suggests it is a problem with OIDs or with the \"@\"\noperator, not a fundamental feature of the yacc/bison parser.\n\n> > > no min/max for oid type\n> I can move some of the items off now, rather than wait until just \n> before 6.4 to be released to move them. OK?\n\nYeah. Let's turn this list into the v6.4 FixIt list; you've done one for\nevery release I can remember and it has been very helpful.\n\nBe sure to add the views problem to this list ;)\n\nAlso, add the html/hardcopy documentation since we will re-release the\nUser's Guide, Admin Guide, and Programmer's Guide.\n\n - Tom\n", "msg_date": "Thu, 10 Sep 1998 13:38:13 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] open 6.4 items" }, { "msg_contents": "> Yeah. Let's turn this list into the v6.4 FixIt list; you've done one for\n> every release I can remember and it has been very helpful.\n\nThe new one.\n\n---------------------------------------------------------------------------\n\ncidr/IP address type(Tom Helbekkmo)\nrewrite system(Jan)\nforeign key?(Vadim)\n\nchange pg args for platforms that don't support argv changes\n\t(setproctitle()?, sendmail hack?)\npg_user dumps core on some platforms\nhave psql dump out rules text with new function\nman pages/sgml synchronization\ngenerate html/postscript documentation\ngenerate postmaster pid file and remove flock/fcntl lock code\n\ncnf-ify still can exhaust memory, make SET KSQO more generic\npermissions on indexes: what do they do? should it be prevented?\nremove PARSEDEBUG defines if not longer needed\nlow level locking - work-in-progress for 6.5\nimprove reporting of syntax errors by showing location of error in query\nuse index with constants on functions\nallow chaining of pages to allow >8k tuples\nallow multiple generic operators in expressions without the use of parentheses\ndocument/trigger/rule so changes to pg_shadow create pg_pwd\nlarge objects orphanage\nimprove group handling\nno min/max for oid type\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, 10 Sep 1998 10:25:32 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] open 6.4 items" }, { "msg_contents": "> foreign key?(Vadim)\n\nI just added attributes for primary/unique/foreign keys\nto pg_index & pg_class => dump/reload (or pg_upgrade)...\nNothing more yet, just catalog changes...\nregression tests ... as usual -:)\n\n> \n> pg_user dumps core on some platforms\n\nPlease, please - could someone run Purify ?\n\nVadim\n", "msg_date": "Thu, 10 Sep 1998 23:32:45 +0800", "msg_from": "Vadim Mikheev <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] open 6.4 items" }, { "msg_contents": "Thus spake Vadim Mikheev\n> > foreign key?(Vadim)\n> \n> I just added attributes for primary/unique/foreign keys\n> to pg_index & pg_class => dump/reload (or pg_upgrade)...\n\nHooray!\n\n> Nothing more yet, just catalog changes...\n\nDo you think there would be any problem if I just manually updated those\nfields so that I can start testing my Python access stuff? Do they get\nset to some default value at least?\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": "Thu, 10 Sep 1998 12:38:14 -0400 (EDT)", "msg_from": "[email protected] (D'Arcy J.M. Cain)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] open 6.4 items" }, { "msg_contents": "> allow multiple generic operators in expressions without the use of \n> parentheses\n\nI could just let this one go until it dies a quiet death, but...\n\nTo parse \"multiple generic operators\", per the example\n\n select oid @ oid @ oid from table;\n\none would have to change the associativity of many operators from\nnon-associative (the correct assumption) to left- or right associative\n(the wrong thing to do). If we are going to allow operator extensibility\nwe cannot make assumptions about the precedence order of operators, and\nshould require parentheses to break the ambiguity.\n\nUnless someone has a good proposal on how to change the standard rules\nof arithmetic, or on how to change the parser to allow\noperator-dependent precedence in an extensible way, then we shouldn't\nbother tracking this as a problem statement imho.\n\n - Tom\n", "msg_date": "Thu, 10 Sep 1998 17:06:49 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] open 6.4 items" }, { "msg_contents": "D'Arcy J.M. Cain wrote:\n> \n> Thus spake Vadim Mikheev\n> > > foreign key?(Vadim)\n> >\n> > I just added attributes for primary/unique/foreign keys\n> > to pg_index & pg_class => dump/reload (or pg_upgrade)...\n> \n> Hooray!\n> \n> > Nothing more yet, just catalog changes...\n> \n> Do you think there would be any problem if I just manually updated those\n> fields so that I can start testing my Python access stuff? Do they get\n> set to some default value at least?\n\nNo problem. Default is: no keys.\n\nVadim\n", "msg_date": "Fri, 11 Sep 1998 01:44:27 +0800", "msg_from": "Vadim Mikheev <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] open 6.4 items" }, { "msg_contents": "> > allow multiple generic operators in expressions without the use of \n> > parentheses\n> \n> I could just let this one go until it dies a quiet death, but...\n> \n> To parse \"multiple generic operators\", per the example\n> \n> select oid @ oid @ oid from table;\n> \n> one would have to change the associativity of many operators from\n> non-associative (the correct assumption) to left- or right associative\n> (the wrong thing to do). If we are going to allow operator extensibility\n> we cannot make assumptions about the precedence order of operators, and\n> should require parentheses to break the ambiguity.\n> \n> Unless someone has a good proposal on how to change the standard rules\n> of arithmetic, or on how to change the parser to allow\n> operator-dependent precedence in an extensible way, then we shouldn't\n> bother tracking this as a problem statement imho.\n\nI agree, except the error message returned from the parser is quite\nconfusing, just stating 'parse error'. In fact, it took me 10 minutes\nto figure out what would and wouldn't work, and I had no idea that\nparentheses would fix it.\n\nIf we can't give a better error message, we have to keep it on the\ntodo/bugs list until we can tell people what they are doing wrong, and\nhow to fix 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": "Thu, 10 Sep 1998 13:59:47 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] open 6.4 items" } ]
[ { "msg_contents": "This one is done, isn't it?\n\n\timprove group handling\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, 10 Sep 1998 02:17:49 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "6.4 items" } ]
[ { "msg_contents": "Notice: I have mailed this (a bit different) message yesterday. I got no\nresponse and gathered that that might not be the correct forum. I hope this\nis.\n\nHi everybody,\n\nI started porting postgreSQL 6.3.2 to Windows NT. For that I use CygWin19B\nwith EGCS 1.1 and several seperate utilities. In this environment I have a\nfairly good unix environment on Windows NT.\n\nCurrently my attempts meet resistance from the configure script. I have some\nquestions that maybe someone can answer:\n\n1. If I run configure it wants a template: cygwin32_nt. As I do not have\nthat I use the generic template. I cannot find docs that say what exactly is\nwanted in the template. Is there a better template to use?\n2. During the etst for the install util I get:\n\nchecking for install... /d/Cygnus/B19/H-i386-cygwin32/bin/install\n- Using /d/Cygnus/B19/H-i386-cygwin32/bin/install\ntest: 0: bad number\ntest: ECHO_C_OUT: bad number\nconfigure: error: echo behaviour undetermined\n\nWhat is the meaning of the test as I have an install but it seems not to\nwork correctly?\n\n3. After I removed the exit(1) at the install test, configure went on but\nstopped at a moment that several (platform dependant?) files could not be\nfound. What files are those and what should they do?\n\nTIA\n\nJoost\n\n\n", "msg_date": "Thu, 10 Sep 1998 08:48:45 +0200", "msg_from": "\"Joost Kraaijeveld\" <[email protected]>", "msg_from_op": true, "msg_subject": "Running configure / port to Windows NT" }, { "msg_contents": "On Thu, 10 Sep 1998, Joost Kraaijeveld wrote:\n\n> Notice: I have mailed this (a bit different) message yesterday. I got no\n> response and gathered that that might not be the correct forum. I hope this\n> is.\n> \n> Hi everybody,\n> \n> I started porting postgreSQL 6.3.2 to Windows NT. For that I use CygWin19B\n> with EGCS 1.1 and several seperate utilities. In this environment I have a\n> fairly good unix environment on Windows NT.\n> \n> Currently my attempts meet resistance from the configure script. I have some\n> questions that maybe someone can answer:\n> \n> 1. If I run configure it wants a template: cygwin32_nt. As I do not have\n> that I use the generic template. I cannot find docs that say what exactly is\n> wanted in the template. Is there a better template to use?\n\n\tSee the template files in the templates directory and build a\ncygwin32_nt appropriate one...there are no docs on this, but its should be\npretty self-explanatory...\n\n> 2. During the etst for the install util I get: >\n \n> checking for install... /d/Cygnus/B19/H-i386-cygwin32/bin/install\n> - Using /d/Cygnus/B19/H-i386-cygwin32/bin/install\n> test: 0: bad number\n> test: ECHO_C_OUT: bad number\n> configure: error: echo behaviour undetermined\n> \n> What is the meaning of the test as I have an install but it seems not to\n> work correctly?\n\n\tcheck configure.in ... there appears to be something wrong with\nthe way that its 'determining' how the echo command is handled...\n\n> 3. After I removed the exit(1) at the install test, configure went on but\n> stopped at a moment that several (platform dependant?) files could not be\n> found. What files are those and what should they do?\n\n\twithout sending the actual errors...your guess is as good as ours\n:)\n\n\n", "msg_date": "Thu, 10 Sep 1998 10:15:50 -0400 (EDT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Running configure / port to Windows NT" } ]
[ { "msg_contents": "\n>Should we be poking around in /usr/local by default? Comments?\n\nI would, since it is pretty much a standard place to put gnu, bsd and other extensions\nlike perl, bison, readline ... on non BSD or Linux systems.\n\n>> \n>> the stream functions on AIX need a size_t for addrlen's in fe-connect.c and pqcomm.c.\n>\n>This has come up before. AIX wants size_t for certain structures like\n>getsockname(). I believe the third parameter on AIX is size_t, while it\n>used to be int on my machine, but is not socklen_t. Is this correct? \n>The 'int' code works fine for me, but I can see why AIX is having a\n>problem, and perhaps it is time for configure to check on the various\n>types.\n>\n>\tgetsockname(int s, struct sockaddr *name, socklen_t *namelen);\n\nOk, so this gets tricky. In 4.2.1 it is size_t and in 4.3.1 it is as above with socklen_t :-(\n\n>> AIX 4.2.1 and 4.3.1 need one other simpler Makefile, another template\n>> and must not include dynloader.c\n>\n>Done. Files added.\n\nThanks very much :-)\n\nAndreas\n\n", "msg_date": "Thu, 10 Sep 1998 09:47:58 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Open portability issues" } ]
[ { "msg_contents": "\nIn the following HTML page:\n\n http://www.postgresql.org/docs/user/typeconv.htm#AEN1886\n\nThe following text is displayed (second paragraph):\n\n In many cases a user will not need to understand the details of the\ntype conversion mechanism.\n However, the implicit conversions done by Postgres can affect the\napparent results of a query, and\n these results can be tailored by a user or programmer using explicit\ntype coersion.\n\nThe last word of this paragraph is, I believe, mispelled. It should be\n\"conversion\" not \"coersion\".\n\n...james\n\n\n", "msg_date": "Thu, 10 Sep 1998 07:23:23 -0400", "msg_from": "James Olin Oden <[email protected]>", "msg_from_op": true, "msg_subject": "Documentation error..." } ]
[ { "msg_contents": "\n>> Should we be poking around in /usr/local by default? Comments?\n\n>\tNo...unless someone can point me at a package that explicitly goes\n> out and looking /usr/local. I've yet to have a problem with any package\n> I've installed not being able to find libraries and include files that are\n> installed in /usr/local ... if someone is having a problem, they should be\n> directed to look at *fixing* their system in the first place, as they are\n> definitely going to have more problems then just with PostgreSQL...\n\nOk, just something to grumble on. \n1. It did find /usr/local headers with a snapshot from about a month ago but not libs\n2. a lot of the templates have SRCH_INC:/usr/local/include SRCH_LIB:/usr/local/lib\n\twhy that if it is supposed to be in the compiler config ?\n\nEven if I add those lines to the AIX template, configure won't find my \n/usr/local/include/readline/readline.h. (the --with-libs works fine :-)\n\nI think SRCH_INC:/usr/local/include SRCH_LIB:/usr/local/lib must be taken out of template/aix_42\nsince it is not a standard AIX path, and therefore won't be available on every system (I thought I deleted\nthose before sending in the file, Sorry)\n\nI don't know how to do the Makefile and dynloader stuff, since $os will be aix\nthe Makefile.aix and aix.c dynloader will be used which is wrong.\nMaybe the dynloader step could be done conditionally only if -ldl is not found by configure ?\n\nAndreas\n\n", "msg_date": "Thu, 10 Sep 1998 14:33:35 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Re: Open portability issues" } ]
[ { "msg_contents": "\[email protected] said:\n> > the long long int printf format in int8.h is %lld on AIX\n> This is on my list. %lld will work with gcc also, so since we don't\n> have very many reported successful ports for int8, we should just\n> change it for now. \n\nTom,\n\nI tried the int8 type onder BSD/OS, running 6.3.2 (contrib/int8). There the \n%Ld type is unimplemented and %lld or %qd both work.\n\nFor BSD/OS 3.1, since DLSUFFIX is .o (static shared libraries), there is a \ncircular dependence in the Makefile. This is resolved by commenting out (or \nifdefing) the following segment:\n\nint8$(DLSUFFIX): int8.o\n $(CC) -shared -o int8$(DLSUFFIX) int8.o $(CLIBS)\n\nUnder BSD/OS 4.0 this should not be neccesary, as it supports Linux style \nshared libraries.\n\nI am missing the aggregate functions, such as sum() to deal with int8. Perhaps \nthese could be easily added? Is there problem to add all functionality that \nexists for int4 to the int8 type?\n\nDaniel\n\n", "msg_date": "Thu, 10 Sep 1998 18:23:49 +0300", "msg_from": "Daniel Kalchev <[email protected]>", "msg_from_op": true, "msg_subject": "more on int8" }, { "msg_contents": "> \n> [email protected] said:\n> > > the long long int printf format in int8.h is %lld on AIX\n> > This is on my list. %lld will work with gcc also, so since we don't\n> > have very many reported successful ports for int8, we should just\n> > change it for now. \n> \n> Tom,\n> \n> I tried the int8 type onder BSD/OS, running 6.3.2 (contrib/int8). There the \n> %Ld type is unimplemented and %lld or %qd both work.\n\nI have added %qd support for the 6.4 beta release last night.\n\n> \n> For BSD/OS 3.1, since DLSUFFIX is .o (static shared libraries), there is a \n> circular dependence in the Makefile. This is resolved by commenting out (or \n> ifdefing) the following segment:\n> \n> int8$(DLSUFFIX): int8.o\n> $(CC) -shared -o int8$(DLSUFFIX) int8.o $(CLIBS)\n> \n> Under BSD/OS 4.0 this should not be neccesary, as it supports Linux style \n> shared libraries.\n\nI never saw this on BSDI 3.1. Oh, this must be in the /contrib\ndirectory. That contrib is gone in 6.4, and merged into the main\nbackend. I have added BSDI 4.0 support for the upcoming 6.4 release\nnext month.\n\n> \n> I am missing the aggregate functions, such as sum() to deal with int8. Perhaps \n> these could be easily added? Is there problem to add all functionality that \n> exists for int4 to the int8 type?\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, 10 Sep 1998 12:14:28 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] more on int8" }, { "msg_contents": "> I tried the int8 type under BSD/OS, running 6.3.2 (contrib/int8). \n> There the %Ld type is unimplemented and %lld or %qd both work.\n> For BSD/OS 3.1, since DLSUFFIX is .o (static shared libraries), there \n> is a circular dependence in the Makefile. This is resolved by \n> commenting out (or ifdefing) the following segment:\n> int8$(DLSUFFIX): int8.o\n> $(CC) -shared -o int8$(DLSUFFIX) int8.o $(CLIBS)\n> Under BSD/OS 4.0 this should not be neccesary, as it supports Linux \n> style shared libraries.\n> I am missing the aggregate functions, such as sum() to deal with int8.\n> Is there problem to add all functionality that\n> exists for int4 to the int8 type?\n\nint8 is a native built-in type for the next release of Postgres. Would\nyou be willing to try beta testing the package and we can work out how\nto support BSD/OS?\n\nIt may be that no changes would be necessary for you, since we are now\nusing \"%lld\" for the default printf/scanf formatting string. But you\nwould have to try an installation and see if \"configure\" catches the\nright characteristics of your system. The shared library won't be an\nissue since everything is now built in.\n\nRegards.\n\n - Tom\n", "msg_date": "Thu, 10 Sep 1998 17:05:38 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] more on int8" }, { "msg_contents": "> > I tried the int8 type under BSD/OS, running 6.3.2 (contrib/int8). \n> > There the %Ld type is unimplemented and %lld or %qd both work.\n> > For BSD/OS 3.1, since DLSUFFIX is .o (static shared libraries), there \n> > is a circular dependence in the Makefile. This is resolved by \n> > commenting out (or ifdefing) the following segment:\n> > int8$(DLSUFFIX): int8.o\n> > $(CC) -shared -o int8$(DLSUFFIX) int8.o $(CLIBS)\n> > Under BSD/OS 4.0 this should not be neccesary, as it supports Linux \n> > style shared libraries.\n> > I am missing the aggregate functions, such as sum() to deal with int8.\n> > Is there problem to add all functionality that\n> > exists for int4 to the int8 type?\n> \n> int8 is a native built-in type for the next release of Postgres. Would\n> you be willing to try beta testing the package and we can work out how\n> to support BSD/OS?\n> \n> It may be that no changes would be necessary for you, since we are now\n> using \"%lld\" for the default printf/scanf formatting string. But you\n> would have to try an installation and see if \"configure\" catches the\n> right characteristics of your system. The shared library won't be an\n> issue since everything is now built in.\n\nI am running BSD/OS here, and configure recoginizes it with %qd.\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, 10 Sep 1998 13:57:13 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] more on int8" }, { "msg_contents": "> > > I tried the int8 type under BSD/OS, running 6.3.2 (contrib/int8).\n> > > There the %Ld type is unimplemented and %lld or %qd both work.\n> I am running BSD/OS here, and configure recoginizes it with %qd.\n\nJust out of curiosity, does Bruce's BSDI system recognize %lld as did\nDaniel's? If so, we could dispense with the %qd option for the final\nrelease...\n\n - Tom\n", "msg_date": "Fri, 11 Sep 1998 05:15:11 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] more on int8" }, { "msg_contents": "> > > > I tried the int8 type under BSD/OS, running 6.3.2 (contrib/int8).\n> > > > There the %Ld type is unimplemented and %lld or %qd both work.\n> > I am running BSD/OS here, and configure recoginizes it with %qd.\n> \n> Just out of curiosity, does Bruce's BSDI system recognize %lld as did\n> Daniel's? If so, we could dispense with the %qd option for the final\n> release...\n\nYes, BSDI understands %lld, but not %Ld, though it is not documented in\nthe printf manual page.\n\nWe could probably do without %qd, but I assume their are some platforms\nthat support %qd and not %lld. We can ask people as they run configure\nif they ever see %lld failing but %qd passing.\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, 11 Sep 1998 02:14:28 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] more on int8" }, { "msg_contents": ">>>Bruce Momjian said:\n > > Just out of curiosity, does Bruce's BSDI system recognize %lld as did\n > > Daniel's? If so, we could dispense with the %qd option for the final\n > > release...\n > \n > Yes, BSDI understands %lld, but not %Ld, though it is not documented in\n > the printf manual page.\n\nIt is documented in the scanf manual page, where it says:\n\n l Indicates either that the conversion will be one of dioux or n\n and the next pointer is a pointer to a long int (rather than\n int), or that the conversion will be one of efg and the next\n pointer is a pointer to double (rather than float). If the con-\n version is dioux or n and two l flags are given, then the next\n pointer will be a pointer to a double precision integer of quad_t\n or u_quad_t (unsigned) type; these types are defined in\n <sys/types.h>.\n\n L Indicates that the conversion will be efg and the next pointer is\n a pointer to long double. (This type is not implemented; the L\n flag is currently ignored.)\n\n q Indicates a double precision integer conversion; identical to us-\n ing ll.\n\nNote the reference to u_quad_t - there is also quad_t in BSD/OS 3.1 which is \nsingned. There are also (identical) types\n\ntypedef u_int64_t u_quad_t; /* quads */\ntypedef int64_t quad_t;\n\nThe same is valid for BSD/OS 4.0.\n\n > We could probably do without %qd, but I assume their are some platforms\n > that support %qd and not %lld. We can ask people as they run configure\n > if they ever see %lld failing but %qd passing.\n\nPerhaps %lld is GNUism? So it should work on most GNU based compilers. I agree \nyour approach is good - to just sample the different platforms on which \nPostgreSQL is compiled.\n\nDaniel\n\n", "msg_date": "Fri, 11 Sep 1998 10:09:03 +0300", "msg_from": "Daniel Kalchev <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] more on int8 " }, { "msg_contents": "> >>>Bruce Momjian said:\n> > > Just out of curiosity, does Bruce's BSDI system recognize %lld as did\n> > > Daniel's? If so, we could dispense with the %qd option for the final\n> > > release...\n> > \n> > Yes, BSDI understands %lld, but not %Ld, though it is not documented in\n> > the printf manual page.\n> \n> It is documented in the scanf manual page, where it says:\n> \n> l Indicates either that the conversion will be one of dioux or n\n> and the next pointer is a pointer to a long int (rather than\n> int), or that the conversion will be one of efg and the next\n> pointer is a pointer to double (rather than float). If the con-\n> version is dioux or n and two l flags are given, then the next\n> pointer will be a pointer to a double precision integer of quad_t\n> or u_quad_t (unsigned) type; these types are defined in\n> <sys/types.h>.\n\nYes, I see it now in the printf manual page:\n\n u_quad_t types are defined in <sys/types.h>. Two l conversion option\n characters are equivalent to a single q.\n\n> \n> L Indicates that the conversion will be efg and the next pointer is\n> a pointer to long double. (This type is not implemented; the L\n> flag is currently ignored.)\n> \n> q Indicates a double precision integer conversion; identical to us-\n> ing ll.\n> \n> Note the reference to u_quad_t - there is also quad_t in BSD/OS 3.1 which is \n> singned. There are also (identical) types\n> \n> typedef u_int64_t u_quad_t; /* quads */\n> typedef int64_t quad_t;\n> \n> The same is valid for BSD/OS 4.0.\n> \n> > We could probably do without %qd, but I assume their are some platforms\n> > that support %qd and not %lld. We can ask people as they run configure\n> > if they ever see %lld failing but %qd passing.\n> \n> Perhaps %lld is GNUism? So it should work on most GNU based compilers. I agree \n> your approach is good - to just sample the different platforms on which \n> PostgreSQL is compiled.\n\nNot sure if we should remove %qd, or keep it an wait. May just wait to\nsee how many people support just %qd.\n\nLooks like I messed up the config.h.in define for lld again, so I am\nfixing it 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, 11 Sep 1998 10:10:45 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] more on int8" }, { "msg_contents": " We could probably do without %qd, but I assume their are some platforms\n that support %qd and not %lld. We can ask people as they run configure\n if they ever see %lld failing but %qd passing.\n\nOne data point: netbsd v1.3.2/i386 (native compiler is gcc) likes both.\n\nCheers,\nBrook\n", "msg_date": "Fri, 11 Sep 1998 08:22:26 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] more on int8" }, { "msg_contents": "> We could probably do without %qd, but I assume their are some \n> platforms that support %qd and not %lld. We can ask people as they \n> run configure if they ever see %lld failing but %qd passing.\n\nCould we please leave all of the hooks for %qd in the code, but disable\nthe automatic check for it in configure.in and configure? If we run into\na case which requires it, then it will be trivial to re-enable it (or if\nyou like allow a manual override --enable-int8-qd). If we do not run\ninto such a case then we can remove the code later, simplifying things a\nbit.\n\nIf we don't disable it for now, then we will never be able to discover\nwhether it is a required feature or not. Now is the time to do this\nsince int8 is a new feature. It won't work very well to try the same\ntactic 6 months from now :)\n\nThanks.\n\n - Tom\n", "msg_date": "Fri, 11 Sep 1998 15:53:13 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] more on int8" }, { "msg_contents": "> > We could probably do without %qd, but I assume their are some \n> > platforms that support %qd and not %lld. We can ask people as they \n> > run configure if they ever see %lld failing but %qd passing.\n> \n> Could we please leave all of the hooks for %qd in the code, but disable\n> the automatic check for it in configure.in and configure? If we run into\n> a case which requires it, then it will be trivial to re-enable it (or if\n> you like allow a manual override --enable-int8-qd). If we do not run\n> into such a case then we can remove the code later, simplifying things a\n> bit.\n> \n> If we don't disable it for now, then we will never be able to discover\n> whether it is a required feature or not. Now is the time to do this\n> since int8 is a new feature. It won't work very well to try the same\n> tactic 6 months from now :)\n\nOK, %qd removed.\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, 11 Sep 1998 13:07:26 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] more on int8" } ]
[ { "msg_contents": "Hi,\n\nProblems running configure:\n\n1. Cannot find a template: cygwin32_nt, solved by copying generic to\ncygwin32_nt\n\n2. In the configure script I changed (see the \"if test\" statements)\n\n\tECHO_N_OUT=`echo -n \"\" | wc -c`\n\tECHO_C_OUT=`echo \"\\c\" | wc -c`\n\n\tif test \"$ECHO_N_OUT\" -eq 0; then\n\t\tDASH_N='-n'\n\t\tBACKSLASH_C=\n\telse\n\t\tif test \"ECHO_C_OUT\" -eq 0; then\n\t\t\tDASH_N=\n\t\t\tBACKSLASH_C='\\\\\\\\c'\n\t\telse\n\t\t\t{ echo \"configure: error: \"echo behaviour undetermined\"\" 1>&2; exit 1; }\n\t\tfi\n\tfi\n\n to\n\n\tECHO_N_OUT=`echo -n \"\" | wc -c`\n\tECHO_C_OUT=`echo \"\\c\" | wc -c`\n\n\tif test $ECHO_N_OUT -eq 0; then\n\t\tDASH_N='-n'\n\t\tBACKSLASH_C=\n\telse\n\t\tif test $ECHO_C_OUT -eq 0; then\n\t\t\tDASH_N=\n\t\t\tBACKSLASH_C='\\\\\\\\c'\n\t\telse\n\t\t\t{ echo \"configure: error: \"echo behaviour undetermined\"\" 1>&2; exit 1; }\n\t\tfi\n\tfi\n\n3. Configure gave the following errors because of missing files:\n\tcreating include/config.h\n\tlinking ./backend/port/tas/dummy.s to backend/port/tas.s\n\tlinking ./backend/port/dynloader/win.c to backend/port/dynloader.c\n\tconfigure: error: ./backend/port/dynloader/win.c: File not found\n\n\tidem for /pgsql/src/backend/port/dynloader/win.h\n\n\tidem for /pgsql/src/include/port/win.h\n\n\tidem for /pgsql/src/makefiles/makefile.win\n\nShort term sollution was to create empty files. Can anyone give me an idea\nwhat the purpose of these files is (I can guess the Makefile.win I think)?\n\nTIA\n\nJoost\n\n", "msg_date": "Thu, 10 Sep 1998 20:00:36 +0200", "msg_from": "\"Joost Kraaijeveld\" <[email protected]>", "msg_from_op": true, "msg_subject": "Porting postgreSQL to Windows NT" } ]
[ { "msg_contents": "Hi,\n\nI am experiencing missing header files. I am not suprised but I would like\nto have any missing header file. If I have them I could attempt to write\n/find them on my system. Can I access them throught the internet or is\nsomeone kind enought to send them to me on request (Hugo??)?\n\nAt this moment I miss: <sys/ipc.h> and <sys/un.h>\n\nTIA\n\nJoost\n\n", "msg_date": "Thu, 10 Sep 1998 20:21:53 +0200", "msg_from": "\"Joost Kraaijeveld\" <[email protected]>", "msg_from_op": true, "msg_subject": "Missing headers Windows NT port" }, { "msg_contents": "> Hi,\n> \n> I am experiencing missing header files. I am not suprised but I would like\n> to have any missing header file. If I have them I could attempt to write\n> /find them on my system. Can I access them throught the internet or is\n> someone kind enought to send them to me on request (Hugo??)?\n> \n> At this moment I miss: <sys/ipc.h> and <sys/un.h>\n> \n> TIA\n> \n> Joost\n> \n> \n> \n\nHere they are from BSDI.\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\n/*-\n * Copyright (c) 1996 Berkeley Software Design, Inc. All rights reserved.\n * The Berkeley Software Design Inc. software License Agreement specifies\n * the terms and conditions for redistribution.\n *\n * BSDI ipc.h,v 2.4 1996/08/21 17:42:01 bostic Exp \n */\n\n/*\n * Copyright (c) 1988 University of Utah.\n * Copyright (c) 1990, 1993\n *\tThe Regents of the University of California. All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * This code is derived from software contributed to Berkeley by\n * the Systems Programming Group of the University of Utah Computer\n * Science Department.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n * must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)ipc.h\t8.4 (Berkeley) 2/19/95\n */\n\n/*\n * SVID compatible ipc.h file\n */\n#ifndef _SYS_IPC_H_\n#define _SYS_IPC_H_\n\n#include <sys/cdefs.h>\n\nstruct ipc_perm {\n\tuid_t\tuid;\t/* user id */\n\tgid_t\tgid;\t/* group id */\n\tuid_t\tcuid;\t/* creator user id */\n\tgid_t\tcgid;\t/* creator group id */\n\tmode_t\tmode;\t/* r/w permission */\n\tu_long\tseq;\t/* sequence # (to generate unique msg/sem/shm id) */\n\tkey_t\tkey;\t/* user specified msg/sem/shm key */\n};\n\n/* common mode bits */\n#define\tIPC_R\t\t000400\t/* read permission */\n#define\tIPC_W\t\t000200\t/* write/alter permission */\n#define\tIPC_M\t\t010000\t/* permission to change control info */\n\n/* SVID required constants (same values as system 5) */\n#define\tIPC_CREAT\t001000\t/* create entry if key does not exist */\n#define\tIPC_EXCL\t002000\t/* fail if key exists */\n#define\tIPC_NOWAIT\t004000\t/* error if request must wait */\n\n#define\tIPC_PRIVATE\t(key_t)0 /* private key */\n\n#define\tIPC_RMID\t0\t/* remove identifier */\n#define\tIPC_SET\t\t1\t/* set options */\n#define\tIPC_STAT\t2\t/* get options */\n\n#ifdef KERNEL\n/* Macros to convert between ipc ids and array indices or sequence ids */\n#define\tIPCID_TO_IX(id)\t\t((id) & 0xffff)\n#define\tIPCID_TO_SEQ(id)\t(((id) >> 16) & 0xffff)\n#define\tIXSEQ_TO_IPCID(ix,perm)\t(((perm.seq) << 16) | (ix & 0xffff))\n\n__BEGIN_DECLS\nint\tipcperm __P((struct ucred *,struct ipc_perm *,int));\n__END_DECLS\n#else \n/* Doesn't really belong but its traditionally here. */\n#ifndef _POSIX_SOURCE\n__BEGIN_DECLS\nkey_t\tftok __P((const char *, int));\n__END_DECLS\n#endif \n#endif \n#endif \n\n/*\tBSDI un.h,v 2.6 1996/10/11 16:02:48 pjd Exp\t*/\n\n/*\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n * must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)un.h\t8.3 (Berkeley) 2/19/95\n */\n\n#ifndef _SYS_UN_H_\n#define _SYS_UN_H_\n\n/*\n * Definitions for LOCAL IPC domain.\n */\nstruct\tsockaddr_un {\n\tu_char\tsun_len;\t\t/* sockaddr len excluding null */\n\tu_char\tsun_family;\t\t/* AF_LOCAL */\n\tchar\tsun_path[104];\t\t/* path name (gag) */\n};\n\n#define\tLOCAL_CREDS\t0x0001\t\t/* get/set struct fcred structure */\n\n#ifdef KERNEL\nstruct unpcb;\n\nint\tuipc_usrreq __P((struct socket *so, int req, struct mbuf *m,\n\t\tstruct mbuf *nam, struct mbuf *control));\nint\tunp_attach __P((struct socket *so));\nint\tunp_bind __P((struct unpcb *unp, struct mbuf *nam, struct proc *p));\nint\tunp_connect __P((struct socket *so, struct mbuf *nam, struct proc *p));\nint\tunp_connect2 __P((struct socket *so, struct socket *so2));\nvoid\tunp_detach __P((struct unpcb *unp));\nvoid\tunp_discard __P((struct file *fp));\nvoid\tunp_disconnect __P((struct unpcb *unp));\nvoid\tunp_dispose __P((struct mbuf *m));\nvoid\tunp_drop __P((struct unpcb *unp, int errno));\nvoid\tunp_gc __P((void));\nvoid\tunp_mark __P((struct file *fp));\nvoid\tunp_scan __P((struct mbuf *m0, void (*op) __P((struct file *))));\nvoid\tunp_shutdown __P((struct unpcb *unp));\n#else /* !KERNEL */\n\n/* actual length of an initialized sockaddr_un */\n#define SUN_LEN(su) \\\n\t(sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))\n#endif /* KERNEL */\n\n#endif /* !_SYS_UN_H_ */", "msg_date": "Thu, 10 Sep 1998 14:54:04 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Missing headers Windows NT port" } ]
[ { "msg_contents": "OK, I have a way to debug this.\n\nAdd to palloc and pfree a printf like:\n\n\tprintf(\"palloc: %d\\n\", mem);\n\tprintf(\"pfree : %d\\n\", mem);\n\nThe printf's should go after the memory is allocated in palloc, and\nbefore it is free'ed in pfree().\n\nand then run the backend and issue the query causing the problem, and\ngrab the lines from the postmaster log file. Check the last pfree\nvalue, because that is the one that is crashing it. Check the list to\nsee if it has been palloc'ed. If it has, was it pfree'ed by someone\nelse, and who palloc'ed it. If it is not on the list, figure out how it\ngot on to the palloc list.\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, 10 Sep 1998 15:13:27 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "pg_user crash" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> OK, I have a way to debug this.\n> \n> Add to palloc and pfree a printf like:\n> \n> printf(\"palloc: %d\\n\", mem);\n> printf(\"pfree : %d\\n\", mem);\n> \n> The printf's should go after the memory is allocated in palloc, and\n> before it is free'ed in pfree().\n> \n> and then run the backend and issue the query causing the problem, and\n> grab the lines from the postmaster log file. Check the last pfree\n> value, because that is the one that is crashing it. Check the list to\n> see if it has been palloc'ed. If it has, was it pfree'ed by someone\n> else, and who palloc'ed it. If it is not on the list, figure out how it\n> got on to the palloc list.\n\nCrash comes from AllocSetReset()->AllocSetFree() - printf in\npfree will not help.\n\nI would suggest to add printf to AllocSetFree()/AllocSetAlloc()...\n\nVadim\n", "msg_date": "Fri, 11 Sep 1998 09:27:59 +0800", "msg_from": "Vadim Mikheev <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] pg_user crash" } ]
[ { "msg_contents": "Compiled with Makefile.custom:\n\n\n\n(gdb) where\n#0 0x80dacfc in nodeHandleViewRule (nodePtr=0x40af1ffc, rtable=0x40b8bff4,\n targetlist=0x40b3bff4, rt_index=1, modified=0xbfffbb90, sublevels_up=0)\n at rewriteManip.c:636\n#1 0x80dac8e in nodeHandleViewRule (nodePtr=0x40af9ff8, rtable=0x40b8bff4,\n targetlist=0x40b3bff4, rt_index=1, modified=0xbfffbb90, sublevels_up=0)\n at rewriteManip.c:596\n#2 0x80dad2e in nodeHandleViewRule (nodePtr=0x40aabfe4, rtable=0x40b8bff4,\n targetlist=0x40b3bff4, rt_index=1, modified=0xbfffbb90, sublevels_up=0)\n at rewriteManip.c:648\n#3 0x80dadd1 in HandleViewRule (parsetree=0x40aabfbc, rtable=0x40b8bff4,\n targetlist=0x40b3bff4, rt_index=1, modified=0xbfffbb90)\n at rewriteManip.c:695\n#4 0x80d9c60 in ApplyRetrieveRule (parsetree=0x40aabfbc, rule=0x4064ffe8,\n rt_index=1, relation_level=1, relation=0x405dafc0, modified=0xbfffbb90)\n at rewriteHandler.c:333\n#5 0x80d9b14 in FireRetrieveRulesAtQuery (parsetree=0x40aabfbc, rt_index=1,\n relation=0x405dafc0, instead_flag=0xbfffbc1f \"\", rule_flag=0)\n at rewriteHandler.c:238\n#6 0x80d9d4b in ProcessRetrieveQuery (parsetree=0x40aabfbc,\n rtable=0x405e0ff4, instead_flag=0xbfffbc1f \"\", rule=0 '\\000')\n at rewriteHandler.c:382\n#7 0x80da3a5 in RewriteQuery (parsetree=0x405cefbc,\n instead_flag=0xbfffbc1f \"\", qual_products=0xbfffbc18)\n at rewriteHandler.c:873\n#8 0x80da4ec in deepRewriteQuery (parsetree=0x405cefbc)\n at rewriteHandler.c:1008\n#9 0x80da49d in QueryRewriteOne (parsetree=0x405cefbc) at\nrewriteHandler.c:983\n#10 0x80da3d3 in QueryRewrite (parsetree=0x405cefbc) at rewriteHandler.c:902\n#11 0x80e7cd8 in pg_parse_and_plan (\n query_string=0xbfffdd14 \"select * from pg_user\\n\", typev=0x0, nargs=0,\n queryListP=0xbfffdcc0, dest=Debug, aclOverride=0 '\\000') at\npostgres.c:503\n#12 0x80e80a9 in pg_exec_query_dest (\n query_string=0xbfffdd14 \"select * from pg_user\\n\", dest=Debug,\n aclOverride=0) at postgres.c:720\n#13 0x80e806b in pg_exec_query (\n query_string=0xbfffdd14 \"select * from pg_user\\n\") at postgres.c:697\n#14 0x80e90d4 in PostgresMain (argc=3, argv=0xbffffd50, real_argc=3,\n real_argv=0xbffffd50) at postgres.c:1611\n#15 0x80ab4cd in main (argc=3, argv=0xbffffd50) at main.c:103\n(gdb) frame\n#0 0x80dacfc in nodeHandleViewRule (nodePtr=0x40af1ffc, rtable=0x40b8bff4,\n targetlist=0x40b3bff4, rt_index=1, modified=0xbfffbb90, sublevels_up=0)\n at rewriteManip.c:636\n636 ((Var *)\n*nodePtr)->varlevelsup = this_varlevelsup;\n(gdb) print nodePtr\n$1 = (Node **) 0x40af1ffc\n(gdb) print *nodePtr\n$2 = (Node *) 0x40b75fec\n\nIf you need anything else, just ask :)\n\nJP Sugarbroad\n\n", "msg_date": "Thu, 10 Sep 1998 14:59:49 -0500", "msg_from": "\"Taral\" <[email protected]>", "msg_from_op": true, "msg_subject": "pg_user backtrace -- with ElectricFence (looks useful :)" }, { "msg_contents": "> *nodePtr)->varlevelsup = this_varlevelsup;\n> (gdb) print nodePtr\n> $1 = (Node **) 0x40af1ffc\n> (gdb) print *nodePtr\n> $2 = (Node *) 0x40b75fec\n> \n> If you need anything else, just ask :)\n\nI am wondering how you got electic fence to work. I can't seem to get\nit very far into the postmaster startup before I get an allocation\nerror. Is there something special you did?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Fri, 18 Sep 1998 01:14:45 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] pg_user backtrace -- with ElectricFence (looks useful\n :)" }, { "msg_contents": "Well, my Makefile.custom is this:\n\nCFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend -O2 -g3\nLDFLAGS:=-lefence $(LDFLAGS)\n\nand I run the backend directly with:\n\npostgres -D <datadir> template1\n\nOf course, I wouldn't compile the postmaster frontend with electric fence if\nI wanted to use it, since efence slows down programs incredibly, and causes\nthem to eat up large amounts of memory. Perhaps this is what is happening to\nyou?\n\nTaral\n\n> -----Original Message-----\n> From: Bruce Momjian [mailto:[email protected]]\n> Sent: Friday, September 18, 1998 12:15 AM\n> To: Taral\n> Cc: [email protected]\n> Subject: Re: [HACKERS] pg_user backtrace -- with ElectricFence (looks\n> useful :)\n>\n> I am wondering how you got electic fence to work. I can't seem to get\n> it very far into the postmaster startup before I get an allocation\n> error. Is there something special you did?\n>\n> --\n> Bruce Momjian | 830 Blythe Avenue\n> [email protected] | Drexel Hill, Pennsylvania 19026\n> http://www.op.net/~candle | (610) 353-9879(w)\n> + If your life is a hard drive, | (610) 853-3000(h)\n> + Christ can be your backup. |\n>\n\n", "msg_date": "Fri, 18 Sep 1998 21:40:26 -0500", "msg_from": "\"Taral\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: [HACKERS] pg_user backtrace -- with ElectricFence (looks useful\n :)" }, { "msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> Well, my Makefile.custom is this:\n> \n> CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend -O2 -g3\n> LDFLAGS:=-lefence $(LDFLAGS)\n> \n> and I run the backend directly with:\n> \n> postgres -D <datadir> template1\n> \n> Of course, I wouldn't compile the postmaster frontend with electric fence if\n> I wanted to use it, since efence slows down programs incredibly, and causes\n> them to eat up large amounts of memory. Perhaps this is what is happening to\n> you?\n\nNo, I ran the postgres backend directly, and it still bombed with\ninsufficient memory.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Sat, 19 Sep 1998 00:00:30 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] pg_user backtrace -- with ElectricFence (looks useful\n :)" } ]
[ { "msg_contents": "Oops! Here's the Makefile.custom:\n\nCFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend -O1 -g3\nLDFLAGS:=-lefence $(LDFLAGS)\n\n> -----Original Message-----\n> From: Taral [mailto:[email protected]]\n> Sent: Thursday, September 10, 1998 3:00 PM\n> To: [email protected]\n> Subject: pg_user backtrace -- with ElectricFence (looks useful :)\n\n", "msg_date": "Thu, 10 Sep 1998 15:07:15 -0500", "msg_from": "\"Taral\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: pg_user backtrace -- with ElectricFence (looks useful :)" } ]
[ { "msg_contents": "(Resend - I sent it to [email protected]... wrong address?)\n\nCompiled with Makefile.custom:\n\nCFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend -O1 -g3\nLDFLAGS:=-lefence $(LDFLAGS)\n\n(gdb) where\n#0 0x80dacfc in nodeHandleViewRule (nodePtr=0x40af1ffc, rtable=0x40b8bff4,\n targetlist=0x40b3bff4, rt_index=1, modified=0xbfffbb90, sublevels_up=0)\n at rewriteManip.c:636\n#1 0x80dac8e in nodeHandleViewRule (nodePtr=0x40af9ff8, rtable=0x40b8bff4,\n targetlist=0x40b3bff4, rt_index=1, modified=0xbfffbb90, sublevels_up=0)\n at rewriteManip.c:596\n#2 0x80dad2e in nodeHandleViewRule (nodePtr=0x40aabfe4, rtable=0x40b8bff4,\n targetlist=0x40b3bff4, rt_index=1, modified=0xbfffbb90, sublevels_up=0)\n at rewriteManip.c:648\n#3 0x80dadd1 in HandleViewRule (parsetree=0x40aabfbc, rtable=0x40b8bff4,\n targetlist=0x40b3bff4, rt_index=1, modified=0xbfffbb90)\n at rewriteManip.c:695\n#4 0x80d9c60 in ApplyRetrieveRule (parsetree=0x40aabfbc, rule=0x4064ffe8,\n rt_index=1, relation_level=1, relation=0x405dafc0, modified=0xbfffbb90)\n at rewriteHandler.c:333\n#5 0x80d9b14 in FireRetrieveRulesAtQuery (parsetree=0x40aabfbc, rt_index=1,\n relation=0x405dafc0, instead_flag=0xbfffbc1f \"\", rule_flag=0)\n at rewriteHandler.c:238\n#6 0x80d9d4b in ProcessRetrieveQuery (parsetree=0x40aabfbc,\n rtable=0x405e0ff4, instead_flag=0xbfffbc1f \"\", rule=0 '\\000')\n at rewriteHandler.c:382\n#7 0x80da3a5 in RewriteQuery (parsetree=0x405cefbc,\n instead_flag=0xbfffbc1f \"\", qual_products=0xbfffbc18)\n at rewriteHandler.c:873\n#8 0x80da4ec in deepRewriteQuery (parsetree=0x405cefbc)\n at rewriteHandler.c:1008\n#9 0x80da49d in QueryRewriteOne (parsetree=0x405cefbc) at\nrewriteHandler.c:983\n#10 0x80da3d3 in QueryRewrite (parsetree=0x405cefbc) at rewriteHandler.c:902\n#11 0x80e7cd8 in pg_parse_and_plan (\n query_string=0xbfffdd14 \"select * from pg_user\\n\", typev=0x0, nargs=0,\n queryListP=0xbfffdcc0, dest=Debug, aclOverride=0 '\\000') at\npostgres.c:503\n#12 0x80e80a9 in pg_exec_query_dest (\n query_string=0xbfffdd14 \"select * from pg_user\\n\", dest=Debug,\n aclOverride=0) at postgres.c:720\n#13 0x80e806b in pg_exec_query (\n query_string=0xbfffdd14 \"select * from pg_user\\n\") at postgres.c:697\n#14 0x80e90d4 in PostgresMain (argc=3, argv=0xbffffd50, real_argc=3,\n real_argv=0xbffffd50) at postgres.c:1611\n#15 0x80ab4cd in main (argc=3, argv=0xbffffd50) at main.c:103\n(gdb) frame\n#0 0x80dacfc in nodeHandleViewRule (nodePtr=0x40af1ffc, rtable=0x40b8bff4,\n targetlist=0x40b3bff4, rt_index=1, modified=0xbfffbb90, sublevels_up=0)\n at rewriteManip.c:636\n636 ((Var *)\n*nodePtr)->varlevelsup = this_varlevelsup;\n(gdb) print nodePtr\n$1 = (Node **) 0x40af1ffc\n(gdb) print *nodePtr\n$2 = (Node *) 0x40b75fec\n\nIf you need anything else, just ask :)\n\nJP Sugarbroad\n\n", "msg_date": "Thu, 10 Sep 1998 15:09:50 -0500", "msg_from": "\"Taral\" <[email protected]>", "msg_from_op": true, "msg_subject": "pg_user backtrace -- with ElectricFence (looks useful :)" } ]
[ { "msg_contents": "Hi people,\n\nI'm using some c++ code to connect to a postgresql 6.3.2 database.\nI need to use this for a CGI application on a website we maintain.\nIt runs perfectly from the command line on my linux machine, and also\nfrom the command line on the BSDI machine we use for a virtually-hosted\nserver.\nThe problem I'm having is when I attempt to execute it as a CGI app from\nthe cgi-bin directory on our server. Here's the code:\n----------------------------------------------------------------------------\n#include <iostream.h>\n#include <libpq++.h>\n#include <stdlib.h>\n\nmain()\n{\n\n cout << \"Content-type: text/plain\\n\\n\";\n cout << \"Trying to connect ...\" << endl;\n char* dbName = \"molinks\"; \n PgEnv Env;\n Env.Host(\"peculiarweb.com\");\n // Env.Port(\"\");\n // Env.Auth(\"\");\n cout << \"Env.Auth = \" << Env.Auth() << endl;\n cout << \"Env.Host = \" << Env.Host() << endl;\n cout << \"Env.Port = \" << Env.Port() << endl;\n cout << \"Env.Option = \" << Env.Option() << endl;\n cout << \"Env.TTY = \" << Env.TTY() << endl;\n\n // Open the connection to the database and make sure it's OK\n PgDatabase data(Env, dbName);\n if ( data.ConnectionBad() ) {\n cout << \"Connection was unsuccessful...\" << endl\n << \"Error message returned: \" << data.ErrorMessage() << endl;\n return 1;\n }\n else\n cout << \"Connection successful...\" << endl;\n----------------------------------------------------------------------------\n\nWhen I try to run it as a CGI app from the web server, I get the\nfollowing error:\n----------------------------------------------------------------------------\nTrying to connect ...\nEnv.Auth = \nEnv.Host = peculiarweb.com\nEnv.Port = \nEnv.Option = \nEnv.TTY = \nConnection was unsuccessful...\nError message returned: fe_setauthsvc: invalid name: , ignoring...\n----------------------------------------------------------------------------\n\nAnybody have any clue why this happens, or what it means? Better yet,\nanybody know how to fix it?\n\n----------------------------------------------------------------------------\n\t\t\tBelinda & Clint Forgy\nMidwest Online\t\t\t\t\tPeculiarWeb Internet Designs\nhttp://www.midwestonline.com\t\t\thttp://www.peculiarweb.com\n", "msg_date": "Fri, 11 Sep 1998 00:11:17 -0500", "msg_from": "Midwest Online <[email protected]>", "msg_from_op": true, "msg_subject": "getting \"fe_setauthsvc: invalid name\" error" }, { "msg_contents": "Midwest Online <[email protected]> writes:\n> Connection was unsuccessful...\n> Error message returned: fe_setauthsvc: invalid name: , ignoring...\n> Anybody have any clue why this happens, or what it means? Better yet,\n> anybody know how to fix it?\n\nThe error message is pretty much useless --- it looks like the actual\nerror is being overwritten thanks to a bug in PgConnection::Connect().\nYou might try diking out the last seven lines of that routine (it's\nin src/interfaces/libpq++/pgconnection.cc) and seeing if you get a\nmore useful message.\n\nMy guess is that the execution environment is different for your CGI\nprogram, with respect to either username or lack of one of the\nenvironment variables that libpq pays attention to (PGPORT, etc).\n\nAnother possibility is that the database server sees the connection\nas being made from a different IP address than what you get from the\ncommand line (I dunno enough about \"virtual web servers\" to know if that\nwould happen, but it seems possible), and the IP address is not one of\nthose listed as permitted to connect in the server's host authentication\nfile.\n\nBTW, hackers: when I looked into pgconnection.cc, I was astonished\nand dismayed by the number of instantly visible bugs. This code is in\n*horrible* shape --- it's amazing it works at all. Someone is going to\nhave to adopt libpq++ and give it a close going-over.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 11 Sep 1998 10:16:37 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] getting \"fe_setauthsvc: invalid name\" error " } ]
[ { "msg_contents": "There's been a very recent change to include the OID in certain names\nin the system table. Do a \"select * from pg_amop;\" to see what I\nmean: the values for amopselect and amopnpages didn't have the OID\nappended before. Was this change intentional? If so, I'm really\ncurious as to why... And what's the best way to find out, from SQL,\nthat 'btreesel' should now be 'btreesel_1268'?\n\n-tih\n-- \nPopularity is the hallmark of mediocrity. --Niles Crane, \"Frasier\"\n", "msg_date": "11 Sep 1998 10:36:57 +0200", "msg_from": "Tom Ivar Helbekkmo <[email protected]>", "msg_from_op": true, "msg_subject": "Names that suddenly include an OID" }, { "msg_contents": "> There's been a very recent change to include the OID in certain names\n> in the system table. Do a \"select * from pg_amop;\" to see what I\n> mean: the values for amopselect and amopnpages didn't have the OID\n> appended before. Was this change intentional? If so, I'm really\n> curious as to why... And what's the best way to find out, from SQL,\n> that 'btreesel' should now be 'btreesel_1268'?\n\nOK, it was me who added it, and it still has some problems. The reason\nthe oid was added is that the old code just displayed the\npg_proc.proname for regproc fields, and the input function just found\nthe FIRST function with a matching name, which is a problem because we\ncan have multiple functions with the same name but different types.\n\nYou can input into regproc with the name_oid format, or you can just\ngive it the oid.\n\nThe problem is that certain function create items now have problems, as\noutlined in the e-mails I am attaching, and am still looking for\nsuggestions on this. I can put it back to the old way 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)", "msg_date": "Fri, 11 Sep 1998 10:29:47 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Names that suddenly include an OID" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n\n> OK, it was me who added it, and it still has some problems. The\n> reason the oid was added is that the old code just displayed the\n> pg_proc.proname for regproc fields, and the input function just\n> found the FIRST function with a matching name, which is a problem\n> because we can have multiple functions with the same name but\n> different types.\n\nThen the code in question should be changed to properly look for a\ntuple where the name matches _and_ the types are right. Combining the\n(overloaded) name and the (unique) OID into a text string seems very\ninelegant to me, and intuitively very, very wrong: if names aren't\nusable in a certain situation, use OIDs instead -- that's what they're\nfor -- but don't change the name to add (seemingly) random numbers to\nmake them unique.\n\nContrived, silly, irrelevant example to illuminate how I'm thinking:\nif you used the string 'plus' to signify addition, and you decided you\nhad to differentiate between adding integers and adding floats, then\n\n\tfindfunc('plus');\n\nshould become\n\n\tfindfunc('plus', 'integer');\n\ninstead of forcing the programmer to write things like\n\n\tfindfunc('plus_234893');\n\nor adding weird code to every use of 'plus' to look up what the silly,\ncomposite name happens to be this time.\n\n-tih\n-- \nPopularity is the hallmark of mediocrity. --Niles Crane, \"Frasier\"\n", "msg_date": "12 Sep 1998 18:38:39 +0200", "msg_from": "Tom Ivar Helbekkmo <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Names that suddenly include an OID" }, { "msg_contents": "> There's been a very recent change to include the OID in certain names\n> in the system table. Do a \"select * from pg_amop;\" to see what I\n> mean: the values for amopselect and amopnpages didn't have the OID\n> appended before. Was this change intentional? If so, I'm really\n> curious as to why... And what's the best way to find out, from SQL,\n> that 'btreesel' should now be 'btreesel_1268'?\n\nI have just fixed this.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n\n", "msg_date": "Fri, 2 Oct 1998 01:34:36 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Names that suddenly include an OID" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n>> There's been a very recent change to include the OID in certain names\n>> in the system table.\n\n> I have just fixed this.\n\nCool. Does this change require a new 'initdb'?\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 02 Oct 1998 10:12:01 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Names that suddenly include an OID " }, { "msg_contents": "> Bruce Momjian <[email protected]> writes:\n> >> There's been a very recent change to include the OID in certain names\n> >> in the system table.\n> \n> > I have just fixed this.\n> \n> Cool. Does this change require a new 'initdb'?\n> \n> \t\t\tregards, tom lane\n> \n\nNo. Internally they are the same.\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n\n", "msg_date": "Fri, 2 Oct 1998 10:43:36 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Names that suddenly include an OID" } ]
[ { "msg_contents": "\n>There's been a very recent change to include the OID in certain names\n>in the system table. Do a \"select * from pg_amop;\" to see what I\n>mean: the values for amopselect and amopnpages didn't have the OID\n>appended before. Was this change intentional? If so, I'm really\n>curious as to why... And what's the best way to find out, from SQL,\n>that 'btreesel' should now be 'btreesel_1268'?\n\nYes, I don't like this change either. If the oid is needed it should be in a second field,\nand the unique index should be ( name, theoid )\n\nAndreas\n\n", "msg_date": "Fri, 11 Sep 1998 11:08:06 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "AW: [HACKERS] Names that suddenly include an OID" }, { "msg_contents": "> \n> >There's been a very recent change to include the OID in certain names\n> >in the system table. Do a \"select * from pg_amop;\" to see what I\n> >mean: the values for amopselect and amopnpages didn't have the OID\n> >appended before. Was this change intentional? If so, I'm really\n> >curious as to why... And what's the best way to find out, from SQL,\n> >that 'btreesel' should now be 'btreesel_1268'?\n> \n> Yes, I don't like this change either. If the oid is needed it should be in a second field,\n> and the unique index should be ( name, theoid )\n\nWell, the problem is that it is a single column, so how to you pass two\nvalues into a type? You really can't split a type across two columns.\n\nStill looking for suggestions.\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, 11 Sep 1998 10:39:35 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: [HACKERS] Names that suddenly include an OID" } ]
[ { "msg_contents": "Hi, please apply following patches to rewrite/rewriteManip.c.\nThis seems to fix the \"pg_user problem.\" (I am not very familiar\nwith the rule/rewrite area, so my understanding may be wrong)\nThe original code sets varlevelsup even if the node is not\nvariable node. This assumption is not always correct, for example\nwith the password column of pg_user view. \nAnyway, with the patch the select_view test is now ok on my LiuxPPC\nbox.\n\n*** rewriteManip.c.orig\tFri Sep 11 21:24:04 1998\n--- rewriteManip.c\tFri Sep 11 22:18:33 1998\n***************\n*** 633,639 ****\n \t\t\t\t\t\t\t*nodePtr = copyObject(n);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\t*nodePtr = n;\n! \t\t\t\t\t\t((Var *) *nodePtr)->varlevelsup = this_varlevelsup;\n \t\t\t\t\t}\n \t\t\t\t\t*modified = TRUE;\n \t\t\t\t}\n--- 633,640 ----\n \t\t\t\t\t\t\t*nodePtr = copyObject(n);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\t*nodePtr = n;\n! \t\t\t\t\t\tif (nodeTag(*nodePtr) == T_Var)\n! \t\t\t\t\t\t ((Var *) *nodePtr)->varlevelsup = this_varlevelsup;\n \t\t\t\t\t}\n \t\t\t\t\t*modified = TRUE;\n \t\t\t\t}\n\n--\nTatsuo Ishii\[email protected]\n\n", "msg_date": "Fri, 11 Sep 1998 23:02:29 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": true, "msg_subject": "pg_user problem" }, { "msg_contents": "> Hi, please apply following patches to rewrite/rewriteManip.c.\n> This seems to fix the \"pg_user problem.\" (I am not very familiar\n> with the rule/rewrite area, so my understanding may be wrong)\n> The original code sets varlevelsup even if the node is not\n> variable node. This assumption is not always correct, for example\n> with the password column of pg_user view.\n> Anyway, with the patch the select_view test is now ok on my LiuxPPC\n> box.\n\nI haven't tried it yet, but great work! That fits in with the\nobservation that the password column seemed to trigger the failure.\n\nWill report on success this evening...\n\n - Tom\n", "msg_date": "Fri, 11 Sep 1998 16:17:12 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] pg_user problem" }, { "msg_contents": "Nice job Tatsuo.\n\nLooks like electric fence was properly pointing to the problem. I am\ngoing to get electric fence working on my machine here.\n\nI have modified your patch, and I would like Jan to confirm the fix. \nInstead of only processing target list Var's, I am doing Var's as you\nsuggested, and non-Vars by re-calling the function to process the\nnon-var node. This appears to be more in keeping with the rest of the\nfunction. I am committing this patch.\n\nLet me know if you or Jan see any problems with this.\n\n> Hi, please apply following patches to rewrite/rewriteManip.c.\n> This seems to fix the \"pg_user problem.\" (I am not very familiar\n> with the rule/rewrite area, so my understanding may be wrong)\n> The original code sets varlevelsup even if the node is not\n> variable node. This assumption is not always correct, for example\n> with the password column of pg_user view. \n> Anyway, with the patch the select_view test is now ok on my LiuxPPC\n> box.\n\nIndex: src/backend/rewrite/rewriteManip.c\n===================================================================\nRCS file: /usr/local/cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v\nretrieving revision 1.17\ndiff -c -r1.17 rewriteManip.c\n*** rewriteManip.c\t1998/09/01 04:31:35\t1.17\n--- rewriteManip.c\t1998/09/11 16:16:20\n***************\n*** 614,622 ****\n \t\t\t\t\t\t\t\t\t\t\t\t\t var->varattno));\n \t\t\t\t\tif (n == NULL)\n \t\t\t\t\t\t*nodePtr = make_null(((Var *) node)->vartype);\n- \n \t\t\t\t\telse\n! \n \t\t\t\t\t\t/*\n \t\t\t\t\t\t * This is a hack: The varlevelsup of the orignal\n \t\t\t\t\t\t * variable and the new one should be the same.\n--- 614,621 ----\n \t\t\t\t\t\t\t\t\t\t\t\t\t var->varattno));\n \t\t\t\t\tif (n == NULL)\n \t\t\t\t\t\t*nodePtr = make_null(((Var *) node)->vartype);\n \t\t\t\t\telse\n! \t\t\t\t\t{\n \t\t\t\t\t\t/*\n \t\t\t\t\t\t * This is a hack: The varlevelsup of the orignal\n \t\t\t\t\t\t * variable and the new one should be the same.\n***************\n*** 628,639 ****\n \t\t\t\t\t\t * before! (Maybe this will cause troubles with\n \t\t\t\t\t\t * some sophisticated queries on views?)\n \t\t\t\t\t\t */\n- \t\t\t\t\t{\n \t\t\t\t\t\tif (this_varlevelsup > 0)\n \t\t\t\t\t\t\t*nodePtr = copyObject(n);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\t*nodePtr = n;\n! \t\t\t\t\t\t((Var *) *nodePtr)->varlevelsup = this_varlevelsup;\n \t\t\t\t\t}\n \t\t\t\t\t*modified = TRUE;\n \t\t\t\t}\n--- 627,642 ----\n \t\t\t\t\t\t * before! (Maybe this will cause troubles with\n \t\t\t\t\t\t * some sophisticated queries on views?)\n \t\t\t\t\t\t */\n \t\t\t\t\t\tif (this_varlevelsup > 0)\n \t\t\t\t\t\t\t*nodePtr = copyObject(n);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\t*nodePtr = n;\n! \n! \t\t\t\t\t\tif (nodeTag(nodePtr) == T_Var)\n! \t\t\t\t\t\t\t((Var *) *nodePtr)->varlevelsup = this_varlevelsup;\n! \t\t\t\t\t\telse\n! \t\t\t\t\t\t\tnodeHandleViewRule(&n, rtable, targetlist,\n! \t\t\t\t\t\t\t\t\t\t rt_index, modified, sublevels_up);\n \t\t\t\t\t}\n \t\t\t\t\t*modified = TRUE;\n \t\t\t\t}\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, 11 Sep 1998 12:38:54 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "pgrewrite: was Re: [HACKERS] pg_user problem" }, { "msg_contents": "At 0:38 PM 98.9.11 -0400, Bruce Momjian wrote:\n>Nice job Tatsuo.\n>\n>Looks like electric fence was properly pointing to the problem. I am\n>going to get electric fence working on my machine here.\n>\n>I have modified your patch, and I would like Jan to confirm the fix. \n>Instead of only processing target list Var's, I am doing Var's as you\n>suggested, and non-Vars by re-calling the function to process the\n>non-var node. This appears to be more in keeping with the rest of the\n>function. I am committing this patch.\n>\n>Let me know if you or Jan see any problems with this.\n\nThank you for correction to my patches. I have tested your\npatches on my LinuxPPC box and it works great!\n--\nTatsuo Ishii\[email protected]\n\n", "msg_date": "Sat, 12 Sep 1998 10:23:53 +0900", "msg_from": "[email protected] (Tatsuo Ishii)", "msg_from_op": false, "msg_subject": "Re: pgrewrite: was Re: [HACKERS] pg_user problem" }, { "msg_contents": "> > Hi, please apply following patches to rewrite/rewriteManip.c.\n> > This seems to fix the \"pg_user problem.\"\n> I haven't tried it yet\n> Will report on success this evening...\n\nSeems to have fixed the problem on my Linux/i686 machine. Great job,\nTatsuo.\n\nMarc, I've got a small set of patches for the parser to allow more SQL92\nsyntax for cursors. Will put them in tomorrow so they will be in place\nfor a Sunday build.\n\n - Tom\n", "msg_date": "Sat, 12 Sep 1998 05:23:34 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] pg_user problem" } ]
[ { "msg_contents": "> Hi,\n> \n> I am experiencing missing header files. I am not suprised but \n> I would like\n> to have any missing header file. If I have them I could \n> attempt to write\n> /find them on my system. Can I access them throught the internet or is\n> someone kind enought to send them to me on request (Hugo??)?\n> \n> At this moment I miss: <sys/ipc.h> and <sys/un.h>\n\nHi!\n\nHave you checked that the SysV IPC functions actually exist? Last time I\nchecked, SysV shared memory was not implemented in cygwin32, and that was\nthe reason the headers were not there. This was some time ago, so they may\nwell have implemented them now - but then my guess would be that they had\nincluded the headers too.\nAnyway. It might be worth checking before you get too dug-in to other parts.\nI believe this is a central part of the backend, so you will probably have a\nlot of trouble unless you can find a working implementation of it.\n\n\n//Magnus\n", "msg_date": "Fri, 11 Sep 1998 16:52:16 +0200", "msg_from": "Magnus Hagander <[email protected]>", "msg_from_op": true, "msg_subject": "RE: [HACKERS] Missing headers Windows NT port" }, { "msg_contents": "> Hi!\n> \n> Have you checked that the SysV IPC functions actually exist? Last time I\n> checked, SysV shared memory was not implemented in cygwin32, and that was\n> the reason the headers were not there. This was some time ago, so they may\n> well have implemented them now - but then my guess would be that they had\n> included the headers too.\n> Anyway. It might be worth checking before you get too dug-in to other parts.\n> I believe this is a central part of the backend, so you will probably have a\n> lot of trouble unless you can find a working implementation of it.\n\nYes, you will need some sort of shared memory, even if it only a file\nthat can be mmap'ed into the memory of each backend. Hopefully they\nhave something that will 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": "Fri, 11 Sep 1998 11:17:05 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Missing headers Windows NT port" }, { "msg_contents": "Hi Magnus,\n\nI found a working (enough) implementation. In fact This afternoon I\nsucceeeded in a complete compile just ip to \"All of PostgreSQL is\nsuccessfully made. Ready to install.\"\n\n\nJoosty\n\n", "msg_date": "Fri, 11 Sep 1998 17:51:23 +0200", "msg_from": "\"Joost Kraaijeveld\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: [HACKERS] Missing headers Windows NT port" }, { "msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> Hi Magnus,\n> \n> I found a working (enough) implementation. In fact This afternoon I\n> succeeeded in a complete compile just ip to \"All of PostgreSQL is\n> successfully made. Ready to install.\"\n\nWow, that's pretty amazing.\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, 11 Sep 1998 12:41:01 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Missing headers Windows NT port" }, { "msg_contents": "I'm impressed so far.\n\nGetting ahead of myself...\n\nWhat the overhead of the cygwin32 environment? (price, etc.)\n\nThis would make a nice binary distribution, eh? Such a distribution could\nput PostgreSQL in the hands of many.\n\n\nBruce Momjian wrote:\n\n> [Charset iso-8859-1 unsupported, filtering to ASCII...]\n> > Hi Magnus,\n> >\n> > I found a working (enough) implementation. In fact This afternoon I\n> > succeeeded in a complete compile just ip to \"All of PostgreSQL is\n> > successfully made. Ready to install.\"\n>\n> Wow, that's pretty amazing.\n\n\n\n", "msg_date": "Fri, 11 Sep 1998 12:56:48 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Missing headers Windows NT port" }, { "msg_contents": "Hi David,\n\n\n> I'm impressed so far.\nYeah, it's a wonderfull world ;-)\n\n> Getting ahead of myself...\n>\n> What the overhead of the cygwin32 environment? (price, etc.)\nNop. Nothing Nada, all GNU.\n\n>\n> This would make a nice binary distribution, eh? Such a\n> distribution could\n> put PostgreSQL in the hands of many.\nThe more the marrier. Let's push Backoffice of the markt (A complete GNU\nbased backoffice, ready to run on all popular OS's). (I am not really making\na joke here, I have a dream... ;-))\n\nJoost\n\n", "msg_date": "Fri, 11 Sep 1998 19:45:42 +0200", "msg_from": "\"Joost Kraaijeveld\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: [HACKERS] Missing headers Windows NT port" }, { "msg_contents": "I'm not sure what the cygwin32 environment entails, but I'm a Windows\nprogrammer (since Windows 2.0!) and I want to produce a Win32-native\nversion of PostgreSQL anyway. I was waiting until the 6.4 excitement died\ndown. Looks like Joost beat me to the punch. :-) \n\nAha, I read Joost's reply as I was reading this. I know that the GNU\nthing is a problem for PG'ers. But if we can get the code working, Joost,\nI can go back and un-GNU it. That is, I can do what I was planning on\ndoing anyway -- do a Win32 port without anybody else's tools. It will\nhelp immensely if we start seeing what will go wrong under Windows. See\nwhere I'm coming from? BTW: what compiler are you using for this effort?\n\nBut I agree that a Win32 port would get PG into the \"hands of the masses.\"\nMy current needs are that it run on Solaris and NT, but I'd *like* it to\nrun well on 95 as well.\n\nMichael\n\nOn Fri, 11 Sep 1998, David Hartwig wrote:\n\n> I'm impressed so far.\n> \n> Getting ahead of myself...\n> \n> What the overhead of the cygwin32 environment? (price, etc.)\n> \n> This would make a nice binary distribution, eh? Such a distribution could\n> put PostgreSQL in the hands of many.\n> \n> \n> Bruce Momjian wrote:\n> \n> > [Charset iso-8859-1 unsupported, filtering to ASCII...]\n> > > Hi Magnus,\n> > >\n> > > I found a working (enough) implementation. In fact This afternoon I\n> > > succeeeded in a complete compile just ip to \"All of PostgreSQL is\n> > > successfully made. Ready to install.\"\n> >\n> > Wow, that's pretty amazing.\n> \n> \n> \n> \n> \n\n\n", "msg_date": "Fri, 11 Sep 1998 12:59:26 -0500 (EST)", "msg_from": "\"J. Michael Roberts\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Missing headers Windows NT port" }, { "msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> Hi David,\n> \n> \n> > I'm impressed so far.\n> Yeah, it's a wonderfull world ;-)\n> \n> > Getting ahead of myself...\n> >\n> > What the overhead of the cygwin32 environment? (price, etc.)\n> Nop. Nothing Nada, all GNU.\n\nWe only have a GNU problem about including GNU stuff INTO the source\ntree, because it GNU'ifies our BSD license. Other than that, we all use\nGNU stuff.\n\n> \n> >\n> > This would make a nice binary distribution, eh? Such a\n> > distribution could\n> > put PostgreSQL in the hands of many.\n> The more the marrier. Let's push Backoffice of the markt (A complete GNU\n> based backoffice, ready to run on all popular OS's). (I am not really making\n> a joke here, I have a dream... ;-))\n> \n> Joost\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, 11 Sep 1998 14:37:40 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Missing headers Windows NT port" }, { "msg_contents": "On Fri, 11 Sep 1998, Bruce Momjian wrote:\n\n> [Charset iso-8859-1 unsupported, filtering to ASCII...]\n> > Hi David,\n> > \n> > \n> > > I'm impressed so far.\n> > Yeah, it's a wonderfull world ;-)\n> > \n> > > Getting ahead of myself...\n> > >\n> > > What the overhead of the cygwin32 environment? (price, etc.)\n> > Nop. Nothing Nada, all GNU.\n> \n> We only have a GNU problem about including GNU stuff INTO the source\n> tree, because it GNU'ifies our BSD license. Other than that, we all use\n> GNU stuff.\n\n\tActually, I don't think we could if we even wanted to...the BSD\nlicencse itself states that its freely distributable as long as the\ncopyright stays in tact...so, if we were to put GPL code into it, would we\nbe breaking the BSD copyright :)\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Sun, 13 Sep 1998 13:40:57 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Missing headers Windows NT port" }, { "msg_contents": "> Actually, I don't think we could if we even wanted to...the BSD\n> license itself states that its freely distributable as long as the\n> copyright stays in tact...so, if we were to put GPL code into it, \n> would we be breaking the BSD copyright :)\n\nI don't mean to start the license thing again, and it's OK to ignore\nthis, but...\n\nThe copyright from UCB seems to allow unlimited use, modification, and\ndistribution, and asks that the copyright notice be included with the\ncode. afaik the main purpose of the copyright notice is to ensure that\nUCB has some credit for the work they and their sponsors have done, and\nto ensure that there is a liability disclaimer for same. Would the\ninclusion of a GPL addendum or GPL code be at odds with that, as long as\nthe UCB license continues to be included and prominently displayed? I\nhave a hard time seeing how, but since lawyers are in a different world\nthan I maybe it's beyond me :)\n\n - Tom\n", "msg_date": "Mon, 14 Sep 1998 01:55:31 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Missing headers Windows NT port" }, { "msg_contents": "On Mon, Sep 14, 1998 at 01:55:31AM +0000, Thomas G. Lockhart wrote:\n> to ensure that there is a liability disclaimer for same. Would the\n> inclusion of a GPL addendum or GPL code be at odds with that, as long as\n> the UCB license continues to be included and prominently displayed? I\n\nJust an example. GPL allows to link against a non-GPLed library only if that\nlibrary is part of the opertaing system. UCB license allows that. So if we\nwere to add such a library we cannot do that if we have a small piece of\nGPLed code included.\n\nOr if you were to make a commercial release from PostgreSQL and in the\nprocess fix some bugs and add some more features, you can keep that stuff\ncommercially, while under GPL you have to make the source available. That is\nyou must not improve GPLed code without making these improvements GPL again.\n\nBut then this discussion is worthless since we DO have GPLed code in\nPostgreSQL. Just check gram.c! If we do not want GPL we cannot use bison at\nall. Granted a commercial vendor could work around this by recompiling\ngram.c, preproc.c etc.\n\nAfter all the main function of GPL is to keep free software free, and I have\nno problems with that.\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Mon, 14 Sep 1998 08:06:27 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Missing headers Windows NT port" } ]
[ { "msg_contents": "The attached patches fix the following problems:\n\n1. The UnixWare tas macro was reformatted (by indent or it like?) which caused\n it to break. The asm macro construct is very particular about the %mem\n construct -- it has to start in column 1.\n\n2. When compiling libpq++, g++ was used even if configure found the C++ com-\n piler to be CC.\n\n3. When compiling libpq++, '-Wno-error' was added to CXXFLAGS, even if the\n compiler wasn't g++.\n\nOpen issues with the UnixWare 7 port:\n\n1. Connecting using the AF_UNIX family does not work correctly. The first\n connection works fine. Re-connecting (i.e. \\connect within psql) fails.\n This is a low priority item with me since connections via AF_INET work\n without problems.\n\n\n\n____ | Billy G. Allie | Domain....: [email protected]\n| /| | 7436 Hartwell | Compuserve: 76337,2061\n|-/-|----- | Dearborn, MI 48126| MSN.......: [email protected]\n|/ |LLIE | (313) 582-1540 |", "msg_date": "Fri, 11 Sep 1998 11:46:20 -0400", "msg_from": "\"Billy G. Allie\" <[email protected]>", "msg_from_op": true, "msg_subject": "6.4 fixes." }, { "msg_contents": "I have applied this patch. Some of the configure fixes where already in\ndone. I have removed libpq++/Makefile and added libpq++/Makefile.in. I\nhave also modified pgindent/README to prevent s_lock.h from being\nprocessed in the future.\n\n\n> The attached patches fix the following problems:\n> \n> 1. The UnixWare tas macro was reformatted (by indent or it like?) which caused\n> it to break. The asm macro construct is very particular about the %mem\n> construct -- it has to start in column 1.\n> \n> 2. When compiling libpq++, g++ was used even if configure found the C++ com-\n> piler to be CC.\n> \n> 3. When compiling libpq++, '-Wno-error' was added to CXXFLAGS, even if the\n> compiler wasn't g++.\n> \n> Open issues with the UnixWare 7 port:\n> \n> 1. Connecting using the AF_UNIX family does not work correctly. The first\n> connection works fine. Re-connecting (i.e. \\connect within psql) fails.\n> This is a low priority item with me since connections via AF_INET work\n> without problems.\n> \nContent-Description: uw7p3.patch\n\n[Attachment, skipping...]\n\n> ____ | Billy G. Allie | Domain....: [email protected]\n> | /| | 7436 Hartwell | Compuserve: 76337,2061\n> |-/-|----- | Dearborn, MI 48126| MSN.......: [email protected]\n> |/ |LLIE | (313) 582-1540 | \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, 11 Sep 1998 13:00:55 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] 6.4 fixes." } ]
[ { "msg_contents": "Hi Hugo,\n\nI succeeded in compiling postgres on Windows NT using EGCS 1.1 for CygWin32\nB19. Below are in short the things I had to do to get that done. Notice that\nI only had to modify 1 source file to get it done (c.h). Maybe even that was\nnot needed.\n\nTo get it running will take me some more time.\n\nFor questions: email me.\n\nJoost\n\n\ncannot find a template: cygwin32_nt\nused : generic -> copied it to cygwin32_nt\n\nconfigure script:\n\nECHO_N_OUT=`echo -n \"\" | wc -c`\nECHO_C_OUT=`echo \"\\c\" | wc -c`\n\nif test \"$ECHO_N_OUT\" -eq 0; then\n\tDASH_N='-n'\n\tBACKSLASH_C=\nelse\n\tif test \"ECHO_C_OUT\" -eq 0; then\n\t\tDASH_N=\n\t\tBACKSLASH_C='\\\\\\\\c'\n\telse\n\t\t{ echo \"configure: error: \"echo behaviour undetermined\"\" 1>&2; exit 1; }\n\tfi\nfi\n\nto\n\nECHO_N_OUT=`echo -n \"\" | wc -c`\nECHO_C_OUT=`echo \"\\c\" | wc -c`\n\nif test $ECHO_N_OUT -eq 0; then\n\tDASH_N='-n'\n\tBACKSLASH_C=\nelse\n\tif test $ECHO_C_OUT -eq 0; then\n\t\tDASH_N=\n\t\tBACKSLASH_C='\\\\\\\\c'\n\telse\n\t\t{ echo \"configure: error: \"echo behaviour undetermined\"\" 1>&2; exit 1; }\n\tfi\nfi\n\nerror:\n\ncreating include/config.h\nlinking ./backend/port/tas/dummy.s to backend/port/tas.s\nlinking ./backend/port/dynloader/win.c to backend/port/dynloader.c\nconfigure: error: ./backend/port/dynloader/win.c: File not found\n\nidem for /pgsql/src/backend/port/dynloader/win.h\n\nidem for /pgsql/src/include/port/win.h\n\nidem for /pgsql/src/makefiles/makefile.win\n\n\nMissing header files:\n\ncopied <sys/ipc.h> and <sys/un.h> from the UWIN package to the <sys>\ndirectorie. For file improvement see the files themselves\n\nhad to solve a bison.hairy and bison.simple problem due to my installation\nby mounting d:/Unix/Cygnus/b19/share to /cygnus/b19/share\n\ncreated <endian.h> that says BYTE_ORDER == LITTLE_ENDIAN\n\ncopied <tcp.h> from UWin (according to Hugo it can be commented out?\n\ncopied <sys/sem.h> from CygWin32_ipc package, added the library to linker\nflags\n\ncopied <sys/shm.h> idem\nconfigured again\n\nadded to c.h (which is included in every c file) becuase otherwise a linker\nerror occured:\n\n#ifdef __CYGWIN32__\n#include <errno.h>\n#endif\n\ncreated win.h with:\n#define pg_dlopen dlopen\n#define pg_dlsym dlsym\n#define pg_dlclose dlclose\n#define pg_dlerror dlerror\n\n", "msg_date": "Fri, 11 Sep 1998 19:04:35 +0200", "msg_from": "\"Joost Kraaijeveld\" <[email protected]>", "msg_from_op": true, "msg_subject": "Postgres compiled on Windopws NT" } ]
[ { "msg_contents": "Hi,\n\nCan anyone give me directions to a high level descriotion of postgres? Which\nexecutables and or scripts are there and what is their responsibility? What\nis a typical scenario of what postgres does? Wait on a port listening for a\nconnection, on request fork? Is there a readable (and no, dozens of\nMakefiles are not considered readable) list of dependancies? Which\nexecutable depends on which source and /or libraries? Which library depends\non what othere librarie / source? etc. etc.\n\nI have read (but not memorized) the user manual and the administrators\nmanual but I found them not giving the answers I was looking for.\n\nTIA\n\nJoost\n\n", "msg_date": "Fri, 11 Sep 1998 19:41:24 +0200", "msg_from": "\"Joost Kraaijeveld\" <[email protected]>", "msg_from_op": true, "msg_subject": "High level description of postgres" }, { "msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> Hi,\n> \n> Can anyone give me directions to a high level descriotion of postgres? Which\n> executables and or scripts are there and what is their responsibility? What\n> is a typical scenario of what postgres does? Wait on a port listening for a\n> connection, on request fork? Is there a readable (and no, dozens of\n> Makefiles are not considered readable) list of dependancies? Which\n> executable depends on which source and /or libraries? Which library depends\n> on what othere librarie / source? etc. etc.\n> \n> I have read (but not memorized) the user manual and the administrators\n> manual but I found them not giving the answers I was looking for.\n\nHave you seen the backend flow chart and developers FAQ on the web site?\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, 11 Sep 1998 14:36:21 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] High level description of postgres" } ]
[ { "msg_contents": "I have a couple minor issues regarding the 6.4 implementation of the\nSERIAL data type. I like the ease of using the serial data type and I\nsuspect it will be used frequently base on the number of inquiries over\nthe past months.\n\n1. Should the sequence created by the serial type declaration, be\ndropped as a result of dropping the parent table?\n\n2. Can a declared serial column be also a primary key? If so, what\nwill be the side effected? Specifically, how will the unique index be\nnamed? The ODBC driver uses the {relname}_pkey to identify the primary\nkey of a table. The driver must be able to identify primary keys.\n\nComments?\n\n", "msg_date": "Fri, 11 Sep 1998 16:01:57 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": true, "msg_subject": "Serial Data Type" }, { "msg_contents": "Thus spake David Hartwig\n> I have a couple minor issues regarding the 6.4 implementation of the\n> SERIAL data type. I like the ease of using the serial data type and I\n> suspect it will be used frequently base on the number of inquiries over\n> the past months.\n> \n> 1. Should the sequence created by the serial type declaration, be\n> dropped as a result of dropping the parent table?\n\nSounds like a good idea.\n\n> 2. Can a declared serial column be also a primary key? If so, what\n> will be the side effected? Specifically, how will the unique index be\n> named? The ODBC driver uses the {relname}_pkey to identify the primary\n> key of a table. The driver must be able to identify primary keys.\n\nI suspect that the serial field will be the primary key 99% of the time.\nI hope it can be.\n\nAs for finding the primary, with the new changes we should be able\nto do something like this.\n\nSELECT pg_class.relname, pg_attribute.attname\n FROM pg_class, pg_attribute, pg_index\n WHERE pg_class.oid = pg_attribute.attrelid AND\n pg_class.oid = pg_index.indrelid AND\n pg_index.indkey[0] = pg_attribute.attnum AND\n pg_index.indisprimary = 't';\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": "Fri, 11 Sep 1998 22:11:31 -0400 (EDT)", "msg_from": "[email protected] (D'Arcy J.M. Cain)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Serial Data Type" }, { "msg_contents": "> I have a couple minor issues regarding the 6.4 implementation of the\n> SERIAL data type.\n> 1. Should the sequence created by the serial type declaration, be\n> dropped as a result of dropping the parent table?\n\nYes. But it isn't. And I don't know how we would do that on short\nnotice. I implemented the serial type with ~20 minutes work using the\nhooks I'd put in to implement primary keys, and of course Vadim's\nsequence capability. The difference is that indices were already\nautomatically removed when tables are dropped, so I didn't have to deal\nwith it.\n\n> 2. Can a declared serial column be also a primary key? If so, what\n> will be the side effected? Specifically, how will the unique index be\n> named? The ODBC driver uses the {relname}_pkey to identify the primary\n> key of a table. The driver must be able to identify primary keys.\n\nHmm.\n\npostgres=> create table xx (s serial primary key, i int4);\nERROR: parser: parse error at or near \"primary\"\npostgres=> create table xx (s int4 primary key, i int4);\nNOTICE: CREATE TABLE/PRIMARY KEY will create implicit index xx_pkey for\ntable xx\nCREATE\n\nSo, at the moment the syntax doesn't allow anything in addition to the\nserial type declaration. We should be able to fix that up and allow\nboth, but perhaps it should wait for Vadim's primary key/foreign key\nfeatures, which may be available for v6.4.\n\nI'd expect to be able to get the name to line up with the \"_pkey\"\nconvention, though perhaps by then you will be able to look in a column\nin a table for real primary/foreign key flags to do this.\n\n - Tom\n", "msg_date": "Sat, 12 Sep 1998 05:57:52 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Serial Data Type" }, { "msg_contents": "\n\nD'Arcy J.M. Cain wrote:\n\n> > 2. Can a declared serial column be also a primary key? If so, what\n> > will be the side effected? Specifically, how will the unique index be\n> > named? The ODBC driver uses the {relname}_pkey to identify the primary\n> > key of a table. The driver must be able to identify primary keys.\n>\n> I suspect that the serial field will be the primary key 99% of the time.\n> I hope it can be.\n>\n> As for finding the primary, with the new changes we should be able\n> to do something like this.\n>\n> SELECT pg_class.relname, pg_attribute.attname\n> FROM pg_class, pg_attribute, pg_index\n> WHERE pg_class.oid = pg_attribute.attrelid AND\n> pg_class.oid = pg_index.indrelid AND\n> pg_index.indkey[0] = pg_attribute.attnum AND\n> pg_index.indisprimary = 't';\n>\n\nIs pg_index.indisprimary available now to determine primary'ness. If not,\nwhen?\n\n", "msg_date": "Sun, 13 Sep 1998 10:18:54 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Serial Data Type" }, { "msg_contents": "Thus spake David Hartwig\n> > As for finding the primary, with the new changes we should be able\n> > to do something like this.\n> >\n> > SELECT pg_class.relname, pg_attribute.attname\n> > FROM pg_class, pg_attribute, pg_index\n> > WHERE pg_class.oid = pg_attribute.attrelid AND\n> > pg_class.oid = pg_index.indrelid AND\n> > pg_index.indkey[0] = pg_attribute.attnum AND\n> > pg_index.indisprimary = 't';\n> >\n> \n> Is pg_index.indisprimary available now to determine primary'ness. If not,\n> when?\n\nIt is now in the current tree but it isn't used yet. I just manually\nset it for the tables I need and then use it. Eventually I will be\nable to leave out the manual step and all my code will work. Right\nnow it is always set to 'f' at create time.\n\n-- \nD'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\nhttp://www.druid.net/darcy/ | and a sheep voting on\n+1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.\n", "msg_date": "Sun, 13 Sep 1998 20:49:07 -0400 (EDT)", "msg_from": "[email protected] (D'Arcy J.M. Cain)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Serial Data Type" } ]
[ { "msg_contents": "The pg_atoi() function uses strtol() to convert the string to numbers. Some \nimplementations of strtol() treat empty strings (\"\") as invalid arguments \nwhile others convert this (erroneously, IHMO) to zero (0). Assuming that the \nexpected behaviour of pg_atoi() is to return 0 if it is passed an empty \nstring, I am supplying the following patch to explictly check for an empty \nstring in pg_atoi() and return 0 if the string is empty. The patch will also \ntrap a NULL character pointer being passed to pg_atoi() and will use elog() to \nprint out an error message if the input char pointer is NULL.\n\n\n\n____ | Billy G. Allie | Domain....: [email protected]\n| /| | 7436 Hartwell | Compuserve: 76337,2061\n|-/-|----- | Dearborn, MI 48126| MSN.......: [email protected]\n|/ |LLIE | (313) 582-1540 |", "msg_date": "Fri, 11 Sep 1998 21:12:05 -0400", "msg_from": "\"Billy G. Allie\" <[email protected]>", "msg_from_op": true, "msg_subject": "postgreSQL 6.4 patches." }, { "msg_contents": "Applied.\n\n> The pg_atoi() function uses strtol() to convert the string to numbers. Some \n> implementations of strtol() treat empty strings (\"\") as invalid arguments \n> while others convert this (erroneously, IHMO) to zero (0). Assuming that the \n> expected behaviour of pg_atoi() is to return 0 if it is passed an empty \n> string, I am supplying the following patch to explictly check for an empty \n> string in pg_atoi() and return 0 if the string is empty. The patch will also \n> trap a NULL character pointer being passed to pg_atoi() and will use elog() to \n> print out an error message if the input char pointer is NULL.\n> \nContent-Description: uw7p4.patch\n\n[Attachment, skipping...]\n\n> ____ | Billy G. Allie | Domain....: [email protected]\n> | /| | 7436 Hartwell | Compuserve: 76337,2061\n> |-/-|----- | Dearborn, MI 48126| MSN.......: [email protected]\n> |/ |LLIE | (313) 582-1540 | \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, 12 Sep 1998 12:00:39 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] postgreSQL 6.4 patches." } ]
[ { "msg_contents": "A few questions for new SERIAL data type:\n\no dropping a table including a serial data type does not drop the sequence\n corresponding to the table. This prevents re-creating the table.\n Do we have to remove the sequence by hand?\u0018\u0013\n\no explicit insertion to the serial column sets the value specified.\n This is good. However, next implicit insertion results in that\n previous value from the sequence + 1 is set.\n\n create table t (c text, i serial);\n insert into t values('a');\n insert into t values('b',100);\n insert into tvalues('c');\n select * from t;\n\n a 1\n b 100\n c 2\n\n This seems a little bit unnatural for me. may be i of the thrid row\n should be 101?\n\n--\nTatsuo Ishii\[email protected]\n\n", "msg_date": "Sat, 12 Sep 1998 10:23:55 +0900", "msg_from": "[email protected] (Tatsuo Ishii)", "msg_from_op": true, "msg_subject": "SERIAL data type" }, { "msg_contents": "Thus spake Tatsuo Ishii\n> o explicit insertion to the serial column sets the value specified.\n> This is good. However, next implicit insertion results in that\n> previous value from the sequence + 1 is set.\n> \n> create table t (c text, i serial);\n> insert into t values('a');\n> insert into t values('b',100);\n> insert into tvalues('c');\n> select * from t;\n> \n> a 1\n> b 100\n> c 2\n> \n> This seems a little bit unnatural for me. may be i of the thrid row\n> should be 101?\n\nPerhaps it should not be possible to specify a value for serial types.\nMake it always use the next value no matter what is supplied. Could\nmake dump and restore a problem of course but I can think of some\nsituations where it would make the programming simpler.\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": "Fri, 11 Sep 1998 22:14:40 -0400 (EDT)", "msg_from": "[email protected] (D'Arcy J.M. Cain)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] SERIAL data type" }, { "msg_contents": "[email protected] (Tatsuo Ishii) writes:\n> A few questions for new SERIAL data type:\n>\t\t[...]\n> o explicit insertion to the serial column sets the value specified.\n> This is good. However, next implicit insertion results in that\n> previous value from the sequence + 1 is set.\n> \n> create table t (c text, i serial);\n> insert into t values('a');\n> insert into t values('b',100);\n> insert into tvalues('c');\n> select * from t;\n> \n> a 1\n> b 100\n> c 2\n> \n> This seems a little bit unnatural for me. may be i of the thrid row\n> should be 101?\n\nThe action above is definitely 'not right'. It is my opinion that either:\n\n 1. Explicit insertion into a serial column be dis-allowed.\n 2. If explicit insertion is allowed, then the sequence need to be set so\n the next implicit insertsion result in the last explicit insertion\n value + 1 being used (i.e. 101 instead of 2 in the example above).\n\nOf these two options, I prefer #1.\n\nAlso, should we be able to specify a starting value for the sequence when the \ntable is created? For example \"create table t (c text, i serial(1000));\" to \nset the starting value of the sequence to 1000.\n-- \n____ | Billy G. Allie | Domain....: [email protected]\n| /| | 7436 Hartwell | Compuserve: 76337,2061\n|-/-|----- | Dearborn, MI 48126| MSN.......: [email protected]\n|/ |LLIE | (313) 582-1540 | \n\n\n", "msg_date": "Fri, 11 Sep 1998 22:43:09 -0400", "msg_from": "\"Billy G. Allie\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] SERIAL data type " }, { "msg_contents": "> o dropping a table including a serial data type does not drop the \n> sequence corresponding to the table. This prevents re-creating the \n> table. Do we have to remove the sequence by hand?\u0018\u0013\n\nYes, at the moment. I don't have specific plans to change/fix things for\nv6.4, but might be possible. It would be OK if someone else wanted to\npick up the coding and carry it forward...\n\n> 1. Explicit insertion into a serial column be dis-allowed.\n> 2. If explicit insertion is allowed, then the sequence need to be set \n> so the next implicit insertsion result in the last explicit \n> insertion value + 1 being used\n> Of these two options, I prefer #1.\n\nI wonder if we can use the rewrite rules system to implement #1?\n\n> Also, should we be able to specify a starting value for the sequence \n> when the table is created? For example \n> create table t (c text, i serial(1000));\n> to set the starting value of the sequence to 1000.\n\nThere was some discussion of this and at least one person thought it was\nan ugly feature (this is available on Sybase, right?). So I didn't even\ntry to implement it.\n\n - Tom\n", "msg_date": "Sat, 12 Sep 1998 06:09:41 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] SERIAL data type" }, { "msg_contents": "Hello Billy,\n\nsabato, 12 settembre 98, you wrote:\n\nBGA> [email protected] (Tatsuo Ishii) writes:\n>> A few questions for new SERIAL data type:\n>> [...]\n>> o explicit insertion to the serial column sets the value specified.\n>> This is good. However, next implicit insertion results in that\n>> previous value from the sequence + 1 is set.\n>> \n>> create table t (c text, i serial);\n>> insert into t values('a');\n>> insert into t values('b',100);\n>> insert into tvalues('c');\n>> select * from t;\n>> \n>> a 1\n>> b 100\n>> c 2\n>> \n>> This seems a little bit unnatural for me. may be i of the thrid row\n>> should be 101?\n\nBGA> The action above is definitely 'not right'. It is my opinion that either:\n\nBGA> 1. Explicit insertion into a serial column be dis-allowed.\nBGA> 2. If explicit insertion is allowed, then the sequence need to be set so\nBGA> the next implicit insertsion result in the last explicit insertion\nBGA> value + 1 being used (i.e. 101 instead of 2 in the example above).\n\nBGA> Of these two options, I prefer #1.\n\nBGA> Also, should we be able to specify a starting value for the sequence when the \nBGA> table is created? For example \"create table t (c text, i serial(1000));\" to \nBGA> set the starting value of the sequence to 1000.\n\nI would like to remember there's another problem with sequences.\nIf you increment a sequence during a transaction and then the transaction\nrolls back, the sequence's original value don't be restored.\n\n Jose'\n\n\n", "msg_date": "Tue, 15 Sep 1998 13:43:13 +0200", "msg_from": "Sferacarta Software <[email protected]>", "msg_from_op": false, "msg_subject": "Re[2]: [HACKERS] SERIAL data type" }, { "msg_contents": "SS> sabato, 12 settembre 98, you wrote:\n\nBGA>> [email protected] (Tatsuo Ishii) writes:\n>>> A few questions for new SERIAL data type:\n>>> [...]\n>>> o explicit insertion to the serial column sets the value specified.\n>>> This is good. However, next implicit insertion results in that\n>>> previous value from the sequence + 1 is set.\n>>> \n>>> create table t (c text, i serial);\n>>> insert into t values('a');\n>>> insert into t values('b',100);\n>>> insert into tvalues('c');\n>>> select * from t;\n>>> \n>>> a 1\n>>> b 100\n>>> c 2\n>>> \n>>> This seems a little bit unnatural for me. may be i of the thrid row\n>>> should be 101?\n\nBGA>> The action above is definitely 'not right'. It is my opinion that either:\n\nBGA>> 1. Explicit insertion into a serial column be dis-allowed.\nBGA>> 2. If explicit insertion is allowed, then the sequence need to be set so\nBGA>> the next implicit insertsion result in the last explicit insertion\nBGA>> value + 1 being used (i.e. 101 instead of 2 in the example above).\n\nBGA>> Of these two options, I prefer #1.\n\nBGA>> Also, should we be able to specify a starting value for the sequence when the \nBGA>> table is created? For example \"create table t (c text, i serial(1000));\" to \nBGA>> set the starting value of the sequence to 1000.\n\nI would like to remember there's another problem with sequences.\nIf you increment a sequence during a transaction and then the transaction\nrolls back, the sequence's original value don't be restored.\n\n Jose'\n\n\n", "msg_date": "Wed, 16 Sep 1998 15:15:45 +0200", "msg_from": "Sferacarta Software <[email protected]>", "msg_from_op": false, "msg_subject": "Re[3]: [HACKERS] SERIAL data type" } ]
[ { "msg_contents": "I have partially ported the PostgreSQL snapshot of September 9 to Irix\nand wanted to report the results to you so that you could enter the\ncorrections into the source tree. Please let me know if you want\nme to rerun or retest anything. Because of time constraints, I may not\nbe able to respond right away, but I will do my best to get PostgreSQL\n6.4 released on time.\n\nThere were several problems compiling the program. First, the configure\nscript uses the wrong format for int8. The following patch corrects the\nproblem on Irix.\n\n*** ./src/configure\tThu Sep 10 21:46:40 1998\n--- ./src/configure.~1~\tWed Sep 2 03:00:33 1998\n***************\n*** 3720,3726 ****\n #include \"confdefs.h\"\n #include <stdio.h>\n typedef long long int int64;\n! #define INT64_FORMAT \"%lld\"\n \n int64 a = 20000001;\n int64 b = 40000005;\n--- 3720,3726 ----\n #include \"confdefs.h\"\n #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========================================================================\n\nNext, the snprintf function does not compile or link correctly. \nI don't know an easy to make equivalent functionality, so I removed the\ncall in int8.c for now. Obviously, snprintf has to be \nresolved.\n\n*** ./src/backend/utils/adt/int8.c\tFri Sep 11 21:30:57 1998\n--- ./src/backend/utils/adt/int8.c.~1~\tTue Sep 1 03:01:35 1998\n***************\n*** 66,72 ****\n \tif (!PointerIsValid(val))\n \t\treturn NULL;\n \n! \tif ((len = sprintf(buf, INT64_FORMAT, *val)) < 0)\n \t\telog(ERROR, \"Unable to format int8\", NULL);\n \n \tresult = palloc(len + 1);\n--- 66,72 ----\n \tif (!PointerIsValid(val))\n \t\treturn NULL;\n \n! \tif ((len = snprintf(buf, MAXINT8LEN, INT64_FORMAT, *val)) < 0)\n \t\telog(ERROR, \"Unable to format int8\", NULL);\n \n \tresult = palloc(len + 1);\n\n========================================================================\n\nThere is a GNUism remaining in the following file.\n\n*** ./src/backend/storage/lmgr/lock.c\tWed Sep 9 21:07:58 1998\n--- ./src/backend/storage/lmgr/lock.c.~1~\tTue Sep 1 03:01:25 1998\n***************\n*** 136,142 ****\n \t\t xidentP->holders[5], \\\n \t\t xidentP->nHolding)\n \n! #define LOCK_TPRINTF(lock, args) \\\n \tif (((LOCKDEBUG(LOCK_LOCKMETHOD(*(lock))) >= 1) \\\n \t\t && (lock->tag.relId >= lockDebugOidMin)) \\\n \t\t|| (lock->tag.relId == lockDebugRelation)) \\\n--- 136,142 ----\n \t\t xidentP->holders[5], \\\n \t\t xidentP->nHolding)\n \n! #define LOCK_TPRINTF(lock, args...) \\\n \tif (((LOCKDEBUG(LOCK_LOCKMETHOD(*(lock))) >= 1) \\\n \t\t && (lock->tag.relId >= lockDebugOidMin)) \\\n \t\t|| (lock->tag.relId == lockDebugRelation)) \\\n***************\n*** 147,153 ****\n #define LOCK_PRINT_AUX(where,lock,type)\n #define XID_PRINT(where,xidentP)\n #define XID_PRINT_AUX(where,xidentP)\n! #define LOCK_TPRINTF(lock, args)\n #endif\t /* !LOCK_MGR_DEBUG */\n \n static char *lock_types[] = {\n--- 147,153 ----\n #define LOCK_PRINT_AUX(where,lock,type)\n #define XID_PRINT(where,xidentP)\n #define XID_PRINT_AUX(where,xidentP)\n! #define LOCK_TPRINTF(lock, args...)\n #endif\t /* !LOCK_MGR_DEBUG */\n \n static char *lock_types[] = {\n\n========================================================================\n\nThe following patch is critical to getting proper lock function\non the SGI's. This is the most important patch for Irix.\n\n*** ./src/include/port/irix5.h\tFri Sep 11 07:40:47 1998\n--- ./src/include/port/irix5.h.~1~\tSun Sep 7 00:59:54 1997\n***************\n*** 3,6 ****\n #define NO_EMPTY_STMTS\n #define SYSV_DIRENT\n #define HAS_TEST_AND_SET\n! typedef unsigned long slock_t;\n--- 3,7 ----\n #define NO_EMPTY_STMTS\n #define SYSV_DIRENT\n #define HAS_TEST_AND_SET\n! #include <abi_mutex.h>\n! typedef abilock_t slock_t;\n*** ./src/include/storage/s_lock.h\tFri Sep 11 07:40:47 1998\n--- ./src/include/storage/s_lock.h.~1~\tTue Sep 1 03:02:25 1998\n***************\n*** 265,275 ****\n * assembly from his NECEWS SVR4 port, but we probably ought to retain this\n * for the R3000 chips out there.\n */\n! #include <mutex.h>\n! #define TAS(lock)\t(test_and_set(lock,1))\n! #define S_UNLOCK(lock)\t(test_then_and(lock,0))\n! #define S_INIT_LOCK(lock)\t(test_then_and(lock,0))\n! #define S_LOCK_FREE(lock)\t(test_then_add(lock,0) == 0)\n #endif\t /* __sgi */\n \n \n--- 265,274 ----\n * assembly from his NECEWS SVR4 port, but we probably ought to retain this\n * for the R3000 chips out there.\n */\n! #define TAS(lock)\t(!acquire_lock(lock))\n! #define S_UNLOCK(lock)\trelease_lock(lock)\n! #define S_INIT_LOCK(lock)\tinit_lock(lock)\n! #define S_LOCK_FREE(lock)\t(stat_lock(lock) == UNLOCKED)\n #endif\t /* __sgi */\n \n========================================================================\n\nThe interfaces Makefile does not get defined properly for the C++\ncompilations. On my system, the SGI C++ compiler is installed,\nbut the Makefile is built to use g++ and therefore the Makefile\nfails. The following works on my system, but doesn't solve the\nconfiguration problem.\n \n*** ./src/interfaces/Makefile\tWed Sep 9 21:18:50 1998\n--- ./src/interfaces/Makefile.~1~\tThu Aug 27 03:00:35 1998\n***************\n*** 24,40 ****\n .DEFAULT all install clean dep depend distclean: $(perl-makefile-dep)\n \t$(MAKE) -C libpq $@\n \t$(MAKE) -C ecpg $@\n! # ifeq ($(HAVE_Cplusplus), true)\n! # \t$(MAKE) -C libpq++ $@\n! # else\n! # \techo $(HAVE_Cplusplus): No C++\n! # endif\n ifeq ($(USE_TCL), true)\n \t$(MAKE) -C libpgtcl $@\n endif\n! # ifeq ($(USE_PERL), true)\n! # \t$(MAKE) -C perl5 $@\n! # endif\n \n perl5/Makefile: perl5/Makefile.PL\n \tcd perl5 && perl Makefile.PL\n--- 24,40 ----\n .DEFAULT all install clean dep depend distclean: $(perl-makefile-dep)\n \t$(MAKE) -C libpq $@\n \t$(MAKE) -C ecpg $@\n! ifeq ($(HAVE_Cplusplus), true)\n! \t$(MAKE) -C libpq++ $@\n! else\n! \techo $(HAVE_Cplusplus): No C++\n! endif\n ifeq ($(USE_TCL), true)\n \t$(MAKE) -C libpgtcl $@\n endif\n! ifeq ($(USE_PERL), true)\n! \t$(MAKE) -C perl5 $@\n! endif\n \n perl5/Makefile: perl5/Makefile.PL\n \tcd perl5 && perl Makefile.PL\n\n========================================================================\n\nHere are differences found for all the regression tests:\n\n::::::::::::::\nabstime.out.dif\n::::::::::::::\n25c25\n< |Sat May 10 23:59:12 1947 PDT\n---\n> |Sat May 10 23:59:12 1947 PST\n38c38\n< |Sat May 10 23:59:12 1947 PDT\n---\n> |Sat May 10 23:59:12 1947 PST\n50c50\n< |Sat May 10 23:59:12 1947 PDT\n---\n> |Sat May 10 23:59:12 1947 PST\n78c78\n< |Sat May 10 23:59:12 1947 PDT\n---\n> |Sat May 10 23:59:12 1947 PST\n88c88\n< |Sat May 10 23:59:12 1947 PDT\n---\n> |Sat May 10 23:59:12 1947 PST\n109c109\n< |Sat May 10 23:59:12 1947 PDT\n---\n> |Sat May 10 23:59:12 1947 PST\n119c119\n< |Sat May 10 23:59:12 1947 PDT\n---\n> |Sat May 10 23:59:12 1947 PST\n129c129\n< |Sat May 10 23:59:12 1947 PDT\n---\n> |Sat May 10 23:59:12 1947 PST\n139c139\n< |Sat May 10 23:59:12 1947 PDT\n---\n> |Sat May 10 23:59:12 1947 PST\n148,152c148,152\n< |Sat May 10 23:59:12 1947 PDT|@ 14 secs ago\n< |Sat May 10 23:59:12 1947 PDT|@ 1 min \n< |Sat May 10 23:59:12 1947 PDT|@ 5 hours \n< |Sat May 10 23:59:12 1947 PDT|@ 10 days \n< |Sat May 10 23:59:12 1947 PDT|@ 3 mons \n---\n> |Sat May 10 23:59:12 1947 PST|@ 14 secs ago\n> |Sat May 10 23:59:12 1947 PST|@ 1 min \n> |Sat May 10 23:59:12 1947 PST|@ 5 hours \n> |Sat May 10 23:59:12 1947 PST|@ 10 days \n> |Sat May 10 23:59:12 1947 PST|@ 3 mons \n::::::::::::::\nalter_table.out.dif\n::::::::::::::\n13c13\n< ERROR: type name lookup of dt failed\n---\n> ERROR: type name lookup of dt failed\n36c36\n< ERROR: Relation temp does not have attribute k\n---\n> ERROR: Relation temp does not have attribute k\n57c57\n< ERROR: type name lookup of dt failed\n---\n> ERROR: type name lookup of dt failed\n80c80\n< ERROR: Relation temp does not have attribute k\n---\n> ERROR: Relation temp does not have attribute k\n::::::::::::::\nfloat8.out.dif\n::::::::::::::\n206c206,214\n< ERROR: exp() result is out of range\n---\n> bad| ?column?\n> ---+--------------------\n> | 1\n> |7.39912306090513e-16\n> | 0\n> | 0\n> | 1\n> (5 rows)\n> \n::::::::::::::\ngeometry.out.dif\n::::::::::::::\n102c102\n< |(0,0) |[(0,0),(6,6)] |(0,0) \n---\n> |(0,0) |[(0,0),(6,6)] |(-0,0) \n115c115\n< |(-10,0) |[(-1000000,200),(300000,-40)]|(-9.99715942258202,15.3864610140472) \n---\n> |(-10,0) |[(-1000000,200),(300000,-40)]|(-9.99715942258202,15.3864610140473) \n132,134c132,134\n< |(71.7106781186547,72.7106781186547),(-69.7106781186547,-68.7106781186547) \n< |(4.53553390593274,6.53553390593274),(-2.53553390593274,-0.535533905932737)\n< |(3.12132034355964,4.12132034355964),(-1.12132034355964,-0.121320343559642)\n---\n> |(71.7106781186548,72.7106781186548),(-69.7106781186548,-68.7106781186548) \n> |(4.53553390593274,6.53553390593274),(-2.53553390593274,-0.535533905932738)\n> |(3.12132034355964,4.12132034355964),(-1.12132034355964,-0.121320343559643)\n136c136\n< |(170.710678118655,70.7106781186547),(29.2893218813453,-70.7106781186547) \n---\n> |(170.710678118655,70.7106781186548),(29.2893218813452,-70.7106781186548) \n207c207\n< |(0,0),(-20,-20) \n---\n> |(-0,0),(-20,-20) \n211c211\n< |(0,2),(-14,0) \n---\n> |(-0,2),(-14,0) \n219c219\n< |(14,0),(0,-34) \n---\n> |(14,-0),(0,-34) \n234c234\n< |(0,0),(-0.2,-0.2) \n---\n> |(0,-0),(-0.2,-0.2) \n238c238\n< |(0.08,0),(0,-0.56) \n---\n> |(0.08,-0),(0,-0.56) \n246c246\n< |(0,0.0828402366863905),(-0.201183431952663,0) \n---\n> |(-0,0.0828402366863905),(-0.201183431952663,0) \n411,418c411,418\n< six|polygon \n< ---+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n< |((-3,0),(-2.59807621135076,1.50000000000442),(-1.49999999999116,2.59807621135842),(1.53104195987908e-11,3),(1.50000000001768,2.59807621134311),(2.59807621136607,1.4999999999779),(3,-3.06208391975815e-11),(2.59807621133545,-1.50000000003094),(1.49999999996464,-2.59807621137373),(-4.59312587963723e-11,-3),(-1.5000000000442,-2.5980762113278),(-2.59807621138139,-1.49999999995138))\n< |((-99,2),(-85.6025403783588,52.0000000001473),(-48.9999999997054,88.602540378614),(1.00000000051035,102),(51.0000000005893,88.6025403781036),(87.6025403788692,51.9999999992634),(101,1.99999999897931),(87.6025403778485,-48.0000000010313),(50.9999999988214,-84.6025403791243),(0.999999998468958,-98),(-49.0000000014732,-84.6025403775933),(-85.6025403793795,-47.9999999983794)) \n< |((-4,3),(-3.33012701891794,5.50000000000737),(-1.49999999998527,7.3301270189307),(1.00000000002552,8),(3.50000000002946,7.33012701890518),(5.33012701894346,5.49999999996317),(6,2.99999999994897),(5.33012701889242,0.499999999948436),(3.49999999994107,-1.33012701895622),(0.999999999923448,-2),(-1.50000000007366,-1.33012701887966),(-3.33012701896897,0.500000000081029)) \n< |((-2,2),(-1.59807621135076,3.50000000000442),(-0.499999999991161,4.59807621135842),(1.00000000001531,5),(2.50000000001768,4.59807621134311),(3.59807621136607,3.4999999999779),(4,1.99999999996938),(3.59807621133545,0.499999999969062),(2.49999999996464,-0.59807621137373),(0.999999999954069,-1),(-0.500000000044197,-0.598076211327799),(-1.59807621138139,0.500000000048617)) \n< |((90,200),(91.3397459621641,205.000000000015),(95.0000000000295,208.660254037861),(100.000000000051,210),(105.000000000059,208.66025403781),(108.660254037887,204.999999999926),(110,199.999999999898),(108.660254037785,194.999999999897),(104.999999999882,191.339745962088),(99.9999999998469,190),(94.9999999998527,191.339745962241),(91.3397459620621,195.000000000162)) \n< |((0,0),(13.3974596216412,50.0000000001473),(50.0000000002946,86.602540378614),(100.00000000051,100),(150.000000000589,86.6025403781036),(186.602540378869,49.9999999992634),(200,-1.02069463991938e-09),(186.602540377848,-50.0000000010313),(149.999999998821,-86.6025403791243),(99.999999998469,-100),(49.9999999985268,-86.6025403775933),(13.3974596206205,-49.9999999983794)) \n---\n> six|polygon \n> ---+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n> |((-3,0),(-2.59807621135332,1.5),(-1.5,2.59807621135332),(-1.83690953073357e-16,3),(1.5,2.59807621135332),(2.59807621135332,1.5),(3,3.67381906146713e-16),(2.59807621135332,-1.5),(1.5,-2.59807621135332),(5.5107285922007e-16,-3),(-1.5,-2.59807621135332),(-2.59807621135332,-1.5))\n> |((-99,2),(-85.6025403784439,52),(-49,88.6025403784439),(0.999999999999994,102),(51,88.6025403784439),(87.6025403784439,52),(101,2.00000000000001),(87.6025403784439,-48),(51,-84.6025403784438),(1.00000000000002,-98),(-49,-84.6025403784439),(-85.6025403784438,-48)) \n> |((-4,3),(-3.33012701892219,5.5),(-1.5,7.33012701892219),(1,8),(3.5,7.33012701892219),(5.33012701892219,5.5),(6,3),(5.33012701892219,0.500000000000001),(3.5,-1.33012701892219),(1,-2),(-1.5,-1.33012701892219),(-3.33012701892219,0.499999999999998)) \n> |((-2,2),(-1.59807621135332,3.5),(-0.5,4.59807621135332),(1,5),(2.5,4.59807621135332),(3.59807621135332,3.5),(4,2),(3.59807621135332,0.500000000000001),(2.5,-0.598076211353315),(1,-1),(-0.5,-0.598076211353316),(-1.59807621135332,0.499999999999999)) \n> |((90,200),(91.3397459621556,205),(95,208.660254037844),(100,210),(105,208.660254037844),(108.660254037844,205),(110,200),(108.660254037844,195),(105,191.339745962156),(100,190),(95,191.339745962156),(91.3397459621556,195)) \n> |((0,0),(13.3974596215561,50),(50,86.6025403784439),(100,100),(150,86.6025403784439),(186.602540378444,50),(200,1.22460635382238e-14),(186.602540378444,-50),(150,-86.6025403784438),(100,-100),(50,-86.6025403784439),(13.3974596215562,-50)) \n423,430c423,430\n< six|polygon \n< ---+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n< |((-3,0),(-2.12132034355423,2.12132034356506),(1.53104195987908e-11,3),(2.12132034357588,2.1213203435434),(3,-3.06208391975815e-11),(2.12132034353258,-2.12132034358671),(-4.59312587963723e-11,-3),(-2.12132034359753,-2.12132034352175))\n< |((-99,2),(-69.7106781184743,72.7106781188352),(1.00000000051035,102),(71.7106781191961,72.7106781181134),(101,1.99999999897931),(71.7106781177526,-68.7106781195569),(0.999999998468958,-98),(-69.7106781199178,-68.7106781173917)) \n< |((-4,3),(-2.53553390592372,6.53553390594176),(1.00000000002552,8),(4.5355339059598,6.53553390590567),(6,2.99999999994897),(4.53553390588763,-0.535533905977846),(0.999999999923448,-2),(-2.53553390599589,-0.535533905869586)) \n< |((-2,2),(-1.12132034355423,4.12132034356506),(1.00000000001531,5),(3.12132034357588,4.1213203435434),(4,1.99999999996938),(3.12132034353258,-0.121320343586708),(0.999999999954069,-1),(-1.12132034359753,-0.121320343521751)) \n< |((90,200),(92.9289321881526,207.071067811884),(100.000000000051,210),(107.07106781192,207.071067811811),(110,199.999999999898),(107.071067811775,192.928932188044),(99.9999999998469,190),(92.9289321880082,192.928932188261)) \n< |((0,0),(29.2893218815257,70.7106781188352),(100.00000000051,100),(170.710678119196,70.7106781181134),(200,-1.02069463991938e-09),(170.710678117753,-70.7106781195569),(99.999999998469,-100),(29.2893218800822,-70.7106781173917)) \n---\n> six|polygon \n> ---+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n> |((-3,0),(-2.12132034355964,2.12132034355964),(-1.83690953073357e-16,3),(2.12132034355964,2.12132034355964),(3,3.67381906146713e-16),(2.12132034355964,-2.12132034355964),(5.5107285922007e-16,-3),(-2.12132034355964,-2.12132034355964))\n> |((-99,2),(-69.7106781186548,72.7106781186548),(0.999999999999994,102),(71.7106781186547,72.7106781186548),(101,2.00000000000001),(71.7106781186548,-68.7106781186547),(1.00000000000002,-98),(-69.7106781186547,-68.7106781186548)) \n> |((-4,3),(-2.53553390593274,6.53553390593274),(1,8),(4.53553390593274,6.53553390593274),(6,3),(4.53553390593274,-0.535533905932737),(1,-2),(-2.53553390593274,-0.535533905932738)) \n> |((-2,2),(-1.12132034355964,4.12132034355964),(1,5),(3.12132034355964,4.12132034355964),(4,2),(3.12132034355964,-0.121320343559642),(1,-1),(-1.12132034355964,-0.121320343559643)) \n> |((90,200),(92.9289321881345,207.071067811865),(100,210),(107.071067811865,207.071067811865),(110,200),(107.071067811865,192.928932188135),(100,190),(92.9289321881345,192.928932188135)) \n> |((0,0),(29.2893218813452,70.7106781186548),(100,100),(170.710678118655,70.7106781186548),(200,1.22460635382238e-14),(170.710678118655,-70.7106781186547),(100,-100),(29.2893218813453,-70.7106781186548)) \n468,493c468,493\n< twentyfour|circle |point | distance\n< ----------+--------------+----------+----------------\n< |<(100,0),100> |(5.1,34.5)|0.97653192697797\n< |<(1,2),3> |(-3,4) |1.47213595499958\n< |<(0,0),3> |(-3,4) | 2\n< |<(100,0),100> |(-3,4) |3.07764064044152\n< |<(100,0),100> |(-5,-12) |5.68348972285122\n< |<(1,3),5> |(-10,0) |6.40175425099138\n< |<(1,3),5> |(10,10) |6.40175425099138\n< |<(0,0),3> |(-10,0) | 7\n< |<(1,2),3> |(-10,0) |8.18033988749895\n< |<(1,2),3> |(10,10) | 9.0415945787923\n< |<(0,0),3> |(-5,-12) | 10\n< |<(100,0),100> |(-10,0) | 10\n< |<(0,0),3> |(10,10) | 11.142135623731\n< |<(1,3),5> |(-5,-12) |11.1554944214035\n< |<(1,2),3> |(-5,-12) |12.2315462117278\n< |<(1,3),5> |(5.1,34.5)|26.7657047773223\n< |<(1,2),3> |(5.1,34.5)| 29.757594539282\n< |<(0,0),3> |(5.1,34.5)|31.8749193547455\n< |<(100,200),10>|(5.1,34.5)|180.778038568384\n< |<(100,200),10>|(10,10) |200.237960416286\n< |<(100,200),10>|(-3,4) |211.415898254845\n< |<(100,200),10>|(0,0) |213.606797749979\n< |<(100,200),10>|(-10,0) |218.254244210267\n< |<(100,200),10>|(-5,-12) |226.577682802077\n---\n> twentyfour|circle |point | distance\n> ----------+--------------+----------+-----------------\n> |<(100,0),100> |(5.1,34.5)|0.976531926977964\n> |<(1,2),3> |(-3,4) | 1.47213595499958\n> |<(0,0),3> |(-3,4) | 2\n> |<(100,0),100> |(-3,4) | 3.07764064044151\n> |<(100,0),100> |(-5,-12) | 5.68348972285122\n> |<(1,3),5> |(-10,0) | 6.40175425099138\n> |<(1,3),5> |(10,10) | 6.40175425099138\n> |<(0,0),3> |(-10,0) | 7\n> |<(1,2),3> |(-10,0) | 8.18033988749895\n> |<(1,2),3> |(10,10) | 9.0415945787923\n> |<(0,0),3> |(-5,-12) | 10\n> |<(100,0),100> |(-10,0) | 10\n> |<(0,0),3> |(10,10) | 11.142135623731\n> |<(1,3),5> |(-5,-12) | 11.1554944214035\n> |<(1,2),3> |(-5,-12) | 12.2315462117278\n> |<(1,3),5> |(5.1,34.5)| 26.7657047773224\n> |<(1,2),3> |(5.1,34.5)| 29.757594539282\n> |<(0,0),3> |(5.1,34.5)| 31.8749193547455\n> |<(100,200),10>|(5.1,34.5)| 180.778038568384\n> |<(100,200),10>|(10,10) | 200.237960416286\n> |<(100,200),10>|(-3,4) | 211.415898254845\n> |<(100,200),10>|(0,0) | 213.606797749979\n> |<(100,200),10>|(-10,0) | 218.254244210267\n> |<(100,200),10>|(-5,-12) | 226.577682802077\n::::::::::::::\nhorology.out.dif\n::::::::::::::\n433c433\n< |Sat May 10 23:59:12 1947 PDT|1947| 5| 10| 23| 59| 12\n---\n> |Sat May 10 23:59:12 1947 PST|1947| 5| 10| 23| 59| 12\n480c480\n< |Sat May 10 23:59:12 1947 PDT|05-10-1947\n---\n> |Sat May 10 23:59:12 1947 PST|05-10-1947\n614c614\n< |Sat May 10 23:59:12 1947 PDT\n---\n> |Sat May 10 23:59:12 1947 PST\n695c695\n< |1947-05-10 23:59:12-07\n---\n> |1947-05-10 23:59:12-08\n778c778\n< |05/10/1947 23:59:12.00 PDT\n---\n> |05/10/1947 23:59:12.00 PST\n869c869\n< |Sat 10 May 23:59:12 1947 PDT\n---\n> |Sat 10 May 23:59:12 1947 PST\n953c953\n< |1947-05-10 23:59:12-07\n---\n> |1947-05-10 23:59:12-08\n1037c1037\n< |10/05/1947 23:59:12.00 PDT\n---\n> |10/05/1947 23:59:12.00 PST\n1124c1124\n< |Sat May 10 23:59:12 1947 PDT\n---\n> |Sat May 10 23:59:12 1947 PST\n1206c1206\n< |1947-05-10 23:59:12-07\n---\n> |1947-05-10 23:59:12-08\n1290c1290\n< |05/10/1947 23:59:12.00 PDT\n---\n> |05/10/1947 23:59:12.00 PST\n1382c1382\n< |Sat 10 May 23:59:12 1947 PDT\n---\n> |Sat 10 May 23:59:12 1947 PST\n1467c1467\n< |1947-05-10 23:59:12-07\n---\n> |1947-05-10 23:59:12-08\n1552c1552\n< |10/05/1947 23:59:12.00 PDT\n---\n> |10/05/1947 23:59:12.00 PST\n::::::::::::::\nint2.out.dif\n::::::::::::::\n10c10\n< ERROR: pg_atoi: error reading \"100000\": Result too large\n---\n> ERROR: pg_atoi: error reading \"100000\": Math result not representable\n::::::::::::::\nint4.out.dif\n::::::::::::::\n10c10\n< ERROR: pg_atoi: error reading \"1000000000000\": Result too large\n---\n> ERROR: pg_atoi: error reading \"1000000000000\": Math result not representable\n::::::::::::::\nrun_ruletest.out.dif\n::::::::::::::\n230d229\n< jwieck|notjw \n231a231\n> jwieck|notjw \n256,262c256,262\n< ename |who |action |newsal |oldsal \n< --------------------+--------+----------+----------+----------\n< wiech |postgres|hired |$5,000.00 |$0.00 \n< gates |postgres|hired |$80,000.00|$0.00 \n< wieck |postgres|honored |$6,000.00 |$5,000.00 \n< wieck |postgres|honored |$7,000.00 |$6,000.00 \n< gates |postgres|fired |$0.00 |$80,000.00\n---\n> ename |who |action |newsal |oldsal \n> --------------------+-----+----------+----------+----------\n> wiech |pgsql|hired |$5,000.00 |$0.00 \n> gates |pgsql|hired |$80,000.00|$0.00 \n> wieck |pgsql|honored |$6,000.00 |$5,000.00 \n> wieck |pgsql|honored |$7,000.00 |$6,000.00 \n> gates |pgsql|fired |$0.00 |$80,000.00\n270,279c270,279\n< ename |who |action |newsal |oldsal \n< --------------------+--------+----------+----------+----------\n< wiech |postgres|hired |$5,000.00 |$0.00 \n< gates |postgres|hired |$80,000.00|$0.00 \n< wieck |postgres|honored |$6,000.00 |$5,000.00 \n< wieck |postgres|honored |$7,000.00 |$6,000.00 \n< gates |postgres|fired |$0.00 |$80,000.00\n< meyer |postgres|hired |$4,000.00 |$0.00 \n< maier |postgres|hired |$5,000.00 |$0.00 \n< mayr |postgres|hired |$6,000.00 |$0.00 \n---\n> ename |who |action |newsal |oldsal \n> --------------------+-----+----------+----------+----------\n> wiech |pgsql|hired |$5,000.00 |$0.00 \n> gates |pgsql|hired |$80,000.00|$0.00 \n> wieck |pgsql|honored |$6,000.00 |$5,000.00 \n> wieck |pgsql|honored |$7,000.00 |$6,000.00 \n> gates |pgsql|fired |$0.00 |$80,000.00\n> meyer |pgsql|hired |$4,000.00 |$0.00 \n> maier |pgsql|hired |$5,000.00 |$0.00 \n> mayr |pgsql|hired |$6,000.00 |$0.00 \n285,297c285,297\n< ename |who |action |newsal |oldsal \n< --------------------+--------+----------+----------+----------\n< wiech |postgres|hired |$5,000.00 |$0.00 \n< gates |postgres|hired |$80,000.00|$0.00 \n< wieck |postgres|honored |$6,000.00 |$5,000.00 \n< wieck |postgres|honored |$7,000.00 |$6,000.00 \n< gates |postgres|fired |$0.00 |$80,000.00\n< meyer |postgres|hired |$4,000.00 |$0.00 \n< maier |postgres|hired |$5,000.00 |$0.00 \n< mayr |postgres|hired |$6,000.00 |$0.00 \n< maier |postgres|honored |$6,000.00 |$5,000.00 \n< mayr |postgres|honored |$7,000.00 |$6,000.00 \n< meyer |postgres|honored |$5,000.00 |$4,000.00 \n---\n> ename |who |action |newsal |oldsal \n> --------------------+-----+----------+----------+----------\n> wiech |pgsql|hired |$5,000.00 |$0.00 \n> gates |pgsql|hired |$80,000.00|$0.00 \n> wieck |pgsql|honored |$6,000.00 |$5,000.00 \n> wieck |pgsql|honored |$7,000.00 |$6,000.00 \n> gates |pgsql|fired |$0.00 |$80,000.00\n> meyer |pgsql|hired |$4,000.00 |$0.00 \n> maier |pgsql|hired |$5,000.00 |$0.00 \n> mayr |pgsql|hired |$6,000.00 |$0.00 \n> maier |pgsql|honored |$6,000.00 |$5,000.00 \n> mayr |pgsql|honored |$7,000.00 |$6,000.00 \n> meyer |pgsql|honored |$5,000.00 |$4,000.00 \n302,317c302,317\n< ename |who |action |newsal |oldsal \n< --------------------+--------+----------+----------+----------\n< wiech |postgres|hired |$5,000.00 |$0.00 \n< gates |postgres|hired |$80,000.00|$0.00 \n< wieck |postgres|honored |$6,000.00 |$5,000.00 \n< wieck |postgres|honored |$7,000.00 |$6,000.00 \n< gates |postgres|fired |$0.00 |$80,000.00\n< meyer |postgres|hired |$4,000.00 |$0.00 \n< maier |postgres|hired |$5,000.00 |$0.00 \n< mayr |postgres|hired |$6,000.00 |$0.00 \n< maier |postgres|honored |$6,000.00 |$5,000.00 \n< mayr |postgres|honored |$7,000.00 |$6,000.00 \n< meyer |postgres|honored |$5,000.00 |$4,000.00 \n< maier |postgres|fired |$0.00 |$6,000.00 \n< mayr |postgres|fired |$0.00 |$7,000.00 \n< meyer |postgres|fired |$0.00 |$5,000.00 \n---\n> ename |who |action |newsal |oldsal \n> --------------------+-----+----------+----------+----------\n> wiech |pgsql|hired |$5,000.00 |$0.00 \n> gates |pgsql|hired |$80,000.00|$0.00 \n> wieck |pgsql|honored |$6,000.00 |$5,000.00 \n> wieck |pgsql|honored |$7,000.00 |$6,000.00 \n> gates |pgsql|fired |$0.00 |$80,000.00\n> meyer |pgsql|hired |$4,000.00 |$0.00 \n> maier |pgsql|hired |$5,000.00 |$0.00 \n> mayr |pgsql|hired |$6,000.00 |$0.00 \n> maier |pgsql|honored |$6,000.00 |$5,000.00 \n> mayr |pgsql|honored |$7,000.00 |$6,000.00 \n> meyer |pgsql|honored |$5,000.00 |$4,000.00 \n> maier |pgsql|fired |$0.00 |$6,000.00 \n> mayr |pgsql|fired |$0.00 |$7,000.00 \n> meyer |pgsql|fired |$0.00 |$5,000.00 \n::::::::::::::\ntinterval.out.dif\n::::::::::::::\n22c22\n< |[\"Sat May 10 23:59:12 1947 PDT\" \"Sun Jan 14 03:14:21 1973 PST\"]\n---\n> |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n41c41\n< |[\"Sat May 10 23:59:12 1947 PDT\" \"Sun Jan 14 03:14:21 1973 PST\"]\n---\n> |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n66c66\n< |[\"Sat May 10 23:59:12 1947 PDT\" \"Sun Jan 14 03:14:21 1973 PST\"]\n---\n> |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n76c76\n< |[\"Sat May 10 23:59:12 1947 PDT\" \"Sun Jan 14 03:14:21 1973 PST\"]\n---\n> |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n101c101\n< |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] \n---\n> |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]|[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n104c104\n< |[\"Sat May 10 23:59:12 1947 PDT\" \"Sun Jan 14 03:14:21 1973 PST\"]|[\"Sat May 10 23:59:12 1947 PDT\" \"Sun Jan 14 03:14:21 1973 PST\"]\n---\n> |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] \n112a113,114\n> |[\"-infinity\" \"infinity\"] |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n> |[\"-infinity\" \"infinity\"] |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]\n115,117c117\n< |[\"-infinity\" \"infinity\"] |[\"Sat May 10 23:59:12 1947 PDT\" \"Sun Jan 14 03:14:21 1973 PST\"]\n< |[\"-infinity\" \"infinity\"] |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]\n< |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] |[\"-infinity\" \"infinity\"] \n---\n> |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]|[\"-infinity\" \"infinity\"] \n119,122c119,122\n< |[\"Sat May 10 23:59:12 1947 PDT\" \"Sun Jan 14 03:14:21 1973 PST\"]|[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n< |[\"Sat May 10 23:59:12 1947 PDT\" \"Sun Jan 14 03:14:21 1973 PST\"]|[\"-infinity\" \"infinity\"] \n< |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] |[\"Sat May 10 23:59:12 1947 PDT\" \"Sun Jan 14 03:14:21 1973 PST\"]\n< |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n---\n> |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]|[\"-infinity\" \"infinity\"] \n> |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] |[\"-infinity\" \"infinity\"] \n> |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n> |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]|[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n126c126\n< |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]|[\"-infinity\" \"infinity\"] \n---\n> |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n136c136\n< |[\"Sat May 10 23:59:12 1947 PDT\" \"Sun Jan 14 03:14:21 1973 PST\"]\n---\n> |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n\n+------------------------------------------+------------------------------+\n| Robert E. Bruccoleri, Ph.D. | Associate Research Professor |\n| phone: 732 235 5796 | Center for Advanced |\n| Fax: 732 235 4850 | Biotechnology and Medicine |\n| email: [email protected] | Rutgers University |\n| URL: http://www.cabm.rutgers.edu/~bruc | 679 Hoes Lane |\n| | Piscataway, NJ 08854-5638 |\n+------------------------------------------+------------------------------+\n", "msg_date": "Fri, 11 Sep 1998 23:24:02 -0400 (EDT)", "msg_from": "Robert Bruccoleri <[email protected]>", "msg_from_op": true, "msg_subject": "Porting effort and patches for the Irix port for PostgreSQL" }, { "msg_contents": "> I have partially ported the PostgreSQL snapshot of September 9 to Irix\n> and wanted to report the results to you so that you could enter the\n> corrections into the source tree. Please let me know if you want\n> me to rerun or retest anything. Because of time constraints, I may not\n> be able to respond right away, but I will do my best to get PostgreSQL\n> 6.4 released on time.\n> \n> There were several problems compiling the program. First, the configure\n> script uses the wrong format for int8. The following patch corrects the\n> problem on Irix.\n\nRobert, in the past two days, we have made fixes to the int8 and c++\nmake handling, and I assume your patches are perhaps no longer needed. \nThe define with ... and the snprintf() problems were also addressed.\n\nI have applied the Irix lock patch. Please check a current snapshot and\nsee if any of the other patches are needed. 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": "Sat, 12 Sep 1998 12:11:00 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Porting effort and patches for the Irix port for PostgreSQL" } ]
[ { "msg_contents": "Hi,\n\nCan anyone else reproduce this problem?\n(Maybe a signal handling problem on S/Linux??)\n\nUsing the regression database...\n\nKeith.\n\n\nregression=> select * from person where age in (38,68);\nname |age|location\n-------+---+----------\nteresa | 38|(7.7,1.8)\nleah | 68|(0.6,3.37)\nliza | 38|(9.76,6.9)\njenifer| 38|(6.6,23.3)\nsumi | 38|(1.15,0.6)\npaula | 68|(0.5,0.5)\njulie | 68|(3.6,7.2)\nbelinda| 38|(8.9,1.7)\nsandy | 38|(3.8,0.2)\nvelma | 68|(8.8,8.9)\n(10 rows)\n\nregression=> create index p_age_idx on person (age);\nCREATE\nregression=> select * from person where age in (38,68);\nERROR: floating point exception! The last floating point operation either \nexceeded legal ranges or was a divide by zero\nregression=> drop index p_age_idx;\nDROP\nregression=> select * from person where age in (38,68);\nname |age|location\n-------+---+----------\nteresa | 38|(7.7,1.8)\nleah | 68|(0.6,3.37)\nliza | 38|(9.76,6.9)\njenifer| 38|(6.6,23.3)\nsumi | 38|(1.15,0.6)\npaula | 68|(0.5,0.5)\njulie | 68|(3.6,7.2)\nbelinda| 38|(8.9,1.7)\nsandy | 38|(3.8,0.2)\nvelma | 68|(8.8,8.9)\n(10 rows)\n\nregression=> \n\nHere's a trace.\n\nProgram received signal SIGFPE, Arithmetic exception.\n0x931c4 in create_or_index_paths (root=0x1d7d10, rel=0x1efb90, clauses=0x1f9270) \nat orindxpath.c:128\n128 t_list = lappend(t_list, pathnode);\n(gdb) bt\n#0 0x931c4 in create_or_index_paths (root=0x1d7d10, rel=0x1efb90, \nclauses=0x1f9270) at orindxpath.c:128\n#1 0x8f0fc in find_rel_paths (root=0x1d7d10, rels=0x1f9510) at allpaths.c:130\n#2 0x8f06c in find_paths (root=0x1d7d10, rels=0x1f9510) at allpaths.c:77\n#3 0x94d48 in subplanner (root=0x1d7d10, flat_tlist=0x1f96f0, qual=0x1f9950) at \nplanmain.c:279\n#4 0x94c30 in query_planner (root=0x1d7d10, command_type=1, tlist=0x1f43f0, \nqual=0x1f9950) at planmain.c:183\n#5 0x953c0 in union_planner (parse=0x1d7d10) at planner.c:151\n#6 0x95228 in planner (parse=0x1d7d10) at planner.c:72\n#7 0xccf1c in pg_parse_and_plan (query_string=0xefffd1a0 \"select * from person \nwhere age in (38,68);\",\n typev=0x0, nargs=0, queryListP=0xefffd09c, dest=Remote, aclOverride=0 \n'\\000') at postgres.c:626\n#8 0xcd040 in pg_exec_query_dest (query_string=0xefffd1a0 \"select * from person \nwhere age in (38,68);\",\n dest=Remote, aclOverride=0 '\\000') at postgres.c:720\n#9 0xccff4 in pg_exec_query (query_string=0xefffd1a0 \"select * from person \nwhere age in (38,68);\")\n at postgres.c:697\n#10 0xce2e4 in PostgresMain (argc=10, argv=0xeffff268, real_argc=10, \nreal_argv=0xeffffd84) at postgres.c:1611\n#11 0xb1fcc in DoBackend (port=0x12d800) at postmaster.c:1528\n#12 0xb1a44 in BackendStartup (port=0x190c00) at postmaster.c:1299\n#13 0xb0ebc in ServerLoop () at postmaster.c:757\n#14 0xb0a04 in PostmasterMain (argc=0, argv=0xeffffd84) at postmaster.c:563\n#15 0x83870 in main (argc=10, argv=0xeffffd84) at main.c:93\n(gdb) print t_list\n$1 = (List *) 0x0\n(gdb) print pathnode\n$2 = (IndexPath *) 0x1ef210\n(gdb) print *pathnode\n$3 = {path = {type = T_IndexPath, parent = 0x1efb90, path_cost = 4.0999999, \npathtype = T_IndexScan,\n p_ordering = {ordtype = MERGE_ORDER, ord = {sortop = 0x0, merge = 0x0}}, \nkeys = 0x0, outerjoincost = 0,\n joinid = 0x0, locclauseinfo = 0x0}, indexid = 0x1e5dd0, indexqual = \n0x1e5b90, indexkeys = 0x0}\n(gdb) \n\n", "msg_date": "Sat, 12 Sep 1998 14:56:39 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Exception in select IN with index" }, { "msg_contents": "In message <[email protected]>, Keith Parks writes:\n> Hi,\n> \n> Can anyone else reproduce this problem?\n> (Maybe a signal handling problem on S/Linux??)\n> \n> Using the regression database...\n> \n> Keith.\n> \n> \n> regression=> select * from person where age in (38,68);\n> name |age|location\n> -------+---+----------\n> teresa | 38|(7.7,1.8)\n> leah | 68|(0.6,3.37)\n> liza | 38|(9.76,6.9)\n> jenifer| 38|(6.6,23.3)\n> sumi | 38|(1.15,0.6)\n> paula | 68|(0.5,0.5)\n> julie | 68|(3.6,7.2)\n> belinda| 38|(8.9,1.7)\n> sandy | 38|(3.8,0.2)\n> velma | 68|(8.8,8.9)\n> (10 rows)\n> \n> regression=> create index p_age_idx on person (age);\n> CREATE\n> regression=> select * from person where age in (38,68);\n> ERROR: floating point exception! The last floating point operation either \n> exceeded legal ranges or was a divide by zero\n> regression=> drop index p_age_idx;\n> DROP\n> regression=> select * from person where age in (38,68);\n> name |age|location\n> -------+---+----------\n> teresa | 38|(7.7,1.8)\n> leah | 68|(0.6,3.37)\n> liza | 38|(9.76,6.9)\n> jenifer| 38|(6.6,23.3)\n> sumi | 38|(1.15,0.6)\n> paula | 68|(0.5,0.5)\n> julie | 68|(3.6,7.2)\n> belinda| 38|(8.9,1.7)\n> sandy | 38|(3.8,0.2)\n> velma | 68|(8.8,8.9)\n> (10 rows)\n> \n> regression=> \n> \n> Here's a trace.\n> \n> Program received signal SIGFPE, Arithmetic exception.\n> 0x931c4 in create_or_index_paths (root=0x1d7d10, rel=0x1efb90, clauses=0x1f9270) \n> at orindxpath.c:128\n> 128 t_list = lappend(t_list, pathnode);\n> (gdb) bt\n> #0 0x931c4 in create_or_index_paths (root=0x1d7d10, rel=0x1efb90, \n> clauses=0x1f9270) at orindxpath.c:128\n> #1 0x8f0fc in find_rel_paths (root=0x1d7d10, rels=0x1f9510) at allpaths.c:130\n> #2 0x8f06c in find_paths (root=0x1d7d10, rels=0x1f9510) at allpaths.c:77\n> #3 0x94d48 in subplanner (root=0x1d7d10, flat_tlist=0x1f96f0, qual=0x1f9950) at \n> planmain.c:279\n> #4 0x94c30 in query_planner (root=0x1d7d10, command_type=1, tlist=0x1f43f0, \n> qual=0x1f9950) at planmain.c:183\n> #5 0x953c0 in union_planner (parse=0x1d7d10) at planner.c:151\n> #6 0x95228 in planner (parse=0x1d7d10) at planner.c:72\n> #7 0xccf1c in pg_parse_and_plan (query_string=0xefffd1a0 \"select * from person \n> where age in (38,68);\",\n> typev=0x0, nargs=0, queryListP=0xefffd09c, dest=Remote, aclOverride=0 \n> '\\000') at postgres.c:626\n> #8 0xcd040 in pg_exec_query_dest (query_string=0xefffd1a0 \"select * from person \n> where age in (38,68);\",\n> dest=Remote, aclOverride=0 '\\000') at postgres.c:720\n> #9 0xccff4 in pg_exec_query (query_string=0xefffd1a0 \"select * from person \n> where age in (38,68);\")\n> at postgres.c:697\n> #10 0xce2e4 in PostgresMain (argc=10, argv=0xeffff268, real_argc=10, \n> real_argv=0xeffffd84) at postgres.c:1611\n> #11 0xb1fcc in DoBackend (port=0x12d800) at postmaster.c:1528\n> #12 0xb1a44 in BackendStartup (port=0x190c00) at postmaster.c:1299\n> #13 0xb0ebc in ServerLoop () at postmaster.c:757\n> #14 0xb0a04 in PostmasterMain (argc=0, argv=0xeffffd84) at postmaster.c:563\n> #15 0x83870 in main (argc=10, argv=0xeffffd84) at main.c:93\n> (gdb) print t_list\n> $1 = (List *) 0x0\n> (gdb) print pathnode\n> $2 = (IndexPath *) 0x1ef210\n> (gdb) print *pathnode\n> $3 = {path = {type = T_IndexPath, parent = 0x1efb90, path_cost = 4.0999999, \n> pathtype = T_IndexScan,\n> p_ordering = {ordtype = MERGE_ORDER, ord = {sortop = 0x0, merge = 0x0}}, \n> keys = 0x0, outerjoincost = 0,\n> joinid = 0x0, locclauseinfo = 0x0}, indexid = 0x1e5dd0, indexqual = \n> 0x1e5b90, indexkeys = 0x0}\n> (gdb) \n> \n> \n> \n\nSorry Keith, It works on my Sparc 20 running S/Linux. I'm using a cvs copy \nfrom sometime on Sept 10. It also works on my solaris 2.6 box (ultra 30).\n\n\nTom Szybist\[email protected]\n\n", "msg_date": "Sat, 12 Sep 1998 11:35:46 -0400", "msg_from": "\"Thomas A. Szybist\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Exception in select IN with index " }, { "msg_contents": "From: Tom Lane <[email protected]>\n> \n> Keith Parks <[email protected]> writes:\n> > Platform SPARC Linux 2.0.36, latest CVS.\n> \n> SPARC Linux? Didn't know there was such a thing. You should look at\n\nIt's been around for a while and is very good.\n\n> the machine-dependent assembly coding in s_lock.h and s_lock.c. Perhaps\n> the #ifdefs are messed up such that the wrong bit of code is being\n> selected for your platform. (We do have spinlock code for SPARC, IIRC,\n> but I wonder whether it gets selected if the platform name is linux ...)\n\nWe appear to have spinlock on this platform and it looks like it works,\nsee below.\n\n> \n> If the failure just started appearing recently then this probably ain't\n> the answer :-(\n\nIt's the 1st time I've had a play with the \"bench\" code so I can't\nsay if it has ever worked.\n\nThe odd thing is that there was nothing else running, no postmaster,\nno backends, nothing. It would seem like it's locking itself!!\n\nIt's not a major problem to me as everything else works OK, even the\nregression tests are 100% excepting error message and precision\ndifferences.\n\nKeith.\n\n> \n> \t\t\tregards, tom lane\n\n\n[postgres@sparclinux buffer]$ make s_lock_test\ngcc -I../../../include -I../../../backend -O2 -Wall -Wmissing-prototypes -I../.. -DS_LOCK_TEST=1 s_lock.c -o s_lock_test\n./s_lock_test\nS_LOCK_TEST: this will hang for a few minutes and then abort\n with a 'stuck spinlock' message if S_LOCK()\n and TAS() are working.\n\nFATAL: s_lock(00020bf0) at s_lock.c:271, stuck spinlock. Aborting.\n\nFATAL: s_lock(00020bf0) at s_lock.c:271, stuck spinlock. Aborting.\nmake: *** [s_lock_test] IOT trap/Abort (core dumped)\nmake: *** Deleting file `s_lock_test'\n[postgres@sparclinux buffer]$ \n\n", "msg_date": "Tue, 25 May 1999 22:24:32 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Problem in S_LOCK? " }, { "msg_contents": "\nI don't know if I can help, but I'm downloading the\nlatest snapshot now. I'll see if I can reproduce it.\n\nYou might want to try recompiling the spin lock file\nwithout optimization. \n\nTom Szybist\[email protected]\n\nIn message <[email protected]>, Keith Parks writes:\n> From: Tom Lane <[email protected]>\n> > \n> > Keith Parks <[email protected]> writes:\n> > > Platform SPARC Linux 2.0.36, latest CVS.\n> > \n> > SPARC Linux? Didn't know there was such a thing. You should look at\n> \n> It's been around for a while and is very good.\n> \n> > the machine-dependent assembly coding in s_lock.h and s_lock.c. Perhaps\n> > the #ifdefs are messed up such that the wrong bit of code is being\n> > selected for your platform. (We do have spinlock code for SPARC, IIRC,\n> > but I wonder whether it gets selected if the platform name is linux ...)\n> \n> We appear to have spinlock on this platform and it looks like it works,\n> see below.\n> \n> > \n> > If the failure just started appearing recently then this probably ain't\n> > the answer :-(\n> \n> It's the 1st time I've had a play with the \"bench\" code so I can't\n> say if it has ever worked.\n> \n> The odd thing is that there was nothing else running, no postmaster,\n> no backends, nothing. It would seem like it's locking itself!!\n> \n> It's not a major problem to me as everything else works OK, even the\n> regression tests are 100% excepting error message and precision\n> differences.\n> \n> Keith.\n> \n> > \n> > \t\t\tregards, tom lane\n> \n> \n> [postgres@sparclinux buffer]$ make s_lock_test\n> gcc -I../../../include -I../../../backend -O2 -Wall -Wmissing-prototypes -I../.. -DS_LOCK_TEST=1 s_lock.c -o s_lock_\n> test\n> ./s_lock_test\n> S_LOCK_TEST: this will hang for a few minutes and then abort\n> with a 'stuck spinlock' message if S_LOCK()\n> and TAS() are working.\n> \n> FATAL: s_lock(00020bf0) at s_lock.c:271, stuck spinlock. Aborting.\n> \n> FATAL: s_lock(00020bf0) at s_lock.c:271, stuck spinlock. Aborting.\n> make: *** [s_lock_test] IOT trap/Abort (core dumped)\n> make: *** Deleting file `s_lock_test'\n> [postgres@sparclinux buffer]$ \n> \n> \n", "msg_date": "Tue, 25 May 1999 20:37:58 -0400", "msg_from": "\"Thomas A. Szybist\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Problem in S_LOCK? " }, { "msg_contents": "Thanks Tom,\n\nI'll try that next time I do a build.\n\nI may also try building with some of the lock debug\nstuff defined.\n\nKeith.\n\n\"Thomas A. Szybist\" <[email protected]>\n> \n> I don't know if I can help, but I'm downloading the\n> latest snapshot now. I'll see if I can reproduce it.\n> \n> You might want to try recompiling the spin lock file\n> without optimization. \n> \n> Tom Szybist\n> [email protected]\n> \n> In message <[email protected]>, Keith Parks writes:\n> > From: Tom Lane <[email protected]>\n> > > \n> > > Keith Parks <[email protected]> writes:\n> > > > Platform SPARC Linux 2.0.36, latest CVS.\n> > > \n> > > SPARC Linux? Didn't know there was such a thing. You should look at\n> > \n> > It's been around for a while and is very good.\n> > \n> > > the machine-dependent assembly coding in s_lock.h and s_lock.c. Perhaps\n> > > the #ifdefs are messed up such that the wrong bit of code is being\n> > > selected for your platform. (We do have spinlock code for SPARC, IIRC,\n> > > but I wonder whether it gets selected if the platform name is linux ...)\n> > \n> > We appear to have spinlock on this platform and it looks like it works,\n> > see below.\n> > \n> > > \n> > > If the failure just started appearing recently then this probably ain't\n> > > the answer :-(\n> > \n> > It's the 1st time I've had a play with the \"bench\" code so I can't\n> > say if it has ever worked.\n> > \n> > The odd thing is that there was nothing else running, no postmaster,\n> > no backends, nothing. It would seem like it's locking itself!!\n> > \n> > It's not a major problem to me as everything else works OK, even the\n> > regression tests are 100% excepting error message and precision\n> > differences.\n> > \n> > Keith.\n> > \n> > > \n> > > \t\t\tregards, tom lane\n> > \n> > \n> > [postgres@sparclinux buffer]$ make s_lock_test\n> > gcc -I../../../include -I../../../backend -O2 -Wall -Wmissing-prototypes -I../.. -DS_LOCK_TEST=1 s_lock.c -o s_lock_\n> > test\n> > ./s_lock_test\n> > S_LOCK_TEST: this will hang for a few minutes and then abort\n> > with a 'stuck spinlock' message if S_LOCK()\n> > and TAS() are working.\n> > \n> > FATAL: s_lock(00020bf0) at s_lock.c:271, stuck spinlock. Aborting.\n> > \n> > FATAL: s_lock(00020bf0) at s_lock.c:271, stuck spinlock. Aborting.\n> > make: *** [s_lock_test] IOT trap/Abort (core dumped)\n> > make: *** Deleting file `s_lock_test'\n> > [postgres@sparclinux buffer]$ \n> > \n> > \n\n", "msg_date": "Wed, 26 May 1999 22:00:22 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Problem in S_LOCK? " }, { "msg_contents": "\nWell, good news and bad news. It seems to work for me. Sorry.\nThis is a sparc10 running 2.0.30. Yes, very old. Soon I can\ngive Red hat 6.0 a try on an Ultra10.\n\n[szybist@anka post]$ initdb\n\nWe are initializing the database system with username szybist (uid=501).\nThis user will own all the files and must also own the server process.\n\nCreating Postgres database system directory /home/szybist/post/data/base\n\nCreating template database in /home/szybist/post/data/base/template1\n\nCreating global classes in /home/szybist/post/data/base\n\nAdding template1 database to pg_database...\n\nVacuuming template1\nCreating public pg_user view\nCreating view pg_rules\nCreating view pg_views\nCreating view pg_tables\nCreating view pg_indexes\nLoading pg_description\n[szybist@anka post]$ postgres template1\n\nPOSTGRES backend interactive interface \n$Revision: 1.115 $ $Date: 1999/05/22 17:47:49 $\n\nbackend> create database bench\nblank\n 1: datname (typeid = 19, len = 32, typmod = -1, byval = f)\n 2: datdba (typeid = 23, len = 4, typmod = -1, byval = t)\n 3: encoding (typeid = 23, len = 4, typmod = -1, byval = t)\n 4: datpath (typeid = 25, len = -1, typmod = -1, byval = f)\n ----\nbackend>\n\n", "msg_date": "Wed, 26 May 1999 20:49:15 -0400", "msg_from": "\"Thomas A. Szybist\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Problem in S_LOCK? " } ]
[ { "msg_contents": "Hi,\n\nI checked latest cvs and notice when I do 'vacuum analyze'\nI got:\n\nflats=> vacuum analyze;\nNOTICE: AbortTransaction and not in in-progress state \nNOTICE: AbortTransaction and not in in-progress state \n\n23:09[om]:~/mian/flats/sql>psql flats\nConnection to database 'flats' failed.\nFATAL 1: Database 'flats' does not exist.\n We know this because the directory '/usr/local/pgsql/data/base/flats' does not exist.\n You can create a database with the SQL command CREATE DATABASE.\n To see what databases exist, look at the subdirectories of '/usr/local/pgsql/data/base/'.\n\n23:09[om]:~/mian/flats/sql>psql -l\nNOTICE: AbortTransaction and not in in-progress state \nNOTICE: AbortTransaction and not in in-progress state \n\n23:10[om]:~/mian/flats/sql>psg post\n 431 p4 S 0:00 rlogin om -l postgres \n 6201 ? S 0:00 postmaster -i -B 1024 -S -D/usr/local/pgsql/data/ -o -Fe \n\nDoes this is a known problem ? I'm running linux 2.1.117, egcs 1.1.b,\npgsql was compiled with -O2 -mpentium options and --enable-locale.\n\nAfter restoring database I tried again 'vacuum analyze' and it\nproduces the same result but I was able to do psql flats.\nNothing could do there though - on any commands I got\nflats=> \\dt\nNOTICE: AbortTransaction and not in in-progress state \nNOTICE: AbortTransaction and not in in-progress state \nflats=> \\q\n\nRestarting postmaster helps a little bit, but after several operations\nI got\nflats=> \\d work_flats\npqReadData() -- backend closed the channel unexpectedly.\n This probably means the backend terminated abnormally before or while processing the request.\n\n\n\n\tRegards,\n\n\t\tOleg\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": "Sat, 12 Sep 1998 23:23:28 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": true, "msg_subject": "AbortTransaction and not in in-progress state" }, { "msg_contents": "> I checked latest cvs and notice when I do 'vacuum analyze'\n> I got:\n> \n> flats=> vacuum analyze;\n> NOTICE: AbortTransaction and not in in-progress state\n> NOTICE: AbortTransaction and not in in-progress state\n> \n> 23:09[om]:~/mian/flats/sql>psql flats\n> Connection to database 'flats' failed.\n\nI see a small problem in running VACUUM ANALYZE on the regression\ndatabase which involves an entry in pg_operator left over from the\nchar16 datatype. If the line containing \"1004\" is removed and the system\nis \"make clean install; initdb\"'d then vacuum completes successfully on\nthat database.\n\nCan you try this test on the regression database (after removing that\nline from pg_operator)?\n\nmake runtest\npsql regression\nregression=> vacuum analyze;\n\nIf that succeeds for you, then you will need to describe your test\nscenerio in more detail. If it fails, then perhaps try backing-off of\nyour bleeding-edge compiler and kernel (maybe start by compiling -m486\ninstead of -mpentium). btw, I'm running Linux kernel 2.0.30, gcc 2.7.2.1\nfrom RH4.2...\n\nRegards.\n\n - Tom\n", "msg_date": "Sun, 13 Sep 1998 14:27:12 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] AbortTransaction and not in in-progress state" }, { "msg_contents": "> > I checked latest cvs and notice when I do 'vacuum analyze'\n> > I got:\n> > \n> > flats=> vacuum analyze;\n> > NOTICE: AbortTransaction and not in in-progress state\n> > NOTICE: AbortTransaction and not in in-progress state\n> > \n> > 23:09[om]:~/mian/flats/sql>psql flats\n> > Connection to database 'flats' failed.\n> \n> I see a small problem in running VACUUM ANALYZE on the regression\n> database which involves an entry in pg_operator left over from the\n> char16 datatype. If the line containing \"1004\" is removed and the system\n> is \"make clean install; initdb\"'d then vacuum completes successfully on\n> that database.\n\nInteresting I missed that one. I am going to add some more *.sql checks\ninto include/catalog to try and catch things like this.\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, 13 Sep 1998 14:44:22 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] AbortTransaction and not in in-progress state" }, { "msg_contents": "On Sun, 13 Sep 1998, Thomas G. Lockhart wrote:\n\n> Date: Sun, 13 Sep 1998 14:27:12 +0000\n> From: \"Thomas G. Lockhart\" <[email protected]>\n> To: Oleg Bartunov <[email protected]>\n> Cc: [email protected]\n> Subject: Re: [HACKERS] AbortTransaction and not in in-progress state\n> \n> > I checked latest cvs and notice when I do 'vacuum analyze'\n> > I got:\n> > \n> > flats=> vacuum analyze;\n> > NOTICE: AbortTransaction and not in in-progress state\n> > NOTICE: AbortTransaction and not in in-progress state\n> > \n> > 23:09[om]:~/mian/flats/sql>psql flats\n> > Connection to database 'flats' failed.\n> \n> I see a small problem in running VACUUM ANALYZE on the regression\n> database which involves an entry in pg_operator left over from the\n> char16 datatype. If the line containing \"1004\" is removed and the system\n> is \"make clean install; initdb\"'d then vacuum completes successfully on\n> that database.\n> \n> Can you try this test on the regression database (after removing that\n> line from pg_operator)?\n> \n> make runtest\n> psql regression\n> regression=> vacuum analyze;\n> \n> If that succeeds for you, then you will need to describe your test\n> scenerio in more detail. If it fails, then perhaps try backing-off of\n> your bleeding-edge compiler and kernel (maybe start by compiling -m486\n> instead of -mpentium). btw, I'm running Linux kernel 2.0.30, gcc 2.7.2.1\n> from RH4.2...\n\nWell, I moved to another machine with gcc 2.7.3, Linux 2.0.35\nto be not confused with compiler. btw, egcs 1.1b really makes a difference -\nlatest cvs run all tests ok except geometry and run_ruletest\nwhen compiled with gcc 2.7.3 on Linux 2.0.35 while egcs 1.1b and Linux 2.1.117\nproduces more failures (in select_having... I don't remember exactly - it's on\nmy home bleeding edge machine)\nUnfortunately, vacuum analyze on my test database produces the same\nresult:\ntest=> vacuum analyze;\nNOTICE: AbortTransaction and not in in-progress state \nNOTICE: AbortTransaction and not in in-progress state \ntest=> \\dt\nNOTICE: AbortTransaction and not in in-progress state \nNOTICE: AbortTransaction and not in in-progress state \ntest=> \\q\ndv:~/cvs/pgsql/src/test/regress$ psql test\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=> \\dt\nNOTICE: AbortTransaction and not in in-progress state \nERROR: cannot write block -1 of [] blind\ntest=> \\q\n\nI attached perl script which creates this test database. I wrote it to\ntest how fast join of tables works, btw could you run it on your setup -\n1. createdb test\n2. mkjoindata.pl | psql test\nThere are several parameters in the script:\n $ntables = 10; - the number of tables to generate\n @nitems - array of tables rows ( just leave them 10)\n $njoins - number of tables to join. On my machine it runs ok until \n $njoins < 6. It seems that postgres is very-very slow\n on join queries but this is another story and needs separate\n postings.\nIf you need only create test database just run mkjoindata.pl > test.sql\nand delete select statements manually.\n\n3. psql test\n4. vaccum analyze;\n\n\nAlso, vacuum analyze; on regression database produces\nregression-> vacuum analyze;\nERROR: type id lookup of 1004 failed\n\nI don't know which file I need to edit as you suggested :-)\n\n\n Regards,\n\n\tOleg\n\n> \n> Regards.\n> \n> - Tom\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", "msg_date": "Mon, 14 Sep 1998 00:08:28 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] AbortTransaction and not in in-progress state" }, { "msg_contents": "> > I see a small problem in running VACUUM ANALYZE on the regression\n> > database which involves an entry in pg_operator left over from the\n> > char16 datatype. If the line containing \"1004\" is removed and the \n> > system is \"make clean install; initdb\"'d then vacuum completes \n> > successfully on that database.\n> Also, vacuum analyze; on regression database produces\n> regression-> vacuum analyze;\n> ERROR: type id lookup of 1004 failed\n> I don't know which file I need to edit as you suggested :-)\n\nOh, sorry. src/include/catalog/pg_operator.h is the one to change. I've\nalready made the change to the development cvs tree, so you could check\nout the newest code.\n\nI haven't had a chance to try your test case yet. Let me know how the\nregression test goes and then I'll look at your test if you would still\nlike me to...\n\n - Tom\n", "msg_date": "Mon, 14 Sep 1998 01:38:54 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] AbortTransaction and not in in-progress state" }, { "msg_contents": "> > > I see a small problem in running VACUUM ANALYZE on the regression\n> > > database which involves an entry in pg_operator left over from the\n> > > char16 datatype. If the line containing \"1004\" is removed and the \n> > > system is \"make clean install; initdb\"'d then vacuum completes \n> > > successfully on that database.\n> > Also, vacuum analyze; on regression database produces\n> > regression-> vacuum analyze;\n> > ERROR: type id lookup of 1004 failed\n> > I don't know which file I need to edit as you suggested :-)\n> \n> Oh, sorry. src/include/catalog/pg_operator.h is the one to change. I've\n> already made the change to the development cvs tree, so you could check\n> out the newest code.\n> \n> I haven't had a chance to try your test case yet. Let me know how the\n> regression test goes and then I'll look at your test if you would still\n> like me to...\n\nI have added contrib/findoidjoins/make_oidjoins_check which will take\nthe output of findoidjoins and create a set of SQL queries that will\nfind any bad oid's in the tables. I have run it on findoidjoins on the\ntemplate1 database, and have created template1_check.sql in\ninclude/catalog to find any bad oid's. I found a few in pg_operator(the\noid was '6'), and fixed them too. We can run the query anytime to find\nany of these problems in the future.\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, 13 Sep 1998 21:51:12 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] AbortTransaction and not in in-progress state" }, { "msg_contents": "On Mon, 14 Sep 1998, Thomas G. Lockhart wrote:\n\n> Date: Mon, 14 Sep 1998 01:38:54 +0000\n> From: \"Thomas G. Lockhart\" <[email protected]>\n> To: Oleg Bartunov <[email protected]>\n> Cc: [email protected]\n> Subject: Re: [HACKERS] AbortTransaction and not in in-progress state\n> \n> > > I see a small problem in running VACUUM ANALYZE on the regression\n> > > database which involves an entry in pg_operator left over from the\n> > > char16 datatype. If the line containing \"1004\" is removed and the \n> > > system is \"make clean install; initdb\"'d then vacuum completes \n> > > successfully on that database.\n> > Also, vacuum analyze; on regression database produces\n> > regression-> vacuum analyze;\n> > ERROR: type id lookup of 1004 failed\n> > I don't know which file I need to edit as you suggested :-)\n> \n> Oh, sorry. src/include/catalog/pg_operator.h is the one to change. I've\n> already made the change to the development cvs tree, so you could check\n> out the newest code.\n> \n\nGreat, checked cvs tree and vacuum analyze works fine on regression database\nas well on my test database !\nBUT !!!\nI just notice, that when I start postmaster from my script i used to\nrun postgres in production vacuum analyze on my test database produces\nthe same error as before ! And just checked it fails and on regression\ndatabase ! \nAfter playing with options I found this happens with -B 1024 !!!\nI don't understand why this fails but 6.3.2 works just fine .\n\n\tRegards,\n\n\t\tOleg\n\n\nBelow is my script:\n\n6:12[dv]:~postgres>cat runpostgres\n#!/bin/sh\n \n# remove postgres lock if it was left on the system\nif [ -S /tmp/.s.PGSQL.5432 ]; then\n /bin/rm -f /tmp/.s.PGSQL.5432\nfi\n \nexport LC_CTYPE=koi8-r\nexport LC_COLLATE=koi8-r\n/usr/local/pgsql/bin/postmaster -i -B 1024 -S -D/usr/local/pgsql/data/ -o '-Fe'\n\n\n\n\n\n> I haven't had a chance to try your test case yet. Let me know how the\n> regression test goes and then I'll look at your test if you would still\n> like me to...\n> \n> - Tom\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, 14 Sep 1998 06:24:55 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] AbortTransaction and not in in-progress state" }, { "msg_contents": "> Great, checked cvs tree and vacuum analyze works fine on regression \n> database as well on my test database !\n> BUT !!!\n> I just notice, that when I start postmaster from my script i used to\n> run postgres in production vacuum analyze on my test database produces\n> the same error as before ! And just checked it fails and on regression\n> database !\n> After playing with options I found this happens with -B 1024 !!!\n\nIt works fine on my system with \"-B 1024\". However, I don't usually use\nthe -F flag. And I don't usually compile with the Russian/Cyrillic\ncharacter set :)\n\n> export LC_CTYPE=koi8-r\n> export LC_COLLATE=koi8-r\n> /usr/local/pgsql/bin/postmaster -i -B 1024 -S -D/usr/local/pgsql/data/ -o '-Fe'\n\n>From the man page:\n-F Disable automatic fsync() call after each transaction. This \n option improves performance, but an operating system crash while \n a transaction is in progress will probably cause data loss.\n\nI ran the regression test with the -F flag; I can see why you might be\ntempted to take the risk since it speeds the regression test by 50%.\nPretty impressive.\n\nSo what we should do is at least have an fsync() happen when a\ntransaction completes (when an explicit END WORK statement is executed).\nBut that's a digression...\n\nNo problems with -B 1024 -o '-F' on my system, trying to \"vacuum\nanalyze\" the regression database. Try running your tests with the -F\nflag omitted just to see what happens...\n\n - Tom\n", "msg_date": "Mon, 14 Sep 1998 03:02:40 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] AbortTransaction and not in in-progress state" } ]
[ { "msg_contents": "Thomas A. Szybist <[email protected]>\n> \n> In message <[email protected]>, Keith Parks writes:\n> > Hi,\n> > \n> > Can anyone else reproduce this problem?\n> > (Maybe a signal handling problem on S/Linux??)\n> > \n> > Using the regression database...\n> > \n> > Keith.\n<snip>\n> > regression=> create index p_age_idx on person (age);\n> > CREATE\n> > regression=> select * from person where age in (38,68);\n> > ERROR: floating point exception! The last floating point operation either \n> > exceeded legal ranges or was a divide by zero\n<snip>\n> > \n> \n> Sorry Keith, It works on my Sparc 20 running S/Linux. I'm using a cvs copy \n> from sometime on Sept 10. It also works on my solaris 2.6 box (ultra 30).\n> \n\nThanks Tom,\n\nPanic over, I've just upgraded my kernel to 2.0.35 and that seems to have\nfixed it. I remembered that there was a math emulation (or lack of)\nproblem in S/Linux that was fixed in the newer ones.\n\nThanks for the response,\nKeith.\n\n", "msg_date": "Sat, 12 Sep 1998 21:52:24 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Exception in select IN with index " } ]
[ { "msg_contents": "Here are some additional patches needed to get the UnixWare 7 C++ compiler to \nattempt to compile libpq++. The patches address the following problems:\n\n1. In my first pass at changing the libpq++ makefile, I forgot to include the\n PORTNAME in the Makefile.in file.\n\n2. The UnixWare 7 C++ compiler did not like the '-K alloca' option in \nCXXFLAGS.\n Unfortunately, the '-K alloca' option is needed in CFLAGS (from which\n CXXFLAGS is dereived). My solution was to redefine the COMPILE.cc macro\n for the unixware (and univel) port when the compiler is not g++ so that the\n '-K alloca' option is removed.\n\n3. The '-Xa' and '-v' options were removed from the CFLAGS entry in the\n unixware template. The '-Xa' option is a default and was not compatable\n with the C++ compiler. The '-v' option turns on verbose mode in the\n compiler and (IMHO) should not be in CFLAGS by default.\n\nThe good news is that the C++ compiler will execute correctly when (g)make \nruns.\n\nThe bad news is that the C++ compiler is unable to compile the source because \nit does not have a full implementation of 'string'. As the problem is related \nto the compiler and not the implementation of libpq++, I will not (at this \ntime) continue trying to compile libpq++ on UnixWare. If libpq++ is needed, \nthen postgreSQL for UnixWare will have to be compiled with gcc/g++.\n\n\n\n____ | Billy G. Allie | Domain....: [email protected]\n| /| | 7436 Hartwell | Compuserve: 76337,2061\n|-/-|----- | Dearborn, MI 48126| MSN.......: [email protected]\n|/ |LLIE | (313) 582-1540 |", "msg_date": "Sat, 12 Sep 1998 23:16:07 -0400", "msg_from": "\"Billy G. Allie\" <[email protected]>", "msg_from_op": true, "msg_subject": "postgreSQL 6.4 patches " }, { "msg_contents": "Applied\n\n> Here are some additional patches needed to get the UnixWare 7 C++ compiler to \n> attempt to compile libpq++. The patches address the following problems:\n> \n> 1. In my first pass at changing the libpq++ makefile, I forgot to include the\n> PORTNAME in the Makefile.in file.\n> \n> 2. The UnixWare 7 C++ compiler did not like the '-K alloca' option in \n> CXXFLAGS.\n> Unfortunately, the '-K alloca' option is needed in CFLAGS (from which\n> CXXFLAGS is dereived). My solution was to redefine the COMPILE.cc macro\n> for the unixware (and univel) port when the compiler is not g++ so that the\n> '-K alloca' option is removed.\n> \n> 3. The '-Xa' and '-v' options were removed from the CFLAGS entry in the\n> unixware template. The '-Xa' option is a default and was not compatable\n> with the C++ compiler. The '-v' option turns on verbose mode in the\n> compiler and (IMHO) should not be in CFLAGS by default.\n> \n> The good news is that the C++ compiler will execute correctly when (g)make \n> runs.\n> \n> The bad news is that the C++ compiler is unable to compile the source because \n> it does not have a full implementation of 'string'. As the problem is related \n> to the compiler and not the implementation of libpq++, I will not (at this \n> time) continue trying to compile libpq++ on UnixWare. If libpq++ is needed, \n> then postgreSQL for UnixWare will have to be compiled with gcc/g++.\n> \nContent-Description: uw7p5.patch\n\n[Attachment, skipping...]\n\n> ____ | Billy G. Allie | Domain....: [email protected]\n> | /| | 7436 Hartwell | Compuserve: 76337,2061\n> |-/-|----- | Dearborn, MI 48126| MSN.......: [email protected]\n> |/ |LLIE | (313) 582-1540 | \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, 13 Sep 1998 00:00:45 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] postgreSQL 6.4 patches" } ]
[ { "msg_contents": "Hi there,\n\nI committed an awful sin. I killed psql while the backend was trying to\nbuild an index for me, a hash with text_ops. Could wait no longer.\nThe problem was that all values in the column it was indexing were \nidentical (got there by mistake). While the question why would it get sick\ndoing such a simple task (just 700,000 identical values in a text type\ncolumn) might by itself be an interesting subject for a hacker, the problem\nI want to report is this: because I killed (9) that misfortunate backend,\nsome leftovers in the system tables prevent me from building the new index under\nthe same name. How can I clean it up?\n\n(Red Hat 5.1, postgresql built from the 6.3.2 release)\n\n\nThanks,\n\nGene\n", "msg_date": "Sat, 12 Sep 1998 23:38:12 -0400", "msg_from": "\"Gene Selkov Jr.\" <[email protected]>", "msg_from_op": true, "msg_subject": "ERROR: cannot create index" } ]
[ { "msg_contents": "The C++ library now builds by default on my Linux box (did it always?).\nAnyway, it is apparently not building a shared library, but goes ahead\nand tries to install it, resulting in a failure.\n\nIs anyone working on this? Could someone either fix it or disable it by\ndefault? I think scrappy wants to do a beta build tomorrow and things\nshould be willing to install by then...\n\n - Tom\n\nmake -C libpq++ install\nmake[2]: Entering directory `/opt/postgres/pgsql/src/interfaces/libpq++'\nInstalling /opt/postgres/current/include/libpq++/pgenv.h.\nInstalling /opt/postgres/current/include/libpq++/pgconnection.h.\nInstalling /opt/postgres/current/include/libpq++/pgdatabase.h.\nInstalling /opt/postgres/current/include/libpq++/pgtransdb.h.\nInstalling /opt/postgres/current/include/libpq++/pgcursordb.h.\nInstalling /opt/postgres/current/include/libpq++/pglobject.h.\nc++ -I../../include -I../../backend -O2 -m486 -Wall\n-Wmissing-prototypes -fpic -I../../backend -I../../include\n-I../../interfaces/libpq -c pgenv.cc -o pgenv.o\nc++ -I../../include -I../../backend -O2 -m486 -Wall\n-Wmissing-prototypes -fpic -I../../backend -I../../include\n-I../../interfaces/libpq -c pgconnection.cc -o pgconnection.o\nc++ -I../../include -I../../backend -O2 -m486 -Wall\n-Wmissing-prototypes -fpic -I../../backend -I../../include\n-I../../interfaces/libpq -c pgtransdb.cc -o pgtransdb.o\nc++ -I../../include -I../../backend -O2 -m486 -Wall\n-Wmissing-prototypes -fpic -I../../backend -I../../include\n-I../../interfaces/libpq -c pgcursordb.cc -o pgcursordb.o\nc++ -I../../include -I../../backend -O2 -m486 -Wall\n-Wmissing-prototypes -fpic -I../../backend -I../../include\n-I../../interfaces/libpq -c pglobject.cc -o pglobject.o\nar crs libpq++.a pgenv.o pgconnection.o pgtransdb.o pgcursordb.o\npglobject.o\nranlib libpq++.a\n/usr/bin/install -c -m 644 libpq++.a /opt/postgres/current/lib/libpq++.a\n/usr/bin/install -c -m 644 libpq++.so.1\n/opt/postgres/current/lib/libpq++.so.1\n/usr/bin/install: libpq++.so.1: No such file or directory\nmake[2]: *** [install-shlib] Error 1\nmake[2]: Leaving directory `/opt/postgres/pgsql/src/interfaces/libpq++'\nmake[1]: *** [install] Error 2\nmake[1]: Leaving directory `/opt/postgres/pgsql/src/interfaces'\nmake: *** [install] Error 2\n", "msg_date": "Sun, 13 Sep 1998 05:07:06 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": true, "msg_subject": "libpq++ shared library missing?" }, { "msg_contents": "\"Thomas G. Lockhart\" <[email protected]>\n> The C++ library now builds by default on my Linux box (did it always?).\n> Anyway, it is apparently not building a shared library, but goes ahead\n> and tries to install it, resulting in a failure.\n> \n> Is anyone working on this? Could someone either fix it or disable it by\n> default? I think scrappy wants to do a beta build tomorrow and things\n> should be willing to install by then...\n\nThe Makefile.in for libpq++ was missing the PORTNAME definition. It should \nnow be fixed.\n-- \n____ | Billy G. Allie | Domain....: [email protected]\n| /| | 7436 Hartwell | Compuserve: 76337,2061\n|-/-|----- | Dearborn, MI 48126| MSN.......: [email protected]\n|/ |LLIE | (313) 582-1540 | \n\n\n", "msg_date": "Sun, 13 Sep 1998 16:09:28 -0400", "msg_from": "\"Billy G. Allie\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] libpq++ shared library missing? " } ]
[ { "msg_contents": "This query crashes the backend. pg_rules is a new system view:\n\n\tBEGIN WORK;\t\n\tDECLARE c_matches BINARY CURSOR FOR\n\tSELECT count(*)\n\tFROM pg_attrdef t1, pg_rules t2\n\tWHERE t1.adrelid = t2.oid\n\tEND WORK;\n\nPartial backtrace is below. It is crashing in the optimizer.\n\n---------------------------------------------------------------------------\n\n\n#0 0x80e8a5b in datumIsEqual (value1=0, value2=0, type=26, byVal=0, len=4)\n at datum.c:216\n#1 0x809d8fe in _equalConst (a=0x82daf10, b=0x82e2dd0) at equalfuncs.c:213\n#2 0x809e7b7 in equal (a=0x82daf10, b=0x82e2dd0) at equalfuncs.c:668\n#3 0x809e909 in equal (a=0x82e3490, b=0x82e3930) at equalfuncs.c:738\n#4 0x809d634 in _equalExpr (a=0x82e2550, b=0x82e2d10) at equalfuncs.c:88\n#5 0x809e737 in equal (a=0x82e2550, b=0x82e2d10) at equalfuncs.c:644\n#6 0x809dab6 in _equalClauseInfo (a=0x82e2710, b=0x82e2cd0)\n at equalfuncs.c:289\n#7 0x809e7e7 in equal (a=0x82e2710, b=0x82e2cd0) at equalfuncs.c:677\n#8 0x809b52a in member (l1=0x82e2cd0, l2=0x82e38f0) at list.c:371\n#9 0x809b692 in set_difference (l1=0x82e3970, l2=0x82e38f0) at list.c:476\n#10 0x80b0c23 in create_index_path (root=0x82e1290, rel=0x82e1490,\n index=0x82e1a90, restriction_clauses=0x82e38f0, is_join_scan=0 '\\000')\n at pathnode.c:274\n#11 0x80a7778 in create_index_paths (root=0x82e1290, rel=0x82e1490,\n index=0x82e1a90, clausegroup_list=0x82e3910, join=0 '\\000')\n at indxpath.c:1381\n#12 0x80a65b5 in find_index_paths (root=0x82e1290, rel=0x82e1490,\n indices=0x82e38d0, clauseinfo_list=0x82e36f0, joininfo_list=0x0)\n at indxpath.c:155\n#13 0x80a55cb in find_rel_paths (root=0x82e1290, rels=0x82e3750)\n at allpaths.c:124\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, 13 Sep 1998 16:28:18 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "crash on new system views" } ]
[ { "msg_contents": "OK,\n\nI have a current version of PostgreSQL running on my pc532 now.\n(It's a NS32K based machine. Somewhat of an antique really...)\n\nI had to apply the following diffs to get it to compile, but it\nthen passed the spinlock test, and most of the regression tests,\nincluding the int8 test. It did not, however, get the datetime\ntest correct.\n\nFor some reason which I haven't figured out yet, it thinks the\nfollowing:\n\ntemplate1=> select ('epoch'::datetime) as ZeroSecs;\nzerosecs \n----------------------------\nFri Dec 31 18:00:00 1999 CST\n(1 row)\n\ntemplate1=> select ('current'::datetime) as ZeroSecs;\nzerosecs \n----------------------------\nFri Dec 31 18:00:00 1999 CST\n(1 row)\n\ntemplate1=> select ('now'::datetime) as ZeroSecs;\nzerosecs \n----------------------------\nSun Sep 13 19:05:43 1998 CDT\n(1 row)\n\n\nSo it knows how to get the date and time, but not always... I'd\nthink this was machine independent, but then I'd expect a MI problem\nlike that to get fixed very quickly. So I don't know if it's a\nNetBSD/pc532 problem, a NetBSD problem, or a PostgreSQL problem,\nbut I suspect the first due to a lack of people screaming.\n\nI did build 6.3.2 with -DDATEDEBUG, but I'm not coherent enough\n(yet?) to properly deduce anything yet. It appeared to all be\ncorrect until it printed the results, implying that libc or a\nsyscall was returning some funny constant perhaps?\n\nWell, with all those disclaimers, here's the patch. (Beware, I\nthink I have it reversed, so you probably want to type patch -r...)\n\n\n*** /usr/local/pgsql/src/include/storage/s_lock.h\tFri Sep 11 19:00:55 1998\n--- s_lock.h\tSat Sep 12 00:27:51 1998\n***************\n*** 213,219 ****\n #endif\t /* NEED_I386_TAS_ASM */\n \n \n! /* NS32K code is in s_lock.c */\n \n #endif\t /* defined(__GNUC__) */\n \n--- 213,234 ----\n #endif\t /* NEED_I386_TAS_ASM */\n \n \n! \n! #if defined(NEED_NS32K_TAS_ASM)\n! \n! #define S_LOCK(lock)\t\t\t\t\\\n! {\t\t\t\t\t\t\\\n! \tslock_t res = 1;\t\t\t\t\\\n! \twhile (res) {\t\t\t\t\\\n! \t __asm__(\"movqd 0, r0\");\t\t\t\\\n! \t __asm__(\"sbitd r0, %0\" : \"=m\"(*lock));\t\\\n! \t __asm__(\"sprb us, %0\" : \"=r\" (res));\t\\\n! \t res = ((res >> 5) & 1);\t\t\t\\\n! \t}\t\t\t\t\t\t\\\n! }\n! \n! #endif\t /* NEED_NS32K_TAS_ASM */\n! \n \n #endif\t /* defined(__GNUC__) */\n \n*** /usr/local/pgsql/src/backend/storage/buffer/s_lock.c\tThu Sep 10 23:08:00 1998\n--- s_lock.c\tSat Sep 12 00:23:04 1998\n***************\n*** 118,134 ****\n #endif\t /* PPC */\n \n \n- #if defined(__ns32k__)\n- int\n- tas(volatile slock_t *lock)\n- {\n- int res;\n- __asm__(\"sbitb 0, %0\" : \"=m\"(*lock));\n- __asm__(\"sprb us, %0\" : \"=r\"(res));\n- res = (res >> 5) & 1;\n- return res;\n- }\n- #endif\n \n #else\t\t\t\t\t\t\t/* defined(__GNUC__) */\n /***************************************************************************\n--- 118,123 ----\n\n\nBTW, does the spinlock code need a TAS function so it can spin for\na while and then declare itself stuck, or does a second process/thread\ntake care of that. It would be simpler for the NS32K to just make\nthe whole lock function be 2 lines of inline assembler, but that\nwould contain an infinite loop if the lock was stuck...\n\nJon Buller <[email protected]>\n", "msg_date": "Sun, 13 Sep 1998 19:16:37 -0500", "msg_from": "Jon Buller <[email protected]>", "msg_from_op": true, "msg_subject": "Compiling 6.4 on NetBSD-current/pc532" }, { "msg_contents": "> I have a current version of PostgreSQL running on my pc532 now.\n> (It's a NS32K based machine. Somewhat of an antique really...)\n> It did not, however, get the datetime test correct.\n> ... I suspect (a NetBSD/pc532 problem) due to a lack of people \n> screaming.\n\nScreaming means you get to help do development :)\n\n> I did build 6.3.2 with -DDATEDEBUG, but I'm not coherent enough\n> (yet?) to properly deduce anything yet. It appeared to all be\n> correct until it printed the results, implying that libc or a\n> syscall was returning some funny constant perhaps?\n\nAh. It's slowly coming back to me, so here are some suggestions:\n\n\"epoch\" and \"current\" are stored internally in the database so that the\nsupport code can pull one back out and say \"oh! that's supposed to be\n'epoch'\", for example. So, I used _very_ small floating point numbers to\nrepresent those special constants (numbers much smaller than one could\nget by doing the usual arithmetic, at least under normal circumstances).\n\nI'll bet that your machine is somehow pushing those numbers to be\nexactly zero, which corresponds to Y2K (with the timezone offset, that\nis what you are seeing). So, try looking at the numbers, and try seeing\nwhat they are being set to. In src/include/utils/dt.h, you will see that\ncurrent and epoch are being set to DBL_MIN and -DBL_MIN, respectively.\nMake sure that these are not identical to zero (they are something like\n1e-308 on my machine). You can change dt.h to make these some other\nusually unique number, say +/-1e-20 for now.\n\nAnd track down why DBL_MIN on your machine isn't the smallest allowed\ndouble-precision number...\n\n - Tom\n", "msg_date": "Mon, 14 Sep 1998 02:17:49 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Compiling 6.4 on NetBSD-current/pc532" }, { "msg_contents": "Thomas G. Lockhart writes:\n > > I have a current version of PostgreSQL running on my pc532 now.\n > > (It's a NS32K based machine. Somewhat of an antique really...)\n > > It did not, however, get the datetime test correct.\n > > ... I suspect (a NetBSD/pc532 problem) due to a lack of people \n > > screaming.\n > \n > Screaming means you get to help do development :)\n > \n > > I did build 6.3.2 with -DDATEDEBUG, but I'm not coherent enough\n > > (yet?) to properly deduce anything yet. It appeared to all be\n > > correct until it printed the results, implying that libc or a\n > > syscall was returning some funny constant perhaps?\n > \n > Ah. It's slowly coming back to me, so here are some suggestions:\n > \n > \"epoch\" and \"current\" are stored internally in the database so that the\n > support code can pull one back out and say \"oh! that's supposed to be\n > 'epoch'\", for example. So, I used _very_ small floating point numbers to\n > represent those special constants (numbers much smaller than one could\n > get by doing the usual arithmetic, at least under normal circumstances).\n > \n > I'll bet that your machine is somehow pushing those numbers to be\n > exactly zero, which corresponds to Y2K (with the timezone offset, that\n > is what you are seeing). So, try looking at the numbers, and try seeing\n > what they are being set to. In src/include/utils/dt.h, you will see that\n > current and epoch are being set to DBL_MIN and -DBL_MIN, respectively.\n > Make sure that these are not identical to zero (they are something like\n > 1e-308 on my machine). You can change dt.h to make these some other\n > usually unique number, say +/-1e-20 for now.\n > \n > And track down why DBL_MIN on your machine isn't the smallest allowed\n > double-precision number...\n > \n > - Tom\n\nWell, finally somebody, who sees the same problems as me. I had the\nsame problems with 6.3, which I didn't pursue due to lack off time.\n\nHowever, now I retried with the 6.4 snapshot from Sep. 11. I compiled\nunder Siemens SINIX (Mips based SVR4) and the system cc.\n\nIf I issue the following sql statement, the backend dies with a core.\n\n regression=> select ('now'::datetime - 'current'::datetime) as \"Zero\";\n\nI guess the following result is ok.\n\n regression=> select ('current'::datetime) as \"Zero\";\n Zero \n -------\n current\n (1 row)\n\nI guess, somehow the applying math operators to datetime causes the\ncore dumps.\n\nHere is the GDB stack trace from the core. (Only dt.c\n\n$ gdb ../../../bin/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.15.1 (mips-sni-sysv4), Copyright 1995 Free Software Foundation, Inc...\nCore was generated by `/local/pgsql-6.4/bin/postmaster -i -p 2222 '.\nProgram terminated with signal 10, Bus error.\nReading symbols from /lib/libnsl.so...done.\nReading symbols from /lib/libsocket.so...done.\nReading symbols from /lib/libdl.so...done.\nReading symbols from /lib/libmutex.so...done.\nReading symbols from /usr/lib/libc.so.1...done.\n(gdb) where\n#0 0x51595c in tm2datetime (tm=0x7fffb334, fsec=1.0609881999384027e-314,\n tzp=0x5db6d4, result=0x542658) at dt.c:2517\n#1 0x50e8cc in SetDateTime (dt=2.2250738585072022e-308) at dt.c:346\n ^^^^^^^^^^^^^^^^^^^^^^^\n\t\t\t\tthis is DBL_MIN\n\n#2 0x510884 in datetime_mi (datetime1=0x60d370, datetime2=0x60d3d0)\n at dt.c:783\n#3 0x5420b0 in fmgr_c ()\n#4 0x46cf98 in ExecMakeFunctionResult ()\n#5 0x46d034 in ExecEvalOper ()\n#6 0x46d418 in ExecEvalExpr ()\n#7 0x46d838 in ExecTargetList ()\n#8 0x46dbf8 in ExecProject ()\n#9 0x476e14 in ExecResult ()\n#10 0x46b32c in ExecProcNode ()\n#11 0x46a3e0 in ExecutePlan ()\n#12 0x469ab0 in ExecutorRun ()\n#13 0x4fc9dc in ProcessQueryDesc ()\n#14 0x4fcabc in ProcessQuery ()\n#15 0x4faa10 in pg_exec_query_dest ()\n#16 0x4fa7dc in pg_exec_query ()\n#17 0x4fc0a8 in PostgresMain ()\n#18 0x4d6a64 in DoBackend ()\n#19 0x4d6260 in BackendStartup ()\n#20 0x4d5050 in ServerLoop ()\n#21 0x4d4840 in PostmasterMain ()\n#22 0x4875c0 in main ()\n#23 0x418004 in __start ()\n(gdb)\n\nDoes this give you some additional hints?\n\nOh, one more thing. With 6.3, when psql lost connection with the\nbackend, I got an error message saying so. With 6.4 it psql seems to\nbe simply hanging.\n-- \nMfG/Regards\n--\n /==== Siemens Nixdorf Informationssysteme AG\n / Ridderbusch / , Abt.: OEC XS QM4\n / /./ Heinz Nixdorf Ring\n /=== /,== ,===/ /,==, // 33106 Paderborn, Germany\n / // / / // / / \\ Tel.: (49) 5251-8-15211\n/ / `==/\\ / / / \\ Email: [email protected]\n\nSince I have taken all the Gates out of my computer, it finally works!!\n", "msg_date": "Mon, 14 Sep 1998 11:37:19 +0200 (MDT)", "msg_from": "Frank Ridderbusch <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Also on SVR4 (Compiling 6.4 on NetBSD-current/pc532)" }, { "msg_contents": "> > > ... I suspect (a NetBSD/pc532 problem) due to a lack of people\n> > > screaming.\n> > Screaming means you get to help do development :)\n> Well, finally somebody, who sees the same problems as me. I had the\n> same problems with 6.3, which I didn't pursue due to lack off time.\n\nFrank, do I hear you screaming? :)\n\n> However, now I retried with the 6.4 snapshot from Sep. 11. I compiled\n> under Siemens SINIX (Mips based SVR4) and the system cc.\n> If I issue the following sql statement, the backend dies with a core.\n> regression=> select ('now'::datetime - 'current'::datetime);\n> I guess the following result is ok.\n> regression=> select ('current'::datetime) as \"Zero\";\n\nYes.\n\n> I guess, somehow the applying math operators to datetime causes the\n> core dumps.\n\nNo. (or, not likely...)\n\n> Here is the GDB stack trace from the core. (Only dt.c ...\n> (gdb) where\n> #0 0x51595c in tm2datetime (tm=0x7fffb334, fsec=1.0609881999384027e-314,\n> tzp=0x5db6d4, result=0x542658) at dt.c:2517\n\nHere is the call in the code:\n\n tm2datetime(&tt, 0, NULL, &dt);\n\nNote that fsec is not the zero-value it should be, and that tzp is not\nnull (zero usually) as it should be. So, somehow your system is not\nconverting the second argument zero in the call to\n (double) 0.0e0\nand that is also screwing up the alignment for the next argument.\n\nHere is the declaration for tm2datetime() (in include/utils/dt.h):\n\nextern int tm2datetime(struct tm * tm, double fsec,\n int *tzp, DateTime *dt);\n\nwhich is pretty clear on what the arguments should be. So, you can\nprobably change/coerce the call inside SetDateTime() to make sure that\nthe second argument is a double zero:\n\n tm2datetime(&tt, 0.0e0, NULL, &dt);\n\nbut I'm not sure why your system would be ignoring the declaration for\nthe routine. Are there some switches you can set on your compiler so it\ndoes the right thing? Something like\n\n --stop-annoying-frank\nor\n --actually-use-standard-C-conventions\n\n?? ;-)\n\n> Oh, one more thing. With 6.3, when psql lost connection with the\n> backend, I got an error message saying so. With 6.4 it psql seems to\n> be simply hanging.\n\nOne thing at a time. Although I find that mine core dumps about as well\nas ever...\n\n - Tom\n", "msg_date": "Mon, 14 Sep 1998 13:56:31 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Also on SVR4 (Compiling 6.4 on NetBSD-current/pc532)" }, { "msg_contents": "Frank Ridderbusch <[email protected]> writes:\n> Oh, one more thing. With 6.3, when psql lost connection with the\n> backend, I got an error message saying so. With 6.4 it psql seems to\n> be simply hanging.\n\nDrat, I thought I fixed that. I better make sure all the libpq patches\nI sent in have been applied...\n\nWhat point is psql \"hanging\" at, exactly? Does it happen when you next\ntry to send a command, or when? Are you using a TCP or Unix-socket\nconnection to the backend?\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 14 Sep 1998 21:46:56 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Also on SVR4 (Compiling 6.4 on NetBSD-current/pc532) " }, { "msg_contents": "\"Thomas G. Lockhart\" <[email protected]> wrote:\n\n> > I have a current version of PostgreSQL running on my pc532 now.\n> > (It's a NS32K based machine. Somewhat of an antique really...)\n> > It did not, however, get the datetime test correct.\n> > ... I suspect (a NetBSD/pc532 problem) due to a lack of people \n> > screaming.\n> \n> Screaming means you get to help do development :)\n\nDoh! opened my mouth one too many times... 8-)\n\n> > I did build 6.3.2 with -DDATEDEBUG, but I'm not coherent enough\n> > (yet?) to properly deduce anything yet. It appeared to all be\n> > correct until it printed the results, implying that libc or a\n> > syscall was returning some funny constant perhaps?\n> \n> Ah. It's slowly coming back to me, so here are some suggestions:\n> \n> \"epoch\" and \"current\" are stored internally in the database so that the\n> support code can pull one back out and say \"oh! that's supposed to be\n> 'epoch'\", for example. So, I used _very_ small floating point numbers to\n> represent those special constants (numbers much smaller than one could\n> get by doing the usual arithmetic, at least under normal circumstances).\n> \n> I'll bet that your machine is somehow pushing those numbers to be\n> exactly zero, which corresponds to Y2K (with the timezone offset, that\n> is what you are seeing). So, try looking at the numbers, and try seeing\n> what they are being set to. In src/include/utils/dt.h, you will see that\n> current and epoch are being set to DBL_MIN and -DBL_MIN, respectively.\n> Make sure that these are not identical to zero (they are something like\n> 1e-308 on my machine). You can change dt.h to make these some other\n> usually unique number, say +/-1e-20 for now.\n> \n> And track down why DBL_MIN on your machine isn't the smallest allowed\n> double-precision number...\n\nI think I saw PostgreSQL say \"0\" in some of those debug messages,\nI'll recompile tonight using some number that's a bit bigger and\nsee what happens. I'm not totally sure that's the problem though.\n(It probably used to be, since the NS32K floating point hardware\nhas no concept of a denormalized number, except that it can trap\nto some software routine to take care of doing the real work for\nit. Ian Dall wrote all that last year, bless his heart.)\n\nHowever, I just ran this test code that turns up some problems with\nthe libc routines, but conclusively shows that the number is not read\ncorrectly with scanf, but is not zero either...\n\n#include <stdio.h>\n#define DBL_MIN 2.2250738585072014E-308\nvoid main () {\n double x;\n scanf (\"%g\", &x);\n printf (\"%g %g %d %d\\n\", DBL_MIN, x, DBL_MIN == x, x == 0.0);\n}\n\nIt spits out the following (notice that I cut and pasted the DBL_MIN value):\na.out\n2.2250738585072014E-308\n2.22507e-308 6.79039e-313 0 0\n\nI'll chase this further with Phil Nelson the NetBSD/pc532 port-master.\nThanks everyone for all your help,\n\nJon Buller\n", "msg_date": "Mon, 14 Sep 1998 22:27:09 -0500", "msg_from": "Jon Buller <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Compiling 6.4 on NetBSD-current/pc532 " }, { "msg_contents": "Thanks to your suggestion, the '0' is indeed the problem. Apparently a \ncompiler problem, since the function prototypes are not correctly\ncoerced. Prefixing the 0 with (double) did it.\n\n > Here is the call in the code:\n > \n > tm2datetime(&tt, 0, NULL, &dt);\n > \n\nThanx again.\n\nThomas G. Lockhart writes:\n > > > > ... I suspect (a NetBSD/pc532 problem) due to a lack of people\n > > > > screaming.\n > > > Screaming means you get to help do development :)\n > > Well, finally somebody, who sees the same problems as me. I had the\n > > same problems with 6.3, which I didn't pursue due to lack off time.\n > \n > Frank, do I hear you screaming? :)\n > \n > > However, now I retried with the 6.4 snapshot from Sep. 11. I compiled\n > > under Siemens SINIX (Mips based SVR4) and the system cc.\n > > If I issue the following sql statement, the backend dies with a core.\n > > regression=> select ('now'::datetime - 'current'::datetime);\n > > I guess the following result is ok.\n > > regression=> select ('current'::datetime) as \"Zero\";\n > \n > Yes.\n > \n > > I guess, somehow the applying math operators to datetime causes the\n > > core dumps.\n > \n > No. (or, not likely...)\n > \n > > Here is the GDB stack trace from the core. (Only dt.c ...\n > > (gdb) where\n > > #0 0x51595c in tm2datetime (tm=0x7fffb334, fsec=1.0609881999384027e-314,\n > > tzp=0x5db6d4, result=0x542658) at dt.c:2517\n > \n > Here is the call in the code:\n > \n > tm2datetime(&tt, 0, NULL, &dt);\n > \n > Note that fsec is not the zero-value it should be, and that tzp is not\n > null (zero usually) as it should be. So, somehow your system is not\n > converting the second argument zero in the call to\n > (double) 0.0e0\n > and that is also screwing up the alignment for the next argument.\n > \n > Here is the declaration for tm2datetime() (in include/utils/dt.h):\n > \n > extern int tm2datetime(struct tm * tm, double fsec,\n > int *tzp, DateTime *dt);\n > \n > which is pretty clear on what the arguments should be. So, you can\n > probably change/coerce the call inside SetDateTime() to make sure that\n > the second argument is a double zero:\n > \n > tm2datetime(&tt, 0.0e0, NULL, &dt);\n > \n > but I'm not sure why your system would be ignoring the declaration for\n > the routine. Are there some switches you can set on your compiler so it\n > does the right thing? Something like\n > \n > --stop-annoying-frank\n > or\n > --actually-use-standard-C-conventions\n > \n > ?? ;-)\n > \n > > Oh, one more thing. With 6.3, when psql lost connection with the\n > > backend, I got an error message saying so. With 6.4 it psql seems to\n > > be simply hanging.\n > \n > One thing at a time. Although I find that mine core dumps about as well\n > as ever...\n > \n > - Tom\n", "msg_date": "Tue, 15 Sep 1998 21:12:41 +0200 (MDT)", "msg_from": "Frank Ridderbusch <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Found it. Also on SVR4 (Compiling 6.4 on NetBSD..." }, { "msg_contents": "Applied.\n\n> OK,\n> \n> I have a current version of PostgreSQL running on my pc532 now.\n> (It's a NS32K based machine. Somewhat of an antique really...)\n> \n> I had to apply the following diffs to get it to compile, but it\n> then passed the spinlock test, and most of the regression tests,\n> including the int8 test. It did not, however, get the datetime\n> test correct.\n> \n> For some reason which I haven't figured out yet, it thinks the\n> following:\n> \n> template1=> select ('epoch'::datetime) as ZeroSecs;\n> zerosecs \n> ----------------------------\n> Fri Dec 31 18:00:00 1999 CST\n> (1 row)\n> \n> template1=> select ('current'::datetime) as ZeroSecs;\n> zerosecs \n> ----------------------------\n> Fri Dec 31 18:00:00 1999 CST\n> (1 row)\n> \n> template1=> select ('now'::datetime) as ZeroSecs;\n> zerosecs \n> ----------------------------\n> Sun Sep 13 19:05:43 1998 CDT\n> (1 row)\n> \n> \n> So it knows how to get the date and time, but not always... I'd\n> think this was machine independent, but then I'd expect a MI problem\n> like that to get fixed very quickly. So I don't know if it's a\n> NetBSD/pc532 problem, a NetBSD problem, or a PostgreSQL problem,\n> but I suspect the first due to a lack of people screaming.\n> \n> I did build 6.3.2 with -DDATEDEBUG, but I'm not coherent enough\n> (yet?) to properly deduce anything yet. It appeared to all be\n> correct until it printed the results, implying that libc or a\n> syscall was returning some funny constant perhaps?\n> \n> Well, with all those disclaimers, here's the patch. (Beware, I\n> think I have it reversed, so you probably want to type patch -r...)\n> \n> \n> *** /usr/local/pgsql/src/include/storage/s_lock.h\tFri Sep 11 19:00:55 1998\n> --- s_lock.h\tSat Sep 12 00:27:51 1998\n> ***************\n> *** 213,219 ****\n> #endif\t /* NEED_I386_TAS_ASM */\n> \n> \n> ! /* NS32K code is in s_lock.c */\n> \n> #endif\t /* defined(__GNUC__) */\n> \n> --- 213,234 ----\n> #endif\t /* NEED_I386_TAS_ASM */\n> \n> \n> ! \n> ! #if defined(NEED_NS32K_TAS_ASM)\n> ! \n> ! #define S_LOCK(lock)\t\t\t\t\\\n> ! {\t\t\t\t\t\t\\\n> ! \tslock_t res = 1;\t\t\t\t\\\n> ! \twhile (res) {\t\t\t\t\\\n> ! \t __asm__(\"movqd 0, r0\");\t\t\t\\\n> ! \t __asm__(\"sbitd r0, %0\" : \"=m\"(*lock));\t\\\n> ! \t __asm__(\"sprb us, %0\" : \"=r\" (res));\t\\\n> ! \t res = ((res >> 5) & 1);\t\t\t\\\n> ! \t}\t\t\t\t\t\t\\\n> ! }\n> ! \n> ! #endif\t /* NEED_NS32K_TAS_ASM */\n> ! \n> \n> #endif\t /* defined(__GNUC__) */\n> \n> *** /usr/local/pgsql/src/backend/storage/buffer/s_lock.c\tThu Sep 10 23:08:00 1998\n> --- s_lock.c\tSat Sep 12 00:23:04 1998\n> ***************\n> *** 118,134 ****\n> #endif\t /* PPC */\n> \n> \n> - #if defined(__ns32k__)\n> - int\n> - tas(volatile slock_t *lock)\n> - {\n> - int res;\n> - __asm__(\"sbitb 0, %0\" : \"=m\"(*lock));\n> - __asm__(\"sprb us, %0\" : \"=r\"(res));\n> - res = (res >> 5) & 1;\n> - return res;\n> - }\n> - #endif\n> \n> #else\t\t\t\t\t\t\t/* defined(__GNUC__) */\n> /***************************************************************************\n> --- 118,123 ----\n> \n> \n> BTW, does the spinlock code need a TAS function so it can spin for\n> a while and then declare itself stuck, or does a second process/thread\n> take care of that. It would be simpler for the NS32K to just make\n> the whole lock function be 2 lines of inline assembler, but that\n> would contain an infinite loop if the lock was stuck...\n> \n> Jon Buller <[email protected]>\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Fri, 18 Sep 1998 01:32:06 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Compiling 6.4 on NetBSD-current/pc532" }, { "msg_contents": "> \n> Applied.\n> \n> > OK,\n> > \n> > I have a current version of PostgreSQL running on my pc532 now.\n> > (It's a NS32K based machine. Somewhat of an antique really...)\n> > \n> > \n> > *** /usr/local/pgsql/src/include/storage/s_lock.h\tFri Sep 11 19:00:55 1998\n> > --- s_lock.h\tSat Sep 12 00:27:51 1998\n> > ***************\n> > *** 213,219 ****\n> > #endif\t /* NEED_I386_TAS_ASM */\n> > \n> > \n> > ! /* NS32K code is in s_lock.c */\n> > \n> > #endif\t /* defined(__GNUC__) */\n> > \n> > --- 213,234 ----\n> > #endif\t /* NEED_I386_TAS_ASM */\n> > \n> > \n> > ! \n> > ! #if defined(NEED_NS32K_TAS_ASM)\n> > ! \n> > ! #define S_LOCK(lock)\t\t\t\t\\\n> > ! {\t\t\t\t\t\t\\\n> > ! \tslock_t res = 1;\t\t\t\t\\\n> > ! \twhile (res) {\t\t\t\t\\\n> > ! \t __asm__(\"movqd 0, r0\");\t\t\t\\\n> > ! \t __asm__(\"sbitd r0, %0\" : \"=m\"(*lock));\t\\\n> > ! \t __asm__(\"sprb us, %0\" : \"=r\" (res));\t\\\n> > ! \t res = ((res >> 5) & 1);\t\t\t\\\n> > ! \t}\t\t\t\t\t\t\\\n> > ! }\n> > ! \n> > ! #endif\t /* NEED_NS32K_TAS_ASM */\n> > ! \n> > \n> > #endif\t /* defined(__GNUC__) */\n> > \n> > *** /usr/local/pgsql/src/backend/storage/buffer/s_lock.c\tThu Sep 10 23:08:00 1998\n> > --- s_lock.c\tSat Sep 12 00:23:04 1998\n> > ***************\n> > *** 118,134 ****\n> > #endif\t /* PPC */\n> > \n> > \n> > - #if defined(__ns32k__)\n> > - int\n> > - tas(volatile slock_t *lock)\n> > - {\n> > - int res;\n> > - __asm__(\"sbitb 0, %0\" : \"=m\"(*lock));\n> > - __asm__(\"sprb us, %0\" : \"=r\"(res));\n> > - res = (res >> 5) & 1;\n> > - return res;\n> > - }\n> > - #endif\n> > \n> > #else\t\t\t\t\t\t\t/* defined(__GNUC__) */\n> > /***************************************************************************\n> > --- 118,123 ----\n> > \n> > \n> > BTW, does the spinlock code need a TAS function so it can spin for\n> > a while and then declare itself stuck, or does a second process/thread\n> > take care of that. It would be simpler for the NS32K to just make\n> > the whole lock function be 2 lines of inline assembler, but that\n> > would contain an infinite loop if the lock was stuck...\n> > \n> > Jon Buller <[email protected]>\n\nI wish I had noticed this before Bruce applied it.\n\nThe TAS function is needed so that stuck spinlocks can be recovered from.\nAlso, it enables the pseudo random back off which helps performance when\nthere are many backends.\n\nIn any case, this patch does not \"follow the one true path\" that I tried\nto outline in s_lock.c and s_lock.h. In fact it is exactly backwards.\n\nBasically the preferred way is:\n\n - in s_lock.h do nothing, the defaults should take care of you.\n\n -in s_lock.c define a TAS function that sets the spinlock and returns the\n previous state of the lock.\n\nI see from your asm()s that you are using gcc. In this case, your TAS function\nshould be called tas(), and should be defined inside the __GNUC__ section.\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": "Thu, 17 Sep 1998 23:27:48 -0700 (PDT)", "msg_from": "[email protected] (David Gould)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Compiling 6.4 on NetBSD-current/pc532" }, { "msg_contents": "> > \n> > Applied.\n> > \n> > > OK,\n> > > \n> > > I have a current version of PostgreSQL running on my pc532 now.\n> > > (It's a NS32K based machine. Somewhat of an antique really...)\n> > > \n> > > \n> > > *** /usr/local/pgsql/src/include/storage/s_lock.h\tFri Sep 11 19:00:55 1998\n> > > --- s_lock.h\tSat Sep 12 00:27:51 1998\n> > > ***************\n> > > *** 213,219 ****\n> > > #endif\t /* NEED_I386_TAS_ASM */\n> > > \n> > > \n> > > ! /* NS32K code is in s_lock.c */\n> > > \n> > > #endif\t /* defined(__GNUC__) */\n> > > \n> > > --- 213,234 ----\n> > > #endif\t /* NEED_I386_TAS_ASM */\n> > > \n> > > \n> > > ! \n> > > ! #if defined(NEED_NS32K_TAS_ASM)\n> > > ! \n> > > ! #define S_LOCK(lock)\t\t\t\t\\\n> > > ! {\t\t\t\t\t\t\\\n> > > ! \tslock_t res = 1;\t\t\t\t\\\n> > > ! \twhile (res) {\t\t\t\t\\\n> > > ! \t __asm__(\"movqd 0, r0\");\t\t\t\\\n> > > ! \t __asm__(\"sbitd r0, %0\" : \"=m\"(*lock));\t\\\n> > > ! \t __asm__(\"sprb us, %0\" : \"=r\" (res));\t\\\n> > > ! \t res = ((res >> 5) & 1);\t\t\t\\\n> > > ! \t}\t\t\t\t\t\t\\\n> > > ! }\n> > > ! \n> > > ! #endif\t /* NEED_NS32K_TAS_ASM */\n> > > ! \n> > > \n> > > #endif\t /* defined(__GNUC__) */\n> > > \n> > > *** /usr/local/pgsql/src/backend/storage/buffer/s_lock.c\tThu Sep 10 23:08:00 1998\n> > > --- s_lock.c\tSat Sep 12 00:23:04 1998\n> > > ***************\n> > > *** 118,134 ****\n> > > #endif\t /* PPC */\n> > > \n> > > \n> > > - #if defined(__ns32k__)\n> > > - int\n> > > - tas(volatile slock_t *lock)\n> > > - {\n> > > - int res;\n> > > - __asm__(\"sbitb 0, %0\" : \"=m\"(*lock));\n> > > - __asm__(\"sprb us, %0\" : \"=r\"(res));\n> > > - res = (res >> 5) & 1;\n> > > - return res;\n> > > - }\n> > > - #endif\n> > > \n> > > #else\t\t\t\t\t\t\t/* defined(__GNUC__) */\n> > > /***************************************************************************\n> > > --- 118,123 ----\n> > > \n> > > \n> > > BTW, does the spinlock code need a TAS function so it can spin for\n> > > a while and then declare itself stuck, or does a second process/thread\n> > > take care of that. It would be simpler for the NS32K to just make\n> > > the whole lock function be 2 lines of inline assembler, but that\n> > > would contain an infinite loop if the lock was stuck...\n> > > \n> > > Jon Buller <[email protected]>\n> \n> I wish I had noticed this before Bruce applied it.\n> \n> The TAS function is needed so that stuck spinlocks can be recovered from.\n> Also, it enables the pseudo random back off which helps performance when\n> there are many backends.\n> \n> In any case, this patch does not \"follow the one true path\" that I tried\n> to outline in s_lock.c and s_lock.h. In fact it is exactly backwards.\n> \n> Basically the preferred way is:\n> \n> - in s_lock.h do nothing, the defaults should take care of you.\n> \n> -in s_lock.c define a TAS function that sets the spinlock and returns the\n> previous state of the lock.\n> \n> I see from your asm()s that you are using gcc. In this case, your TAS function\n> should be called tas(), and should be defined inside the __GNUC__ section.\n\nThe patch had been on the list for a while, so I figured it was safe. \nI will back it out, and the user will have to study what is already\nthere and resubmit a new patch.\n\nI belive the problem is that 6.3 users are trying to get their platforms\ninto the new locking code, and naturally using their old code to do it.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Fri, 18 Sep 1998 13:09:03 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Compiling 6.4 on NetBSD-current/pc532" }, { "msg_contents": "[email protected] (David Gould) writes:\n\n[ reversed, and possibly bad NS32K patch removed from quoted material. ]\n\n> I wish I had noticed this before Bruce applied it.\n\nMe too, I wrote a quick hack that worked, and I always like people\nwho know what's really going on to double check things when possible.\n\n> The TAS function is needed so that stuck spinlocks can be recovered from.\n> Also, it enables the pseudo random back off which helps performance when\n> there are many backends.\n\nI suspected as much, which is why I wrote a tas function to fix\nthe link errors, rather than try to remove the code that called\ntas.\n\n> In any case, this patch does not \"follow the one true path\" that I tried\n> to outline in s_lock.c and s_lock.h. In fact it is exactly backwards.\n> \n> Basically the preferred way is:\n> \n> - in s_lock.h do nothing, the defaults should take care of you.\n> \n> -in s_lock.c define a TAS function that sets the spinlock and returns the\n> previous state of the lock.\n> \n> I see from your asm()s that you are using gcc. In this case, your TAS function\n> should be called tas(), and should be defined inside the __GNUC__ section.\n\nYour quote removes the comment that says something to the effect\nof: I think I built a bogus patch, you might need patch -r to make\nit work because it's backwards. In fact you might need more than\nthat to get the right pathnames in the right places. (My quoting\nremoves the whole patch... 8-) I built the patch by hand, since\ncvs patch spewed out a whole bunch of stuff in files I know I never\ntouched. I figured they were altered in the build process or\nsomething...\n\nHowever, what I did on my machine was to remove a #define S_LOCK ...\nfrom s_lock.h and add function tas in s_lock.c. It wouldn't link\nthe way it came out of cvs checkout, but it would with the changes\nI just described.\n\nI suspect Bruce got it right, otherwise hed have a handful of\ngarbled code. I think it *might* be like you describe it should\nbe, but please double check it, I will. (Like I said above, the\nmore the better, since I don't really know what I'm doing, just\nmaking some guesses.)\n", "msg_date": "Fri, 18 Sep 1998 16:20:02 -0500", "msg_from": "Jon Buller <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Compiling 6.4 on NetBSD-current/pc532 " }, { "msg_contents": "> \n> [email protected] (David Gould) writes:\n> \n> [ reversed, and possibly bad NS32K patch removed from quoted material. ]\n> \n> > I wish I had noticed this before Bruce applied it.\n> \n> Me too, I wrote a quick hack that worked, and I always like people\n> who know what's really going on to double check things when possible.\n> \n> > The TAS function is needed so that stuck spinlocks can be recovered from.\n> > Also, it enables the pseudo random back off which helps performance when\n> > there are many backends.\n> \n> I suspected as much, which is why I wrote a tas function to fix\n> the link errors, rather than try to remove the code that called\n> tas.\n> \n> > In any case, this patch does not \"follow the one true path\" that I tried\n> > to outline in s_lock.c and s_lock.h. In fact it is exactly backwards.\n> > \n> > Basically the preferred way is:\n> > \n> > - in s_lock.h do nothing, the defaults should take care of you.\n> > \n> > -in s_lock.c define a TAS function that sets the spinlock and returns the\n> > previous state of the lock.\n> > \n> > I see from your asm()s that you are using gcc. In this case, your TAS function\n> > should be called tas(), and should be defined inside the __GNUC__ section.\n> \n> Your quote removes the comment that says something to the effect\n> of: I think I built a bogus patch, you might need patch -r to make\n> it work because it's backwards. In fact you might need more than\n> that to get the right pathnames in the right places. (My quoting\n> removes the whole patch... 8-) I built the patch by hand, since\n> cvs patch spewed out a whole bunch of stuff in files I know I never\n> touched. I figured they were altered in the build process or\n> something...\n> \n> However, what I did on my machine was to remove a #define S_LOCK ...\n> from s_lock.h and add function tas in s_lock.c. It wouldn't link\n> the way it came out of cvs checkout, but it would with the changes\n> I just described.\n> \n> I suspect Bruce got it right, otherwise hed have a handful of\n> garbled code. I think it *might* be like you describe it should\n> be, but please double check it, I will. (Like I said above, the\n> more the better, since I don't really know what I'm doing, just\n> making some guesses.)\n\nI completely missed the part about the patch being reversed... duh.\n\nOk, so if what you did is undefine the S_LOCK for your platform (to select\nthe default), and add a tas() function to s_lock.c then that is exactly\nwhat was supposed to happen and I was just confused by the reversed patch.\n\nSince Bruce un-applied your change, the simplest way to fix things from here\nmight be for you to submit a new (un-reversed this time) patch and after\nBruce applies it I will pull it down and verify it.\n\nSorry for the confusion.\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": "Fri, 18 Sep 1998 17:06:00 -0700 (PDT)", "msg_from": "[email protected] (David Gould)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Compiling 6.4 on NetBSD-current/pc532" } ]
[ { "msg_contents": "\nMorning...\n\n\tWell, as of 00:40EST, there is a BETA1 available at\nftp.postgresql.org:/pub/postgresql.v6.4-BETA1.tar.gz ...\n\n\tI've add a README-1ST file to the top level that is meant to\nprovide a listing of those operating systems that are supported, dated as\nto the last time it was known to do so. Right now, only FreeBSD\n3.0-CURRENT is listed, but I hope others testing it will put in their\n\"two-cents\" worth :)\n\n Marc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 14 Sep 1998 01:44:54 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": true, "msg_subject": "BETA1 Snapshot built..." }, { "msg_contents": "Hi,\njust tested on Debian 2.0 and it works.\n\nverlag=> select version();\nversion \n--------------------------------------------------------------\nPostgreSQL 6.4.0 on i586-pc-linux-gnu, compiled by gcc 2.7.2.3\n(1 row)\n\n-Egon\n\nOn Mon, 14 Sep 1998, The Hermit Hacker wrote:\n\n> \n> Morning...\n> \n> \tWell, as of 00:40EST, there is a BETA1 available at\n> ftp.postgresql.org:/pub/postgresql.v6.4-BETA1.tar.gz ...\n> \n> \tI've add a README-1ST file to the top level that is meant to\n> provide a listing of those operating systems that are supported, dated as\n> to the last time it was known to do so. Right now, only FreeBSD\n> 3.0-CURRENT is listed, but I hope others testing it will put in their\n> \"two-cents\" worth :)\n> \n> Marc G. Fournier \n> Systems Administrator @ hub.org \n> primary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 14 Sep 1998 07:24:45 +0200 (MET DST)", "msg_from": "Egon Schmid <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] BETA1 Snapshot built..." }, { "msg_contents": "> Well, as of 00:40EST, there is a BETA1 available at\n> ftp.postgresql.org:/pub/postgresql.v6.4-BETA1.tar.gz ...\n> > > Added Files:\n> > > README-1ST\n> > > A sort of 'log' of what operating systems are supported\n> > Marc, can you please use the existing file for this? Look at\n> > http://www.postgresql.org/docs/admin/ports.htm\n> I'll remove (README-1ST)...\n\nThanks Marc. So, for this release the drill is the same: it would be\ngreat to have as many platforms as possible regression tested as early\nas possible now that the beta1 is available.\n\nI would expect that the last regression test (which involves the rules\nsystem) will fail for almost everyone since the \"expected\" file assumes\na specific Postgres user name for running the test. I'm working on\nfixing that now.\n\nOn my Linux/i686 machine, all regression tests pass with that one\nexception. As folks have found before, other machines may show an exact\nmatch or may show minor differences in floating point rounding and in\nerror messages, neither of which are fatal.\n\nEither report your results on the hackers list or send in a patch for\n\n doc/src/sgml/ports.sgml\n\nand the results will show up on the web site and in the v6.4\nAdministrator's Guide.\n\nv6.4 has lots of nice improvements, so start testing to make sure you\ncan use it on your platform...\n\n - Tom\n", "msg_date": "Mon, 14 Sep 1998 14:11:38 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] BETA1 Snapshot built..." }, { "msg_contents": "On Mon, 14 Sep 1998, Thomas G. Lockhart wrote:\n\n> > Well, as of 00:40EST, there is a BETA1 available at\n> > ftp.postgresql.org:/pub/postgresql.v6.4-BETA1.tar.gz ...\n> > > > Added Files:\n> > > > README-1ST\n> > > > A sort of 'log' of what operating systems are supported\n> > > Marc, can you please use the existing file for this? Look at\n> > > http://www.postgresql.org/docs/admin/ports.htm\n> > I'll remove (README-1ST)...\n> \n> Thanks Marc. So, for this release the drill is the same: it would be\n> great to have as many platforms as possible regression tested as early\n> as possible now that the beta1 is available.\n\n\tYup...I'm going to spend some time here getting things working\nalso, which gives me Sparc/2.5.1, Sparc/2.6 and x86/2.6..\n\n\n", "msg_date": "Mon, 14 Sep 1998 10:22:02 -0400 (EDT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] BETA1 Snapshot built..." }, { "msg_contents": "\nOn 14-Sep-98 The Hermit Hacker wrote:\n> \n> Morning...\n> \n> Well, as of 00:40EST, there is a BETA1 available at\n> ftp.postgresql.org:/pub/postgresql.v6.4-BETA1.tar.gz ...\n> \n> I've add a README-1ST file to the top level that is meant to\n> provide a listing of those operating systems that are supported, dated as\n> to the last time it was known to do so. Right now, only FreeBSD\n> 3.0-CURRENT is listed, but I hope others testing it will put in their\n> \"two-cents\" worth :)\n\nMay be a while. Transfer rate's below 1K/s !!!\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": "Mon, 14 Sep 1998 15:09:37 -0400 (EDT)", "msg_from": "Vince Vielhaber <[email protected]>", "msg_from_op": false, "msg_subject": "RE: [HACKERS] BETA1 Snapshot built..." }, { "msg_contents": "Thus spake Vince Vielhaber\n> On 14-Sep-98 The Hermit Hacker wrote:\n> > Well, as of 00:40EST, there is a BETA1 available at\n> > ftp.postgresql.org:/pub/postgresql.v6.4-BETA1.tar.gz ...\n> May be a while. Transfer rate's below 1K/s !!!\n\nNot sure why it is taking you so long but if anyone is having problems\nI have copied it to the other side of the T1. You can get it at\n\n ftp://ftp.vex.net/pub/postgresql.v6.4-BETA1.tar.gz\n\nfor now. Marc, poke me personally when you create a new beta. Vince,\nI would be curious to see if that improves your download. If not then\nthe problem must be closer to you as that site is ethernet connected\nto the backbone.\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": "Mon, 14 Sep 1998 17:34:00 -0400 (EDT)", "msg_from": "[email protected] (D'Arcy J.M. Cain)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] BETA1 Snapshot built..." }, { "msg_contents": "\nOn 14-Sep-98 D'Arcy J.M. Cain wrote:\n> Thus spake Vince Vielhaber\n>> On 14-Sep-98 The Hermit Hacker wrote:\n>> > Well, as of 00:40EST, there is a BETA1 available at\n>> > ftp.postgresql.org:/pub/postgresql.v6.4-BETA1.tar.gz ...\n>> May be a while. Transfer rate's below 1K/s !!!\n> \n> Not sure why it is taking you so long but if anyone is having problems\n> I have copied it to the other side of the T1. You can get it at\n> \n> ftp://ftp.vex.net/pub/postgresql.v6.4-BETA1.tar.gz\n> \n> for now. Marc, poke me personally when you create a new beta. Vince,\n> I would be curious to see if that improves your download. If not then\n> the problem must be closer to you as that site is ethernet connected\n> to the backbone.\n\nI got a note from QualNet a little while ago and it seems MCI had a fiber\noptic line cut so things were rerouted (I think they called it \"suboptimal\nrouting\" :) The transfer timed out after about 2 and a half MB. I'll \ntry it again in a bit as well as the other site - after things are back up.\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": "Mon, 14 Sep 1998 17:50:58 -0400 (EDT)", "msg_from": "Vince Vielhaber <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] BETA1 Snapshot built..." }, { "msg_contents": ">On Mon, 14 Sep 1998, Thomas G. Lockhart wrote:\n>\n>> > Well, as of 00:40EST, there is a BETA1 available at\n>> > ftp.postgresql.org:/pub/postgresql.v6.4-BETA1.tar.gz ...\n>> > > > Added Files:\n>> > > > README-1ST\n>> > > > A sort of 'log' of what operating systems are supported\n>> > > Marc, can you please use the existing file for this? Look at\n>> > > http://www.postgresql.org/docs/admin/ports.htm\n>> > I'll remove (README-1ST)...\n>> \n>> Thanks Marc. So, for this release the drill is the same: it would be\n>> great to have as many platforms as possible regression tested as early\n>> as possible now that the beta1 is available.\n>\n>\tYup...I'm going to spend some time here getting things working\n>also, which gives me Sparc/2.5.1, Sparc/2.6 and x86/2.6..\n\nI have sucessfully run regression tests of BETA1 on following\nplatforms:\n\nOS\t\tProcessor\n-------------------------------------\nMkLinux DR3\tPPC750\t\t\n\nLinux 2.1.24\tPPC603e (*)\n\nFreeBSD 2.2.6\tPentium Pro 200MHz\n--------------------------------------\n* Running the regression test on 2.1.103 kernel crashes the system. I\nheard that this is due to a known bug of the kernel with the Unix\ndomain socket. I'm not sure about 2.1.11x kernels.\n\n\nBTW, I see the 6.4 frontend cannot connect to the 6.3.2 backend. I\nassume this is normal.\n--\nTatsuo Ishii\[email protected]\n", "msg_date": "Wed, 16 Sep 1998 15:59:53 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] BETA1 Snapshot built... " }, { "msg_contents": "> BTW, I see the 6.4 frontend cannot connect to the 6.3.2 backend. I\n> assume this is normal.\n\nYes.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Wed, 16 Sep 1998 07:23:05 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] BETA1 Snapshot built..." } ]
[ { "msg_contents": "Is it possible to include just <name> as opt_portal_name as well? That is\ninstead of fetch in c I'd like to write fetch c. ECPG does allow this for\nOracle compatibility and I think it wouldn't be a bad idea for the backend\ntoo.\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Mon, 14 Sep 1998 08:55:15 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "Fetch command" } ]
[ { "msg_contents": "Okay, I just found the problem. When enabling 'fetch C' I get shift/reduce\nproblems. Tom, can we work around this, or do we have to be incompatible to\nOracle?\n\nMichael\n-- \nMichael Meskes\t\t\[email protected], [email protected]\nGo SF49ers! Go Rhein Fire!\tUse Debian GNU/Linux! \n", "msg_date": "Mon, 14 Sep 1998 09:32:39 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "Fetch again" } ]
[ { "msg_contents": "My backlog is getting longer and longer. Could anyone please apply this to\nthe archive? Thanks a lot.\n\nMichael\n\n-- \nDr. Michael Meskes | Th.-Heuss-Str. 61, D-41812 Erkelenz | Go SF49ers!\nSenior-Consultant | business: [email protected] | Go Rhein Fire!\nMummert+Partner | private: [email protected] | Use Debian\nUnternehmensberatung AG | [email protected] | GNU/Linux!", "msg_date": "Mon, 14 Sep 1998 11:20:08 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "ecpg patches" } ]
[ { "msg_contents": "Jon Buller wrote:\n> \n> For some reason which I haven't figured out yet, it thinks the\n> following:\n> \n> template1=> select ('epoch'::datetime) as ZeroSecs;\n> zerosecs \n> ----------------------------\n> Fri Dec 31 18:00:00 1999 CST\n> (1 row)\n> \n> template1=> select ('current'::datetime) as ZeroSecs;\n> zerosecs \n> ----------------------------\n> Fri Dec 31 18:00:00 1999 CST\n> (1 row)\n> \n> template1=> select ('now'::datetime) as ZeroSecs;\n> zerosecs \n> ----------------------------\n> Sun Sep 13 19:05:43 1998 CDT\n> (1 row)\n\nSo I thought I would try it and:\n\ntemplate1=> select ('epoch'::datetime) as ZeroSecs;\nzerosecs\n--------\nepoch \n(1 row)\n\ntemplate1=> select ('current'::datetime) as ZeroSecs;\nzerosecs\n--------\ncurrent \n(1 row)\n\ntemplate1=> select ('now'::datetime) as ZeroSecs;\nzerosecs \n----------------------------\nMon Sep 14 11:01:44 1998 BST\n(1 row)\n\n?!\n\n\nCheers,\n\nPatrick\n\nPS\n#define DBL_MAX 1.7976931348623157E+308\n#define DBL_MIN 2.2250738585072014E-308\nand are OK in a program - NetBSD/i386, postgresql-current\n", "msg_date": "Mon, 14 Sep 1998 11:05:41 +0100 (BST)", "msg_from": "[email protected] (Patrick Welche)", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Compiling 6.4 on NetBSD-current/pc532" }, { "msg_contents": "> ?!\n> PS\n> #define DBL_MAX 1.7976931348623157E+308\n> #define DBL_MIN 2.2250738585072014E-308\n> and are OK in a program - NetBSD/i386, postgresql-current\n\nSure, it's the NS32532 and the math library that are the problem, not\nthe NetBSD or Postgres per-se. Once we are running on two dozen\nprocessors and OSes (which we are!), new problems seen on a new\ncombination are likely to be pretty arcane.\n\nLet me know how it goes, Jon. Once we have isolated the problem, we can\nwork around it for your machine and put the workaround into the code. If\nwe can get this done in the next week or two you'll have it in v6.4 when\nit is released...\n\nReally nice processor btw; too bad it got buried by the brain-dead ix86.\nI'd much rather be running on a clean 400mips NS32x32...\n\n - Tom\n", "msg_date": "Mon, 14 Sep 1998 13:32:55 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Compiling 6.4 on NetBSD-current/pc532" }, { "msg_contents": "At 6:32 AM -0700 9/14/98, Thomas G. Lockhart wrote:\n>> ?!\n>> PS\n>> #define DBL_MAX 1.7976931348623157E+308\n>> #define DBL_MIN 2.2250738585072014E-308\n>> and are OK in a program - NetBSD/i386, postgresql-current\n>\n>Sure, it's the NS32532 and the math library that are the problem, not\n>the NetBSD or Postgres per-se. Once we are running on two dozen\n>processors and OSes (which we are!), new problems seen on a new\n>combination are likely to be pretty arcane.\n>\n>Let me know how it goes, Jon. Once we have isolated the problem, we can\n>work around it for your machine and put the workaround into the code. If\n>we can get this done in the next week or two you'll have it in v6.4 when\n\nWell, since this is NetBSD-current we're talking about, and not a fixed\nrelease version, I'd say the correct procedure is to fix NetBSD if that's\nwhere the problem is. We should still be able to get the fix in by release\ndate if someone does a send-pr with a real fix/patch to the NetBSD\nportmaster. A footnote in the PG release notes about needing -current\npost-<some-date> for the '532 might be appropriate.\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": "Mon, 14 Sep 1998 08:46:24 -0700", "msg_from": "\"Henry B. Hotz\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Compiling 6.4 on NetBSD-current/pc532" } ]
[ { "msg_contents": " Hello,\n \n I was wondering if you guys managed to get in user-setable tuples > 8191 \n into the 6.4 beta so I could get a look at it.\n \n Thanks,\n Eddie\n [email protected]\n", "msg_date": "Mon, 14 Sep 1998 10:39:47 -0400 (EDT)", "msg_from": "Integration <[email protected]>", "msg_from_op": true, "msg_subject": "Query: Extensible Tuple Sizes?" }, { "msg_contents": ">\n> I was wondering if you guys managed to get in user-setable tuples > 8191\n> into the 6.4 beta so I could get a look at it.\n>\n\nI didn't manage to get this done. In the meantime, a new approach to this\nproblem has been briefly discussed. In 6.5, someone (I if no one else) will\nimplement tuple chaining. Tuples will able to span blocks, thus limiting\nthe\ntuple size to the system file size limit, in theory.\n\nNot sure what use a db with one massive tuple would be though. :)\n\nTuples that span blocks would obviously have a performance penalty, but\nwould\nremove the size limit.\n\nAny opinions or comments?\n\nDarren\n\n", "msg_date": "Mon, 14 Sep 1998 19:29:28 -0400", "msg_from": "\"Stupor Genius\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: [HACKERS] Query: Extensible Tuple Sizes?" } ]
[ { "msg_contents": "Do we have something similar to Oracle's describe command? That is an SQL\nstatement that outputs the table definition.\n\nMichael\n-- \nDr. Michael Meskes | Th.-Heuss-Str. 61, D-41812 Erkelenz | Go SF49ers!\nSenior-Consultant | business: [email protected] | Go Rhein Fire!\nMummert+Partner | private: [email protected] | Use Debian\nUnternehmensberatung AG | [email protected] | GNU/Linux!\n", "msg_date": "Mon, 14 Sep 1998 17:11:28 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "Describe command" } ]
[ { "msg_contents": "Are there any plans to add row level locking to Postgres? This is a\nperfect database for us, but row level locking (or even page level\nlocking) is beginning to become a need for us.\n\nThanks,\n\nBrian\n\n\n--\nCliniComp, Intl, Inc. (\"CCI\") does not authorize the use of E-\nmail messaging to confirm any legally binding contract, agreement,\nCommitment, representation or warranty. CCI does not assume\nliability for the content of any E-mail message. Any contract or\nobligation must be separately confirmed in a document signed (not\nelectronically) by an authorized CCI representative. See CCI's\nWebsite at www.clinicomp.com for additional disclaimers,\nlimitations and explanations of CCI's E-mail policies. =\n\n", "msg_date": "Mon, 14 Sep 1998 14:26:05 -0700", "msg_from": "Brian Sanders <[email protected]>", "msg_from_op": true, "msg_subject": "Row-level locking" } ]
[ { "msg_contents": "\nThe following tests failed:\n\nint8 .. failed\nfloat8 .. failed\nnumerology .. failed\ngeometry .. failed\ntinterval .. failed\nunion .. failed\nrun_ruletest .. failed\n\n\nThe output of checkresults is here:\n\nhttp://www.michvhf.com/~vev/postgres/regression.test.diffs \n\nSeeing as it's around 40K, I didn't want to send it to the list, this\nway anyone can get it if they want.\n\nThe system is a K6-233 w/ 64MB ram running FreeBSD 2.2.6-RELEASE\n\nIn case anyone's interested, I didn't get much better transfer times from\nvex, so I went to the mit mirror and got it. BTW, Marc: there is a typo\nin the address for the mit mirror. It's mit/edu instead of mit.edu\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": "Mon, 14 Sep 1998 20:20:31 -0400 (EDT)", "msg_from": "Vince Vielhaber <[email protected]>", "msg_from_op": true, "msg_subject": "Regress results on FreeBSD 2.2.6-RELEASE" } ]
[ { "msg_contents": "subscribe\n", "msg_date": "Tue, 15 Sep 1998 05:48:03 +0200", "msg_from": "\"Chandrashekar T S (MICO/PPI9)\" <[email protected]>", "msg_from_op": true, "msg_subject": "None" } ]
[ { "msg_contents": "subscribe\n\n", "msg_date": "Tue, 15 Sep 1998 13:48:16 +0930", "msg_from": "[email protected]", "msg_from_op": true, "msg_subject": "subscribe" } ]
[ { "msg_contents": "Hi all,\n\nPostgreSQL gives me a strange message when I try to create a table\nwith a NOT NULL column.\n\n\ndrop table prova;\nDROP\ncreate table prova(\n campo1 INTEGER\n );\nCREATE\n\ndrop table prova;\nDROP\ncreate table prova(\n campo1 INTEGER NOT NULL\n );\nNOTICE: _outNode: don't know how to print type 715\nCREATE\n\\d prova\n\nTable = prova\n+---------------------------+----------------------------------+-------+\n| Field | Type | Length|\n+---------------------------+----------------------------------+-------+\n| campo1 | int4 not null | 4 |\n+---------------------------+----------------------------------+-------+\n\nDoes someone knows what that message means ?\n\n Thank you,\n Jose'\n", "msg_date": "Tue, 15 Sep 1998 13:14:32 +0200", "msg_from": "\"Jose' Soares\" <[email protected]>", "msg_from_op": true, "msg_subject": "NOTICE: _outNode: don't know how to print type 715" }, { "msg_contents": "Hi all,\n \n PostgreSQL gives me a strange message when I try to create a table\n with a NOT NULL column.\n \n drop table prova;\n DROP\n create table prova(\n campo1 INTEGER\n );\n CREATE\n \n drop table prova;\n DROP\n create table prova(\n campo1 INTEGER NOT NULL\n );\n NOTICE: _outNode: don't know how to print type 715\n CREATE\n \\d prova\n \n Table = prova\n\n+---------------------------+----------------------------------+-------+\n | Field | Type |\nLength|\n\n+---------------------------+----------------------------------+-------+\n | campo1 | int4 not null | 4\n|\n\n+---------------------------+----------------------------------+-------+\n \n Does someone knows what this message means ?\n \n Thank you,\n Jose'\n", "msg_date": "Thu, 17 Sep 1998 15:31:58 +0200", "msg_from": "\"Jose' Soares\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: NOTICE: _outNode: don't know how to print type 715" }, { "msg_contents": "> Hi all,\n> \n> PostgreSQL gives me a strange message when I try to create a table\n> with a NOT NULL column.\n> \n> drop table prova;\n> DROP\n> create table prova(\n> campo1 INTEGER\n> );\n> CREATE\n> \n> drop table prova;\n> DROP\n> create table prova(\n> campo1 INTEGER NOT NULL\n> );\n> NOTICE: _outNode: don't know how to print type 715\n> CREATE\n> \\d prova\n> \n> Table = prova\n> \n> +---------------------------+----------------------------------+-------+\n> | Field | Type |\n> Length|\n> \n> +---------------------------+----------------------------------+-------+\n> | campo1 | int4 not null | 4\n> |\n> \n> +---------------------------+----------------------------------+-------+\n> \n> Does someone knows what this message means ?\n\nIt is a bug, though I am not sure what is causing it. What version are\nyou running?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Thu, 17 Sep 1998 11:57:05 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] Re: NOTICE: _outNode: don't know how to print type 715" }, { "msg_contents": "> Hi all,\n> \n> PostgreSQL gives me a strange message when I try to create a table\n> with a NOT NULL column.\n> \n> drop table prova;\n> DROP\n> create table prova(\n> campo1 INTEGER\n> );\n> CREATE\n> \n> drop table prova;\n> DROP\n> create table prova(\n> campo1 INTEGER NOT NULL\n> );\n> NOTICE: _outNode: don't know how to print type 715\n> CREATE\n> \\d prova\n> \n> Table = prova\n> \n> +---------------------------+----------------------------------+-------+\n> | Field | Type |\n> Length|\n> \n> +---------------------------+----------------------------------+-------+\n> | campo1 | int4 not null | 4\n> |\n> \n> +---------------------------+----------------------------------+-------+\n> \n> Does someone knows what this message means ?\n\nI retract my comment that this is a bug. I can not reproduce this here.\n\nPerhaps your system tables have gotten messed up somehow.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Thu, 17 Sep 1998 11:59:14 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: NOTICE: _outNode: don't know how to print type 715" }, { "msg_contents": "> > PostgreSQL gives me a strange message when I try to create a table\n> > with a NOT NULL column.\n> > create table prova(\n> > campo1 INTEGER NOT NULL\n> > );\n> > NOTICE: _outNode: don't know how to print type 715\n> > Does someone knows what this message means ?\n> I retract my comment that this is a bug. I can not reproduce this \n> here.\n\nYou have compiled the parser subdirectory with -DPARSEDEBUG, which then\ntries to print the parse tree. The nodes subdirectory must be compiled\nwith -DPARSEDEBUG to get extra nodes to be recognized by the printing\nroutine.\n\nIt could be something else, but I get a similar symptom when I do this.\n\nIt's my fault that those PARSEDEBUG blocks are in there in the first\nplace. But I didn't want these nodes which don't usually propagate past\nthe parser to be mixed in to normal backend nodes in the print routines.\n\n - Tom\n", "msg_date": "Sun, 20 Sep 1998 23:36:53 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: NOTICE: _outNode: don't know how to print type 715" }, { "msg_contents": "Thomas G. Lockhart wrote:\n> \n> > > PostgreSQL gives me a strange message when I try to create a table\n> > > with a NOT NULL column.\n> > > create table prova(\n> > > campo1 INTEGER NOT NULL\n> > > );\n> > > NOTICE: _outNode: don't know how to print type 715\n> > > Does someone knows what this message means ?\n> > I retract my comment that this is a bug. I can not reproduce this\n> > here.\n> \n> You have compiled the parser subdirectory with -DPARSEDEBUG, which then\n> tries to print the parse tree. The nodes subdirectory must be compiled\n> with -DPARSEDEBUG to get extra nodes to be recognized by the printing\n> routine.\n> \n> It could be something else, but I get a similar symptom when I do this.\n\nYou are right Tom, now I remember, the other day I ran the postmaster\nwith \nparameter -d to have debug information about another problem.\nNow without -d the bad message is gone away.\n\nThanks a lot\n Jose'\n", "msg_date": "Mon, 21 Sep 1998 16:56:54 +0200", "msg_from": "\"Jose' Soares\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Re: NOTICE: _outNode: don't know how to print type 715" } ]
[ { "msg_contents": "\n\nHmmm. I sent this yesterday and never saw it come back. Did it go \nthrough, is the list down or did I get bumped off the list?\n\n------\n\nThe following tests failed:\n\nint8 .. failed\nfloat8 .. failed\nnumerology .. failed\ngeometry .. failed\ntinterval .. failed\nunion .. failed\nrun_ruletest .. failed\n\n\nThe output of checkresults is here:\n\nhttp://www.michvhf.com/~vev/postgres/regression.test.diffs \n\nSeeing as it's around 40K, I didn't want to send it to the list, this\nway anyone can get it if they want.\n\nThe system is a K6-233 w/ 64MB ram running FreeBSD 2.2.6-RELEASE\n\nIn case anyone's interested, I didn't get much better transfer times from\nvex, so I went to the mit mirror and got it. BTW, Marc: there is a typo\nin the address for the mit mirror. It's mit/edu instead of mit.edu\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, 15 Sep 1998 07:23:42 -0400 (EDT)", "msg_from": "Vince Vielhaber <[email protected]>", "msg_from_op": true, "msg_subject": "Regress results on FreeBSD 2.2.6-RELEASE - RESEND" }, { "msg_contents": "On Tue, 15 Sep 1998, Vince Vielhaber wrote:\n\n> \n> \n> Hmmm. I sent this yesterday and never saw it come back. Did it go \n> through, is the list down or did I get bumped off the list?\n\n\tList had problems yesterday due to some work on the system...\n\n> ------\n> \n> The following tests failed:\n> \n> int8 .. failed\n> float8 .. failed\n> numerology .. failed\n> geometry .. failed\n> tinterval .. failed\n> union .. failed\n> run_ruletest .. failed\n> \n> \n> The output of checkresults is here:\n> \n> http://www.michvhf.com/~vev/postgres/regression.test.diffs \n> \n> Seeing as it's around 40K, I didn't want to send it to the list, this\n> way anyone can get it if they want.\n> \n> The system is a K6-233 w/ 64MB ram running FreeBSD 2.2.6-RELEASE\n> \n> In case anyone's interested, I didn't get much better transfer times from\n> vex, so I went to the mit mirror and got it. BTW, Marc: there is a typo\n> in the address for the mit mirror. It's mit/edu instead of mit.edu\n> \n> Vince.\n> -- \n> ==========================================================================\n> Vince 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\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Tue, 15 Sep 1998 19:12:16 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Regress results on FreeBSD 2.2.6-RELEASE - RESEND" } ]
[ { "msg_contents": "\"select @1\" crashes the backend on my LinuxPPC box.\n\nin left_oper() line 785:\n\n\ttargetOid = func_select_candidate(1, &arg, candidates);\n\nHere returned targetOid is NULL and it seems this causes a\nsegfault later. Comments?\n--\nTatsuo Ishii\[email protected]\n\n", "msg_date": "Tue, 15 Sep 1998 20:25:03 +0900", "msg_from": "[email protected] (Tatsuo Ishii)", "msg_from_op": true, "msg_subject": "a query to crash the backend" } ]
[ { "msg_contents": "I am experimenting to compile postgresql-snapshot [Sep 15 07:01] on BSD/OS 3.1\n\nconfigure however chooses the bsdi_4.0 template. (which uses different kind of \nshared libraries)\n\nUpon investigation, it turns out that there is template/.similar file that \n'helps' configure choose the proper template with fewer hard-coded \ninstructions.\nFor BSD/OS it lists:\n\ni386-pc-bsdi2.0=bsdi_2.0\ni386-pc-bsdi2.1=bsdi_2.1\ni386-pc-bsdi3.0=bsdi_2.1\ni386-pc-bsdi4.0=bsdi_4.0\n\nI tried adding\n\ni386-pc-bsdi3.1=bsdi_2.1\n\nthere but the result was the same.\n\nIt turns out, that configure executes\n\nGUESS=`grep \"$host_no_ver\" template/.similar | sed 's/.*=//' | tail -1`\n\nto guess the template... but earlier host_no_ver is set using\n\nhost_no_ver=`echo \"$host\" | sed 's/[0-9.]*$//'`\n\nwhich in my cases results in\n\ni386-pc-bsdi\n\nwhich apparently matches all rows in the .similar file and returns the last \none...\n\nI understand the reasons to have such 'automatism', to pick the latest version \nif other is not defined in the .similar file, but apparently this should pick \nthe longest match first.\n\nWhich can be done using two-pass selection, first with using '$host', then \nwith using '$host_no_ver' in configure.\n\nThe enclosed patch does that.\n\nDaniel", "msg_date": "Tue, 15 Sep 1998 14:30:18 +0300", "msg_from": "Daniel Kalchev <[email protected]>", "msg_from_op": true, "msg_subject": "configure autodetection problem" } ]
[ { "msg_contents": "I have been wondering why the perl5 module is compiled using the \n\ncd perl5 && perl Makefile.PL\n\ncommand (in /var/src/local/pgsql/src/interfaces/Makefile)\n\nWhy perl and not perl5? :-)\n\nOn BSD/OS 'perl' is perl 4.0 and perl5 is separate binary. TO add to the \nconfustion, /usr/local/bin/perl is perl5 (symbolic link).\n\nDo other platform have 'perl' binary is that is actually perl 5.0, but do not \nhave perl5 binary?\n\nMaybe configure should test about perl version and proper binary?\n\nDaniel\n\n", "msg_date": "Tue, 15 Sep 1998 14:47:23 +0300", "msg_from": "Daniel Kalchev <[email protected]>", "msg_from_op": true, "msg_subject": "perl vs perl5" }, { "msg_contents": "On Tue, 15 Sep 1998, Daniel Kalchev wrote:\n\n> I have been wondering why the perl5 module is compiled using the \n> \n> cd perl5 && perl Makefile.PL\n> \n> command (in /var/src/local/pgsql/src/interfaces/Makefile)\n> \n> Why perl and not perl5? :-)\n> \n> On BSD/OS 'perl' is perl 4.0 and perl5 is separate binary. TO add to the \n> confustion, /usr/local/bin/perl is perl5 (symbolic link).\n> \n> Do other platform have 'perl' binary is that is actually perl 5.0, but\n> do not have perl5 binary?\n\n\tCorrect...I have /usr/bin/perl which is perl4, and\n/usr/local/bin/perl, which is perl5 ...\n\n\n\n\n", "msg_date": "Tue, 15 Sep 1998 08:41:19 -0400 (EDT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] perl vs perl5" } ]
[ { "msg_contents": "Bruce Momjian <[email protected]>\n\n> \n> This query crashes the backend. pg_rules is a new system view:\n> \n> \tBEGIN WORK;\t\n> \tDECLARE c_matches BINARY CURSOR FOR\n> \tSELECT count(*)\n> \tFROM pg_attrdef t1, pg_rules t2\n> \tWHERE t1.adrelid = t2.oid\n> \tEND WORK;\n> \n> Partial backtrace is below. It is crashing in the optimizer.\n\nBruce,\n\nI'm getting the same here when testing your query.\n\nThe odd (maybe not?) thing is that views appear to have\na NULL oid for all tuples.\n\npostgres=> select oid,usename from pg_user;\noid|usename\n---+--------\n |postgres \n^^^\n\nThinking about it, a view would not actually have an OID for each\ntuple as it's not a real table.\n \nIt also crashed without the BEGIN or DECLARE ...\n\npostgres=> SELECT count(*) FROM pg_attrdef t1, pg_rules t2 WHERE \nt1.adrelid = t2.oid;\npqReadData() -- backend closed the channel unexpectedly. \n\nAs usual I have no idea where to look for the problem!!\n\nKeith.\n\n", "msg_date": "Tue, 15 Sep 1998 15:35:49 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] crash on new system views" }, { "msg_contents": "> Bruce Momjian <[email protected]>\n> \n> > \n> > This query crashes the backend. pg_rules is a new system view:\n> > \n> > \tBEGIN WORK;\t\n> > \tDECLARE c_matches BINARY CURSOR FOR\n> > \tSELECT count(*)\n> > \tFROM pg_attrdef t1, pg_rules t2\n> > \tWHERE t1.adrelid = t2.oid\n> > \tEND WORK;\n> > \n> > Partial backtrace is below. It is crashing in the optimizer.\n> \n> Bruce,\n> \n> I'm getting the same here when testing your query.\n> \n> The odd (maybe not?) thing is that views appear to have\n> a NULL oid for all tuples.\n\nThis has always been the case. Views don't have oid.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 15 Sep 1998 11:17:00 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] crash on new system views" } ]
[ { "msg_contents": "Bruce Momjian <[email protected]>\n> \n> > Bruce Momjian <[email protected]>\n> > \n> > > \n> > > This query crashes the backend. pg_rules is a new system view:\n> > > \n> > > \tBEGIN WORK;\t\n> > > \tDECLARE c_matches BINARY CURSOR FOR\n> > > \tSELECT count(*)\n> > > \tFROM pg_attrdef t1, pg_rules t2\n> > > \tWHERE t1.adrelid = t2.oid\n> > > \tEND WORK;\n> > > \n> > > Partial backtrace is below. It is crashing in the optimizer.\n> > \n> > Bruce,\n> > \n> > I'm getting the same here when testing your query.\n> > \n> > The odd (maybe not?) thing is that views appear to have\n> > a NULL oid for all tuples.\n> \n> This has always been the case. Views don't have oid.\n> \n\nOK, so we shouldn't be able to select a column called oid from\nany view?\n\nKeith.\n\n", "msg_date": "Tue, 15 Sep 1998 19:12:39 +0100 (BST)", "msg_from": "Keith Parks <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] crash on new system views" }, { "msg_contents": "> > > The odd (maybe not?) thing is that views appear to have\n> > > a NULL oid for all tuples.\n> > \n> > This has always been the case. Views don't have oid.\n> > \n> \n> OK, so we shouldn't be able to select a column called oid from\n> any view?\n\nThat's an interesting question. Do we disallow the query? Comments?\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 15 Sep 1998 14:36:02 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] crash on new system views" }, { "msg_contents": "On Tue, 15 Sep 1998, Bruce Momjian wrote:\n\n> > > > The odd (maybe not?) thing is that views appear to have\n> > > > a NULL oid for all tuples.\n> > > \n> > > This has always been the case. Views don't have oid.\n> > > \n> > \n> > OK, so we shouldn't be able to select a column called oid from\n> > any view?\n> \n> That's an interesting question. Do we disallow the query? Comments?\n\n\tIt sounds reasonable to me...considering that any other query on a\ntable which references a field that doesn't exist fails...no?\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Tue, 15 Sep 1998 19:14:18 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] crash on new system views" } ]
[ { "msg_contents": "It fails to link against Tcl 8.0 (Linux 2.0.35, gcc-2.7.2.1):\n\ngcc -I../../include -I../../backend -I/usr/include/termcap -O2 -Wall -Wmissing-prototypes -I/usr/X11R6/include -I../../interfaces/libpgtcl -o pgtclsh pgtclAppInit.o \\\n -L../../interfaces/libpgtcl -lpgtcl -L../../interfaces/libpq -lpq -ltcl8.0 -lm -L/usr/lib/termcap -ldl -lm -lbsd -lreadline -lhistory -ltermcap -lncurses -export-dynamic \n../../interfaces/libpgtcl/libpgtcl.so: undefined reference to `Tcl_FileReady'\n../../interfaces/libpgtcl/libpgtcl.so: undefined reference to `Tcl_GetFile'\n../../interfaces/libpgtcl/libpgtcl.so: undefined reference to `Tcl_WatchFile'\nmake[2]: *** [pgtclsh] Error 1\nmake[2]: Leaving directory `/usr/src/packages/BUILD/pgsql/src/bin/pgtclsh'\nmake[1]: *** [all] Error 2\nmake[1]: Leaving directory `/usr/src/packages/BUILD/pgsql/src/bin'\nmake: *** [all] Error 2\nmake: Leaving directory `/usr/src/packages/BUILD/pgsql/src'\nBad exit status\n\nLinking against Tcl 7.6 is okay. I didn't find a hint, which Tcl\nversion one should use.\n\npgsql/src/interfaces/libpgtcl/README talks about libpgtcl.doc -- but\nthis file (libpgtcl.doc) isn't there.\n\nJust for the record, the end user documentation (.tar.gz and .ps.gz\nfiles) isn't up-to-date. The SGML sources are newer.\n\n-- \nKarl Eichwalder S.u.S.E. GmbH Fax +49-911-3206727\[email protected] Gebhardtstrasse 2 Mo & Th 13:00-18:00:\nhttp://www.suse.de/~ke/ 90762 Fuerth, Germany Hotline +49-911-3247130\n\n", "msg_date": "15 Sep 1998 20:47:36 +0200", "msg_from": "Karl Eichwalder <[email protected]>", "msg_from_op": true, "msg_subject": "6.4-BETA1: libpgtcl.so / Tcl version?" }, { "msg_contents": "> Just for the record, the end user documentation (.tar.gz and .ps.gz\n> files) isn't up-to-date. The SGML sources are newer.\n\nYes, I don't freeze and convert the html and ps files until the last few\ndays before a release (though I have made one or two intermediate html\nreleases for the web site and the ftp area). That way last minute\ncontributions to docs can make it into the final release. I'm still\nworking on some User's Guide additions and I hope folks will update the\ninstallation and porting instructions at least.\n\nbtw, is there other pgtcl documentation which has not made it into the\nsgml sources (and html output)? Do you have any indication that the .doc\nfile referred to by the README had information not available elsewhere?\nYou can see fairly fresh html output on the Postgres web site in the\ndocumentation area.\n\n - Tom\n", "msg_date": "Wed, 16 Sep 1998 04:27:21 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] 6.4-BETA1: libpgtcl.so / Tcl version?" }, { "msg_contents": "Karl Eichwalder <[email protected]> writes:\n> It fails to link against Tcl 8.0 (Linux 2.0.35, gcc-2.7.2.1):\n\nRight, libpgtcl is currently broken for Tcl 8.*, because it relies on\nsome Tcl routines that went away in Tcl 8.\n\nI have that on my todo list but have been swamped with other work...\n\nIf you don't mind using Tcl 7.6 the beta should work fine with that for\nnow.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 16 Sep 1998 10:17:50 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] 6.4-BETA1: libpgtcl.so / Tcl version? " } ]
[ { "msg_contents": "This works.\n CREATE TABLE x (a serial, b int);\nbut this doesn't.\n CREATE TABLE x (a serial PRIMARY KEY, b int);\n\nShould it?\n\n-- \nD'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\nhttp://www.druid.net/darcy/ | and a sheep voting on\n+1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.\n", "msg_date": "Tue, 15 Sep 1998 14:50:47 -0400 (EDT)", "msg_from": "[email protected] (D'Arcy J.M. Cain)", "msg_from_op": true, "msg_subject": "Serial syntax" }, { "msg_contents": "> This works.\n> CREATE TABLE x (a serial, b int);\n> but this doesn't.\n> CREATE TABLE x (a serial PRIMARY KEY, b int);\n> Should it?\n\nYeah. I'm testing some patches now...\n\n - Tom\n", "msg_date": "Wed, 16 Sep 1998 04:45:23 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Serial syntax" }, { "msg_contents": "> Yeah. I'm testing some patches now...\n\npostgres=> create table t (s serial, ss serial primary key);\nNOTICE: CREATE TABLE will create implicit sequence\n t_s_key for SERIAL column t.s\nNOTICE: CREATE TABLE will create implicit sequence\n t_ss_seq for SERIAL column t.ss\nNOTICE: CREATE TABLE/UNIQUE will create implicit index\n t_s_key for table t\nNOTICE: CREATE TABLE/PRIMARY KEY will create implicit index\n t_pkey for table t\nCREATE\n", "msg_date": "Wed, 16 Sep 1998 05:18:16 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Serial syntax" }, { "msg_contents": "> > Yeah. I'm testing some patches now...\n\nI've committed patches to the cvs source tree to allow PRIMARY KEY to be\nspecified with the SERIAL type. The patches also fix some DEFAULT NULL\nproblems and the \"SELECT @1\" problem.\n\nWith these patches and fixes for the rules regression tests and results\nall regression tests pass on my linux-2.0.30/i686 machine.\n\nI've enclosed the source patches _except_ for the regression test\nchanges, since those involve new files, etc. Also, I have _not_ updated\ngram.c yet, so anyone building in the next few days may need bison to\nbuild. If that is a problem someone can go ahead and build and commit a\nnew gram.c.\n\nI'm out of town tomorrow through Sunday, but keep those cards and\nletters coming :)\n\n - Tom", "msg_date": "Wed, 16 Sep 1998 15:13:33 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Serial syntax, DEFAULT NULL, and rules" } ]
[ { "msg_contents": "interesting that\nselect * from work_flats where (METRO_ID = 81 or METRO_ID = 82) and DISTRICT_ID < 11;\ncrashes backend\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.\nwhile \nselect * from work_flats where METRO_ID = 81 or METRO_ID = 82 and DISTRICT_ID < 11;\nworks ok.\n\nThis happens with latest cvs, 6.3.2 has no problem.\n\n\tRegards,\n\t\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": "Tue, 15 Sep 1998 23:52:50 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": true, "msg_subject": "query crashes backend - cvs" }, { "msg_contents": "This query crashes the backend too.\n\ntemplate1=> select @1;\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\nWith 6.3.2 the same query produces:\n\ntest=> select @1;\nERROR: Can't find left op: @ for type 23\n--\nTatsuo Ishii\[email protected]\n", "msg_date": "Wed, 16 Sep 1998 12:32:55 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] query crashes backend - cvs " }, { "msg_contents": "> select * from work_flats where (METRO_ID = 81 or METRO_ID = 82) and \n> DISTRICT_ID < 11;\n> crashes backend\n> pqReadData() -- backend closed the channel unexpectedly.\n> while\n> select * from work_flats where METRO_ID = 81 or METRO_ID = 82 and \n> DISTRICT_ID < 11;\n> works ok.\n> \n> This happens with latest cvs, 6.3.2 has no problem.\n\npostgres=> select * from t where (METRO_ID = 81 or METRO_ID = 82) and\npostgres-> DISTRICT_ID < 11;\nmetro_id|district_id\n--------+-----------\n 81| 1\n 82| 2\n(2 rows)\n\nMore details please...\n\n - Tom\n", "msg_date": "Wed, 16 Sep 1998 05:14:13 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] query crashes backend - cvs" }, { "msg_contents": "Ok,\ncreate table t0 ( a_id int4 NOT NULL, a varchar(10), a_t1_id int4);\ncreate index a_id_t0 on t0 (a_id);\ncreate index a_t1_id_t0 on t0 (a_t1_id);\nCOPY t0 FROM STDIN USING DELIMITERS '|';\n1|at0|0\n2|at0|0\n\\.\n\ntest=> \\d t0\n\nTable = t0\n+----------------------------------+----------------------------------+-------+\n| Field | Type | Length|\n+----------------------------------+----------------------------------+-------+\n| a_id | int4 not null | 4 |\n| a | varchar() | 10 |\n| a_t1_id | int4 | 4 |\n+----------------------------------+----------------------------------+-------+\nIndices: a_id_t0\n a_t1_id_t0\ntest=> select * from t0 where a_id = 1 or a_id = 2 and a_t1_id < 1;\na_id|a |a_t1_id\n----+---+-------\n 1|at0| 0\n 2|at0| 0\n(2 rows)\n\ntest=> select * from t0 where (a_id = 1 or a_id = 2) and a_t1_id < 1;\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.\nThis is Linux box, running postgres from cvs\nLinux om 2.1.117 #2 Tue Aug 25 21:05:29 MSD 1998 i586\nKernel modules 2.1.121\nGnu C egcs-2.91.57\nBinutils 2.9.1.0.7\nLinux C Library 5.4.46\nDynamic Linker (ld.so) 1.9.9\nLinux C++ Library 27.1.4\nProcps 1.2.7\nMount 2.8a\nNet-tools (1998-03-02)\nKbd \nSh-utils 1.16\nThis happens also on another Linux box:\nLinux dv 2.0.34 #7 Wed Aug 26 14:05:30 MSD 1998 i586 unknown\nKernel modules 2.1.71\nGnu C 2.7.2.3\nBinutils 2.8.1.0.23\nLinux C Library 5.4.44\nDynamic Linker (ld.so) 1.9.7\nLinux C++ Library 27.2.8\nProcps 1.2.6\nProcinfo 12\nMount 2.7l\nNet-tools 1.432.\nKbd 0.94\nSh-utils 1.16\n\nAgain, 6.3.2 works fine. \nAlso, cvs has a problem with vacuum analyze \n\ntest=> vacuum analyze t0;\nERROR: cannot write block -1 of [] blind\ntest=> \\q\n11:53[om]:~/bin>psql test\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=> \\d t0\npqReadData() -- backend closed the channel unexpectedly.\n This probably means the backend terminated abnormally before or while processing the request.\n\nI run postmaster as 'postmaster -i -S -D/usr/local/pgsql/data/ -o -Fe'\n(note, no -B 1024 now, because number of buffers > 128 causes\nvacuum analyze crash also, I've already posted several day s ago)\n\n\n\tRegards,\n\t Oleg\n\n\nOn Wed, 16 Sep 1998, Thomas G. Lockhart wrote:\n\n> Date: Wed, 16 Sep 1998 05:14:13 +0000\n> From: \"Thomas G. Lockhart\" <[email protected]>\n> To: Oleg Bartunov <[email protected]>\n> Cc: [email protected]\n> Subject: Re: [HACKERS] query crashes backend - cvs\n> \n> > select * from work_flats where (METRO_ID = 81 or METRO_ID = 82) and \n> > DISTRICT_ID < 11;\n> > crashes backend\n> > pqReadData() -- backend closed the channel unexpectedly.\n> > while\n> > select * from work_flats where METRO_ID = 81 or METRO_ID = 82 and \n> > DISTRICT_ID < 11;\n> > works ok.\n> > \n> > This happens with latest cvs, 6.3.2 has no problem.\n> \n> postgres=> select * from t where (METRO_ID = 81 or METRO_ID = 82) and\n> postgres-> DISTRICT_ID < 11;\n> metro_id|district_id\n> --------+-----------\n> 81| 1\n> 82| 2\n> (2 rows)\n> \n> More details please...\n> \n> - Tom\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": "Wed, 16 Sep 1998 11:53:27 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] query crashes backend - cvs" }, { "msg_contents": "> interesting that\n> select * from work_flats where (METRO_ID = 81 or METRO_ID = 82) and DISTRICT_ID < 11;\n> crashes backend\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> while \n> select * from work_flats where METRO_ID = 81 or METRO_ID = 82 and DISTRICT_ID < 11;\n> works ok.\n> \n> This happens with latest cvs, 6.3.2 has no problem.\n\nI can't reproduce this. Can you send a reproducable example with data,\nor tell me what columns have indexes.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Sun, 20 Sep 1998 21:29:42 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] query crashes backend - cvs" }, { "msg_contents": "> interesting that\n> select * from work_flats where (METRO_ID = 81 or METRO_ID = 82) and DISTRICT_ID < 11;\n> crashes backend\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> while \n> select * from work_flats where METRO_ID = 81 or METRO_ID = 82 and DISTRICT_ID < 11;\n> works ok.\n> \n> This happens with latest cvs, 6.3.2 has no problem.\n\nNever mind. I have a reproducable example now.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Sun, 20 Sep 1998 21:43:07 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] query crashes backend - cvs" } ]
[ { "msg_contents": "As for the 'select @1' problem:\n\n785 targetOid = func_select_candidate(1, &arg,\ncandidates);\n786 tup = SearchSysCacheTuple(OPRNAME,\n787\nPointerGetDatum(op),\n788\nObjectIdGetDatum(InvalidOid),\n789\nObjectIdGetDatum(*targetOid),\n790\nCharGetDatum('l'));\n(gdb) print targetOid\n$1 = (unsigned int *) 0x0\n\nAhem... dereferencing a NULL? Bad bad bad.\n\nPARSEDEBUG gives:\n\nunary_oper_get_candidates: start scan for '@'\nunary_oper_get_candidates: found candidate '@' for type float4\nunary_oper_get_candidates: found candidate '@' for type float8\nunary_oper_get_candidates: found 2 candidates\nfunc_select_candidate- candidate has 0 matches\nfunc_select_candidate- choose candidate as best match\nfunc_select_candidate- candidate has 0 matches\nfunc_select_candidate- choose candidate as possible match\nfunc_select_candidate- column #0 input type is int4\n\nAnyone know where the error is supposed to be generated?\n\nJP Sugarbroad\n\n", "msg_date": "Tue, 15 Sep 1998 23:53:59 -0500", "msg_from": "\"Taral\" <[email protected]>", "msg_from_op": true, "msg_subject": "'select @1' problem" }, { "msg_contents": "> Ahem... dereferencing a NULL? Bad bad bad.\n\nNo kidding, eh? :)\n\npostgres=> select @1;\n?column?\n--------\n 1\n(1 row)\n\nI had paid more attention to the binary operators when re-doing the\noperator matching and implicit type coersion stuff for this release. So,\nthe binary operators were using new code, while the unary operators were\nstill reusing the function matching code rather than the new dedicated\noperator matching code.\n\nAlso, the left-hand operator code was not checking for a null return\nfrom the function/operator matching code, so core dumped rather than\nthrowing a graceful error message.\n\nSo two problems have been fixed: the core dump when unable to find a\nsingle best match, and the inability to find a good match for this test\ncase.\n\nWill apply patches after regression testing (but it can't be worse than\nbefore).\n\nThanks for spotting the problem...\n\n - Tom\n", "msg_date": "Wed, 16 Sep 1998 06:33:19 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] 'select @1' problem" } ]
[ { "msg_contents": "\n> > > > The odd (maybe not?) thing is that views appear to have\n> > > > a NULL oid for all tuples.\n> > > \n> > > This has always been the case. Views don't have oid.\n> > > \n> > \n> > OK, so we shouldn't be able to select a column called oid from\n> > any view?\n> \n> That's an interesting question. Do we disallow the query? Comments?\n\nI guess it would be nice if views could show the original oid for all non join or single table views.\n\nAndreas\n\n\n\n", "msg_date": "Wed, 16 Sep 1998 10:08:45 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] crash on new system views" }, { "msg_contents": "On Wed, 16 Sep 1998, Andreas Zeugswetter wrote:\n\n> \n> > > > > The odd (maybe not?) thing is that views appear to have\n> > > > > a NULL oid for all tuples.\n> > > > \n> > > > This has always been the case. Views don't have oid.\n> > > > \n> > > \n> > > OK, so we shouldn't be able to select a column called oid from\n> > > any view?\n> > \n> > That's an interesting question. Do we disallow the query? Comments?\n> \n> I guess it would be nice if views could show the original oid for all\n> non join or single table views.\n\n\tIMHO, then the oid should be included as part of the view\ndefinition itself...even on a join operation, having the OID might be\nuseful...consider a case where you have a join of two tables such that the\nselect is something like:\n\nselect a.oid,a.field,b.field where a.field=b.field;\n\n\tHaving a.oid means that later I can just do:\n\nselect * from <view> where oid = <oid#>;\n\n\tBut I think the person setting up the view should be the one\nexplicitly including the oid value, not the system \"guessing\"...\n\n\n", "msg_date": "Wed, 16 Sep 1998 08:03:34 -0400 (EDT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] crash on new system views" }, { "msg_contents": "> IMHO, then the oid should be included as part of the view\n> definition itself...even on a join operation, having the OID might be\n> useful...consider a case where you have a join of two tables such that the\n> select is something like:\n>\n> select a.oid,a.field,b.field where a.field=b.field;\n>\n> Having a.oid means that later I can just do:\n>\n> select * from <view> where oid = <oid#>;\n>\n> But I think the person setting up the view should be the one\n> explicitly including the oid value, not the system \"guessing\"...\n\n This is true. Especially if we look a bit ahead for functions\n returning tuple sets, it might be possible in the future to\n have a view that calls a functions to retrieve the data. But\n this time all the data could be computed at runtime and there\n is absolutely no OID the system can guess.\n\n So if there should be one in another case, the creator of the\n view must specify it. It must have a different name than oid\n but I think this forces the creator to choose a name from\n which the user can guess which oid it is in a join 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": "Fri, 25 Sep 1998 11:33:04 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] crash on new system views" } ]
[ { "msg_contents": "> > I guess it would be nice if views could show the original oid for all\n> > non join or single table views.\n> \n> \tIMHO, then the oid should be included as part of the view\n> definition itself...even on a join operation, having the OID might be\n> useful...consider a case where you have a join of two tables such that the\n> select is something like:\n> \n> select a.oid,a.field,b.field where a.field=b.field;\n> \n> \tHaving a.oid means that later I can just do:\n> \n> select * from <view> where oid = <oid#>;\n> \n> \tBut I think the person setting up the view should be the one\n> explicitly including the oid value, not the system \"guessing\"...\n\nWhile I perfectly understand your argument, I see a disadvantage, that the above \nwill show the oid column with the select * while on the original table the oid is hidden.\n\nBut besides:\nregression=> create view tables as select oid, relname as tabname from pg_class;\nERROR: create: system attribute named \"oid\"\n\nwhich is perfectly OK I think.\n\nAndreas\n\n", "msg_date": "Wed, 16 Sep 1998 15:28:11 +0200", "msg_from": "Andreas Zeugswetter <[email protected]>", "msg_from_op": true, "msg_subject": "AW: [HACKERS] crash on new system views" } ]
[ { "msg_contents": "The following is a patch to bring the geometry regression test in line\nwith current (1.3.2/i386) NetBSD output. I didn't see any differences\nfrom the current \"normal\" expectation that were other than roundoff\nerrors, so I think the differences are irrelevant.\n\nCheers,\nBrook\n\n===========================================================================\n--- test/regress/expected/geometry-NetBSD.out.orig\tSun Mar 22 12:46:33 1998\n+++ test/regress/expected/geometry-NetBSD.out\tWed Sep 16 09:51:55 1998\n@@ -87,43 +87,42 @@\n \n QUERY: SELECT '' AS count, p.f1, l.s, l.s # p.f1 AS intersection\n FROM LSEG_TBL l, POINT_TBL p;\n-ERROR: There is no operator '#' for types 'lseg' and 'point'\n-\tYou will either have to retype this query using an explicit cast,\n-\tor you will have to define the operator using CREATE OPERATOR\n+ERROR: There is more than one possible operator '#' for types 'lseg' and 'point'\n+\tYou will have to retype this query using an explicit cast\n QUERY: SELECT '' AS thirty, p.f1, l.s, p.f1 ## l.s AS closest\n FROM LSEG_TBL l, POINT_TBL p;\n-thirty|f1 |s |closest \n-------+----------+-----------------------------+------------------------------------\n- |(0,0) |[(1,2),(3,4)] |(1,2) \n- |(-10,0) |[(1,2),(3,4)] |(1,2) \n- |(-3,4) |[(1,2),(3,4)] |(1,2) \n- |(5.1,34.5)|[(1,2),(3,4)] |(3,4) \n- |(-5,-12) |[(1,2),(3,4)] |(1,2) \n- |(10,10) |[(1,2),(3,4)] |(3,4) \n- |(0,0) |[(0,0),(6,6)] |(0,0) \n- |(-10,0) |[(0,0),(6,6)] |(0,0) \n- |(-3,4) |[(0,0),(6,6)] |(0,0) \n- |(5.1,34.5)|[(0,0),(6,6)] |(6,6) \n- |(-5,-12) |[(0,0),(6,6)] |(0,0) \n- |(10,10) |[(0,0),(6,6)] |(6,6) \n- |(0,0) |[(10,-10),(-3,-4)] |(-3,-4) \n- |(-10,0) |[(10,-10),(-3,-4)] |(-3,-4) \n- |(-3,4) |[(10,-10),(-3,-4)] |(-3,-4) \n- |(5.1,34.5)|[(10,-10),(-3,-4)] |(-3,-4) \n- |(-5,-12) |[(10,-10),(-3,-4)] |(-3,-4) \n- |(10,10) |[(10,-10),(-3,-4)] |(-3,-4) \n- |(0,0) |[(-1000000,200),(300000,-40)]|(0.0028402365895872,15.384614860264)\n- |(-10,0) |[(-1000000,200),(300000,-40)]|(-9.99715942258202,15.3864610140472)\n- |(-3,4) |[(-1000000,200),(300000,-40)]|(-2.99789812267519,15.3851688427303)\n- |(5.1,34.5)|[(-1000000,200),(300000,-40)]|(5.09647083221496,15.3836744976925) \n- |(-5,-12) |[(-1000000,200),(300000,-40)]|(-4.99494420845634,15.3855375281616)\n- |(10,10) |[(-1000000,200),(300000,-40)]|(10.000993741978,15.3827690473092) \n- |(0,0) |[(11,22),(33,44)] |(11,22) \n- |(-10,0) |[(11,22),(33,44)] |(11,22) \n- |(-3,4) |[(11,22),(33,44)] |(11,22) \n- |(5.1,34.5)|[(11,22),(33,44)] |(11,22) \n- |(-5,-12) |[(11,22),(33,44)] |(11,22) \n- |(10,10) |[(11,22),(33,44)] |(11,22) \n+thirty|f1 |s |closest \n+------+----------+-----------------------------+-------------------------------------\n+ |(0,0) |[(1,2),(3,4)] |(1,2) \n+ |(-10,0) |[(1,2),(3,4)] |(1,2) \n+ |(-3,4) |[(1,2),(3,4)] |(1,2) \n+ |(5.1,34.5)|[(1,2),(3,4)] |(3,4) \n+ |(-5,-12) |[(1,2),(3,4)] |(1,2) \n+ |(10,10) |[(1,2),(3,4)] |(3,4) \n+ |(0,0) |[(0,0),(6,6)] |(0,0) \n+ |(-10,0) |[(0,0),(6,6)] |(0,0) \n+ |(-3,4) |[(0,0),(6,6)] |(0.5,0.5) \n+ |(5.1,34.5)|[(0,0),(6,6)] |(6,6) \n+ |(-5,-12) |[(0,0),(6,6)] |(0,0) \n+ |(10,10) |[(0,0),(6,6)] |(6,6) \n+ |(0,0) |[(10,-10),(-3,-4)] |(-2.04878048780488,-4.4390243902439) \n+ |(-10,0) |[(10,-10),(-3,-4)] |(-3,-4) \n+ |(-3,4) |[(10,-10),(-3,-4)] |(-3,-4) \n+ |(5.1,34.5)|[(10,-10),(-3,-4)] |(-3,-4) \n+ |(-5,-12) |[(10,-10),(-3,-4)] |(-1.60487804878049,-4.64390243902439)\n+ |(10,10) |[(10,-10),(-3,-4)] |(2.39024390243902,-6.48780487804878) \n+ |(0,0) |[(-1000000,200),(300000,-40)]|(0.0028402365895872,15.384614860264) \n+ |(-10,0) |[(-1000000,200),(300000,-40)]|(-9.99715942258202,15.3864610140472) \n+ |(-3,4) |[(-1000000,200),(300000,-40)]|(-2.99789812267519,15.3851688427303) \n+ |(5.1,34.5)|[(-1000000,200),(300000,-40)]|(5.09647083221496,15.3836744976925) \n+ |(-5,-12) |[(-1000000,200),(300000,-40)]|(-4.99494420845634,15.3855375281616) \n+ |(10,10) |[(-1000000,200),(300000,-40)]|(10.000993741978,15.3827690473092) \n+ |(0,0) |[(11,22),(33,44)] |(11,22) \n+ |(-10,0) |[(11,22),(33,44)] |(11,22) \n+ |(-3,4) |[(11,22),(33,44)] |(11,22) \n+ |(5.1,34.5)|[(11,22),(33,44)] |(14.3,25.3) \n+ |(-5,-12) |[(11,22),(33,44)] |(11,22) \n+ |(10,10) |[(11,22),(33,44)] |(11,22) \n (30 rows)\n \n QUERY: SELECT '' as six, box(f1) AS box FROM CIRCLE_TBL;\n", "msg_date": "Wed, 16 Sep 1998 14:07:51 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": true, "msg_subject": "geometry-NetBSD.out patch" }, { "msg_contents": "APplied.\n\n\n> The following is a patch to bring the geometry regression test in line\n> with current (1.3.2/i386) NetBSD output. I didn't see any differences\n> from the current \"normal\" expectation that were other than roundoff\n> errors, so I think the differences are irrelevant.\n> \n> Cheers,\n> Brook\n> \n> ===========================================================================\n> --- test/regress/expected/geometry-NetBSD.out.orig\tSun Mar 22 12:46:33 1998\n> +++ test/regress/expected/geometry-NetBSD.out\tWed Sep 16 09:51:55 1998\n> @@ -87,43 +87,42 @@\n> \n> QUERY: SELECT '' AS count, p.f1, l.s, l.s # p.f1 AS intersection\n> FROM LSEG_TBL l, POINT_TBL p;\n> -ERROR: There is no operator '#' for types 'lseg' and 'point'\n> -\tYou will either have to retype this query using an explicit cast,\n> -\tor you will have to define the operator using CREATE OPERATOR\n> +ERROR: There is more than one possible operator '#' for types 'lseg' and 'point'\n> +\tYou will have to retype this query using an explicit cast\n> QUERY: SELECT '' AS thirty, p.f1, l.s, p.f1 ## l.s AS closest\n> FROM LSEG_TBL l, POINT_TBL p;\n> -thirty|f1 |s |closest \n> -------+----------+-----------------------------+------------------------------------\n> - |(0,0) |[(1,2),(3,4)] |(1,2) \n> - |(-10,0) |[(1,2),(3,4)] |(1,2) \n> - |(-3,4) |[(1,2),(3,4)] |(1,2) \n> - |(5.1,34.5)|[(1,2),(3,4)] |(3,4) \n> - |(-5,-12) |[(1,2),(3,4)] |(1,2) \n> - |(10,10) |[(1,2),(3,4)] |(3,4) \n> - |(0,0) |[(0,0),(6,6)] |(0,0) \n> - |(-10,0) |[(0,0),(6,6)] |(0,0) \n> - |(-3,4) |[(0,0),(6,6)] |(0,0) \n> - |(5.1,34.5)|[(0,0),(6,6)] |(6,6) \n> - |(-5,-12) |[(0,0),(6,6)] |(0,0) \n> - |(10,10) |[(0,0),(6,6)] |(6,6) \n> - |(0,0) |[(10,-10),(-3,-4)] |(-3,-4) \n> - |(-10,0) |[(10,-10),(-3,-4)] |(-3,-4) \n> - |(-3,4) |[(10,-10),(-3,-4)] |(-3,-4) \n> - |(5.1,34.5)|[(10,-10),(-3,-4)] |(-3,-4) \n> - |(-5,-12) |[(10,-10),(-3,-4)] |(-3,-4) \n> - |(10,10) |[(10,-10),(-3,-4)] |(-3,-4) \n> - |(0,0) |[(-1000000,200),(300000,-40)]|(0.0028402365895872,15.384614860264)\n> - |(-10,0) |[(-1000000,200),(300000,-40)]|(-9.99715942258202,15.3864610140472)\n> - |(-3,4) |[(-1000000,200),(300000,-40)]|(-2.99789812267519,15.3851688427303)\n> - |(5.1,34.5)|[(-1000000,200),(300000,-40)]|(5.09647083221496,15.3836744976925) \n> - |(-5,-12) |[(-1000000,200),(300000,-40)]|(-4.99494420845634,15.3855375281616)\n> - |(10,10) |[(-1000000,200),(300000,-40)]|(10.000993741978,15.3827690473092) \n> - |(0,0) |[(11,22),(33,44)] |(11,22) \n> - |(-10,0) |[(11,22),(33,44)] |(11,22) \n> - |(-3,4) |[(11,22),(33,44)] |(11,22) \n> - |(5.1,34.5)|[(11,22),(33,44)] |(11,22) \n> - |(-5,-12) |[(11,22),(33,44)] |(11,22) \n> - |(10,10) |[(11,22),(33,44)] |(11,22) \n> +thirty|f1 |s |closest \n> +------+----------+-----------------------------+-------------------------------------\n> + |(0,0) |[(1,2),(3,4)] |(1,2) \n> + |(-10,0) |[(1,2),(3,4)] |(1,2) \n> + |(-3,4) |[(1,2),(3,4)] |(1,2) \n> + |(5.1,34.5)|[(1,2),(3,4)] |(3,4) \n> + |(-5,-12) |[(1,2),(3,4)] |(1,2) \n> + |(10,10) |[(1,2),(3,4)] |(3,4) \n> + |(0,0) |[(0,0),(6,6)] |(0,0) \n> + |(-10,0) |[(0,0),(6,6)] |(0,0) \n> + |(-3,4) |[(0,0),(6,6)] |(0.5,0.5) \n> + |(5.1,34.5)|[(0,0),(6,6)] |(6,6) \n> + |(-5,-12) |[(0,0),(6,6)] |(0,0) \n> + |(10,10) |[(0,0),(6,6)] |(6,6) \n> + |(0,0) |[(10,-10),(-3,-4)] |(-2.04878048780488,-4.4390243902439) \n> + |(-10,0) |[(10,-10),(-3,-4)] |(-3,-4) \n> + |(-3,4) |[(10,-10),(-3,-4)] |(-3,-4) \n> + |(5.1,34.5)|[(10,-10),(-3,-4)] |(-3,-4) \n> + |(-5,-12) |[(10,-10),(-3,-4)] |(-1.60487804878049,-4.64390243902439)\n> + |(10,10) |[(10,-10),(-3,-4)] |(2.39024390243902,-6.48780487804878) \n> + |(0,0) |[(-1000000,200),(300000,-40)]|(0.0028402365895872,15.384614860264) \n> + |(-10,0) |[(-1000000,200),(300000,-40)]|(-9.99715942258202,15.3864610140472) \n> + |(-3,4) |[(-1000000,200),(300000,-40)]|(-2.99789812267519,15.3851688427303) \n> + |(5.1,34.5)|[(-1000000,200),(300000,-40)]|(5.09647083221496,15.3836744976925) \n> + |(-5,-12) |[(-1000000,200),(300000,-40)]|(-4.99494420845634,15.3855375281616) \n> + |(10,10) |[(-1000000,200),(300000,-40)]|(10.000993741978,15.3827690473092) \n> + |(0,0) |[(11,22),(33,44)] |(11,22) \n> + |(-10,0) |[(11,22),(33,44)] |(11,22) \n> + |(-3,4) |[(11,22),(33,44)] |(11,22) \n> + |(5.1,34.5)|[(11,22),(33,44)] |(14.3,25.3) \n> + |(-5,-12) |[(11,22),(33,44)] |(11,22) \n> + |(10,10) |[(11,22),(33,44)] |(11,22) \n> (30 rows)\n> \n> QUERY: SELECT '' as six, box(f1) AS box FROM CIRCLE_TBL;\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Fri, 18 Sep 1998 17:47:29 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] geometry-NetBSD.out patch" } ]
[ { "msg_contents": "I have finally resolved the differences in the union regression test.\nThe problem is that the test uses the float8 table as part of the\ntest, and this table turns out to be different among platforms because\nof different behavior with small numbers. Since the float8 part of\ntesting unions seemed entirely irrelevant I have changed it to use\nfloat4, which is not different among platforms. This will prevent the\nproliferation of special case files, while still properly testing the\nunion code (correct me if there really is something about float8 that\nis important).\n\nThis raises an issue I had never considered before concerning the\ndevelopment of regression tests. Perhaps something along the lines of\nthe following can be added to the developers FAQ.\n\n When developing regression tests there is often a choice about\n what tables in the regression database to obtain data from. In\n most cases which table is used does not matter. However, some\n tables contain different data depending on the platform and must\n be special-cased for verifying the regression tests. These\n tables can be recognized by looking for the\n test/regress/expected/*-PLATFORM.out files, where PLATFORM is a\n particular supported platform. Whenever possible, other\n regression tests should avoid using data from these tables, or\n special cases will inevitably proliferate and the regression\n tests will be unnecessarily difficult to verify.\n\nCheers,\nBrook\n\n===========================================================================\n--- test/regress/sql/union.sql.orig\tFri May 29 07:23:02 1998\n+++ test/regress/sql/union.sql\tWed Sep 16 08:26:01 1998\n@@ -42,23 +42,23 @@\n -- Try testing from tables...\n --\n \n-SELECT f1 AS five FROM FLOAT8_TBL\n+SELECT f1 AS five FROM FLOAT4_TBL\n UNION\n-SELECT f1 FROM FLOAT8_TBL;\n+SELECT f1 FROM FLOAT4_TBL;\n \n-SELECT f1 AS ten FROM FLOAT8_TBL\n+SELECT f1 AS ten FROM FLOAT4_TBL\n UNION ALL\n-SELECT f1 FROM FLOAT8_TBL;\n+SELECT f1 FROM FLOAT4_TBL;\n \n-SELECT f1 AS nine FROM FLOAT8_TBL\n+SELECT f1 AS nine FROM FLOAT4_TBL\n UNION\n SELECT f1 FROM INT4_TBL;\n \n-SELECT f1 AS ten FROM FLOAT8_TBL\n+SELECT f1 AS ten FROM FLOAT4_TBL\n UNION ALL\n SELECT f1 FROM INT4_TBL;\n \n-SELECT f1 AS five FROM FLOAT8_TBL\n+SELECT f1 AS five FROM FLOAT4_TBL\n WHERE f1 BETWEEN -1e6 AND 1e6\n UNION\n SELECT f1 FROM INT4_TBL\n===========================================================================\n--- test/regress/expected/union.out.orig\tFri May 29 07:22:42 1998\n+++ test/regress/expected/union.out\tWed Sep 16 10:03:17 1998\n@@ -112,80 +112,80 @@\n 2\n (3 rows)\n \n-QUERY: SELECT f1 AS five FROM FLOAT8_TBL\n+QUERY: SELECT f1 AS five FROM FLOAT4_TBL\n UNION\n-SELECT f1 FROM FLOAT8_TBL;\n-five \n----------------------\n--1.2345678901234e+200\n--1004.3 \n--34.84 \n--1.2345678901234e-200\n-0 \n+SELECT f1 FROM FLOAT4_TBL;\n+five \n+------------\n+-1.23457e+20\n+-1004.3 \n+-34.84 \n+-1.23457e-20\n+0 \n (5 rows)\n \n-QUERY: SELECT f1 AS ten FROM FLOAT8_TBL\n+QUERY: SELECT f1 AS ten FROM FLOAT4_TBL\n UNION ALL\n-SELECT f1 FROM FLOAT8_TBL;\n-ten \n----------------------\n-0 \n--34.84 \n--1004.3 \n--1.2345678901234e+200\n--1.2345678901234e-200\n-0 \n--34.84 \n--1004.3 \n--1.2345678901234e+200\n--1.2345678901234e-200\n+SELECT f1 FROM FLOAT4_TBL;\n+ten \n+------------\n+0 \n+-34.84 \n+-1004.3 \n+-1.23457e+20\n+-1.23457e-20\n+0 \n+-34.84 \n+-1004.3 \n+-1.23457e+20\n+-1.23457e-20\n (10 rows)\n \n-QUERY: SELECT f1 AS nine FROM FLOAT8_TBL\n+QUERY: SELECT f1 AS nine FROM FLOAT4_TBL\n UNION\n SELECT f1 FROM INT4_TBL;\n-nine \n----------------------\n--1.2345678901234e+200\n--2147483647 \n--123456 \n--1004.3 \n--34.84 \n--1.2345678901234e-200\n-0 \n-123456 \n-2147483647 \n+nine \n+------------\n+-1.23457e+20\n+-2.14748e+09\n+-123456 \n+-1004.3 \n+-34.84 \n+-1.23457e-20\n+0 \n+123456 \n+2.14748e+09 \n (9 rows)\n \n-QUERY: SELECT f1 AS ten FROM FLOAT8_TBL\n+QUERY: SELECT f1 AS ten FROM FLOAT4_TBL\n UNION ALL\n SELECT f1 FROM INT4_TBL;\n-ten \n----------------------\n-0 \n--34.84 \n--1004.3 \n--1.2345678901234e+200\n--1.2345678901234e-200\n-0 \n-123456 \n--123456 \n-2147483647 \n--2147483647 \n+ten \n+------------\n+0 \n+-34.84 \n+-1004.3 \n+-1.23457e+20\n+-1.23457e-20\n+0 \n+123456 \n+-123456 \n+2.14748e+09 \n+-2.14748e+09\n (10 rows)\n \n-QUERY: SELECT f1 AS five FROM FLOAT8_TBL\n+QUERY: SELECT f1 AS five FROM FLOAT4_TBL\n WHERE f1 BETWEEN -1e6 AND 1e6\n UNION\n SELECT f1 FROM INT4_TBL\n WHERE f1 BETWEEN 0 AND 1000000;\n- five\n----------------------\n- -1004.3\n- -34.84\n--1.2345678901234e-200\n- 0\n- 123456\n+ five\n+------------\n+ -1004.3\n+ -34.84\n+-1.23457e-20\n+ 0\n+ 123456\n (5 rows)\n \n QUERY: SELECT f1 AS five FROM VARCHAR_TBL\n", "msg_date": "Wed, 16 Sep 1998 14:25:00 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": true, "msg_subject": "union regression test" }, { "msg_contents": "Brook Milligan <[email protected]> writes:\n> I have finally resolved the differences in the union regression test.\n> The problem is that the test uses the float8 table as part of the\n> test, and this table turns out to be different among platforms because\n> of different behavior with small numbers. Since the float8 part of\n> testing unions seemed entirely irrelevant I have changed it to use\n> float4, which is not different among platforms.\n\nIt's not? I think you assume far too much about the uniformity of\nfloating-point hardware.\n\nIs it necessary to use float data at all for union tests?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 16 Sep 1998 17:05:57 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] union regression test " }, { "msg_contents": "> > I have finally resolved the differences in the union regression \n> > test.\n> > The problem is that the test uses the float8 table as part of the\n> > test, and this table turns out to be different among platforms \n> > because of different behavior with small numbers. Since the float8 \n> > part of testing unions seemed entirely irrelevant I have changed it \n> > to use float4, which is not different among platforms.\n> It's not? I think you assume far too much about the uniformity of\n> floating-point hardware.\n\nI had included float8 in this particular regression test to exercise the\nint4->float8 \"promotion\" since float8 is a \"preferred type\". Don't know\nwhy float4 should in general have different or better behavior than\nfloat8 wrt conversions and rounding; you may just be lucky on your\nplatform.\n\nHowever, the float8_tbl is pretty ugly after the float8 regression test.\nHow about defining a new table which has better behaved numbers? I would\nprefer that to eliminating float8 from the test altogether. I'll bet\nthat floating numbers like 1.1 are represented OK on Brook's machine,\nand that the problems are with the 1e-200 numbers?\n\n(I'm out of town tomorrow through Sunday so we can continue this\ndiscussion next week?)\n\n - Tom\n", "msg_date": "Thu, 17 Sep 1998 01:54:06 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] union regression test" }, { "msg_contents": "> I had included float8 in this particular regression test to exercise the\n> int4->float8 \"promotion\" since float8 is a \"preferred type\". Don't know\n> why float4 should in general have different or better behavior than\n> float8 wrt conversions and rounding; you may just be lucky on your\n> platform.\n\nIn fact, float4 normally has much _worse_ floating point portability\nthan float8.\n\nfloat4 can't seem to get even simple number right.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Wed, 16 Sep 1998 23:59:54 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] union regression test" }, { "msg_contents": " Brook Milligan <[email protected]> writes:\n > I have finally resolved the differences in the union regression test.\n > The problem is that the test uses the float8 table as part of the\n > test, and this table turns out to be different among platforms because\n > of different behavior with small numbers. Since the float8 part of\n > testing unions seemed entirely irrelevant I have changed it to use\n > float4, which is not different among platforms.\n\nTom Lane replied:\n\n It's not? I think you assume far too much about the uniformity of\n floating-point hardware.\n\nBruce Momjian replied:\n\n In fact, float4 normally has much _worse_ floating point portability\n than float8.\n\n float4 can't seem to get even simple number right.\n\nI was just basing my idea on the fact that there are no\nplatform-specific special-cases for the float4 regression test. I\nguess no one has submitted them? If it is really that bad, why aren't\nthere more special-cases so the regression tests don't fail? Would\nthis not help new users?\n\nThomas Lockhart replied:\n\n I had included float8 in this particular regression test to exercise the\n int4->float8 \"promotion\" since float8 is a \"preferred type\". Don't know\n why float4 should in general have different or better behavior than\n float8 wrt conversions and rounding; you may just be lucky on your\n platform.\n\n However, the float8_tbl is pretty ugly after the float8 regression test.\n How about defining a new table which has better behaved numbers? I would\n prefer that to eliminating float8 from the test altogether. I'll bet\n that floating numbers like 1.1 are represented OK on Brook's machine,\n and that the problems are with the 1e-200 numbers?\n\nYes, the small numbers (like 1e-200) are handled as zero and enter the\nfloat8 table, making the later union results different.\n\nAnyway, there is nothing magical about using float4. I chose it\narbitrarily because I was under the impression that it was better\nbehaved because of lack of special casing. Clearly a wrong\nassumption.\n\nThe important point here, though, is not really about float4 versus\nfloat8; float8 is fine and now I see that it is better in fact. The\nimportant point is that a table that is not special-cased should be\nused whenever possible (and I still recommend including something\nalong the lines of my earlier paragraph to prevent this in the\nfuture).\n\nIf the float8 data type works better, we should make a float8 table\nthat is uniform across platforms in order to test the union code.\nThere is really no point in including the boundary cases of float8\ninto a test of union.\n\nPerhaps a better solution is to insert into the union.sql code a\nfloat8 table creation, fill it with well-behaved data, and then use\nthat table in the union test.\n\nCheers,\nBrook\n", "msg_date": "Thu, 17 Sep 1998 08:23:24 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] union regression test" }, { "msg_contents": "> If the float8 data type works better, we should make a float8 table\n> that is uniform across platforms in order to test the union code.\n> There is really no point in including the boundary cases of float8\n> into a test of union.\n> Perhaps a better solution is to insert into the union.sql code a\n> float8 table creation, fill it with well-behaved data, and then use\n> that table in the union test.\n\nYes, this is the best solution. Would you like to take a crack at it? I\ncan consolidate a patch and patch results on my machine (which has been\nthe nominal \"truth\" machine for the last few releases).\n\n - Tom\n", "msg_date": "Sun, 20 Sep 1998 23:25:26 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] union regression test" }, { "msg_contents": "Tom,\n\n > If the float8 data type works better, we should make a float8 table\n > that is uniform across platforms in order to test the union code.\n > There is really no point in including the boundary cases of float8\n > into a test of union.\n > Perhaps a better solution is to insert into the union.sql code a\n > float8 table creation, fill it with well-behaved data, and then use\n > that table in the union test.\n\n Yes, this is the best solution. Would you like to take a crack at it? I\n can consolidate a patch and patch results on my machine (which has been\n the nominal \"truth\" machine for the last few releases).\n\nI'm glad to do it. It seems like there are two approaches, here.\n\n1. Modify the float8 test so that the table contains exactly the same\n values on all platforms. In this case, this would mean removing\n the \"extra\" rows that creep in on NetBSD because of the different\n handling of small (in absolute value) numbers. Following this\n strategy generally (i.e., in other similar cases) would mean that\n all tables could be used at will by \"derived\" tests without\n propagating special cases beyond the direct tests where boundary\n cases are critical to include.\n\n2. Add a new table with a subset of float8 values that are the same\n on all platforms. This leaves the current float8 table the same,\n but if this stategy is followed it will propagate special tables\n for derived tests.\n\nMy preference is the first of these options, because it seems like a\nbetter long-term strategy for developing new regression tests. If\nplatform-specific differences arise in whether or not values enter the\ntable, primary tests can be modified to remove extra ones so that the\ntests always complete with a uniformly consistent set of values.\n\nUnless there is some feeling that the second options is preferable, I\nwill proceed to fix the float8 table so that the values are the same\nacross platforms and adjust the expectations for float8 and union to\ncorrespond.\n\nCheers,\nBrook\n", "msg_date": "Mon, 21 Sep 1998 09:07:50 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] union regression test" }, { "msg_contents": "> 1. Modify the float8 test so that the table contains exactly the same\n> values on all platforms. In this case, this would mean removing\n> the \"extra\" rows that creep in on NetBSD because of the different\n> handling of small (in absolute value) numbers. Following this\n> strategy generally (i.e., in other similar cases) would mean that\n> all tables could be used at will by \"derived\" tests without\n> propagating special cases beyond the direct tests where boundary\n> cases are critical to include.\n> \n> 2. Add a new table with a subset of float8 values that are the same\n> on all platforms. This leaves the current float8 table the same,\n> but if this stategy is followed it will propagate special tables\n> for derived tests.\n> \n> My preference is the first of these options, because it seems like a\n> better long-term strategy for developing new regression tests. If\n> platform-specific differences arise in whether or not values enter the\n> table, primary tests can be modified to remove extra ones so that the\n> tests always complete with a uniformly consistent set of values.\n> \n> Unless there is some feeling that the second options is preferable, I\n> will proceed to fix the float8 table so that the values are the same\n> across platforms and adjust the expectations for float8 and union to\n> correspond.\n\nOK, I agree that the first option is probably preferable. But...\n\nThis will ripple across several of the regression tests, and we will\nneed to carefully check the changed results in those tests to ensure\nthat we understand the changes. We can't just assume that they are due\nto the different input values.\n\nAlso, I would strongly prefer that we keep the internals of the float8\ntest the same, so it continues to test edge-effect operations and\nresults. Then, at or near the end of the float8 test, empty the table\nand re-insert some better-behaved values (in fact, it could be the same\nvalues that the table started with probably; I haven't looked).\n\n - Tom\n", "msg_date": "Mon, 21 Sep 1998 15:33:40 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] union regression test" }, { "msg_contents": " > 1. Modify the float8 test so that the table contains exactly the same\n > values on all platforms. In this case, this would mean removing\n > the \"extra\" rows that creep in on NetBSD because of the different\n > handling of small (in absolute value) numbers. Following this\n > strategy generally (i.e., in other similar cases) would mean that\n > all tables could be used at will by \"derived\" tests without\n > propagating special cases beyond the direct tests where boundary\n > cases are critical to include.\n\n OK, I agree that the first option is probably preferable. But...\n\n This will ripple across several of the regression tests, and we will\n need to carefully check the changed results in those tests to ensure\n that we understand the changes. We can't just assume that they are due\n to the different input values.\n\n Also, I would strongly prefer that we keep the internals of the float8\n test the same, so it continues to test edge-effect operations and\n results. Then, at or near the end of the float8 test, empty the table\n and re-insert some better-behaved values (in fact, it could be the same\n values that the table started with probably; I haven't looked).\n\nAbsolutely. That was my intent. The internal tests should be as\nrigorous as possible. The last thing done would be to leave the table\nin a state that is absolutely identical across all platforms. Yes,\ndeleting everything and reinserting the well-behaved values seems like\nthe easiest thing to do.\n\nI don't think anything will ripple much, actually. The entire point,\nthough, is to reduce the possible ripple of special cases (after the\ncorrect consistency is guarranteed). I should have no trouble\nrecognizing changes, since for me everything passes regression, except\nthe union test.\n\nCheers,\nBrook\n", "msg_date": "Mon, 21 Sep 1998 10:21:52 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] union regression test" }, { "msg_contents": "Here are some patches to fix up the regression tests so that the union\ntest passes. Interestingly, the fix involves no changes or special\ncases in the union test and actually removes a special case for the\nnumerology test. Thus, following the strategy outlined below is a\ndefinite improvement over the previous situation.\n\n > 1. Modify the float8 test so that the table contains exactly the same\n > values on all platforms. In this case, this would mean removing\n > the \"extra\" rows that creep in on NetBSD because of the different\n > handling of small (in absolute value) numbers. Following this\n > strategy generally (i.e., in other similar cases) would mean that\n > all tables could be used at will by \"derived\" tests without\n > propagating special cases beyond the direct tests where boundary\n > cases are critical to include.\n\n Absolutely. That was my intent. The internal tests should be as\n rigorous as possible. The last thing done would be to leave the table\n in a state that is absolutely identical across all platforms. Yes,\n deleting everything and reinserting the well-behaved values seems like\n the easiest thing to do.\n\nPerhaps future regression testers can try to follow the points alluded\nto above and outlined specifically below:\n\n1. Make the tests internal to each test/regress/sql/*.sql file as\n rigorous as possible so that all relevant features are exercised.\n\n2. Place any tests that lead to platform specific results as late as\n possible within each *.sql file so that later tests within the\n same file will not repeat failures of earlier tests but will\n instead document legitimate differences.\n\n3. Ensure that the contents of all tables constructed or modified by\n a single *.sql file are identical upon completion across all\n platforms. This will ensure that derived tests will not propagate\n errors/differences of earlier tests.\n\nThese ideas are encapsulated in the patches below for the float8 tests\nthat resulted in platform-specific differences that then propagated to\nboth the numerology and union tests. Also, even within the float8\ntests were a bunch of platform-specific differences that really only\npropagated a single difference; now that difference is tested at the\nend so that almost all results are identical across platforms.\n\nNOTE: test/regress/expected/numerology-NetBSD.out should be removed.\n\nNOTE: I can't test anything except NetBSD. I tried to make the\n\"default\" float8.out correspond to what I expect other systems will\ngenerate, but would appreciate it if someone else would check it over.\n\nNOTE: with these patches to the most recent snapshot every regression\ntest passes for NetBSD 1.3.2/i386.\n\nCheers,\nBrook\n\n===========================================================================\n--- test/regress/sql/float8.sql.orig\tSun May 11 09:41:51 1997\n+++ test/regress/sql/float8.sql\tMon Sep 21 12:14:12 1998\n@@ -12,15 +12,6 @@\n \n INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200');\n \n--- test for over and under flow \n-INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');\n-\n-INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');\n-\n-INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');\n-\n-INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');\n-\n \n SELECT '' AS five, FLOAT8_TBL.*;\n \n@@ -98,6 +89,32 @@\n SELECT '' AS bad, : (f.f1) from FLOAT8_TBL f;\n \n SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f;\n+\n+SELECT '' AS five, FLOAT8_TBL.*;\n+\n+-- test for over and under flow \n+INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');\n+\n+INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');\n+\n+INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');\n+\n+INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');\n+\n+-- maintain external table consistency across platforms\n+-- delete all values and reinsert well-behaved ones\n+\n+DELETE FROM FLOAT8_TBL;\n+\n+INSERT INTO FLOAT8_TBL(f1) VALUES ('0.0');\n+\n+INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');\n+\n+INSERT INTO FLOAT8_TBL(f1) VALUES ('-1004.30');\n+\n+INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e+200');\n+\n+INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e-200');\n \n SELECT '' AS five, FLOAT8_TBL.*;\n \n===========================================================================\n--- test/regress/expected/float8.out.orig\tSun Jan 4 20:35:30 1998\n+++ test/regress/expected/float8.out\tMon Sep 21 12:07:51 1998\n@@ -4,14 +4,6 @@\n QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');\n QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200');\n QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200');\n-QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');\n-ERROR: Bad float8 input format '10e400'\n-QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');\n-ERROR: Bad float8 input format '-10e400'\n-QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');\n-ERROR: Bad float8 input format '10e-400'\n-QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');\n-ERROR: Bad float8 input format '-10e-400'\n QUERY: SELECT '' AS five, FLOAT8_TBL.*;\n five|f1 \n ----+--------------------\n@@ -222,5 +214,29 @@\n |-1004.3 \n |-1.2345678901234e+200\n |-1.2345678901234e-200\n+(5 rows)\n+\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');\n+ERROR: Bad float8 input format '10e400'\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');\n+ERROR: Bad float8 input format '-10e400'\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');\n+ERROR: Bad float8 input format '10e-400'\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');\n+ERROR: Bad float8 input format '-10e-400'\n+QUERY: DELETE FROM FLOAT8_TBL;\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('0.0');\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1004.30');\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e+200');\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e-200');\n+QUERY: SELECT '' AS five, FLOAT8_TBL.*;\n+five|f1 \n+----+---------------------\n+ |0 \n+ |-34.84 \n+ |-1004.3 \n+ |-1.2345678901234e+200\n+ |-1.2345678901234e-200\n (5 rows)\n \n===========================================================================\n--- test/regress/expected/float8-NetBSD.out.orig\tSun Mar 22 12:46:31 1998\n+++ test/regress/expected/float8-NetBSD.out\tMon Sep 21 11:47:24 1998\n@@ -4,12 +4,6 @@\n QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');\n QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200');\n QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200');\n-QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');\n-ERROR: Bad float8 input format '10e400'\n-QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');\n-ERROR: Bad float8 input format '-10e400'\n-QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');\n-QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');\n QUERY: SELECT '' AS five, FLOAT8_TBL.*;\n five|f1 \n ----+--------------------\n@@ -18,9 +12,7 @@\n |-34.84 \n |1.2345678901234e+200\n |1.2345678901234e-200\n- |0 \n- |0 \n-(7 rows)\n+(5 rows)\n \n QUERY: SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <> '1004.3';\n four|f1 \n@@ -29,9 +21,7 @@\n |-34.84 \n |1.2345678901234e+200\n |1.2345678901234e-200\n- |0 \n- |0 \n-(6 rows)\n+(4 rows)\n \n QUERY: SELECT '' AS one, f.* FROM FLOAT8_TBL f WHERE f.f1 = '1004.3';\n one| f1\n@@ -45,9 +35,7 @@\n | 0\n | -34.84\n |1.2345678901234e-200\n- | 0\n- | 0\n-(5 rows)\n+(3 rows)\n \n QUERY: SELECT '' AS three, f.* FROM FLOAT8_TBL f WHERE f.f1 < '1004.3';\n three| f1\n@@ -55,9 +43,7 @@\n | 0\n | -34.84\n |1.2345678901234e-200\n- | 0\n- | 0\n-(5 rows)\n+(3 rows)\n \n QUERY: SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE '1004.3' >= f.f1;\n four| f1\n@@ -66,9 +52,7 @@\n | 1004.3\n | -34.84\n |1.2345678901234e-200\n- | 0\n- | 0\n-(6 rows)\n+(4 rows)\n \n QUERY: SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <= '1004.3';\n four| f1\n@@ -77,9 +61,7 @@\n | 1004.3\n | -34.84\n |1.2345678901234e-200\n- | 0\n- | 0\n-(6 rows)\n+(4 rows)\n \n QUERY: SELECT '' AS three, f.f1, f.f1 * '-10' AS x\n FROM FLOAT8_TBL f\n@@ -137,9 +119,7 @@\n |-34.84 |34.84 \n |1.2345678901234e+200|1.2345678901234e+200\n |1.2345678901234e-200|1.2345678901234e-200\n- |0 |0 \n- |0 |0 \n-(7 rows)\n+(5 rows)\n \n QUERY: SELECT '' AS five, f.f1, %f.f1 AS trunc_f1\n FROM FLOAT8_TBL f;\n@@ -150,9 +130,7 @@\n |-34.84 |-34 \n |1.2345678901234e+200|1.2345678901234e+200\n |1.2345678901234e-200|0 \n- |0 |0 \n- |0 |0 \n-(7 rows)\n+(5 rows)\n \n QUERY: SELECT '' AS five, f.f1, f.f1 % AS round_f1\n FROM FLOAT8_TBL f;\n@@ -163,9 +141,7 @@\n |-34.84 |-35 \n |1.2345678901234e+200|1.2345678901234e+200\n |1.2345678901234e-200|0 \n- |0 |0 \n- |0 |0 \n-(7 rows)\n+(5 rows)\n \n QUERY: SELECT '' AS three, f.f1, |/f.f1 AS sqrt_f1\n FROM FLOAT8_TBL f\n@@ -195,9 +171,7 @@\n |-34.84 |-3.26607421344208 \n |1.2345678901234e+200|4.97933859234765e+66\n |1.2345678901234e-200|2.3112042409018e-67 \n- |0 |0 \n- |0 |0 \n-(7 rows)\n+(5 rows)\n \n QUERY: SELECT '' AS five, FLOAT8_TBL.*;\n five|f1 \n@@ -207,9 +181,7 @@\n |-34.84 \n |1.2345678901234e+200\n |1.2345678901234e-200\n- |0 \n- |0 \n-(7 rows)\n+(5 rows)\n \n QUERY: UPDATE FLOAT8_TBL\n SET f1 = FLOAT8_TBL.f1 * '-1'\n@@ -231,10 +203,30 @@\n ----+---------------------\n |0 \n |-34.84 \n- |0 \n- |0 \n |-1004.3 \n |-1.2345678901234e+200\n |-1.2345678901234e-200\n-(7 rows)\n+(5 rows)\n+\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');\n+ERROR: Bad float8 input format '10e400'\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');\n+ERROR: Bad float8 input format '-10e400'\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');\n+QUERY: DELETE FROM FLOAT8_TBL;\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('0.0');\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1004.30');\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e+200');\n+QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e-200');\n+QUERY: SELECT '' AS five, FLOAT8_TBL.*;\n+five|f1 \n+----+---------------------\n+ |0 \n+ |-34.84 \n+ |-1004.3 \n+ |-1.2345678901234e+200\n+ |-1.2345678901234e-200\n+(5 rows)\n \n===========================================================================\n--- test/regress/expected/numerology-NetBSD.out.orig\tSun Mar 22 12:46:37 1998\n+++ test/regress/expected/numerology-NetBSD.out\tMon Sep 21 12:49:07 1998\n@@ -1,122 +0,0 @@\n-QUERY: CREATE TABLE TEMP_FLOAT (f1 FLOAT8);\n-QUERY: INSERT INTO TEMP_FLOAT (f1)\n- SELECT float8(f1) FROM INT4_TBL;\n-QUERY: INSERT INTO TEMP_FLOAT (f1)\n- SELECT float8(f1) FROM INT2_TBL;\n-QUERY: SELECT '' AS ten, f1 FROM TEMP_FLOAT\n- ORDER BY f1;\n-ten| f1\n----+-----------\n- |-2147483647\n- | -123456\n- | -32767\n- | -1234\n- | 0\n- | 0\n- | 1234\n- | 32767\n- | 123456\n- | 2147483647\n-(10 rows)\n-\n-QUERY: CREATE TABLE TEMP_INT4 (f1 INT4);\n-QUERY: INSERT INTO TEMP_INT4 (f1)\n- SELECT int4(f1) FROM FLOAT8_TBL\n- WHERE (f1 > -2147483647) AND (f1 < 2147483647);\n-QUERY: INSERT INTO TEMP_INT4 (f1)\n- SELECT int4(f1) FROM INT2_TBL;\n-QUERY: SELECT '' AS nine, f1 FROM TEMP_INT4\n- ORDER BY f1;\n-nine| f1\n-----+------\n- |-32767\n- | -1234\n- | -1004\n- | -35\n- | 0\n- | 0\n- | 0\n- | 0\n- | 0\n- | 1234\n- | 32767\n-(11 rows)\n-\n-QUERY: CREATE TABLE TEMP_INT2 (f1 INT2);\n-QUERY: INSERT INTO TEMP_INT2 (f1)\n- SELECT int2(f1) FROM FLOAT8_TBL\n- WHERE (f1 >= -32767) AND (f1 <= 32767);\n-QUERY: INSERT INTO TEMP_INT2 (f1)\n- SELECT int2(f1) FROM INT4_TBL\n- WHERE (f1 >= -32767) AND (f1 <= 32767);\n-QUERY: SELECT '' AS five, f1 FROM TEMP_INT2\n- ORDER BY f1;\n-five| f1\n-----+-----\n- |-1004\n- | -35\n- | 0\n- | 0\n- | 0\n- | 0\n- | 0\n-(7 rows)\n-\n-QUERY: CREATE TABLE TEMP_GROUP (f1 INT4, f2 INT4, f3 FLOAT8);\n-QUERY: INSERT INTO TEMP_GROUP\n- SELECT 1, (- i.f1), (- f.f1)\n- FROM INT4_TBL i, FLOAT8_TBL f;\n-QUERY: INSERT INTO TEMP_GROUP\n- SELECT 2, i.f1, f.f1\n- FROM INT4_TBL i, FLOAT8_TBL f;\n-QUERY: SELECT DISTINCT f1 AS two FROM TEMP_GROUP;\n-two\n----\n- 1\n- 2\n-(2 rows)\n-\n-QUERY: SELECT f1 AS two, max(f3) AS max_float, min(f3) as min_float\n- FROM TEMP_GROUP\n- GROUP BY two\n- ORDER BY two, max_float, min_float;\n-two|max_float |min_float \n----+--------------------+---------------------\n- 1|1.2345678901234e+200|0 \n- 2|0 |-1.2345678901234e+200\n-(2 rows)\n-\n-QUERY: SELECT f1 AS two, max(f3) AS max_float, min(f3) AS min_float\n- FROM TEMP_GROUP\n- GROUP BY two\n- ORDER BY two, max_float, min_float;\n-two|max_float |min_float \n----+--------------------+---------------------\n- 1|1.2345678901234e+200|0 \n- 2|0 |-1.2345678901234e+200\n-(2 rows)\n-\n-QUERY: SELECT f1 AS two, (max(f3) + 1) AS max_plus_1, (min(f3) - 1) AS min_minus_1\n- FROM TEMP_GROUP\n- GROUP BY two\n- ORDER BY two, min_minus_1;\n-two|max_plus_1 |min_minus_1 \n----+--------------------+---------------------\n- 1|1.2345678901234e+200|-1 \n- 2|1 |-1.2345678901234e+200\n-(2 rows)\n-\n-QUERY: SELECT f1 AS two, (max(f3) + 1) AS max_plus_1, (min(f3) - 1) AS min_minus_1\n- FROM TEMP_GROUP\n- GROUP BY two\n- ORDER BY two, min_minus_1;\n-two|max_plus_1 |min_minus_1 \n----+--------------------+---------------------\n- 1|1.2345678901234e+200|-1 \n- 2|1 |-1.2345678901234e+200\n-(2 rows)\n-\n-QUERY: DROP TABLE TEMP_INT2;\n-QUERY: DROP TABLE TEMP_INT4;\n-QUERY: DROP TABLE TEMP_FLOAT;\n-QUERY: DROP TABLE TEMP_GROUP;\n", "msg_date": "Mon, 21 Sep 1998 14:37:33 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] union regression test" }, { "msg_contents": "Applied.\n\n> Here are some patches to fix up the regression tests so that the union\n> test passes. Interestingly, the fix involves no changes or special\n> cases in the union test and actually removes a special case for the\n> numerology test. Thus, following the strategy outlined below is a\n> definite improvement over the previous situation.\n> \n> > 1. Modify the float8 test so that the table contains exactly the same\n> > values on all platforms. In this case, this would mean removing\n> > the \"extra\" rows that creep in on NetBSD because of the different\n> > handling of small (in absolute value) numbers. Following this\n> > strategy generally (i.e., in other similar cases) would mean that\n> > all tables could be used at will by \"derived\" tests without\n> > propagating special cases beyond the direct tests where boundary\n> > cases are critical to include.\n> \n> Absolutely. That was my intent. The internal tests should be as\n> rigorous as possible. The last thing done would be to leave the table\n> in a state that is absolutely identical across all platforms. Yes,\n> deleting everything and reinserting the well-behaved values seems like\n> the easiest thing to do.\n> \n> Perhaps future regression testers can try to follow the points alluded\n> to above and outlined specifically below:\n> \n> 1. Make the tests internal to each test/regress/sql/*.sql file as\n> rigorous as possible so that all relevant features are exercised.\n> \n> 2. Place any tests that lead to platform specific results as late as\n> possible within each *.sql file so that later tests within the\n> same file will not repeat failures of earlier tests but will\n> instead document legitimate differences.\n> \n> 3. Ensure that the contents of all tables constructed or modified by\n> a single *.sql file are identical upon completion across all\n> platforms. This will ensure that derived tests will not propagate\n> errors/differences of earlier tests.\n> \n> These ideas are encapsulated in the patches below for the float8 tests\n> that resulted in platform-specific differences that then propagated to\n> both the numerology and union tests. Also, even within the float8\n> tests were a bunch of platform-specific differences that really only\n> propagated a single difference; now that difference is tested at the\n> end so that almost all results are identical across platforms.\n> \n> NOTE: test/regress/expected/numerology-NetBSD.out should be removed.\n> \n> NOTE: I can't test anything except NetBSD. I tried to make the\n> \"default\" float8.out correspond to what I expect other systems will\n> generate, but would appreciate it if someone else would check it over.\n> \n> NOTE: with these patches to the most recent snapshot every regression\n> test passes for NetBSD 1.3.2/i386.\n> \n> Cheers,\n> Brook\n> \n> ===========================================================================\n> --- test/regress/sql/float8.sql.orig\tSun May 11 09:41:51 1997\n> +++ test/regress/sql/float8.sql\tMon Sep 21 12:14:12 1998\n> @@ -12,15 +12,6 @@\n> \n> INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200');\n> \n> --- test for over and under flow \n> -INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');\n> -\n> -INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');\n> -\n> -INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');\n> -\n> -INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');\n> -\n> \n> SELECT '' AS five, FLOAT8_TBL.*;\n> \n> @@ -98,6 +89,32 @@\n> SELECT '' AS bad, : (f.f1) from FLOAT8_TBL f;\n> \n> SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f;\n> +\n> +SELECT '' AS five, FLOAT8_TBL.*;\n> +\n> +-- test for over and under flow \n> +INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');\n> +\n> +INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');\n> +\n> +INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');\n> +\n> +INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');\n> +\n> +-- maintain external table consistency across platforms\n> +-- delete all values and reinsert well-behaved ones\n> +\n> +DELETE FROM FLOAT8_TBL;\n> +\n> +INSERT INTO FLOAT8_TBL(f1) VALUES ('0.0');\n> +\n> +INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');\n> +\n> +INSERT INTO FLOAT8_TBL(f1) VALUES ('-1004.30');\n> +\n> +INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e+200');\n> +\n> +INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e-200');\n> \n> SELECT '' AS five, FLOAT8_TBL.*;\n> \n> ===========================================================================\n> --- test/regress/expected/float8.out.orig\tSun Jan 4 20:35:30 1998\n> +++ test/regress/expected/float8.out\tMon Sep 21 12:07:51 1998\n> @@ -4,14 +4,6 @@\n> QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');\n> QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200');\n> QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200');\n> -QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');\n> -ERROR: Bad float8 input format '10e400'\n> -QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');\n> -ERROR: Bad float8 input format '-10e400'\n> -QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');\n> -ERROR: Bad float8 input format '10e-400'\n> -QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');\n> -ERROR: Bad float8 input format '-10e-400'\n> QUERY: SELECT '' AS five, FLOAT8_TBL.*;\n> five|f1 \n> ----+--------------------\n> @@ -222,5 +214,29 @@\n> |-1004.3 \n> |-1.2345678901234e+200\n> |-1.2345678901234e-200\n> +(5 rows)\n> +\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');\n> +ERROR: Bad float8 input format '10e400'\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');\n> +ERROR: Bad float8 input format '-10e400'\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');\n> +ERROR: Bad float8 input format '10e-400'\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');\n> +ERROR: Bad float8 input format '-10e-400'\n> +QUERY: DELETE FROM FLOAT8_TBL;\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('0.0');\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1004.30');\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e+200');\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e-200');\n> +QUERY: SELECT '' AS five, FLOAT8_TBL.*;\n> +five|f1 \n> +----+---------------------\n> + |0 \n> + |-34.84 \n> + |-1004.3 \n> + |-1.2345678901234e+200\n> + |-1.2345678901234e-200\n> (5 rows)\n> \n> ===========================================================================\n> --- test/regress/expected/float8-NetBSD.out.orig\tSun Mar 22 12:46:31 1998\n> +++ test/regress/expected/float8-NetBSD.out\tMon Sep 21 11:47:24 1998\n> @@ -4,12 +4,6 @@\n> QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');\n> QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200');\n> QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200');\n> -QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');\n> -ERROR: Bad float8 input format '10e400'\n> -QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');\n> -ERROR: Bad float8 input format '-10e400'\n> -QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');\n> -QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');\n> QUERY: SELECT '' AS five, FLOAT8_TBL.*;\n> five|f1 \n> ----+--------------------\n> @@ -18,9 +12,7 @@\n> |-34.84 \n> |1.2345678901234e+200\n> |1.2345678901234e-200\n> - |0 \n> - |0 \n> -(7 rows)\n> +(5 rows)\n> \n> QUERY: SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <> '1004.3';\n> four|f1 \n> @@ -29,9 +21,7 @@\n> |-34.84 \n> |1.2345678901234e+200\n> |1.2345678901234e-200\n> - |0 \n> - |0 \n> -(6 rows)\n> +(4 rows)\n> \n> QUERY: SELECT '' AS one, f.* FROM FLOAT8_TBL f WHERE f.f1 = '1004.3';\n> one| f1\n> @@ -45,9 +35,7 @@\n> | 0\n> | -34.84\n> |1.2345678901234e-200\n> - | 0\n> - | 0\n> -(5 rows)\n> +(3 rows)\n> \n> QUERY: SELECT '' AS three, f.* FROM FLOAT8_TBL f WHERE f.f1 < '1004.3';\n> three| f1\n> @@ -55,9 +43,7 @@\n> | 0\n> | -34.84\n> |1.2345678901234e-200\n> - | 0\n> - | 0\n> -(5 rows)\n> +(3 rows)\n> \n> QUERY: SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE '1004.3' >= f.f1;\n> four| f1\n> @@ -66,9 +52,7 @@\n> | 1004.3\n> | -34.84\n> |1.2345678901234e-200\n> - | 0\n> - | 0\n> -(6 rows)\n> +(4 rows)\n> \n> QUERY: SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <= '1004.3';\n> four| f1\n> @@ -77,9 +61,7 @@\n> | 1004.3\n> | -34.84\n> |1.2345678901234e-200\n> - | 0\n> - | 0\n> -(6 rows)\n> +(4 rows)\n> \n> QUERY: SELECT '' AS three, f.f1, f.f1 * '-10' AS x\n> FROM FLOAT8_TBL f\n> @@ -137,9 +119,7 @@\n> |-34.84 |34.84 \n> |1.2345678901234e+200|1.2345678901234e+200\n> |1.2345678901234e-200|1.2345678901234e-200\n> - |0 |0 \n> - |0 |0 \n> -(7 rows)\n> +(5 rows)\n> \n> QUERY: SELECT '' AS five, f.f1, %f.f1 AS trunc_f1\n> FROM FLOAT8_TBL f;\n> @@ -150,9 +130,7 @@\n> |-34.84 |-34 \n> |1.2345678901234e+200|1.2345678901234e+200\n> |1.2345678901234e-200|0 \n> - |0 |0 \n> - |0 |0 \n> -(7 rows)\n> +(5 rows)\n> \n> QUERY: SELECT '' AS five, f.f1, f.f1 % AS round_f1\n> FROM FLOAT8_TBL f;\n> @@ -163,9 +141,7 @@\n> |-34.84 |-35 \n> |1.2345678901234e+200|1.2345678901234e+200\n> |1.2345678901234e-200|0 \n> - |0 |0 \n> - |0 |0 \n> -(7 rows)\n> +(5 rows)\n> \n> QUERY: SELECT '' AS three, f.f1, |/f.f1 AS sqrt_f1\n> FROM FLOAT8_TBL f\n> @@ -195,9 +171,7 @@\n> |-34.84 |-3.26607421344208 \n> |1.2345678901234e+200|4.97933859234765e+66\n> |1.2345678901234e-200|2.3112042409018e-67 \n> - |0 |0 \n> - |0 |0 \n> -(7 rows)\n> +(5 rows)\n> \n> QUERY: SELECT '' AS five, FLOAT8_TBL.*;\n> five|f1 \n> @@ -207,9 +181,7 @@\n> |-34.84 \n> |1.2345678901234e+200\n> |1.2345678901234e-200\n> - |0 \n> - |0 \n> -(7 rows)\n> +(5 rows)\n> \n> QUERY: UPDATE FLOAT8_TBL\n> SET f1 = FLOAT8_TBL.f1 * '-1'\n> @@ -231,10 +203,30 @@\n> ----+---------------------\n> |0 \n> |-34.84 \n> - |0 \n> - |0 \n> |-1004.3 \n> |-1.2345678901234e+200\n> |-1.2345678901234e-200\n> -(7 rows)\n> +(5 rows)\n> +\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');\n> +ERROR: Bad float8 input format '10e400'\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');\n> +ERROR: Bad float8 input format '-10e400'\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');\n> +QUERY: DELETE FROM FLOAT8_TBL;\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('0.0');\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1004.30');\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e+200');\n> +QUERY: INSERT INTO FLOAT8_TBL(f1) VALUES ('-1.2345678901234e-200');\n> +QUERY: SELECT '' AS five, FLOAT8_TBL.*;\n> +five|f1 \n> +----+---------------------\n> + |0 \n> + |-34.84 \n> + |-1004.3 \n> + |-1.2345678901234e+200\n> + |-1.2345678901234e-200\n> +(5 rows)\n> \n> ===========================================================================\n> --- test/regress/expected/numerology-NetBSD.out.orig\tSun Mar 22 12:46:37 1998\n> +++ test/regress/expected/numerology-NetBSD.out\tMon Sep 21 12:49:07 1998\n> @@ -1,122 +0,0 @@\n> -QUERY: CREATE TABLE TEMP_FLOAT (f1 FLOAT8);\n> -QUERY: INSERT INTO TEMP_FLOAT (f1)\n> - SELECT float8(f1) FROM INT4_TBL;\n> -QUERY: INSERT INTO TEMP_FLOAT (f1)\n> - SELECT float8(f1) FROM INT2_TBL;\n> -QUERY: SELECT '' AS ten, f1 FROM TEMP_FLOAT\n> - ORDER BY f1;\n> -ten| f1\n> ----+-----------\n> - |-2147483647\n> - | -123456\n> - | -32767\n> - | -1234\n> - | 0\n> - | 0\n> - | 1234\n> - | 32767\n> - | 123456\n> - | 2147483647\n> -(10 rows)\n> -\n> -QUERY: CREATE TABLE TEMP_INT4 (f1 INT4);\n> -QUERY: INSERT INTO TEMP_INT4 (f1)\n> - SELECT int4(f1) FROM FLOAT8_TBL\n> - WHERE (f1 > -2147483647) AND (f1 < 2147483647);\n> -QUERY: INSERT INTO TEMP_INT4 (f1)\n> - SELECT int4(f1) FROM INT2_TBL;\n> -QUERY: SELECT '' AS nine, f1 FROM TEMP_INT4\n> - ORDER BY f1;\n> -nine| f1\n> -----+------\n> - |-32767\n> - | -1234\n> - | -1004\n> - | -35\n> - | 0\n> - | 0\n> - | 0\n> - | 0\n> - | 0\n> - | 1234\n> - | 32767\n> -(11 rows)\n> -\n> -QUERY: CREATE TABLE TEMP_INT2 (f1 INT2);\n> -QUERY: INSERT INTO TEMP_INT2 (f1)\n> - SELECT int2(f1) FROM FLOAT8_TBL\n> - WHERE (f1 >= -32767) AND (f1 <= 32767);\n> -QUERY: INSERT INTO TEMP_INT2 (f1)\n> - SELECT int2(f1) FROM INT4_TBL\n> - WHERE (f1 >= -32767) AND (f1 <= 32767);\n> -QUERY: SELECT '' AS five, f1 FROM TEMP_INT2\n> - ORDER BY f1;\n> -five| f1\n> -----+-----\n> - |-1004\n> - | -35\n> - | 0\n> - | 0\n> - | 0\n> - | 0\n> - | 0\n> -(7 rows)\n> -\n> -QUERY: CREATE TABLE TEMP_GROUP (f1 INT4, f2 INT4, f3 FLOAT8);\n> -QUERY: INSERT INTO TEMP_GROUP\n> - SELECT 1, (- i.f1), (- f.f1)\n> - FROM INT4_TBL i, FLOAT8_TBL f;\n> -QUERY: INSERT INTO TEMP_GROUP\n> - SELECT 2, i.f1, f.f1\n> - FROM INT4_TBL i, FLOAT8_TBL f;\n> -QUERY: SELECT DISTINCT f1 AS two FROM TEMP_GROUP;\n> -two\n> ----\n> - 1\n> - 2\n> -(2 rows)\n> -\n> -QUERY: SELECT f1 AS two, max(f3) AS max_float, min(f3) as min_float\n> - FROM TEMP_GROUP\n> - GROUP BY two\n> - ORDER BY two, max_float, min_float;\n> -two|max_float |min_float \n> ----+--------------------+---------------------\n> - 1|1.2345678901234e+200|0 \n> - 2|0 |-1.2345678901234e+200\n> -(2 rows)\n> -\n> -QUERY: SELECT f1 AS two, max(f3) AS max_float, min(f3) AS min_float\n> - FROM TEMP_GROUP\n> - GROUP BY two\n> - ORDER BY two, max_float, min_float;\n> -two|max_float |min_float \n> ----+--------------------+---------------------\n> - 1|1.2345678901234e+200|0 \n> - 2|0 |-1.2345678901234e+200\n> -(2 rows)\n> -\n> -QUERY: SELECT f1 AS two, (max(f3) + 1) AS max_plus_1, (min(f3) - 1) AS min_minus_1\n> - FROM TEMP_GROUP\n> - GROUP BY two\n> - ORDER BY two, min_minus_1;\n> -two|max_plus_1 |min_minus_1 \n> ----+--------------------+---------------------\n> - 1|1.2345678901234e+200|-1 \n> - 2|1 |-1.2345678901234e+200\n> -(2 rows)\n> -\n> -QUERY: SELECT f1 AS two, (max(f3) + 1) AS max_plus_1, (min(f3) - 1) AS min_minus_1\n> - FROM TEMP_GROUP\n> - GROUP BY two\n> - ORDER BY two, min_minus_1;\n> -two|max_plus_1 |min_minus_1 \n> ----+--------------------+---------------------\n> - 1|1.2345678901234e+200|-1 \n> - 2|1 |-1.2345678901234e+200\n> -(2 rows)\n> -\n> -QUERY: DROP TABLE TEMP_INT2;\n> -QUERY: DROP TABLE TEMP_INT4;\n> -QUERY: DROP TABLE TEMP_FLOAT;\n> -QUERY: DROP TABLE TEMP_GROUP;\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 22 Sep 1998 12:50:51 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] union regression test" } ]
[ { "msg_contents": "Hi...\n\n \n\tI was thinking in a major rewrite of the PostrgreSQL transaction\nsystem, in order to provide less tuple overhead and recoverabilty.\n\n\tMy first goal is to reduce tuple overhead, getting rid of xmin/xman and\ncmin/cmax. To provide this functionality, I'm planning to keep only a\nflag indicating if the transaction is in curse or not. If, during a\ntransaction, a certain tuple is affected, this flag will store the\ncurrent transaction id. Thus, if this tuple is commited, an invalid OID\n(say, 0), will be written to this flag.\n\n\tThe only problem a saw using this approach is if some pages got flushed\nduring the transaction, because these pages will have to be reload from\ndisk.\n\n\tTo address the problem of non-functional update, I pretend to store a\ncommand identifier with the tuple, and, during update, see if the cid of\na tuple is equal of the current cid of this transaction (like we do\ntoday).\n\n\tTo keep track of current transactions, there will have a list of tuples\naffected by this transaction, and the operation executed. This way,\nduring commit, we only confirm these operations in relations (writing an\ninvalid OID in current xid of each tuple affected). To rollback, we\ndelete the new tuples (and mark this operation as a commit) and mark the\nold tuples affected as \"live\" (and leave these commited).\n\n\tI'm thinking of leave a transaction id for each new backend, and\npostmaster will keep track of used transaction ids. This way, there is\nno need to keep a list of transactions in shared memory.\n\n\tFor recovery (my second goal), I pretend to, at startup of postmaster,\nto rollback all marked in-curse transactions. After that, I'm thinking\nabout a redo log, but I'm still searching a way to keep it with the\nminimum size possible. \n\n Sugestions? Comments?\n\n Robson.\n", "msg_date": "Wed, 16 Sep 1998 18:35:53 -0300", "msg_from": "Robson Miranda <[email protected]>", "msg_from_op": true, "msg_subject": "Transaction system (proposal for 6.5)" }, { "msg_contents": "On Wed, Sep 16, 1998 at 06:35:53PM -0300, Robson Miranda wrote:\n> \tI was thinking in a major rewrite of the PostrgreSQL transaction\n> system, in order to provide less tuple overhead and recoverabilty.\n\nI do not have much of an idea how postgres handles stuff right now, so\nforgive me if I'm asking stupid questions.\n\n> \tMy first goal is to reduce tuple overhead, getting rid of xmin/xman and\n> cmin/cmax. To provide this functionality, I'm planning to keep only a\n> flag indicating if the transaction is in curse or not. If, during a\n> transaction, a certain tuple is affected, this flag will store the\n> current transaction id. Thus, if this tuple is commited, an invalid OID\n> (say, 0), will be written to this flag.\n\nThat means you store one flag per tuple? Does this happen only in memory?\n\n> \tThe only problem a saw using this approach is if some pages got flushed\n> during the transaction, because these pages will have to be reload from\n> disk.\n\nAh yes, it seems to be in memory only. And you exactly point to one problem.\nAny idea how to solve this?\n\n> \tTo keep track of current transactions, there will have a list of tuples\n> affected by this transaction, and the operation executed. This way,\n> during commit, we only confirm these operations in relations (writing an\n> invalid OID in current xid of each tuple affected). To rollback, we\n> delete the new tuples (and mark this operation as a commit) and mark the\n> old tuples affected as \"live\" (and leave these commited).\n\nThat means we always have both in the relation? That is we write the new\ntuple in and keep the old one? Is this done the same way in the actual\nversion? I'd prefer to have a clean cut with new and old not being in the\nsame table at the same time. \n\n> \tFor recovery (my second goal), I pretend to, at startup of postmaster,\n> to rollback all marked in-curse transactions. After that, I'm thinking\n> about a redo log, but I'm still searching a way to keep it with the\n> minimum size possible. \n\nWhere's the problem with a redo log?\n\nMichael\n-- \nDr. Michael Meskes | Th.-Heuss-Str. 61, D-41812 Erkelenz | Go SF49ers!\nSenior-Consultant | business: [email protected] | Go Rhein Fire!\nMummert+Partner | private: [email protected] | Use Debian\nUnternehmensberatung AG | [email protected] | GNU/Linux!\n", "msg_date": "Thu, 17 Sep 1998 10:18:52 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Transaction system (proposal for 6.5)" }, { "msg_contents": "> Hi...\n> \n> \n> \tI was thinking in a major rewrite of the PostrgreSQL transaction\n> system, in order to provide less tuple overhead and recoverabilty.\n> \n> \tMy first goal is to reduce tuple overhead, getting rid of xmin/xman and\n> cmin/cmax. To provide this functionality, I'm planning to keep only a\n> flag indicating if the transaction is in curse or not. If, during a\n> transaction, a certain tuple is affected, this flag will store the\n> current transaction id. Thus, if this tuple is commited, an invalid OID\n> (say, 0), will be written to this flag.\n> \n> \tThe only problem a saw using this approach is if some pages got flushed\n> during the transaction, because these pages will have to be reload from\n> disk.\n> \n> \tTo address the problem of non-functional update, I pretend to store a\n> command identifier with the tuple, and, during update, see if the cid of\n> a tuple is equal of the current cid of this transaction (like we do\n> today).\n> \n> \tTo keep track of current transactions, there will have a list of tuples\n> affected by this transaction, and the operation executed. This way,\n> during commit, we only confirm these operations in relations (writing an\n> invalid OID in current xid of each tuple affected). To rollback, we\n> delete the new tuples (and mark this operation as a commit) and mark the\n> old tuples affected as \"live\" (and leave these commited).\n> \n> \tI'm thinking of leave a transaction id for each new backend, and\n> postmaster will keep track of used transaction ids. This way, there is\n> no need to keep a list of transactions in shared memory.\n> \n> \tFor recovery (my second goal), I pretend to, at startup of postmaster,\n> to rollback all marked in-curse transactions. After that, I'm thinking\n> about a redo log, but I'm still searching a way to keep it with the\n> minimum size possible. \n\n\nInteresting. I know we have talked in the past about the various system\ncolumns and their removal. If you check the hackers archive under cmin,\netc, I think you will find some discussion.\n\nNow, as far as their removal, is it worth removing 8 bytes of tuple\noverhead for the gain of having to do a redo log, etc. I am not sure. \nI know many commercial databases have it, but I am not sure how\nbenificial it would be.\n\nWhat I would really like is the ability to re-use superceeded tuples\nwithout vacuum. It seems that should be possible, but it has not been\ndone by anyone yet. That would be a HUGE win, I think.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Sun, 20 Sep 1998 21:34:33 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Transaction system (proposal for 6.5)" }, { "msg_contents": "On Sun, 20 Sep 1998, Bruce Momjian wrote:\n\n> > Hi...\n> > \n> > \n> > \tI was thinking in a major rewrite of the PostrgreSQL transaction\n> > system, in order to provide less tuple overhead and recoverabilty.\n> > \n> > \tMy first goal is to reduce tuple overhead, getting rid of xmin/xman and\n> > cmin/cmax. To provide this functionality, I'm planning to keep only a\n> > flag indicating if the transaction is in curse or not. If, during a\n> > transaction, a certain tuple is affected, this flag will store the\n> > current transaction id. Thus, if this tuple is commited, an invalid OID\n> > (say, 0), will be written to this flag.\n> > \n> > \tThe only problem a saw using this approach is if some pages got flushed\n> > during the transaction, because these pages will have to be reload from\n> > disk.\n> > \n> > \tTo address the problem of non-functional update, I pretend to store a\n> > command identifier with the tuple, and, during update, see if the cid of\n> > a tuple is equal of the current cid of this transaction (like we do\n> > today).\n> > \n> > \tTo keep track of current transactions, there will have a list of tuples\n> > affected by this transaction, and the operation executed. This way,\n> > during commit, we only confirm these operations in relations (writing an\n> > invalid OID in current xid of each tuple affected). To rollback, we\n> > delete the new tuples (and mark this operation as a commit) and mark the\n> > old tuples affected as \"live\" (and leave these commited).\n> > \n> > \tI'm thinking of leave a transaction id for each new backend, and\n> > postmaster will keep track of used transaction ids. This way, there is\n> > no need to keep a list of transactions in shared memory.\n> > \n> > \tFor recovery (my second goal), I pretend to, at startup of postmaster,\n> > to rollback all marked in-curse transactions. After that, I'm thinking\n> > about a redo log, but I'm still searching a way to keep it with the\n> > minimum size possible. \n> \n> \n> Interesting. I know we have talked in the past about the various system\n> columns and their removal. If you check the hackers archive under cmin,\n> etc, I think you will find some discussion.\n> \n> Now, as far as their removal, is it worth removing 8 bytes of tuple\n> overhead for the gain of having to do a redo log, etc. I am not sure. \n> I know many commercial databases have it, but I am not sure how\n> benificial it would be.\n\n\tI may be missing something in the original posting that you are\nseeing, but I don't see the two as necesarily being inter-related...my\nunderstanding of the Oracle redo logs is that if a database corrupts, you\ncan rebuild it from the last backup + the redo logs to get to the same\npoint as where the corruption happened...\n\n> What I would really like is the ability to re-use superceeded tuples\n> without vacuum. It seems that should be possible, but it has not been\n> done by anyone yet. That would be a HUGE win, I think.\n\n\tNot sure, but IMHO, having a redo log capability would be a HUGE\nwin also...consider a mission critical application that doesn't have, in\nessence, \"live backups\" in the form of a redo log...\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 21 Sep 1998 03:02:16 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Transaction system (proposal for 6.5)" }, { "msg_contents": "The Hermit Hacker <[email protected]> writes:\n\n> \tNot sure, but IMHO, having a redo log capability would be a HUGE\n> win also...consider a mission critical application that doesn't have, in\n> essence, \"live backups\" in the form of a redo log...\n\nConsidering that every postgresql application I write has two backups:\n\n\to a full database dump,\n\to an incremental change log,\n\nso I can do exactly that...\n\n--Michael\n", "msg_date": "21 Sep 1998 08:55:03 -0700", "msg_from": "Michael Graff <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Transaction system (proposal for 6.5)" }, { "msg_contents": "Robson Miranda wrote:\n> \n> I was thinking in a major rewrite of the PostrgreSQL transaction\n> system, in order to provide less tuple overhead and recoverabilty.\n> \n> My first goal is to reduce tuple overhead, getting rid of xmin/xman and\n> cmin/cmax. To provide this functionality, I'm planning to keep only a\n\nI need in xmin & xmax for multi-version concurrency control...\nLet's decide what should be implemented in 6.5...\n\n> To address the problem of non-functional update, I pretend to store a\n> command identifier with the tuple, and, during update, see if the cid of\n> a tuple is equal of the current cid of this transaction (like we do\n> today).\n\ncmin & cmax very simplifies implementation of data changes\nvisibility rules - I'm not sure is it ever possible to\ndo this having only one attribute for command id,\nkeeping in mind triggers, (PL/)SQL-funcs...\n\nVadim\n", "msg_date": "Fri, 25 Sep 1998 10:43:28 +0800", "msg_from": "Vadim Mikheev <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Transaction system (proposal for 6.5)" } ]
[ { "msg_contents": "Hi all,\n\nSeems that ODBC driver have some problems while it translate Access\ncommands.\nI created a form with a subform joined by two columns.\n\nafter the Access Addnew event, log file returns the following error:\n-----------------------------------------------------------------------\nconn=75511800, query='SELECT \"risanamento\".\"oid\" FROM \"risanamento\" WHERE ((\"distretto\" = '' ) AND (\"progressivo\" = NULL ) ) '\nERROR from backend during send_query: 'ERROR: parser: parse error at or near \"null\"'\nSTATEMENT ERROR: func=SC_execute, desc='', errnum=1, errmsg='Error while executing the query'\n------------------------------------------------------------------------\nNB: Note that parser translate (\"progressivo\" = NULL) instead of\n(\"progressivo\" IS NULL).\n\n\nI suspect that problem is linked with column type, in fact\n\"progressivo\" is an int4. I changed this field to char and now it\nworks:\n----------------------------------------------------------------------------------\nconn=92477940, query='SELECT \"risanamento\".\"oid\" FROM \"risanamento\" WHERE ((\"distretto\" = '' ) AND (\"progressivo\" = '' ) ) '\n------------------------------------------------------------------------------------\n\n\"progressivo\" is a counter field and it must be numeric.\n\nAny hints will be appreciate.\n\nThank you in advance,\n Marco Pollachini mailto:[email protected]\n\n\n", "msg_date": "Thu, 17 Sep 1998 10:34:51 +0200", "msg_from": "Sferacarta Software <[email protected]>", "msg_from_op": true, "msg_subject": "Odbc parser error" }, { "msg_contents": "\n\nSferacarta Software wrote:\n\n> Hi all,\n>\n> Seems that ODBC driver have some problems while it translate Access\n> commands.\n> I created a form with a subform joined by two columns.\n>\n> after the Access Addnew event, log file returns the following error:\n> -----------------------------------------------------------------------\n> conn=75511800, query='SELECT \"risanamento\".\"oid\" FROM \"risanamento\" WHERE ((\"distretto\" = '' ) AND (\"progressivo\" = NULL ) ) '\n> ERROR from backend during send_query: 'ERROR: parser: parse error at or near \"null\"'\n> STATEMENT ERROR: func=SC_execute, desc='', errnum=1, errmsg='Error while executing the query'\n> ------------------------------------------------------------------------\n> NB: Note that parser translate (\"progressivo\" = NULL) instead of\n> (\"progressivo\" IS NULL).\n>\n>\n\nYes, the NULL works for parameters of an update statement, where Access would specify a statement such as \"update table set param =\n? where x = 1\". But it doesn't work in a select statement. I don't think I have much to work with here. The statement comes in as\nsomething like \"select * from table where x = ?\". I have to replace the ? with something. On updates, 'NULL' works fine.\n\nI'm not sure what to do about this. On other dbms, parameter passing is handled through a separate protocol to the backend, usually\nafter a prepare statement, so on these its no problem to send a null, or large amounts of ascii/binary data, without having to worry\nabout direct substitution into the sql string or hitting the upper limit of the statement string. I think until Postgres has such\nas protocol for parameter substitution/passing, it will be difficult to fix this problem.\n\nAny suggestions?\n\nByron\n\n\n", "msg_date": "Thu, 17 Sep 1998 16:33:31 -0400", "msg_from": "Byron Nikolaidis <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] Odbc parser error" }, { "msg_contents": "Byron Nikolaidis <[email protected]> wrote:\n\n> Sferacarta Software wrote:\n> \n> > Hi all,\n> >\n> > Seems that ODBC driver have some problems while it translate Access\n> > commands.\n> > I created a form with a subform joined by two columns.\n\t\t[...]\n> > NB: Note that parser translate (\"progressivo\" = NULL) instead of\n> > (\"progressivo\" IS NULL).\n> >\n> >\n> \n> Yes, the NULL works for parameters of an update statement, where Access would\n> specify a statement such as \"update table set param = ? where x = 1\". But\n> it doesn't work in a select statement. I don't think I have much to work\n> with here. The statement comes in as something like \"select * from table\n> where x = ?\". I have to replace the ? with something. On updates, 'NULL'\n> works fine.\n> \n> I'm not sure what to do about this. On other dbms, parameter passing is\n> handled through a separate protocol to the backend, usually after a prepare\n> statement, so on these its no problem to send a null, or large amounts of\n> ascii/binary data, without having to worry about direct substitution into\n> the sql string or hitting the upper limit of the statement string. I think\n> until Postgres has such as protocol for parameter substitution/passing, it\n> will be difficult to fix this problem.\n> \n> Any suggestions?\n> \n> Byron\n\nHow about subsitution any occurance of /=[ \\t]*?/ with \"IS NULL\". This should\nwork for both select and update statements.\n--\n____ | Billy G. Allie | Domain....: [email protected]\n| /| | 7436 Hartwell | Compuserve: 76337,2061\n|-/-|----- | Dearborn, MI 48126| MSN.......: [email protected]\n|/ |LLIE | (313) 582-1540 | \n", "msg_date": "Thu, 17 Sep 1998 19:37:22 -0400", "msg_from": "\"Billy G. Allie\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: [INTERFACES] Odbc parser error " }, { "msg_contents": "\n\nBilly G. Allie wrote:\n\n> How about subsitution any occurance of /=[ \\t]*?/ with \"IS NULL\". This should\n> work for both select and update statements.\n> --\n\nYes, sure, it could be done, assuming I could get a regex library for VC++. But I\nthink it would be more of a kludge than a solution. Even the current substitution\nof the ? with the parameter data is a kludge. The frontend shouldn't be rewriting\nthe sql string to stick parameters in.\n\nThe real point of the whole thing is that if the backend recognized parameters and\nthere was a protocol for passing the data over, we would be able to do some cool\nthings we have never been able to do. Not just passing NULL, but also passing\nlarger parameter data without worrying about running into the upper limit of the\nstatement string. It would also be easier to send binary data. And, assuming the\nprotocol allowed it, you could retrieve information from the backend about a\nparticular parameter, such as its precision, data type, nullablity, etc.\n\nAnd its not just ODBC that would benefit. JDBC has the same semantics. And I\nbelieve Embedded SQL does too.\n\nByron\n\n\n\n", "msg_date": "Fri, 18 Sep 1998 09:23:26 -0400", "msg_from": "Byron Nikolaidis <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: [INTERFACES] Odbc parser error" }, { "msg_contents": "Byron Nikolaidis <[email protected]> wrote:\n\n> Yes, the NULL works for parameters of an update statement, where Access would\n> specify a statement such as \"update table set param = ? where x = 1\". But\n> it doesn't work in a select statement. I don't think I have much to work\n> with here. The statement comes in as something like \"select * from table\n> where x = ?\". I have to replace the ? with something. On updates, 'NULL'\n> works fine.\n>\n> I'm not sure what to do about this. On other dbms, parameter passing is\n> handled through a separate protocol to the backend, usually after a prepare\n> statement, so on these its no problem to send a null, or large amounts of\n> ascii/binary data, without having to worry about direct substitution into\n> the sql string or hitting the upper limit of the statement string. I think\n> until Postgres has such as protocol for parameter substitution/passing, it\n> will be difficult to fix this problem.\n\nWell, before we jump high, I think this stems from a long-standing Postgres\nproblem - which I mentioned in the past, and I guess I'll continue to\nmention, until we finally buy Oracle (and get a whole different set of\nproblems).\n\nThe problem is that in Postgres, NULL=NULL gives false.\n\nAs simple as that.\n\nI am appaled to hear that this is still the situation. I thought by 6.4 (I\nonly have 6.2.1), the problem would probably be looked into, but I guess it\nwasn't.\n\nThis NULL=NULL is FALSE problem explains why there is no problem in updates\n(where the semantics of \"=\" is assignment, not comparison!).\n\nThe problem causes many other problems - like the inability to sort by two\nfields when the first field may contain nulls. Why? Because sorting by two\nfields means that when the values of the first fields in two rows are\ncompared and found equal, the second field is used for the comparison. But\nif nulls are allowed, two rows with NULL in the first field are not\nconsidered to have the same value! So, despite the nulls being sort of\n\"grouped together\", their secondary sort fields will come out with an\narbitrary order!\n\nThis problem stems from Postgres's global definition that when you have\n\n operand1 operator operand2\n\nand operand1 or operand2 are null, the result will always be NULL. That's\nnice when you are trying to add 5 to a column, and expect all places where\nthere was NULL before to stay NULL, because NULL signifies \"no data here\".\n\nSince the comparison operator is just an operator, the result of the\ncomparison is not really FALSE, but NULL. NULL, however, is interpreted\nalmost as a \"false\". To show this, here is an example of comparison:\n\ntesting=> create table test6 (val int);\nCREATE\ntesting=> copy test6 from stdin;\nEnter info followed by a newline\nEnd with a backslash and a period on a line by itself.\n>> 1\n>> 2\n>> \\N\n>> 4\n>> \\.\ntesting=> select ( val = 2 ) from test6;\n?column?\n--------\nf\nt\n\nf\n(4 rows)\n\nBy the way, the reason that I said \"almost\" is that the NOT boolean\noperator, just like the binary operators I've discussed, returns NULL when\napplied to NULL. Which means that NOT ( NULL = something ) will give you\nthe same result as NULL = something...\n\ntesting=> select ( val ) from test6 where NOT ( val = 2 );\nval\n---\n 1\n 4\n(2 rows)\n\nIn short, something needs to be done about the semantics of the equality\noperator. It should be treated as a special case - in order to maintain the\nlogic of logic, as well...\n\nSuggested semantics:\n\nPerhaps the general solution is always to treat NULLS as false in boolean\ncontext, and have the equality operator return TRUE in the case where both\nits operands are NULL.\n\nHerouth\n--\nHerouth Maoz, B.Sc. Work: [email protected]\n Home: [email protected]\nHOME PAGE: http://telem.openu.ac.il/~herutma/\nInternet technical assistant Open University, Telem Project\n", "msg_date": "Tue, 22 Sep 1998 01:41:03 +0200", "msg_from": "Herouth Maoz <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: [INTERFACES] Odbc parser error" }, { "msg_contents": "Byron Nikolaidis wrote:\n> \n> Jose' Soares (Sferacarta Software) wrote:\n> \n> > Hi all,\n> >\n> > Seems that ODBC driver have some problems while it translate Access\n> > commands.\n> > I created a form with a subform joined by two columns.\n> >\n> > after the Access Addnew event, log file returns the following error:\n> > -----------------------------------------------------------------------\n> > conn=75511800, query='SELECT \"risanamento\".\"oid\" FROM \"risanamento\" WHERE ((\"distretto\" = '' ) AND (\"progressivo\" = NULL ) ) '\n> > ERROR from backend during send_query: 'ERROR: parser: parse error at or near \"null\"'\n> > STATEMENT ERROR: func=SC_execute, desc='', errnum=1, errmsg='Error while executing the query'\n> > ------------------------------------------------------------------------\n> > NB: Note that parser translate (\"progressivo\" = NULL) instead of\n> > (\"progressivo\" IS NULL).\n> >\n> >\n> \n> Yes, the NULL works for parameters of an update statement, where Access would specify a statement such as \"update table set param =\n> ? where x = 1\". But it doesn't work in a select statement. I don't think I have much to work with here. The statement comes in as\n> something like \"select * from table where x = ?\". I have to replace the ? with something. On updates, 'NULL' works fine.\n> \n> I'm not sure what to do about this. On other dbms, parameter passing is handled through a separate protocol to the backend, usually\n> after a prepare statement, so on these its no problem to send a null, or large amounts of ascii/binary data, without having to worry\n> about direct substitution into the sql string or hitting the upper limit of the statement string. I think until Postgres has such\n> as protocol for parameter substitution/passing, it will be difficult to fix this problem.\n> \n> Any suggestions?\n> \nYes, I would to suggest a way to solve this problem because in Access we\ncan't link two tables\nby a numeric field, for example:\n\nI have 2 tables:\n\nORDER_MASTER:\t\tORDER_DETAIL:\n--------------\t\t--------------\nnumero\tSERIAL\t<--->\tnumero\tSERIAL\n...\t\t\t...\n\nWhen I try to create a new ORDER, the connection goes down with message:\n\n# conn=75511800, query='SELECT \"order_detail\".\"numero\" FROM\n\"order_detail\" WHERE (\"numero\" = NULL )'\n# ERROR from backend during send_query: 'ERROR: parser: parse error at\nor near \"null\"'\n\n\nI know this is not standard but Access understand both syntaxes (i.e.:\n\nSELECT * FROM table WHERE field IS NULL; = SELECT * FROM table\nWHERE field = NULL;\nSELECT * FROM table WHERE field IS NOT NULL; = SELECT * FROM table\nWHERE field <> NULL;\n\nWhy not to get PostgreSQL to understand it also ?\n\nThank you for any help\n Jose'\n", "msg_date": "Thu, 22 Oct 1998 10:13:15 +0200", "msg_from": "\"Jose' Soares\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: [INTERFACES] Odbc parser error" }, { "msg_contents": "Hi all,\n\nJS> Yes, I would to suggest a way to solve this problem because in Access we\nJS> can't link two tables\nJS> by a numeric field, for example:\n\nJS> I have 2 tables:\n\nJS> ORDER_MASTER: ORDER_DETAIL:\nJS> -------------- --------------\nJS> numero SERIAL <---> numero SERIAL\nJS> ... ...\n\nJS> When I try to create a new ORDER, the connection goes down with message:\n\nJS> # conn=75511800, query='SELECT \"order_detail\".\"numero\" FROM\nJS> \"order_detail\" WHERE (\"numero\" = NULL )'\nJS> # ERROR from backend during send_query: 'ERROR: parser: parse error at\nJS> or near \"null\"'\n\n\nJS> I know this is not standard but Access understand both syntaxes (i.e.:\n\nJS> SELECT * FROM table WHERE field IS NULL; = SELECT * FROM table\nJS> WHERE field = NULL;\nJS> SELECT * FROM table WHERE field IS NOT NULL; = SELECT * FROM table\nJS> WHERE field <> NULL;\n\nJS> Why not to get PostgreSQL to understand it also ?\n\nDone. I modify the pgsql/src/backend/gram.y at line 3318 I inserted\nthe following two lines:\n\n<DELETED>\n3318 | a_expr '=' NULL_P\n3319 { $$ = makeA_Expr(ISNULL, NULL,$1, NULL);\n\n3320 | a_expr '=' a_expr\n3321 { $$ = makeA_Expr(OP, \"=\", $1, $3); }\n<DELETED>\n\nnow SELECT * FROM table WHERE field IS NULL;\nis the same as: SELECT * FROM table WHERE field = NULL;\n\nHow about to add it to official release ?\n-------------------------------------------------------------------\n\nI think I found a bug using IS NULL operator:\n\nhygea=> \\d comuni\n\nTable = comuni\n+----------------------------------+----------------------------------+-------+\n| Field | Type | Length|\n+----------------------------------+----------------------------------+-------+\n| istat | char() not null | 6 |\n| nome | char() | 50 |\n| provincia | char() | 2 |\n| codice_fiscale | char() | 4 |\n| cap | char() | 5 |\n| regione | char() | 3 |\n| distretto | char() | 4 |\n+----------------------------------+----------------------------------+-------+\nhygea=> select * from comuni where COMUNI is null;\n ^^^^^^------------------COMUNI is\n not a field but the table name.\n \nistat|nome|provincia|codice_fiscale|cap|regione|distretto\n-----+----+---------+--------------+---+-------+---------\n(0 rows)\n\n\n\nJose'\n\n\n", "msg_date": "Mon, 26 Oct 1998 17:22:25 +0100", "msg_from": "Sferacarta Software <[email protected]>", "msg_from_op": true, "msg_subject": "Re[2]: [HACKERS] Re: [INTERFACES] Odbc parser error" }, { "msg_contents": "> JS> Yes, I would to suggest a way to solve this problem because in\n> JS> Access we can't link two tables by a numeric field\n> JS> # conn=75511800, query='SELECT \"order_detail\".\"numero\" FROM\n> JS> \"order_detail\" WHERE (\"numero\" = NULL )'\n> JS> I know this is not standard but Access understand both syntaxes \n> JS> SELECT * FROM table WHERE field IS NULL;\n> JS> SELECT * FROM table WHERE field = NULL;\n> JS> Why not to get PostgreSQL to understand it also ?\n> Done. I modify the pgsql/src/backend/gram.y\n> How about to add it to official release ?\n\nOr, how about insisting that your commercial software suppliers conform\nto one of the simplest and clearest part of the SQL standard they claim\nto support? Instead of using those suppliers who insist on making small\nand large incompatibilities in their popular software packages to ensure\nthat only their own products can interoperate with them?\n\n*slap* Ow! Ok, Ok!\n\nIt looks like a nice patch. But it is too late to get it into v6.4. It\nlooks like a good addition to v6.5...\n\n*slap* OW! OK!\n\nIn fact, it is such a nice feature that I'm sure it will fit nicely into\nv6.4.1, and you are welcome to submit a patchset to post on\npostgresql.org to fix v6.4. \n\n*grin*\n\nIt would be best to include patches for both gram.y and a full gram.c so\nthat users may not have to rebuild the parser. Also, if we run into\nparser syntax conflicts in the future it would be a candidate for\nremoval, I suppose.\n\n - Tom\n", "msg_date": "Mon, 26 Oct 1998 17:28:25 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: [INTERFACES] Odbc parser error" }, { "msg_contents": "Hello Thomas,\n\nluned�, 26 ottobre 98, you wrote:\n\n>> JS> Yes, I would to suggest a way to solve this problem because in\n>> JS> Access we can't link two tables by a numeric field\n>> JS> # conn=75511800, query='SELECT \"order_detail\".\"numero\" FROM\n>> JS> \"order_detail\" WHERE (\"numero\" = NULL )'\n>> JS> I know this is not standard but Access understand both syntaxes \n>> JS> SELECT * FROM table WHERE field IS NULL;\n>> JS> SELECT * FROM table WHERE field = NULL;\n>> JS> Why not to get PostgreSQL to understand it also ?\n>> Done. I modify the pgsql/src/backend/gram.y\n>> How about to add it to official release ?\n\nTGL> Or, how about insisting that your commercial software suppliers conform\nTGL> to one of the simplest and clearest part of the SQL standard they claim\nTGL> to support? Instead of using those suppliers who insist on making small\nTGL> and large incompatibilities in their popular software packages to ensure\nTGL> that only their own products can interoperate with them?\n\nYou are right Tom, but you know there is no way to have something from\nthose bastards, I prefer to talk with a wall.\n\nTGL> *slap* Ow! Ok, Ok!\n\nTGL> It looks like a nice patch. But it is too late to get it into v6.4. It\nTGL> looks like a good addition to v6.5...\n\nTGL> *slap* OW! OK!\n\nTGL> In fact, it is such a nice feature that I'm sure it will fit nicely into\nTGL> v6.4.1, and you are welcome to submit a patchset to post on\nTGL> postgresql.org to fix v6.4. \n\nTGL> *grin*\n\nTGL> It would be best to include patches for both gram.y and a full gram.c so\nTGL> that users may not have to rebuild the parser. Also, if we run into\nTGL> parser syntax conflicts in the future it would be a candidate for\nTGL> removal, I suppose.\n\nShould I send the patch now or after v6.4 is released ?\n\nJose'\n\n\n", "msg_date": "Tue, 27 Oct 1998 16:01:11 +0100", "msg_from": "Sferacarta Software <[email protected]>", "msg_from_op": true, "msg_subject": "Re[2]: [HACKERS] Re: [INTERFACES] Odbc parser error" }, { "msg_contents": "> Should I send the patch now or after v6.4 is released ?\n\nI would suggest waiting, since that will ensure that it doesn't get\nlost. Try sending it in ~1 week after release and we'll post as a patch\nand put it into the main tree.\n\n - Tom\n", "msg_date": "Tue, 27 Oct 1998 15:55:47 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: [INTERFACES] Odbc parser error" } ]
[ { "msg_contents": "I am getting the following error when trying to build postgres under BSD/OS \n3.1 or 4.0.\n\ngmake[2]: Entering directory `/var/src/local/pgsql/src/backend/parser'\n/usr/bin/yacc -d gram.y\n/usr/bin/yacc: f - maximum table size exceeded\ngmake[2]: *** [parse.h] Error 2\ngmake[2]: Leaving directory `/var/src/local/pgsql/src/backend/parser'\n\nHas someone sucessfuly built scan.c and parse.h under BSD/OS?\n\nDaniel\n\n", "msg_date": "Thu, 17 Sep 1998 19:48:41 +0300", "msg_from": "Daniel Kalchev <[email protected]>", "msg_from_op": true, "msg_subject": "yacc problems" }, { "msg_contents": "On Thu, Sep 17, 1998 at 07:48:41PM +0300, Daniel Kalchev wrote:\n> I am getting the following error when trying to build postgres under BSD/OS \n> 3.1 or 4.0.\n> \n> gmake[2]: Entering directory `/var/src/local/pgsql/src/backend/parser'\n> /usr/bin/yacc -d gram.y\n> /usr/bin/yacc: f - maximum table size exceeded\n> gmake[2]: *** [parse.h] Error 2\n> gmake[2]: Leaving directory `/var/src/local/pgsql/src/backend/parser'\n\nNot much of a surprise. You need bison to compile it.\n\n> Has someone sucessfuly built scan.c and parse.h under BSD/OS?\n\nThe .c files are distributed with the source.\n\nMichael\n-- \nDr. Michael Meskes | Th.-Heuss-Str. 61, D-41812 Erkelenz | Go SF49ers!\nSenior-Consultant | business: [email protected] | Go Rhein Fire!\nMummert+Partner | private: [email protected] | Use Debian\nUnternehmensberatung AG | [email protected] | GNU/Linux!\n", "msg_date": "Thu, 17 Sep 1998 19:13:24 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] yacc problems" }, { "msg_contents": "> I am getting the following error when trying to build postgres under BSD/OS \n> 3.1 or 4.0.\n> \n> gmake[2]: Entering directory `/var/src/local/pgsql/src/backend/parser'\n> /usr/bin/yacc -d gram.y\n> /usr/bin/yacc: f - maximum table size exceeded\n> gmake[2]: *** [parse.h] Error 2\n> gmake[2]: Leaving directory `/var/src/local/pgsql/src/backend/parser'\n> \n> Has someone sucessfuly built scan.c and parse.h under BSD/OS?\n\nI assume this is the beta. I am fixing it now. I have BSD/OS too, but\nhave bison installed. That is the only thing that will fix it. You\nwill need to grab the source after I have generated a new gram.y, or get\nbison.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Thu, 17 Sep 1998 15:44:38 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] yacc problems" } ]
[ { "msg_contents": "Sorry for sending those separately.\n\nThe current snapshot has the following error (under BSD/OS 3.1 and 4.0):\n\ngmake[3]: Entering directory `/var/src/local/pgsql/src/interfaces/ecpg/preproc'\ngcc2 -I../../../include -I../../../backend -O2 -m486 -pipe -I../include \n-DMAJOR_VERSION=2 -DMINOR_VERSION=4 -DPATCHLEVEL=1 \n-DINCLUDE_PATH=\\\"/usr/local/pgsql/include\\\" -c y.tab.c -o y.tab.o\npreproc.y: In function `yyparse':\npreproc.y:1562: syntax error before `}'\ngmake[3]: *** [y.tab.o] Error 1\n\nIndeed, at line 1562 of preproc.y it is missing an ';'\n\nDaniel\n\nPS: well, this time I waited the compile to complete.\n\n", "msg_date": "Thu, 17 Sep 1998 19:54:32 +0300", "msg_from": "Daniel Kalchev <[email protected]>", "msg_from_op": true, "msg_subject": "syntax error" }, { "msg_contents": "On Thu, Sep 17, 1998 at 07:54:32PM +0300, Daniel Kalchev wrote:\n> The current snapshot has the following error (under BSD/OS 3.1 and 4.0):\n> ...\n\nThanks. I fixed it in my source. Here's my actual patch. It gets bigger.\nCould anyone please apply this to the archive?\n\nMichael \n\n-- \nDr. Michael Meskes | Th.-Heuss-Str. 61, D-41812 Erkelenz | Go SF49ers!\nSenior-Consultant | business: [email protected] | Go Rhein Fire!\nMummert+Partner | private: [email protected] | Use Debian\nUnternehmensberatung AG | [email protected] | GNU/Linux!", "msg_date": "Thu, 17 Sep 1998 19:27:32 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] syntax error" } ]
[ { "msg_contents": "The query generated by \\df causes the backend to fail in oid8types.\n\nThe simplest illustration I found was:\n\n\tSELECT oid8types(proargtypes) FROM pg_proc;\n\nIt appears that oid8types() originally expected an array of pointers\nto oid8, but now it gets the base of an array of oid8. The following\nseems to fix things for me in today's snapshot. Any comments?\n\n--- include/utils/builtins.h\t1998/09/18 03:25:18\t1.1\n+++ include/utils/builtins.h\t1998/09/18 03:25:47\n@@ -358,7 +358,7 @@\n /* regproc.c */\n extern int32 regprocin(char *pro_name_and_oid);\n extern char *regprocout(RegProcedure proid);\n-extern text *oid8types(Oid **oidArray); \n+extern text *oid8types(Oid *oidArray); \n extern Oid\tregproctooid(RegProcedure rp);\n \n /* define macro to replace mixed-case function call - tgl 97/04/27 */\n--- backend/utils/adt/regproc.c\t1998/09/18 02:25:19\t1.1\n+++ backend/utils/adt/regproc.c\t1998/09/18 03:23:19\n@@ -7,7 +7,7 @@\n *\n *\n * IDENTIFICATION\n- *\t $Header: /home/staff/oliver/lab/pgsql/src/backend/utils/adt/regproc.c,v 1.1 1998/09/18 02:25:19 oliver Exp oliver $\n+ *\t $Header: /usr/local/cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.26 1998/09/01 04:32:47 momjian Exp $\n *\n *-------------------------------------------------------------------------\n */\n@@ -211,7 +211,7 @@\n *\t\tint8typeout\t\t\t- converts int8 type oids to \"typname\" list\n */\n text *\n-oid8types(Oid **oidArray)\n+oid8types(Oid *oidArray)\n {\n \tHeapTuple\ttypetup;\n \ttext\t *result;\n@@ -228,7 +228,7 @@\n \tresult = (text *) palloc(NAMEDATALEN * 8 + 8 + VARHDRSZ);\n \t*VARDATA(result) = '\\0';\n \n-\tsp = *oidArray;\n+\tsp = oidArray;\n \tfor (num = 8; num != 0; num--, sp++)\n \t{\n \t\tif (*sp != InvalidOid)\n\n-- \nChristopher Oliver Traverse Internet\nSystems Coordinator 223 Grandview Pkwy, Suite 108\[email protected] Traverse City, Michigan, 49684\n \"What good is a can of worms if you never open it?\" -Bob Arning\n", "msg_date": "Thu, 17 Sep 1998 23:28:09 -0400", "msg_from": "Christopher Oliver <[email protected]>", "msg_from_op": true, "msg_subject": "oid8types() borken?" }, { "msg_contents": "Fixed. The actual fix is to change:\n\n\toid8types(Oid **oidArray)\n\nto:\n\n\toid8types(Oid (*oidArray)[])\n\nCan someone explain what this is? This is the old 6.3 code, and forgot\nto reverse back this part when I realized my change to **oidArray did\nnot work.\n\n\n> The query generated by \\df causes the backend to fail in oid8types.\n> \n> The simplest illustration I found was:\n> \n> \tSELECT oid8types(proargtypes) FROM pg_proc;\n> \n> It appears that oid8types() originally expected an array of pointers\n> to oid8, but now it gets the base of an array of oid8. The following\n> seems to fix things for me in today's snapshot. Any comments?\n> \n> --- include/utils/builtins.h\t1998/09/18 03:25:18\t1.1\n> +++ include/utils/builtins.h\t1998/09/18 03:25:47\n> @@ -358,7 +358,7 @@\n> /* regproc.c */\n> extern int32 regprocin(char *pro_name_and_oid);\n> extern char *regprocout(RegProcedure proid);\n> -extern text *oid8types(Oid **oidArray); \n> +extern text *oid8types(Oid *oidArray); \n> extern Oid\tregproctooid(RegProcedure rp);\n> \n> /* define macro to replace mixed-case function call - tgl 97/04/27 */\n> --- backend/utils/adt/regproc.c\t1998/09/18 02:25:19\t1.1\n> +++ backend/utils/adt/regproc.c\t1998/09/18 03:23:19\n> @@ -7,7 +7,7 @@\n> *\n> *\n> * IDENTIFICATION\n> - *\t $Header: /home/staff/oliver/lab/pgsql/src/backend/utils/adt/regproc.c,v 1.1 1998/09/18 02:25:19 oliver Exp oliver $\n> + *\t $Header: /usr/local/cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.26 1998/09/01 04:32:47 momjian Exp $\n> *\n> *-------------------------------------------------------------------------\n> */\n> @@ -211,7 +211,7 @@\n> *\t\tint8typeout\t\t\t- converts int8 type oids to \"typname\" list\n> */\n> text *\n> -oid8types(Oid **oidArray)\n> +oid8types(Oid *oidArray)\n> {\n> \tHeapTuple\ttypetup;\n> \ttext\t *result;\n> @@ -228,7 +228,7 @@\n> \tresult = (text *) palloc(NAMEDATALEN * 8 + 8 + VARHDRSZ);\n> \t*VARDATA(result) = '\\0';\n> \n> -\tsp = *oidArray;\n> +\tsp = oidArray;\n> \tfor (num = 8; num != 0; num--, sp++)\n> \t{\n> \t\tif (*sp != InvalidOid)\n> \n> -- \n> Christopher Oliver Traverse Internet\n> Systems Coordinator 223 Grandview Pkwy, Suite 108\n> [email protected] Traverse City, Michigan, 49684\n> \"What good is a can of worms if you never open it?\" -Bob Arning\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Fri, 18 Sep 1998 00:47:50 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] oid8types() borken?" }, { "msg_contents": "At 0:47 AM 98.9.18 -0400, Bruce Momjian wrote:\n>Fixed. The actual fix is to change:\n>\n>\toid8types(Oid **oidArray)\n>\n>to:\n>\n>\toid8types(Oid (*oidArray)[])\n>\n>Can someone explain what this is? This is the old 6.3 code, and forgot\n>to reverse back this part when I realized my change to **oidArray did\n>not work.\n\nOid **oidArray and (Oid (*oidArray)[] are quite different.\nThe latter is a pointer to Oid array. Sample code for a caller might\nbe:\n\nOid oids[8];\n :\n :\noid8types(&oids);\n\n&oids is actually same as oids or &oids[0]. Interesting but just\nwaste of time IMHO.\nYou will see oidArray and *oidArray shows same value in oid8types().\n\nSeems just \n\n oid8types(Oid *oidArray)\nor\n oid8types(Oid oidArray[])\n\nare simpler and more effective.\n\n--\nTatsuo Ishii\[email protected]\n\n", "msg_date": "Wed, 23 Sep 1998 00:57:48 +0900", "msg_from": "[email protected] (Tatsuo Ishii)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] oid8types() borken?" }, { "msg_contents": "> At 0:47 AM 98.9.18 -0400, Bruce Momjian wrote:\n> >Fixed. The actual fix is to change:\n> >\n> >\toid8types(Oid **oidArray)\n> >\n> >to:\n> >\n> >\toid8types(Oid (*oidArray)[])\n> >\n> >Can someone explain what this is? This is the old 6.3 code, and forgot\n> >to reverse back this part when I realized my change to **oidArray did\n> >not work.\n> \n> Oid **oidArray and (Oid (*oidArray)[] are quite different.\n> The latter is a pointer to Oid array. Sample code for a caller might\n> be:\n> \n> Oid oids[8];\n> :\n> :\n> oid8types(&oids);\n> \n> &oids is actually same as oids or &oids[0]. Interesting but just\n> waste of time IMHO.\n\nYes, I have seen people do this, and it is a waste.\n\n> You will see oidArray and *oidArray shows same value in oid8types().\n> \n> Seems just \n> \n> oid8types(Oid *oidArray)\n> or\n> oid8types(Oid oidArray[])\n> \n> are simpler and more effective.\n\nAh, I see now, just a confusion of adding meaningless []. I am applying\nthe cleanup now. Thanks.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 22 Sep 1998 15:49:17 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] oid8types() borken?" } ]
[ { "msg_contents": "The following syntax (which is legal under Oracle) does not parse under \nPostreSQL 6.3.2.\n\n update table1 set col1=(select col2 from table2 where col3='x') where col4='z';\n\nIs there a variant of the syntax which does work?\n\nCheers and thanks,\nStephen.\n\n========================================================================\nStephen Davies Consulting\t \t\t [email protected]\nAdelaide, South Australia. \t\t\t Voice: 61-8-82728863\nComputing & Network solutions.\t \t Fax: 61-8-82741015\n\n\n", "msg_date": "Fri, 18 Sep 1998 14:37:28 +0930", "msg_from": "Stephen Davies <[email protected]>", "msg_from_op": true, "msg_subject": "PostgreSQL syntax question" }, { "msg_contents": "SD> The following syntax (which is legal under Oracle) does not parse under\nSD> PostreSQL 6.3.2.\n\nSD> update table1 set col1=(select col2 from table2 where col3='x') where col4='z';\nThis syntax is SQL standard but seems that PostgreSQL doesn't\nsupport \"scalar subqueries\" yet.\nI don't see this on TODO things ? What about to add it to TODO file ?\n\nJose'\n\n\n", "msg_date": "Fri, 18 Sep 1998 15:13:37 +0200", "msg_from": "Sferacarta Software <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [SQL] PostgreSQL syntax question" }, { "msg_contents": "> SD> The following syntax (which is legal under Oracle) does not parse under\n> SD> PostreSQL 6.3.2.\n> \n> SD> update table1 set col1=(select col2 from table2 where col3='x') where col4='z';\n> This syntax is SQL standard but seems that PostgreSQL doesn't\n> support \"scalar subqueries\" yet.\n> I don't see this on TODO things ? What about to add it to TODO file ?\n\nAlready there:\n\n\t* Allow subqueries in target list\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Fri, 18 Sep 1998 12:21:38 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [SQL] PostgreSQL syntax question" } ]
[ { "msg_contents": "I tried updating the ecpg docs. But I'm not sure it works as expected since\nI neither speak sgml, nor have sgml software on my notebook to test. So I\njust send out the patch.\n\nMichael\n\n-- \nDr. Michael Meskes | Th.-Heuss-Str. 61, D-41812 Erkelenz | Go SF49ers!\nSenior-Consultant | business: [email protected] | Go Rhein Fire!\nMummert+Partner | private: [email protected] | Use Debian\nUnternehmensberatung AG | [email protected] | GNU/Linux!", "msg_date": "Fri, 18 Sep 1998 09:13:43 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "ecpg docs" } ]
[ { "msg_contents": "\nHi, \nI just found an error in every postgres versions, \n(I tried 6.2.1, 6.3.2, and 6.4beta1 )\n\nif I have a table with boolean field, and I want to negate that field,\nit's kills the backend process... meanwhile 'select not ( 'T'::bool )'\nworks well...\n\ncreate table t1 ( b bool );\ninsert into t1 values ( 'T' );\n\nselect not b from t1;\nPQexec() -- Request was sent to backend, but backend closed the channel\nbefore responding.\n This probably means the backend terminated abnormally before or\nwhile processing the request.\n\n\tdon't you have some idea what to do,?\n\t\n\tthanks, \n\t\tRedax\n.----------------------------------------------------------.\n|Zsolt Varga | tel/fax: +36 36 422811 |\n| AgriaComputer LTD | email: [email protected] |\n| System Administrator | URL: http://www.agria.hu/ |\n`----------------------------------------------------------'\n\n", "msg_date": "Fri, 18 Sep 1998 12:39:16 +0200 (CEST)", "msg_from": "Zsolt Varga <[email protected]>", "msg_from_op": true, "msg_subject": "BUG: NOT boolfield kills backend" }, { "msg_contents": "Hello Zsolt,\n\nvenerd�, 18 settembre 98, you wrote:\n\n\nZV> Hi, \nZV> I just found an error in every postgres versions, \nZV> (I tried 6.2.1, 6.3.2, and 6.4beta1 )\n\nZV> if I have a table with boolean field, and I want to negate that field,\nZV> it's kills the backend process... meanwhile 'select not ( 'T'::bool )'\nZV> works well...\n\nZV> create table t1 ( b bool );\nZV> insert into t1 values ( 'T' );\n\nZV> select not b from t1;\n\nWrong syntax.\nThe logical operator must be used in WHERE condition.\nTry this: SELECT b FROM t1 WHERE NOT b;\nIt works! ;)\n\nJose'\n\n\n", "msg_date": "Fri, 18 Sep 1998 14:54:23 +0200", "msg_from": "Sferacarta Software <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] BUG: NOT boolfield kills backend" }, { "msg_contents": "On Fri, 18 Sep 1998, Sferacarta Software wrote:\n\n|ZV> create table t1 ( b bool );\n|ZV> insert into t1 values ( 'T' );\n|\n|ZV> select not b from t1;\n|\n|Wrong syntax.\n|The logical operator must be used in WHERE condition.\n|Try this: SELECT b FROM t1 WHERE NOT b;\n|It works! ;)\nyes, but what I want is to list every touple, \nand negate the bool field from 'T' -> 'F' and vica verse\n\n\tthanks.\n\n\tredax\n\n.----------------------------------------------------------.\n|Zsolt Varga | tel/fax: +36 36 422811 |\n| AgriaComputer LTD | email: [email protected] |\n| System Administrator | URL: http://www.agria.hu/ |\n`----------------------------------------------------------'\n\n", "msg_date": "Sat, 19 Sep 1998 15:10:53 +0200 (CEST)", "msg_from": "Zsolt Varga <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] BUG: NOT boolfield kills backend" }, { "msg_contents": "Fixed.\n\n> \n> Hi, \n> I just found an error in every postgres versions, \n> (I tried 6.2.1, 6.3.2, and 6.4beta1 )\n> \n> if I have a table with boolean field, and I want to negate that field,\n> it's kills the backend process... meanwhile 'select not ( 'T'::bool )'\n> works well...\n> \n> create table t1 ( b bool );\n> insert into t1 values ( 'T' );\n> \n> select not b from t1;\n> PQexec() -- Request was sent to backend, but backend closed the channel\n> before responding.\n> This probably means the backend terminated abnormally before or\n> while processing the request.\n> \n> \tdon't you have some idea what to do,?\n> \t\n> \tthanks, \n> \t\tRedax\n> .----------------------------------------------------------.\n> |Zsolt Varga | tel/fax: +36 36 422811 |\n> | AgriaComputer LTD | email: [email protected] |\n> | System Administrator | URL: http://www.agria.hu/ |\n> `----------------------------------------------------------'\n> \n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 22 Sep 1998 17:21:11 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] BUG: NOT boolfield kills backend" } ]
[ { "msg_contents": "Is there supposed to be a Makefile in src/pl/plpgsql? The INSTALL file\nsays to run make.\n\nThere is none.\n\nShould I have provides configure parameter?\n\n", "msg_date": "Fri, 18 Sep 1998 10:44:33 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": true, "msg_subject": "PL/pgsql" }, { "msg_contents": "> Is there supposed to be a Makefile in src/pl/plpgsql? The INSTALL file\n> says to run make.\n> \n> There is none.\n> \n> Should I have provides configure parameter?\n\nThat is from Jan Wieck. I am CC'ing him for a comment.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Fri, 18 Sep 1998 12:48:41 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PL/pgsql" } ]
[ { "msg_contents": "At the request of our lock guy, I have had to reverse out this patch. \nHe wants the locking to follow the current locking code in 6.4.\n\nHope you will be able to make that change and resubmit.\n\nThanks.\n\n> Applied.\n> \n> > OK,\n> > \n> > I have a current version of PostgreSQL running on my pc532 now.\n> > (It's a NS32K based machine. Somewhat of an antique really...)\n> > \n> > I had to apply the following diffs to get it to compile, but it\n> > then passed the spinlock test, and most of the regression tests,\n> > including the int8 test. It did not, however, get the datetime\n> > test correct.\n> > \n> > For some reason which I haven't figured out yet, it thinks the\n> > following:\n> > \n> > template1=> select ('epoch'::datetime) as ZeroSecs;\n> > zerosecs \n> > ----------------------------\n> > Fri Dec 31 18:00:00 1999 CST\n> > (1 row)\n> > \n> > template1=> select ('current'::datetime) as ZeroSecs;\n> > zerosecs \n> > ----------------------------\n> > Fri Dec 31 18:00:00 1999 CST\n> > (1 row)\n> > \n> > template1=> select ('now'::datetime) as ZeroSecs;\n> > zerosecs \n> > ----------------------------\n> > Sun Sep 13 19:05:43 1998 CDT\n> > (1 row)\n> > \n> > \n> > So it knows how to get the date and time, but not always... I'd\n> > think this was machine independent, but then I'd expect a MI problem\n> > like that to get fixed very quickly. So I don't know if it's a\n> > NetBSD/pc532 problem, a NetBSD problem, or a PostgreSQL problem,\n> > but I suspect the first due to a lack of people screaming.\n> > \n> > I did build 6.3.2 with -DDATEDEBUG, but I'm not coherent enough\n> > (yet?) to properly deduce anything yet. It appeared to all be\n> > correct until it printed the results, implying that libc or a\n> > syscall was returning some funny constant perhaps?\n> > \n> > Well, with all those disclaimers, here's the patch. (Beware, I\n> > think I have it reversed, so you probably want to type patch -r...)\n> > \n> > \n> > *** /usr/local/pgsql/src/include/storage/s_lock.h\tFri Sep 11 19:00:55 1998\n> > --- s_lock.h\tSat Sep 12 00:27:51 1998\n> > ***************\n> > *** 213,219 ****\n> > #endif\t /* NEED_I386_TAS_ASM */\n> > \n> > \n> > ! /* NS32K code is in s_lock.c */\n> > \n> > #endif\t /* defined(__GNUC__) */\n> > \n> > --- 213,234 ----\n> > #endif\t /* NEED_I386_TAS_ASM */\n> > \n> > \n> > ! \n> > ! #if defined(NEED_NS32K_TAS_ASM)\n> > ! \n> > ! #define S_LOCK(lock)\t\t\t\t\\\n> > ! {\t\t\t\t\t\t\\\n> > ! \tslock_t res = 1;\t\t\t\t\\\n> > ! \twhile (res) {\t\t\t\t\\\n> > ! \t __asm__(\"movqd 0, r0\");\t\t\t\\\n> > ! \t __asm__(\"sbitd r0, %0\" : \"=m\"(*lock));\t\\\n> > ! \t __asm__(\"sprb us, %0\" : \"=r\" (res));\t\\\n> > ! \t res = ((res >> 5) & 1);\t\t\t\\\n> > ! \t}\t\t\t\t\t\t\\\n> > ! }\n> > ! \n> > ! #endif\t /* NEED_NS32K_TAS_ASM */\n> > ! \n> > \n> > #endif\t /* defined(__GNUC__) */\n> > \n> > *** /usr/local/pgsql/src/backend/storage/buffer/s_lock.c\tThu Sep 10 23:08:00 1998\n> > --- s_lock.c\tSat Sep 12 00:23:04 1998\n> > ***************\n> > *** 118,134 ****\n> > #endif\t /* PPC */\n> > \n> > \n> > - #if defined(__ns32k__)\n> > - int\n> > - tas(volatile slock_t *lock)\n> > - {\n> > - int res;\n> > - __asm__(\"sbitb 0, %0\" : \"=m\"(*lock));\n> > - __asm__(\"sprb us, %0\" : \"=r\"(res));\n> > - res = (res >> 5) & 1;\n> > - return res;\n> > - }\n> > - #endif\n> > \n> > #else\t\t\t\t\t\t\t/* defined(__GNUC__) */\n> > /***************************************************************************\n> > --- 118,123 ----\n> > \n> > \n> > BTW, does the spinlock code need a TAS function so it can spin for\n> > a while and then declare itself stuck, or does a second process/thread\n> > take care of that. It would be simpler for the NS32K to just make\n> > the whole lock function be 2 lines of inline assembler, but that\n> > would contain an infinite loop if the lock was stuck...\n> > \n> > Jon Buller <[email protected]>\n> > \n> > \n> \n> \n> -- \n> Bruce Momjian | 830 Blythe Avenue\n> [email protected] | Drexel Hill, Pennsylvania 19026\n> http://www.op.net/~candle | (610) 353-9879(w)\n> + If your life is a hard drive, | (610) 853-3000(h)\n> + Christ can be your backup. |\n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Fri, 18 Sep 1998 13:19:35 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Compiling 6.4 on NetBSD-current/pc532" } ]
[ { "msg_contents": "Tom,\n\nThe following came from the most recient snapshot. I know your away\nfor a few days. I will give it a look-see if I get time this weekend\n\n\nCREATE TABLE foo (\n id serial primary key,\n name varchar(32)\n);\nNOTICE: CREATE TABLE will create implicit sequence foo_id_seq for\nSERIAL column foo.id\nNOTICE: CREATE TABLE/PRIMARY KEY will create implicit index foo_pkey\nfor table foo\nCREATE\n-- This is good. Thanks.\n\nCREATE TABLE bar (\n id serial,\n name varchar(32)\n);\nNOTICE: CREATE TABLE will create implicit sequence bar_id_key for\nSERIAL column bar.id\nNOTICE: CREATE TABLE/UNIQUE will create implicit index bar_id_key for\ntable bar\nERROR: Cannot create index: 'bar_id_key' already exists\n-- This is bad. Sorry.\n\n", "msg_date": "Fri, 18 Sep 1998 13:55:25 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": true, "msg_subject": "Serial Data Type Failure" }, { "msg_contents": "> The following came from the most recient snapshot.\n> CREATE TABLE bar (\n> id serial,\n> name varchar(32)\n> );\n> NOTICE: CREATE TABLE will create implicit sequence bar_id_key for\n> SERIAL column bar.id\n> NOTICE: CREATE TABLE/UNIQUE will create implicit index bar_id_key for\n> table bar\n> ERROR: Cannot create index: 'bar_id_key' already exists\n> -- This is bad. Sorry.\n\nOK, will look at it if you haven't fixed it already...\n\n - Tom\n", "msg_date": "Mon, 21 Sep 1998 00:50:13 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Serial Data Type Failure" }, { "msg_contents": "> > ERROR: Cannot create index: 'bar_id_key' already exists\n> > -- This is bad. Sorry.\n\npostgres=> CREATE TABLE bar (\npostgres-> id serial,\npostgres-> name varchar(32)\npostgres-> );\nNOTICE: CREATE TABLE will create implicit sequence bar_id_seq for\nSERIAL column bar.id\nNOTICE: CREATE TABLE/UNIQUE will create implicit index bar_id_key for\ntable bar\nCREATE\n\nI hadn't noticed that there was a positional dependency in the code I\nhad moved around to implement the SERIAL PRIMARY KEY feature. Sorry\nabout that.\n\nPatch enclosed. Will commit to source tree soon...\n\n - Tom", "msg_date": "Mon, 21 Sep 1998 05:41:25 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: Serial Data Type Failure" } ]
[ { "msg_contents": "Sferacarta Software <[email protected]> writes:\n> ZV> create table t1 ( b bool );\n> ZV> insert into t1 values ( 'T' );\n> \n> ZV> select not b from t1;\n> \n> Wrong syntax.\n\nNot if he is trying to display the complement of a logical field\nrather than restrict a selection. And regardless, is backend\nfailure an acceptable out? How about the following in 6.4beta?\n\n create table mine (a bool);\n insert into mine values (true);\n select * from mine as t1,mine as t2 where t1.a or not t2.a;\n\nLook folk. We're falling over on variations of expressions in\nboth our result attributes and our selection criteria, and smug-\nness won't remove bugs. A session with gdb showed that at least\nin the case of:\n\n create table t0 (a_id int4 not null, a varchar, a_t1_id int4);\n insert into t0 values (1, 'at0', 0);\n insert into t0 values (2, 'at0', 0);\n create index a_id_t0 on t0 (a_id);\n create index a_t1_id_t0 on t0 (a_t1_id);\n select * from t0 where (a_id = 1 or a_id = 2) and a_t1_id < 1;\n\nwe are dereferencing NULL in the 6.4beta1 query optimizer, and I\nsuspect the same in my first example.\n\nMy I, a humble newcomer, make a suggestion? Should we place any\nlegitimate query set we've discovered to cause crashes into our\nregression suite?\n\n-- \nChristopher Oliver Traverse Internet\nSystems Coordinator 223 Grandview Pkwy, Suite 108\[email protected] Traverse City, Michigan, 49684\n \"What good is a can of worms if you never open it?\" -Bob Arning\n", "msg_date": "Fri, 18 Sep 1998 14:01:25 -0400", "msg_from": "Christopher Oliver <[email protected]>", "msg_from_op": true, "msg_subject": "[[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n backend]" }, { "msg_contents": "On Fri, 18 Sep 1998, Christopher Oliver wrote:\n> My I, a humble newcomer, make a suggestion? Should we place any\n> legitimate query set we've discovered to cause crashes into our\n> regression suite?\n\nAs another newcomer, let me say that I fervently support this notion. I\ndon't want to discover these bugs when I build them into production\nsoftware!\n\nMichael\n\n", "msg_date": "Fri, 18 Sep 1998 14:57:57 -0500 (EST)", "msg_from": "\"J. Michael Roberts\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "> On Fri, 18 Sep 1998, Christopher Oliver wrote:\n> > My I, a humble newcomer, make a suggestion? Should we place any\n> > legitimate query set we've discovered to cause crashes into our\n> > regression suite?\n> \n> As another newcomer, let me say that I fervently support this notion. I\n> don't want to discover these bugs when I build them into production\n> software!\n\nWe keep the current crash items until they are fixed during beta. They\ngo on to the current items list. If they don't get fixed, they are\nmoved to the TODO list, where you will see the unfixed ones mentioned.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Fri, 18 Sep 1998 16:56:51 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "> > > My I, a humble newcomer, make a suggestion? Should we place any\n> > > legitimate query set we've discovered to cause crashes into our\n> > > regression suite?\n> We keep the current crash items until they are fixed during beta. \n> They go on to the current items list. If they don't get fixed, they \n> are moved to the TODO list, where you will see the unfixed ones \n> mentioned.\n\nThe regression suite should reasonably be expected to pass on a system\nwhich has an \"as good as it gets\" installation. We haven't been very\ngood about moving new features and fixed breakage _into_ the regression\nsuite once it is fixed, but we shouldn't move known breakage into the\nregression suite.\n\nBruce keeps the ToDo list, and does a good job of filtering problem\nstatements down to the one line per problem allowed in that list.\nOccasionally it would be helpful to carry along more verbiage to\ndescribe a problem, but that would open a can of worms in making the\nToDo list unreadable because it is too verbose.\n\nI'm not sure of the best way to document these kinds of problem\nstatements. If we generate a \"catchall file\" of queries which crash, it\nruns the great risk of becoming stale and useless. To undertake this we\nprobably need a volunteer from the developer's list who would be willing\nto babysit this file of problem queries, and even better to make sure\nthat new features move from this file to the regression test.\n\nHmm, we could have a \"breakage\" regression suite which could illustrate\nbroken features and which would fail if a broken feature is fixed. Would\nbe most effective if we had a volunteer maintainer for it...\n\nbtw, for many kinds of problem statements (such as the one which started\nthis thread), the problem was not known until it was mentioned. It's\nlikely to be picked up by one of the active developers/maintainers,\nthough since it has been broken forever it doesn't count as a \"must-fix\"\nbug and may not make it into the v6.4 release. But it does count as a\n\"should-fix\" bug, and it's possible it could be fixed for v6.4...\n\nWe were all newcomers to Postgres at one time or another, and ended up\ncontributing in areas in which we had the most interest. There is always\nroom for more contributors, especially in areas which aren't at the top\nof someone else's list since that area is probably not getting covered\nat all.\n\n - Tom\n", "msg_date": "Mon, 21 Sep 1998 00:16:20 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "> The regression suite should reasonably be expected to pass on a system\n> which has an \"as good as it gets\" installation. We haven't been very\n> good about moving new features and fixed breakage _into_ the regression\n> suite once it is fixed, but we shouldn't move known breakage into the\n> regression suite.\n\nIf the queries which produce the problem are not exotic, then why\nshould they not go there? I would prefer a regression that took half\nan hour or longer on modern hardware yet screened the code to a degree\nthat I could have reasonable faith in an installation if it passed the\nregression. As it stands, I had to back off of a recommendation even\nwith a promise of my maintenance. I'll reiterate that quite common\nqueries are causing NULL pointers to get chased even in non-beta code.\nWhen someone snoozes, our tests should alert us to that. I think to\nensure reliability, the regression must be as complete as possible.\nIt should work as an acceptance criterion. As it stands, it doesn't\ntest severely enough for much if any confidence in deployment.\n\n> I'm not sure of the best way to document these kinds of problem\n> statements. If we generate a \"catchall file\" of queries which crash, it\n> runs the great risk of becoming stale and useless.\n\nEven vaccinations require periodic renewal. The only degree to which\na test becomes stale is the degree that a feature is completely removed.\n\n> though since it has been broken forever it doesn't count as a \"must-fix\"\n> bug and may not make it into the v6.4 release. But it does count as a\n> \"should-fix\" bug, and it's possible it could be fixed for v6.4...\n\nSeg faults in the backend for standard queries would count as must-fix\nfrom my view. The only justification for failure in the non-exotic\nqueries is that we are ignorant of the bug's existence. Once we are\naware, fixing these should become priority one.\n\n\\begin{soapbox}\n\nAt the very time ESR is lecturing the software community that open-\nsource is the way things should work, we have the opportunity to\nsupport or refute his claims based on how seriously we take repair\nand maintenance where non-exotic queries induce damage and failure.\n\nThink about the free UNIX-like kernels. They are now gaining accept-\nance mostly because they keep running even when folk beat on them.\nWe have glass jaws, and it shows. Let's take the required steps to\nfirm them up.\n\n\\end{soapbox}\n\n-- \nChristopher Oliver Traverse Internet\nSystems Coordinator 223 Grandview Pkwy, Suite 108\[email protected] Traverse City, Michigan, 49684\n \"What good is a can of worms if you never open it?\" -Bob Arning\n", "msg_date": "Sun, 20 Sep 1998 20:54:00 -0400", "msg_from": "Christopher Oliver <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "> > The regression suite should reasonably be expected to pass on a system\n> > which has an \"as good as it gets\" installation. We haven't been very\n> > good about moving new features and fixed breakage _into_ the regression\n> > suite once it is fixed, but we shouldn't move known breakage into the\n> > regression suite.\n> \n> If the queries which produce the problem are not exotic, then why\n> should they not go there? I would prefer a regression that took half\n> an hour or longer on modern hardware yet screened the code to a degree\n> that I could have reasonable faith in an installation if it passed the\n> regression. As it stands, I had to back off of a recommendation even\n> with a promise of my maintenance. I'll reiterate that quite common\n> queries are causing NULL pointers to get chased even in non-beta code.\n> When someone snoozes, our tests should alert us to that. I think to\n> ensure reliability, the regression must be as complete as possible.\n> It should work as an acceptance criterion. As it stands, it doesn't\n> test severely enough for much if any confidence in deployment.\n> \n> > I'm not sure of the best way to document these kinds of problem\n> > statements. If we generate a \"catchall file\" of queries which crash, it\n> > runs the great risk of becoming stale and useless.\n> \n> Even vaccinations require periodic renewal. The only degree to which\n> a test becomes stale is the degree that a feature is completely removed.\n> \n> > though since it has been broken forever it doesn't count as a \"must-fix\"\n> > bug and may not make it into the v6.4 release. But it does count as a\n> > \"should-fix\" bug, and it's possible it could be fixed for v6.4...\n> \n> Seg faults in the backend for standard queries would count as must-fix\n> from my view. The only justification for failure in the non-exotic\n> queries is that we are ignorant of the bug's existence. Once we are\n> aware, fixing these should become priority one.\n> \n> \\begin{soapbox}\n> \n> At the very time ESR is lecturing the software community that open-\n> source is the way things should work, we have the opportunity to\n> support or refute his claims based on how seriously we take repair\n> and maintenance where non-exotic queries induce damage and failure.\n> \n> Think about the free UNIX-like kernels. They are now gaining accept-\n> ance mostly because they keep running even when folk beat on them.\n> We have glass jaws, and it shows. Let's take the required steps to\n> firm them up.\n> \n> \\end{soapbox}\n\nOK, what do you suggest we do?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Sun, 20 Sep 1998 22:22:50 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "> If the queries which produce the problem are not exotic, then why\n> should they not go there? I would prefer a regression that took half\n> an hour or longer on modern hardware yet screened the code to a degree\n> that I could have reasonable faith in an installation if it passed the\n> regression.\n\nWell, we shouldn't get caught up in semantics, but in this case it gets\nto the heart of the intent: the regression test is designed to test if\nknown-good features are still good and behavior on one installation\nmatches behavior on another, not to ensure or document that known-bad\nfeatures are still bad. \n\nAnother test (or other docs, or ??) might be a good idea, and we could\ncertainly benefit from it I'm sure, but the regression test is not where\nthat should go.\n\nAs you point out above, \"I could have reasonable faith in an\ninstallation if it passed the regression\", and that is true; if the\nregression test passes you can have reasonable faith that your\ninstallation is a good Postgres installation. It won't ensure that your\nPostgres installation does everything you want it to, and no test can do\nthat :)\n\n> As it stands, I had to back off of a recommendation even\n> with a promise of my maintenance. I'll reiterate that quite common\n> queries are causing NULL pointers to get chased even in non-beta code.\n\nSure. And thanks for pointing it out. And we'll work on it. And we'll be\nglad to accept patches from any source which would fix it immediately.\n\n> When someone snoozes, our tests should alert us to that. I think to\n> ensure reliability, the regression must be as complete as possible.\n> It should work as an acceptance criterion. As it stands, it doesn't\n> test severely enough for much if any confidence in deployment.\n\n?? See above. The regression test does exactly what is intended for it.\nIf there is another kind of test you would like to propose or\ncontribute, we'd certainly consider it.\n\n> > though since it has been broken forever it doesn't count as a \n> > \"must-fix\" bug and may not make it into the v6.4 release. But it \n> > does count as a \"should-fix\" bug, and it's possible it could be \n> fixed for v6.4...\n> Seg faults in the backend for standard queries would count as must-fix\n> from my view. The only justification for failure in the non-exotic\n> queries is that we are ignorant of the bug's existence. Once we are\n> aware, fixing these should become priority one.\n> \n> \\begin{soapbox}\n> \n> At the very time ESR is lecturing the software community that open-\n> source is the way things should work, we have the opportunity to\n> support or refute his claims based on how seriously we take repair\n> and maintenance where non-exotic queries induce damage and failure.\n> \n> Think about the free UNIX-like kernels. They are now gaining accept-\n> ance mostly because they keep running even when folk beat on them.\n> We have glass jaws, and it shows. Let's take the required steps to\n> firm them up.\n> \n> \\end{soapbox}\n\nWell, that's all well and good. The way Open Source works is that\n_everyone_ has the tools available to them to make the product better,\nand some folks will use those tools to contribute back. Not everyone has\nto or can, and there is a role for those offering encouragement as well\nas those offering actual code. But Open Source doesn't happen without\nuser participation, and the next version is never the last version.\n\nPostgres has undergone a tremendous evolutionary improvement over the\nlast two years, and it's actually encouraging that we get darn few\nreports of problems with simple (though uncommon) cases such as yours.\n\nDon't panic: yours is the first problem report of this failure, and if\nyou're disappointed in the response please remember that you brought it\nup only three days ago. And that you've gotten two or three responses\nfrom the \"support team\" since then. And we haven't asked for money. All\nin all, a great bargain :)\n\nRegards.\n\n - Tom\n", "msg_date": "Mon, 21 Sep 1998 05:10:59 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "> OK, what do you suggest we do?\n\nWhat I'm basically suggesting is to increase the stringency of the\nregression suite. Several posters supported my idea of keeping crash-\ning tests around. I think they should stick around indefinitely.\nI.e. 6.4 BETA1 has some pointer errors that turn up as crashes in the\nquery optimizer. They seem to be of the form CLAUSE AND (CLAUSE OR\nCLAUSE) or the same with the disjunction and conjunction reversed.\nThis sort of construct or the crashing negation construct someone\ncomplained of earlier are likely to arise in real life. It's not\nunreasonable therefore that tests for such patterns be added to the\nregression suite. I.e. we collect the past queries from the real\nworld that crash our system with a mind to validate the software\nshould they recur. You mentioned that your old code somehow crept\ninto oid8types(), so it isn't simply a waste of testing time to\ntest against \"old friends.\" Also, this defends against someone down\nthe road getting some \"bright\" idea that was discarded in the past\non grounds of workability or soundness. Fundamentally, I'm advocating\ndefensive coding as base practice, and I think perhaps a strong valid-\nation suite might be a step toward enforcing this. I might also advo-\ncate that authors show the discipline of running a full regression\nbefore submitting to the code base. This is mostly a cultural thing.\nI think it was Jolly Chen who said that while he hadn't lost any\ndata, he was glad the system wasn't managing his payroll. Imagine it\nIS your bank balance riding on the lines of code you write. I don't\nthink I'm being as draconian as some software engineering folk, but\nI think these sort of steps might help PGSQL move from strength to\nstrength.\n\n-- \nChristopher Oliver Traverse Internet\nSystems Coordinator 223 Grandview Pkwy, Suite 108\[email protected] Traverse City, Michigan, 49684\n \"What good is a can of worms if you never open it?\" -Bob Arning\n", "msg_date": "Mon, 21 Sep 1998 01:34:08 -0400", "msg_from": "Christopher Oliver <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "Hi,\n\nsorry for interference,\nthis is a very good topic for discussing and in spite of some stress\nit indicates Postgres are really coming into production and most \nimportant question becomes a stability.\n\nOn Mon, 21 Sep 1998, Christopher Oliver wrote:\n\n> Date: Mon, 21 Sep 1998 01:34:08 -0400\n> From: Christopher Oliver <[email protected]>\n> To: Bruce Momjian <[email protected]>\n> Cc: [email protected]\n> Subject: Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills backend]\n> \n> > OK, what do you suggest we do?\n> \n> What I'm basically suggesting is to increase the stringency of the\n> regression suite. Several posters supported my idea of keeping crash-\n> ing tests around. I think they should stick around indefinitely.\n> I.e. 6.4 BETA1 has some pointer errors that turn up as crashes in the\n> query optimizer. They seem to be of the form CLAUSE AND (CLAUSE OR\n> CLAUSE) or the same with the disjunction and conjunction reversed.\n> This sort of construct or the crashing negation construct someone\n> complained of earlier are likely to arise in real life. It's not\n> unreasonable therefore that tests for such patterns be added to the\n> regression suite. I.e. we collect the past queries from the real\n> world that crash our system with a mind to validate the software\n\nI'm using postgres in commecrcial applications since beginning of 1995 and \ncertainly without home-made test-suite I couldn't do that.\nAnd I put new version into production only if my test-sute passes\nfor me on specific machine and works at least month. \nSometimes it works but I didnt' satisfied by speed and I'm looking\nfor workaround ( robust workaround ). I would be happy if someone\ncould works on general test suite which cover my specific data,\noperational system and environment and I would prefer to run regression tests\nfor a 30 minutes, one hour or more if it would guarantee my applications will\nrun ok, but I understand how different may be data, OSes and especially\nappl. environment. i.e. fast developing Linux, compilers, locale, libc etc...\n\n> should they recur. You mentioned that your old code somehow crept\n> into oid8types(), so it isn't simply a waste of testing time to\n> test against \"old friends.\" Also, this defends against someone down\n> the road getting some \"bright\" idea that was discarded in the past\n> on grounds of workability or soundness. Fundamentally, I'm advocating\n> defensive coding as base practice, and I think perhaps a strong valid-\n> ation suite might be a step toward enforcing this. I might also advo-\n> cate that authors show the discipline of running a full regression\n> before submitting to the code base. This is mostly a cultural thing.\n> I think it was Jolly Chen who said that while he hadn't lost any\n> data, he was glad the system wasn't managing his payroll. Imagine it\n> IS your bank balance riding on the lines of code you write. I don't\n> think I'm being as draconian as some software engineering folk, but\n> I think these sort of steps might help PGSQL move from strength to\n> strength.\n> \n> -- \n> Christopher Oliver Traverse Internet\n> Systems Coordinator 223 Grandview Pkwy, Suite 108\n> [email protected] Traverse City, Michigan, 49684\n> \"What good is a can of worms if you never open it?\" -Bob Arning\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, 21 Sep 1998 10:34:53 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "> > OK, what do you suggest we do?\n> \n> What I'm basically suggesting is to increase the stringency of the\n> regression suite. Several posters supported my idea of keeping crash-\n> ing tests around. I think they should stick around indefinitely.\n> I.e. 6.4 BETA1 has some pointer errors that turn up as crashes in the\n> query optimizer. They seem to be of the form CLAUSE AND (CLAUSE OR\n> CLAUSE) or the same with the disjunction and conjunction reversed.\n> This sort of construct or the crashing negation construct someone\n> complained of earlier are likely to arise in real life. It's not\n> unreasonable therefore that tests for such patterns be added to the\n> regression suite. I.e. we collect the past queries from the real\n> world that crash our system with a mind to validate the software\n> should they recur. You mentioned that your old code somehow crept\n\nBasically, there are an infinite number of queries that can be sent to\nthe backend. Even if we test 10 time the current number of queries, we\ndon't approach the total possible number of queries.\n\nThe AND/OR thing you mentioned is a new problem only because we now\nuse indexes on OR's, which we never did before. It has been found, and\nwill be fixed very soon.\n\nThere may be other problems, but I doubt that one will come return as a\nbug again once it is fixed. Some NEW one will.\n\n> into oid8types(), so it isn't simply a waste of testing time to\n> test against \"old friends.\" Also, this defends against someone down\n> the road getting some \"bright\" idea that was discarded in the past\n> on grounds of workability or soundness. Fundamentally, I'm advocating\n> defensive coding as base practice, and I think perhaps a strong valid-\n> ation suite might be a step toward enforcing this. I might also advo-\n\nThe old code was put back because for some reason, the new code did not\nwork. No one has told me the diffence between:\n\n\tint **var \n\nand\n\n\tint (*var)[]\n\nbut that was the fix. The problem is that people want features added\nAND more stable code, and we just can't do both.\n\nThe old versions like 6.3.2 are around for people who want them, and no\none is suggesting they have to upgrade, but if they want OR indexing,\nthey will have to take some instability while I get things working\n100%.\n\nThere are no shortcuts, and I don't see a regression test finding them\nthat much faster considering the odds that the regression test may not\nhave the test that shows the failure.\n\nWe also have to consider the cost of trying to approach an infinite\nnumber of query possibilities vs. benefit.\n\n> cate that authors show the discipline of running a full regression\n> before submitting to the code base. This is mostly a cultural thing.\n> I think it was Jolly Chen who said that while he hadn't lost any\n> data, he was glad the system wasn't managing his payroll. Imagine it\n> IS your bank balance riding on the lines of code you write. I don't\n> think I'm being as draconian as some software engineering folk, but\n> I think these sort of steps might help PGSQL move from strength to\n> strength.\n\nI don't think we can be accused of throwing code into the backend\nwithout considering the consequences. In fact, I think we are more\nstrict about it than most/any open software project. It is just the\namount of code and complexity, and the infinite query possibilities that\ncan bite us.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Mon, 21 Sep 1998 06:56:20 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "> Hi,\n> \n> sorry for interference,\n> this is a very good topic for discussing and in spite of some stress\n> it indicates Postgres are really coming into production and most \n> important question becomes a stability.\n> \n> On Mon, 21 Sep 1998, Christopher Oliver wrote:\n> \n> > Date: Mon, 21 Sep 1998 01:34:08 -0400\n> > From: Christopher Oliver <[email protected]>\n> > To: Bruce Momjian <[email protected]>\n> > Cc: [email protected]\n> > Subject: Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills backend]\n> > \n> > > OK, what do you suggest we do?\n> > \n> > What I'm basically suggesting is to increase the stringency of the\n> > regression suite. Several posters supported my idea of keeping crash-\n> > ing tests around. I think they should stick around indefinitely.\n> > I.e. 6.4 BETA1 has some pointer errors that turn up as crashes in the\n> > query optimizer. They seem to be of the form CLAUSE AND (CLAUSE OR\n> > CLAUSE) or the same with the disjunction and conjunction reversed.\n> > This sort of construct or the crashing negation construct someone\n> > complained of earlier are likely to arise in real life. It's not\n> > unreasonable therefore that tests for such patterns be added to the\n> > regression suite. I.e. we collect the past queries from the real\n> > world that crash our system with a mind to validate the software\n> \n> I'm using postgres in commecrcial applications since beginning of 1995 and \n> certainly without home-made test-suite I couldn't do that.\n> And I put new version into production only if my test-sute passes\n> for me on specific machine and works at least month. \n> Sometimes it works but I didnt' satisfied by speed and I'm looking\n> for workaround ( robust workaround ). I would be happy if someone\n> could works on general test suite which cover my specific data,\n> operational system and environment and I would prefer to run regression tests\n> for a 30 minutes, one hour or more if it would guarantee my applications will\n> run ok, but I understand how different may be data, OSes and especially\n> appl. environment. i.e. fast developing Linux, compilers, locale, libc etc...\n> \n\nThis may sound obvious, but isn't that what we are doing in the beta\ntest cycle. Everyone is testing their applications/platforms, and\nreporting problems back to us.\n\nI don't see how we can ever duplicate all the tests everyone runs with\ntheir applications. I suppose it is possible, but as applications\nchange to use new features, we would still be running the old\napplication tests.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Mon, 21 Sep 1998 07:02:26 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "\nYeek. Some hackles seem to getting raised.\n\nI am one of the people who support a more stringent regression test.\nBruce, I don't think anyone in their right mind could possibly accuse you\nof doing less than a superhuman job here. So I think there's no need for\nyou to react defensively.\n\nBut the fact remains that I, for one, am not going to recommend PG for any\napp that I'm not going to check myself on a daily basis. Not when normal\nqueries like the one that started this mess can cause crashes that will\nnever be detected, even if they always did do that.\n\nAnd yes, there has been support from the peanut gallery, as I think Tom\npointed out, and no, nobody's asked for money. And yes, the \"big guys\"\ncan be far more cavalier about saying \"Oh, yes, we knew about that\nproblem, it'll be fixed in the next release hopefully.\" But what we're\nreally proposing is better documentation of known bugs, and the\nconstruction of a test suite that will not only check basic functionality,\nbut everything anyone can think of that could be considered sort of normal\nusage, and we certainly all have different ideas about what is \"normal.\" \nThis, no matter what changes are made, we know where we stand. That's all\nthat has been said. \n\nThe idea of separating a more complete \"stability test\" from the present\ndevelopment-time \"regression\" test, I think, is a valid one. By the way,\ncan anyone tell me why it's called a regression test? What are we\nregressing from, or are we regretting having tested? OK, OK, just a\nlittle humor.\n\nI am perfectly willing to organize a stability test, and I am also more\nthan willing to start improving the documentation because I've got to\nanyway to get this beast working well under Windows -- but I'm not ready\nyet, because of that damnable requirement of keeping the family fed and\nthe bank from repossessing the house. Towards the end of the year, I hope\nthat the curve will take me back towards free time, and then we'll see\nwhere we stand.\n\nIn the meantime, I would hope that all the people doing this incredible\nwork don't take all this amiss. You really are doing a bang-up job.\n\nMichael\n\n", "msg_date": "Mon, 21 Sep 1998 11:18:47 -0500 (EST)", "msg_from": "\"J. Michael Roberts\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "> I'm using postgres in commecrcial applications since beginning of \n> 1995 and certainly without home-made test-suite I couldn't do that.\n> And I put new version into production only if my test-sute passes\n> for me on specific machine and works at least month.\n> Sometimes it works but I didnt' satisfied by speed and I'm looking\n> for workaround ( robust workaround ). I would be happy if someone\n> could works on general test suite which cover my specific data,\n> operational system and environment and I would prefer to run \n> regression tests for a 30 minutes, one hour or more if it would \n> guarantee my applications will run ok, but I understand how different \n> may be data, OSes and especially appl. environment. i.e. fast \n> developing Linux, compilers, locale, libc etc...\n\nWell, it sounds like you just volunteered :)\n\nThat is how we build Postgres: people contribute features and support\nwhich addresses their needs or requirements. \n\nI agree that a large/long db regression test would be interesting and\nhelpful, and you are already providing that, and contributing back the\nresults, for your specific platform. How large is the dataset for your\ntest? If it is relatively small it could be packaged into the Postgres\ndistribution. If it is a megabyte or larger then it could be packaged\ninto a tar file and placed on the Postgres ftp or web site. That would\nlet others run the same large tests, and would encourage them to\ncontribute other large test suites or to augment yours.\n\nA complication is that you are compiling with locale features and using\nthe Russian/Cyrillic character set. I don't know if that combination is\ntestable on other machines; it probably is but others would need to be\nable to interpret the results too.\n\nTatsuo has also been very active with the locale features, and you might\nwant to coordinate with him on ideas for a test suite which addresses\nthose features specifically.\n\nIt helps to have a test coordinator, which you might be willing to do.\nFor example, during alpha or early beta, you can be running the test and\nreporting results, then during mid- to late-beta you can be soliciting\nothers to run the same test on other platforms.\n\nAnother interesting regression test would involve multiple clients\nrunning on a shared database, with transactions, etc. Should be possible\nto do from a shell script so we could run it ad infinitum.\n\nCheers.\n\n - Tom\n", "msg_date": "Mon, 21 Sep 1998 16:38:24 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "> But what we're\n> really proposing is better documentation of known bugs, and the\n> construction of a test suite that will not only check basic \n> functionality, but everything anyone can think of that could be \n> considered sort of normal usage, and we certainly all have different \n> ideas about what is \"normal.\"\n> This, no matter what changes are made, we know where we stand. That's \n> all that has been said.\n\nAnd that is exactly what a regression test is for.\n\nI think the issues here are what the proper response to a _new_ problem\nreport should be, and how that new problem should be documented if it is\nnot going to be fixed right away.\n\nI should mention that Jose' De Silva, who is somehow connected with this\nthread since his address shows up in the subject line, did a great job\nof writing reference documentation which will appear in the next\nPostgres release. He included several examples of deficient Postgres\nfeatures, and as I transcribed that documentation was able to fix\nseveral of them. He went to the trouble to write it down, and that\nresulted in fixes.\n\nWe shouldn't blow this problem out of proportion; although in hindsight\na query as simple as \"select not b from t\" should be an obvious one, it\nhas not been reported as a problem in the entire history of Postgres.\nThat's either because no one had ever tried it, or they did but didn't\nbother reporting it (imho letting all of us down in the process). So\nthere is no way to have guessed that it should have been in the current\nregression test. If it had been, it would have never been broken, which\nis sort of circular but true...\n\nNow that it's been reported, it will likely be fixed (though don't get\nthe wrong impression; this long thread has actually gotten in the way of\nthat rather than helped :). This thread is helpful though because it may\nresult in a better way of tracking features and problems. What you see\nwith the Postgres product is what is possible with the current set of\nactive developers and maintainers. We are _always_ open to others\ncontributing, but we can't just say \"Oh, sure we'll do that\" since we\nare already putting in as much time as our real lives allow.\n\nThere are several people who have expressed interest in this, and Bruce\nand I have been responding as best we can, but we don't mean to stifle\ninnovation or good ideas. I've tried to help the discussion by moving it\naway from \"regression test\", which has a specific goal, to some \"bad\nfeatures test\" or \"bad features list\" which would document the things\nthat don't work right. It would be helpful if folks are interested in\nmaintaining it, and not so helpful if they aren't.\n\nCheers.\n\n - Tom\n", "msg_date": "Mon, 21 Sep 1998 17:04:08 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "> > ZV> create table t1 ( b bool );\n> > ZV> insert into t1 values ( 'T' );\n> > ZV> select not b from t1;\n> > Wrong syntax.\n> Not if he is trying to display the complement of a logical field\n> rather than restrict a selection.\n\n(I've lost who started this thread, so if it isn't \"techguys\" sorry for\nthe misdirection...)\n\nIt looks like \"NOT anything\" is pretty broken at the moment. However,\ntry\n\n select b is false from t1;\n\nto get what you want. The only problem with this is that it would mask\nNULL fields if you have any.\n\n - Tom\n", "msg_date": "Mon, 21 Sep 1998 17:43:25 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "On Mon, 21 Sep 1998, Bruce Momjian wrote:\n\n> I don't see how we can ever duplicate all the tests everyone runs with\n> their applications. I suppose it is possible, but as applications\n> change to use new features, we would still be running the old\n> application tests.\n\n\tJust a side note on this thread...nothing prevents *add* to the\nregression test, and, in fact, I see this all the time, especially as new\nfeatures are added. If someone comes up with a test that they feel\nstresses an aspect of the server that we haven't thought of (so long as it\ndoesn't include adding 80meg of data to our backend), by all means, let us\nknow and throw patches our way that we can include.\n\n\tIf you want to 'volume' test it, regression tests aren't for\nthat...they are only meant to catch changes between versions or snapshots\nas a result of a change somewhere else in the system...\n\n Marc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 21 Sep 1998 21:42:37 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "On Mon, 21 Sep 1998, Thomas G. Lockhart wrote:\n\n> A complication is that you are compiling with locale features and using\n> the Russian/Cyrillic character set. I don't know if that combination is\n> testable on other machines; it probably is but others would need to be\n> able to interpret the results too.\n\n\tWhat about 'language dictionaries'? On FreeBSD, we have:\n\n 234946 web2\n\n\tThat would give a pretty good basis for a table, no? Why not have\nit so that when the person installs, they can stipulate a simple file of\n'words' to load in for performing various tests?\n\n\tThat would also test out the various 'character sets', since I\ndon't imagine the only dictionary file out there is just English, no?\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 21 Sep 1998 21:48:47 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "> \n> Yeek. Some hackles seem to getting raised.\n> \n> I am one of the people who support a more stringent regression test.\n> Bruce, I don't think anyone in their right mind could possibly accuse you\n> of doing less than a superhuman job here. So I think there's no need for\n> you to react defensively.\n\nI'll accept the 'superhuman' compliment, though I really think it\nbelongs to Vadim. Vadim, here it is.\n\n> But the fact remains that I, for one, am not going to recommend PG for any\n> app that I'm not going to check myself on a daily basis. Not when normal\n> queries like the one that started this mess can cause crashes that will\n> never be detected, even if they always did do that.\n\nOK, this has me confused. This is BETA period. You are checking on a\ndaily basis? I assume you are referring to the beta code as it is\npatched, right? Is this something you did not expect? Are we fixing\nthe bugs too quickly? I don't understand what your expectations are.\n\n> And yes, there has been support from the peanut gallery, as I think Tom\n> pointed out, and no, nobody's asked for money. And yes, the \"big guys\"\n> can be far more cavalier about saying \"Oh, yes, we knew about that\n> problem, it'll be fixed in the next release hopefully.\" But what we're\n> really proposing is better documentation of known bugs, and the\n> construction of a test suite that will not only check basic functionality,\n> but everything anyone can think of that could be considered sort of normal\n> usage, and we certainly all have different ideas about what is \"normal.\" \n> This, no matter what changes are made, we know where we stand. That's all\n> that has been said. \n> \n> The idea of separating a more complete \"stability test\" from the present\n> development-time \"regression\" test, I think, is a valid one. By the way,\n> can anyone tell me why it's called a regression test? What are we\n> regressing from, or are we regretting having tested? OK, OK, just a\n> little humor.\n> \n> I am perfectly willing to organize a stability test, and I am also more\n> than willing to start improving the documentation because I've got to\n> anyway to get this beast working well under Windows -- but I'm not ready\n> yet, because of that damnable requirement of keeping the family fed and\n> the bank from repossessing the house. Towards the end of the year, I hope\n> that the curve will take me back towards free time, and then we'll see\n> where we stand.\n> \n> In the meantime, I would hope that all the people doing this incredible\n> work don't take all this amiss. You really are doing a bang-up job.\n\nOK, I have no problem with expanding the regression test to test more\nthings. However, I want to clearly outline my expectations. Of the\npast few bugs we have fixed in the beta:\n\n\tmulti-key system table indexing bug\n\tbad pfree system table indexing bug\n\tpg_user access failure\n\tAND/OR crash\n\t\nThree of these showed up only on certain platforms, and not the platform\nof the coder(me). Second, the top three did show up in the regression\ntests, again only on some platforms. The other one(the AND/OR) requires\ntwo tables to be joined by index columns, and one of the indexed columns\nhas to be used in an OR.\n\nSo three of the four were already caught by regression, but\nunfortunately, only on certain platforms, and the last one is clearly\nsomething related to new OR indexing code. You could add a regression\ntest, but I doubt it is going to catch future bugs any more than the\ncurrent regression tests.\n\nThomas maintains the regression tests, and I am sure he would LOVE some\nhelp, or even give the whole area to someone else. But basically, I\ndon't see how additional SQL's in the regression suite are going to make\nPostgreSQL _that_ much more stable. Sure, it may catch a few more items\nthan the current code, but only a few. Because the query input domain\nis nearly infinite, we will still have a vast number of queries that\ncould potentially fail.\n\nSo basically, I am saying, let's beef up the regression suite, if you\nthink is going to help, and it is going to help, but it is not going to\nmake _major_ improvements in stability. You are still going to have to\ntest the beta at certain intervals in the beta cycle to be sure the\nfinal is going to work 100%. You could also wait for the final, then\ntest that and submit bug reports. We usually have patches or minor\nreleases after the final to fix those bugs.\n\nBasically, I have a problem with the comment that we need to focus more\non stability. We focus a _ton_ on stability, because we are not a word\nprocessor that can be restarted if it crashes. We hold people's data,\nand they expect that data to remain stable. We have had very few\nreports of data loss or corruption.\n\nWe have been focusing on performance and features, but I don't think we\nhave sacrificed stability. In fact, all the bugs reported above are\nrelated to new features added (multi-key system indexes, rewrite system\noverhaul, OR indexing). We get bugs in new features, and they have to\nbe ironed out. Many times, the bugs are related to things people had\nnever had before, i.e. why test the OR indexing code, since we never had\nit, so as we add new features like SERIAL, there is going to be NO\nregression test for it, because it did not exist before the developer\nadded it.\n\nregression test additions are not a silver bullet to fix stability\nproblems. Having people involved in real-world testing, like we have\nnow, is what we need. Yes, it takes time to test things, but we can't\npossibly test all the things people are going to do, and taking\ndevelopers time away from improving the system to add regression test to\ntry and approach that infinite input query domain is not really going to\nhelp.\n\nHaving clean code that is explained/documented and having developers who\ncan understand the code, and having people who can test those new\nfeatures and changes it the way to go. I can see this giving far more\nbenefit to stability than adding queries to the regression suite.\n\nI guess I have seen too many bug reports where someone sends in a query\nthat I would never have thought to try in a 100 years. It is that type\nof testing that really improves stability.\n\nAnd the beauty of the system is that once we cut a final, like 6.2.1 or\n6.3.2, we have _very_ few bug reports.\n\nI can't see even a 10x increase in a regression test eliminating the\nneed for a rigirous beta test cycle.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 22 Sep 1998 00:47:21 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" } ]
[ { "msg_contents": "(gdb) set args template1\n(gdb) run\nStarting program: /home/taral/cvs/install/bin/postgres template1\n\n Electric Fence 2.0.5 Copyright (C) 1987-1995 Bruce Perens.\n\nPOSTGRES backend interactive interface\n$Revision: 1.89 $ $Date: 1998/09/01 04:32:13 $\n> select not b from t1\nblank\n 1: ?column? (typeid = 16, len = 1, typmod = -1, byval = t)\n ----\n\nProgram received signal SIGSEGV, Segmentation fault.\nExecEvalOper (opClause=0x4091dfec, econtext=0x40933fd4, isNull=0xbfffdaff\n\"\")\n at execQual.c:878\n878 if (fcache == NULL)\n(gdb) list\n873 /*\n874 * get the fcache from the Oper node. If it is NULL, then\ninitialize\n875 * it\n876 */\n877 fcache = op->op_fcache;\n878 if (fcache == NULL)\n879 {\n880 setFcache((Node *) op, op->opid, argList, econtext);\n881 fcache = op->op_fcache;\n882 }\n(gdb) print op\n$1 = (Oper *) 0x0\n\nUmm... looking at this... why is the node type FUNC_EXPR? Shouldn't it be\nNOT_EXPR?\nAnyway, PARSEDEBUG,OPTIMIZER_DEBUG,DEBUG_RECIPE doesn't give me anything.\nSomeone have some idea how these nodes are constructed? I have no way to\nfollow the parsing & evaluating path in the program.\n\nJP Sugarbroad\n\n", "msg_date": "Sat, 19 Sep 1998 00:14:35 -0500", "msg_from": "\"Taral\" <[email protected]>", "msg_from_op": true, "msg_subject": "select not b from t1 -- electric fence" }, { "msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> (gdb) set args template1\n> (gdb) run\n> Starting program: /home/taral/cvs/install/bin/postgres template1\n> \n> Electric Fence 2.0.5 Copyright (C) 1987-1995 Bruce Perens.\n> \n> POSTGRES backend interactive interface\n> $Revision: 1.89 $ $Date: 1998/09/01 04:32:13 $\n> > select not b from t1\n> blank\n> 1: ?column? (typeid = 16, len = 1, typmod = -1, byval = t)\n> ----\n> \n> Program received signal SIGSEGV, Segmentation fault.\n> ExecEvalOper (opClause=0x4091dfec, econtext=0x40933fd4, isNull=0xbfffdaff\n> \"\")\n> at execQual.c:878\n> 878 if (fcache == NULL)\n> (gdb) list\n> 873 /*\n> 874 * get the fcache from the Oper node. If it is NULL, then\n> initialize\n> 875 * it\n> 876 */\n> 877 fcache = op->op_fcache;\n> 878 if (fcache == NULL)\n> 879 {\n> 880 setFcache((Node *) op, op->opid, argList, econtext);\n> 881 fcache = op->op_fcache;\n> 882 }\n> (gdb) print op\n> $1 = (Oper *) 0x0\n> \n> Umm... looking at this... why is the node type FUNC_EXPR? Shouldn't it be\n> NOT_EXPR?\n> Anyway, PARSEDEBUG,OPTIMIZER_DEBUG,DEBUG_RECIPE doesn't give me anything.\n> Someone have some idea how these nodes are constructed? I have no way to\n> follow the parsing & evaluating path in the program.\n\nFixed.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 22 Sep 1998 17:20:56 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] select not b from t1 -- electric fence" } ]
[ { "msg_contents": "Hi everybody,\n\nA report of my attempts after my holiday.\n\n1. Configure\n\nConfigure needed a little change in the detection of the way echo handles\nen-of-line.\n\n2. Make\n\nPostgres compiles and links with EGCS 1.1 for CygWin B19 with some tools\nfrom Andy Piper and a IPC library by Ludovic Lange. Some changes in the EGCS\nsource tree are needed (I did this so that I did not have to change any\nPostgres source).\n\n3. Make install\n\nI had to strip the extension from the executables (I read somewhere that\nthat could be done from configure but I cannot find te correct message.\nAfter Make instal I renamed the executables to the *.exe form again. If I\ndid not do that I got a lot of \"access denied\" messages in the rest of the\nprocedure.\n\n4. Initdb\n\nI created a postgres account (jkr).\n\nI set the environmental variable USER to the account above.\n\nThis line in the script gave NOUSER as POSTGRES_SUPERUID:\nPOSTGRES_SUPERUID=`pg_id $POSTGRES_SUPERUSERNAME`\nI think it has something to do with the way a user name is created in\nWindows NT: WindowNTDomain\\UserName and the way getpwnam() in pg_id.c works.\nRunning pg_id with no $POSTGRES_SUPERUSERNAME gave a number. So I changed\nthe line to:\nPOSTGRES_SUPERUID=500, the result of running pg_id without parameter.\n\nAfter doing that the output of initdb was:\n\nbash-2.01$ initdb\ninitdb: using /usr/local/pgsql/lib/local1_template1.bki.source as input to\ncreate the template database.\ninitdb: using /usr/local/pgsql/lib/global1.bki.source as input to create the\nglobal classes.\ninitdb: using /usr/local/pgsql/lib/pg_hba.conf.sample as the host-based\nauthentication control file.\n\nWe are initializing the database system with username jkr (uid=500).\nThis user will own all the files and must also own the server process.\n\ninitdb: creating template database in /usr/local/pgsql/data/base/template1\nRunning: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1\n(d:\\unix\\root\\usr\\local\\pgsql\\bin\\postgres.exe 5333) Exception:\nSTATUS_ACCESS_VIOLATION\n(d:\\unix\\root\\usr\\local\\pgsql\\bin\\postgres.exe 5333) Dumping stack trace to\npostgres.exe.core\ninitdb: could not create template database\ninitdb: cleaning up by wiping out /usr/local/pgsql/data/base/template1\nbash-2.01$\n\nDebugging postgres with the above commandline created some difficulties\nbecause the debugger did not step into the function that was responsible for\nthe crash (bool IsBootstrapProcessingMode() in miscinit.c line 170). I have\nnot figured out what the problem is.\n\n5. People who have offered help.\n\nThere are a few people who have offered to help (active coding / guidance /\nmoral support) :\nHugo Korwaser ([email protected])\nJ. Michael Roberts ([email protected])\nChris Williams ([email protected])\n\nMore help is welcome. (BTW because of some major hard and software prblems I\nlost my entire email archive. So if you offered help and I did not mention\nyou please respond and don't be mad at me ;-)).\n\nThe people who have offered help will be contacted shortly to make a plan.\nIf you allready have one let me know.\n\nJoost\n\n\n", "msg_date": "Sat, 19 Sep 1998 14:17:28 +0200", "msg_from": "\"Joost Kraaijeveld\" <[email protected]>", "msg_from_op": true, "msg_subject": "Windows NT port of Postgres" }, { "msg_contents": "> More help is welcome. (BTW because of some major hard and software \n> prblems I lost my entire email archive. So if you offered help and I \n> did not mention you please respond and don't be mad at me ;-)).\n\nYeah, I know at least one other person who lot their e-mail system\nbecause of memory problems on an NT machine.\n\nOne of the problems of running on a bleeding-edge retro system ;)\n\n - Tom\n", "msg_date": "Mon, 21 Sep 1998 00:26:05 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Windows NT port of Postgres" }, { "msg_contents": "[Charset iso-8859-1 unsupported, filtering to ASCII...]\n> Hi everybody,\n> \n> A report of my attempts after my holiday.\n> \n> 1. Configure\n> \n> Configure needed a little change in the detection of the way echo handles\n> en-of-line.\n> \n> 2. Make\n> \n> Postgres compiles and links with EGCS 1.1 for CygWin B19 with some tools\n> from Andy Piper and a IPC library by Ludovic Lange. Some changes in the EGCS\n> source tree are needed (I did this so that I did not have to change any\n> Postgres source).\n> \n> 3. Make install\n> \n> I had to strip the extension from the executables (I read somewhere that\n> that could be done from configure but I cannot find te correct message.\n> After Make instal I renamed the executables to the *.exe form again. If I\n> did not do that I got a lot of \"access denied\" messages in the rest of the\n> procedure.\n> \n> 4. Initdb\n> \n> I created a postgres account (jkr).\n> \n> I set the environmental variable USER to the account above.\n> \n> This line in the script gave NOUSER as POSTGRES_SUPERUID:\n> POSTGRES_SUPERUID=`pg_id $POSTGRES_SUPERUSERNAME`\n> I think it has something to do with the way a user name is created in\n> Windows NT: WindowNTDomain\\UserName and the way getpwnam() in pg_id.c works.\n> Running pg_id with no $POSTGRES_SUPERUSERNAME gave a number. So I changed\n> the line to:\n> POSTGRES_SUPERUID=500, the result of running pg_id without parameter.\n> \n> After doing that the output of initdb was:\n> \n> bash-2.01$ initdb\n> initdb: using /usr/local/pgsql/lib/local1_template1.bki.source as input to\n> create the template database.\n> initdb: using /usr/local/pgsql/lib/global1.bki.source as input to create the\n> global classes.\n> initdb: using /usr/local/pgsql/lib/pg_hba.conf.sample as the host-based\n> authentication control file.\n> \n> We are initializing the database system with username jkr (uid=500).\n> This user will own all the files and must also own the server process.\n> \n> initdb: creating template database in /usr/local/pgsql/data/base/template1\n> Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1\n> (d:\\unix\\root\\usr\\local\\pgsql\\bin\\postgres.exe 5333) Exception:\n> STATUS_ACCESS_VIOLATION\n> (d:\\unix\\root\\usr\\local\\pgsql\\bin\\postgres.exe 5333) Dumping stack trace to\n> postgres.exe.core\n> initdb: could not create template database\n> initdb: cleaning up by wiping out /usr/local/pgsql/data/base/template1\n> bash-2.01$\n> \n> Debugging postgres with the above commandline created some difficulties\n> because the debugger did not step into the function that was responsible for\n> the crash (bool IsBootstrapProcessingMode() in miscinit.c line 170). I have\n> not figured out what the problem is.\n\nThis is pretty amazing you got this far. Hard to see how it could crash\non that code.\n\n> \n> 5. People who have offered help.\n> \n> There are a few people who have offered to help (active coding / guidance /\n> moral support) :\n> Hugo Korwaser ([email protected])\n> J. Michael Roberts ([email protected])\n> Chris Williams ([email protected])\n> \n> More help is welcome. (BTW because of some major hard and software prblems I\n> lost my entire email archive. So if you offered help and I did not mention\n> you please respond and don't be mad at me ;-)).\n> \n> The people who have offered help will be contacted shortly to make a plan.\n> If you allready have one let me know.\n\nThis is all pretty amazing. To port something like this requires a huge\namount of supporting NT code to make it look like Unix.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Sun, 20 Sep 1998 22:14:38 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Windows NT port of Postgres" } ]
[ { "msg_contents": "Hmm, I start wondering if my email goes through or not. So I send the\nremaining patches to this list instead of the hackers list so I can check\nwhether I get them back. I have the feeling some of my mail simply doesn't\nmake it through. Could that be? Do we have to send email from the subscribed\naddress? I'm pretty sure some of my comments didn't make it into my mailbox.\n\nAnyway, I include two patches, one fixing the remaining bugs in ecpg, one\nwith an improvement to the docs.\n\nAnd I CC this to Marc (hope you don't mind) just to check it. \n\nMichael\n-- \nDr. Michael Meskes | Th.-Heuss-Str. 61, D-41812 Erkelenz | Go SF49ers!\nSenior-Consultant | business: [email protected] | Go Rhein Fire!\nMummert+Partner | private: [email protected] | Use Debian\nUnternehmensberatung AG | [email protected] | GNU/Linux!", "msg_date": "Sat, 19 Sep 1998 15:19:30 +0200", "msg_from": "Michael Meskes <[email protected]>", "msg_from_op": true, "msg_subject": "My patches" }, { "msg_contents": "\nApplied...\n\nOn Sat, 19 Sep 1998, Michael Meskes wrote:\n\n> Hmm, I start wondering if my email goes through or not. So I send the\n> remaining patches to this list instead of the hackers list so I can check\n> whether I get them back. I have the feeling some of my mail simply doesn't\n> make it through. Could that be? Do we have to send email from the subscribed\n> address? I'm pretty sure some of my comments didn't make it into my mailbox.\n> \n> Anyway, I include two patches, one fixing the remaining bugs in ecpg, one\n> with an improvement to the docs.\n> \n> And I CC this to Marc (hope you don't mind) just to check it. \n> \n> Michael\n> -- \n> Dr. Michael Meskes | Th.-Heuss-Str. 61, D-41812 Erkelenz | Go SF49ers!\n> Senior-Consultant | business: [email protected] | Go Rhein Fire!\n> Mummert+Partner | private: [email protected] | Use Debian\n> Unternehmensberatung AG | [email protected] | GNU/Linux!\n> \n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 21 Sep 1998 02:55:30 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: My patches" } ]
[ { "msg_contents": "The regression tests are starting to look pretty good. Aside\nfrom the usual minor discrepancies in math error message wording\n&etc, I see only two things that look wrong.\n\nFirst, the \"tinterval\" test is giving differently sorted results\nthan the regression test expects for two queries that sort on\ntintervals. Now, I'm not too sure what it means to sort on a\ntinterval, but the tinterval comparison operators in adt/date.c\nseem to think that the way to compare tintervals is to compare\ntheir duration. If that's how it's supposed to work, then\n*neither* the regression reference data nor my output is right!\nThe regression reference sorts in order:\n\tinfinite interval\n\t25-year 8-month interval\n\t25-year 4-month interval\n\t1-month interval\n\t8-years-and-growing interval\nMy result puts the epoch-to-1995 interval at the end, which is\njust as broken.\n\nI expect the reason the infinite interval sorts first is internal\noverflow in the comparison routines, which after all are only using\n32-bit integer arithmetic to compute the interval lengths. But\nI don't understand why the other intervals don't sort properly.\n\nBTW, this regression test has a time bomb: as \"current\" increases\nthe correct sort order will change, about 16 years from now...\n\nThere is a second case failing with similar symptoms in tinterval,\nbut I didn't bother to look at it closely.\n\nSecondly, the \"rules\" test emits the same tuples in a different order\nin one case. It's from an unordered SELECT so it's hard to claim\nthat the output is wrong. I think this might just indicate an obsolete\nreference file, but I don't know enough to know if that's true.\nAre other people getting comparison failures for \"rules\", or not?\n\n\t\t\tregards, tom lane\n\n\n*** expected/tinterval.out\tSun Jan 4 22:35:46 1998\n--- results/tinterval.out\tSat Sep 19 19:22:58 1998\n***************\n*** 99,107 ****\n ----+---------------------------------------------------------------+---------------------------------------------------------------\n |[\"-infinity\" \"infinity\"] |[\"-infinity\" \"infinity\"] \n |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]|[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n- |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]|[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]\n |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] \n (5 rows)\n \n QUERY: SELECT '' AS fourteen, t1.f1 AS interval1, t2.f1 AS interval2\n--- 99,107 ----\n ----+---------------------------------------------------------------+---------------------------------------------------------------\n |[\"-infinity\" \"infinity\"] |[\"-infinity\" \"infinity\"] \n |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]|[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]|[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]\n |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] \n+ |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n (5 rows)\n \n QUERY: SELECT '' AS fourteen, t1.f1 AS interval1, t2.f1 AS interval2\n***************\n*** 110,129 ****\n ORDER BY interval1, interval2;\n fourteen|interval1 |interval2 \n --------+---------------------------------------------------------------+---------------------------------------------------------------\n |[\"-infinity\" \"infinity\"] |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n |[\"-infinity\" \"infinity\"] |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]\n- |[\"-infinity\" \"infinity\"] |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n- |[\"-infinity\" \"infinity\"] |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] \n |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]|[\"-infinity\" \"infinity\"] \n |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] |[\"-infinity\" \"infinity\"] \n- |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]|[\"-infinity\" \"infinity\"] \n |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] |[\"-infinity\" \"infinity\"] \n |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]|[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]\n |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] \n |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]|[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n! |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n (14 rows)\n \n QUERY: SELECT '' AS five, t1.f1\n--- 110,129 ----\n ORDER BY interval1, interval2;\n fourteen|interval1 |interval2 \n --------+---------------------------------------------------------------+---------------------------------------------------------------\n+ |[\"-infinity\" \"infinity\"] |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] \n+ |[\"-infinity\" \"infinity\"] |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n |[\"-infinity\" \"infinity\"] |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n |[\"-infinity\" \"infinity\"] |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]\n |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]|[\"-infinity\" \"infinity\"] \n |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] |[\"-infinity\" \"infinity\"] \n |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] |[\"-infinity\" \"infinity\"] \n |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]\n+ |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n |[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]|[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]\n |[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] |[\"Thu Feb 15 12:15:03 1990 PST\" \"current\"] \n |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]|[\"epoch\" \"Mon May 01 00:30:30 1995 PDT\"] \n! |[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]|[\"-infinity\" \"infinity\"] \n (14 rows)\n \n QUERY: SELECT '' AS five, t1.f1\n\n----------------------\n\n*** expected/rules.out\tWed Sep 16 10:35:06 1998\n--- results/rules.out\tSat Sep 19 19:29:16 1998\n***************\n*** 315,322 ****\n pname |sysname\n ------+-------\n bm |pluto \n- jwieck|orion \n jwieck|notjw \n (3 rows)\n \n QUERY: delete from rtest_system where sysname = 'orion';\n--- 315,322 ----\n pname |sysname\n ------+-------\n bm |pluto \n jwieck|notjw \n+ jwieck|orion \n (3 rows)\n \n QUERY: delete from rtest_system where sysname = 'orion';\n\n----------------------\n\n", "msg_date": "Sat, 19 Sep 1998 21:58:06 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Regression results from HPUX 9/PA-RISC" } ]
[ { "msg_contents": "At this point the Irix port is nearly complete. There are two problems\nthat remain. \n\nFirst, the snprintf function does not process the %lld format\ncorrectly. Frankly, there is no reason to use it in\nsrc/backend/utils/adt/int8.c because there is not chance of exceeding\nthe supplied buffer. sprintf is safe in this circumstance and works\ncorrectly.\n\t\nSecond, the SGI C++ compiler does not recognize #include <string>,\nand it fails. \n\nI still have to run a multiprocess test of the new locking code,\nand will let you know the results when I have them.\n\nOverall, PostgreSQL is looking good!\n\n+------------------------------------------+------------------------------+\n| Robert E. Bruccoleri, Ph.D. | Associate Research Professor |\n| President | Center for Advanced |\n| Congenomics, Inc. | Biotechnology and Medicine |\n| P.O. Box 314 | Rutgers University |\n| Pennington, NJ 08534 | 679 Hoes Lane |\n| Phone: 609 737 6383 | Piscataway, NJ 08854-5638 |\n+------------------------------------------+ phone: 732 235 5796 | \n| email: [email protected] | Fax: 732 235 4850 |\n| URL: http://www.cabm.rutgers.edu/~bruc | |\n+------------------------------------------+------------------------------+\n\n\n\n", "msg_date": "Sat, 19 Sep 1998 23:50:44 -0400 (EDT)", "msg_from": "Robert Bruccoleri <[email protected]>", "msg_from_op": true, "msg_subject": "Results of port of Sept 18 port of PostgreSQL" }, { "msg_contents": "> At this point the Irix port is nearly complete. There are two problems\n> that remain. \n> \n> First, the snprintf function does not process the %lld format\n> correctly. Frankly, there is no reason to use it in\n> src/backend/utils/adt/int8.c because there is not chance of exceeding\n> the supplied buffer. sprintf is safe in this circumstance and works\n> correctly.\n\nAre you talking about the Irix snprintf, our our ports/snprintf.c?\n\n> \t\n> Second, the SGI C++ compiler does not recognize #include <string>,\n> and it fails. \n\nWhere is this?\n\n> \n> I still have to run a multiprocess test of the new locking code,\n> and will let you know the results when I have them.\n> \n> Overall, PostgreSQL is looking good!\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Sun, 20 Sep 1998 22:18:57 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Results of port of Sept 18 port of PostgreSQL" } ]
[ { "msg_contents": "The following failures in the regression tests have started appearing in the \nlast couple of days in the sanity_check test:\n\n====== sanity_check ======\n1a2,3\n> NOTICE: AbortTransaction and not in in-progress state \n> NOTICE: AbortTransaction and not in in-progress state \n6,32c8,9\n< relname |relhasindex\n< --------------+-----------\n< bt_f8_heap |t \n< bt_i4_heap |t \n< bt_name_heap |t \n< bt_txt_heap |t \n\t[...]\n< shighway |t \n< tenk1 |t \n< tenk2 |t \n< (23 rows)\n< \n---\n> NOTICE: AbortTransaction and not in in-progress state \n> NOTICE: AbortTransaction and not in in-progress state \n\nThe VACUUM command against the regression data base fails with the following \nerror messages:\n\n\t[...]\nDEBUG: --Relation circle_tbl--\nDEBUG: Pages 1: Changed 0, Reapped 0, Empty 0, New 0; Tup 6: Vac 0, Crash 0, \nUn\nUsed 0, MinLen 64, MaxLen 64; Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. \nP\nages 0/0. Elapsed 0/0 sec.\nDEBUG: --Relation timespan_tbl--\nDEBUG: Pages 1: Changed 0, Reapped 0, Empty 0, New 0; Tup 10: Vac 0, Crash 0, \nU\nnUsed 0, MinLen 52, MaxLen 52; Re-using: Free/Avail. Space 0/0; EndEmpty/Avail.\nPages 0/0. Elapsed 0/0 sec.\nERROR: cannot write block 0 of circle_tbl [regression] blind\nNOTICE: AbortTransaction and not in in-progress state\nERROR: cannot write block 0 of circle_tbl [regression] blind\nNOTICE: AbortTransaction and not in in-progress state\n\nRunning the VACUUM command manually in the regression data base fails but at \ndifferent blocks in different tables (no obvious pattern in blocks and tables).\n\nOnce vacuum runs and fails, any query in the database will fail with the:\n\tNOTICE: AbortTransaction and not in in-progress state\n\tNOTICE: AbortTransaction and not in in-progress state\nmessages displayed. Re-connecting to the database (i.e. '\\c regression') \nallows the queries to succeed (until vacuum is executed).\n\nAny help will be greatly appreciated.\n-- \n____ | Billy G. Allie | Domain....: [email protected]\n| /| | 7436 Hartwell | Compuserve: 76337,2061\n|-/-|----- | Dearborn, MI 48126| MSN.......: [email protected]\n|/ |LLIE | (313) 582-1540 | \n\n\n", "msg_date": "Sun, 20 Sep 1998 00:34:39 -0400", "msg_from": "\"Billy G. Allie\" <[email protected]>", "msg_from_op": true, "msg_subject": "UnixWare 7 vacuum failures on the regression database." } ]
[ { "msg_contents": "Is this an error on my part or is there a bug in the CREATE TRIGGER\ncode?\n\ndarcy=> CREATE FUNCTION function_dead(int)\ndarcy-> RETURNS int \ndarcy-> AS 'UPDATE bid SET live = \\'f\\' WHERE item_id = $1; \ndarcy'> SELECT 1 AS ignore_this'\ndarcy-> LANGUAGE 'sql';\nCREATE\ndarcy=> CREATE TRIGGER trigger_dead BEFORE INSERT OR UPDATE\ndarcy-> ON bid\ndarcy-> FOR EACH ROW\ndarcy-> EXECUTE PROCEDURE function_dead (item_id); \nERROR: CreateTrigger: function function_dead () does not exist\ndarcy=> SELECT function_dead(1);\nfunction_dead\n-------------\n 1\n(1 row)\n\ndarcy=> DROP FUNCTION function_dead(int);\nDROP\ndarcy=> \n\nNote that the CREATE FUNCTION works as it can be used as in the SELECT\nand it can be dropped proving (?) that it existed. I think I have\nall the argument types right. I tried it with int4 as well.\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": "Sun, 20 Sep 1998 00:45:23 -0400 (EDT)", "msg_from": "[email protected] (D'Arcy J.M. Cain)", "msg_from_op": true, "msg_subject": "SQL Triggers" }, { "msg_contents": ">\n> Is this an error on my part or is there a bug in the CREATE TRIGGER\n> code?\n>\n> darcy=> CREATE FUNCTION function_dead(int)\n> darcy-> RETURNS int\n> darcy-> AS 'UPDATE bid SET live = \\'f\\' WHERE item_id = $1;\n> darcy'> SELECT 1 AS ignore_this'\n> darcy-> LANGUAGE 'sql';\n> CREATE\n> darcy=> CREATE TRIGGER trigger_dead BEFORE INSERT OR UPDATE\n> darcy-> ON bid\n> darcy-> FOR EACH ROW\n> darcy-> EXECUTE PROCEDURE function_dead (item_id);\n> ERROR: CreateTrigger: function function_dead () does not exist\n> darcy=> SELECT function_dead(1);\n> function_dead\n> -------------\n> 1\n> (1 row)\n>\n> darcy=> DROP FUNCTION function_dead(int);\n> DROP\n> darcy=>\n>\n> Note that the CREATE FUNCTION works as it can be used as in the SELECT\n> and it can be dropped proving (?) that it existed. I think I have\n> all the argument types right. I tried it with int4 as well.\n>\n> --\n> D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\n> http://www.druid.net/darcy/ | and a sheep voting on\n> +1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.\n>\n>\n\n The arguments aren't right and the return type too. Trigger\n procedures take no arguments in their definition and return\n OPAQUE type. They really return a tuple of the table they are\n actually fired for.\n\n Take a look at PL/pgSQL and it's docs which is already in the\n CVS and will be shipped with 6.4.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#======================================== [email protected] (Jan Wieck) #\n\n\n", "msg_date": "Thu, 24 Sep 1998 10:55:50 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] SQL Triggers" }, { "msg_contents": "Jan,\n\nI am dying to take our (your) new procedural language for a spin. Just one\nproblem. I don't see a Makefile in the pl/plpgsql/src directory. Am I\nmissing something in my configure?\n\nJan Wieck wrote:\n\n> Take a look at PL/pgSQL and it's docs which is already in the\n> CVS and will be shipped with 6.4.\n>\n\n", "msg_date": "Thu, 24 Sep 1998 10:33:45 -0400", "msg_from": "David Hartwig <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] SQL Triggers" }, { "msg_contents": "> \n> Jan,\n> \n> I am dying to take our (your) new procedural language for a spin. Just one\n> problem. I don't see a Makefile in the pl/plpgsql/src directory. Am I\n> missing something in my configure?\n> \n> Jan Wieck wrote:\n> \n> > Take a look at PL/pgSQL and it's docs which is already in the\n> > CVS and will be shipped with 6.4.\n> >\n> \n> \n> \n\n Don't know where we lost it. Appended at the end.\n\n Bruce, could you please put it into src/pl/pgsql/src 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\nbegin 644 Makefile\nM(RTM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM\nM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2T*(PHC($UA:V5F:6QE\"B,@\nM(\"`@36%K969I;&4@9F]R('1H92!P;'!G<W%L('-H87)E9\"!O8FIE8W0*(PHC\nM($E$14Y4249)0T%424].\"B,@(\"`@)$AE861E<CH@+W5S<B]L;V-A;\"]S<F,O\nM<&=S<6PO<W)C+W!L+W!L<&=S<6PO<W)C+U)#4R]-86ME9FEL92QV(#$N,B`Q\nM.3DX+S`X+S$S(#$V.C4S.C0X('!G<W%L($5X<\"!P9W-Q;\"`D\"B,*(RTM+2TM\nM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM\nM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2T*\"B,*(R!496QL(&UA:V4@=VAE<F4@\nM=&AE('!O<W1G<F5S<6P@<V]U<F-E<R!L:79E\"B,*4U)#1$E2/2`N+B\\N+B\\N\nM+@H*(PHC($EN8VQU9&4@=&AE(&=L;V)A;\"!A;F0@<&]R=\"!S<&5C:69I8R!-\nM86ME9FEL97,*(PII;F-L=61E(\"0H4U)#1$E2*2]-86ME9FEL92YG;&]B86P*\nM:6YC;'5D92`D*%-20T1)4BDO36%K969I;&4N<&]R=`H*0T9,04=3*ST@+4DD\nM*$Q)0E!11$E2*2`M220H4U)#1$E2*2]I;F-L=61E\"DQ&3$%'4RL](\"UI(\"UL\nM\"@HC($9O<B!F;6=R+F@*0T9,04=3*ST@+4DD*%-20T1)4BDO8F%C:V5N9`H*\nM3$1!1$0K/2`M3\"0H3$E\"4%%$25(I(\"UL<'$*\"B,*(R!$3$]\"2B!I<R!T:&4@\nM9'EN86UI8V%L;'DM;&]A9&5D(&]B:F5C=\"!F:6QE+@HC\"D1,3T)*/2!P;'!G\nM<W%L)\"A$3%-51D9)6\"D*\"D]\"2E,]\"7!L7W!A<G-E+F\\@<&Q?:&%N9&QE<BYO\nM('!L7V-O;7`N;R!P;%]E>&5C+F\\@<&Q?9G5N8W,N;PH*04Q,/0DD*$1,3T)*\nM*0H*(PHC($)U:6QD('1H92!S:&%R960@;V)J96-T\"B,*86QL.B`D*$%,3\"D*\nM\"B0H1$Q/0DHI.@DD*$]\"2E,I\"@HC\"B,@0VQE86X@\"B,*8VQE86XZ\"@ER;2`M\nM9B`D*$%,3\"D*\"7)M(\"UF(\"HN;R!Y+G1A8BYH('!L+G1A8BYH('!L7V=R86TN\nM8R!G<F%M+F,@<&Q?<V-A;BYC('-C86XN8PH*:6YS=&%L;#H@86QL\"@DD*$E.\nM4U1!3$PI(\"0H24Y35$Q?3$E\"7T]05%,I(\"0H1$Q/0DHI(\"0H1$535$1)4BDD\nM*$Q)0D1)4BDO)\"A$3$]\"2BD*\"B0H1$Q/0DHI.@DD*$]\"2E,I\"@DD*$-#*2`M\nM<VAA<F5D(\"UO(\"1`(\"0H3T)*4RD*\"B,))\"A,1\"D@)\"A,1$9,04=37U-,*2`M\nM;R`D0\"`D*$]\"2E,I\"@H*<&Q?:&%N9&QE<BYO.@EP;%]H86YD;&5R+F,@<&QP\nM9W-Q;\"YH('!L+G1A8BYH\"@IP;%]C;VUP+F\\Z\"7!L7V-O;7`N8R!P;'!G<W%L\nM+F@@<&PN=&%B+F@*\"G!L7V5X96,N;SH)<&Q?97AE8RYC('!L<&=S<6PN:\"!P\nM;\"YT86(N:`H*<&Q?9G5N8W,N;SH)<&Q?9G5N8W,N8R!P;'!G<W%L+F@@<&PN\nM=&%B+F@*\"G!L7W!A<G-E+F\\Z\"7!L7V=R86TN8R!P;%]S8V%N+F,@<&QP9W-Q\nM;\"YH\"@DD*$-#*2`D*$-&3$%'4RD@+6,@+6\\@)$`@<&Q?9W)A;2YC\"@IP;%]G\nM<F%M+F,Z\"6=R86TN8PH)<V5D(\"UE(\"=S+WEY+W!L<&=S<6Q?>7DO9R<@+64@\nM)W,O65DO4$Q01U-13%]962]G)R`\\9W)A;2YC(#YP;%]G<F%M+F,*\"7-E9\"`M\nM92`G<R]Y>2]P;'!G<W%L7WEY+V<G(\"UE(\"=S+UE9+U!,4$=344Q?65DO9R<@\nM/'DN=&%B+F@@/G!L+G1A8BYH\"@IP;%]S8V%N+F,Z\"7-C86XN8PH)<V5D(\"UE\nM(\"=S+WEY+W!L<&=S<6Q?>7DO9R<@+64@)W,O65DO4$Q01U-13%]962]G)R`\\\nM<V-A;BYC(#YP;%]S8V%N+F,*\"F=R86TN8SH)\"6=R86TN>0H*<V-A;BYC.@D)\n<<V-A;BYL\"@IP;\"YT86(N:#H)<&Q?9W)A;2YC\"@``\n`\nend\n", "msg_date": "Fri, 25 Sep 1998 09:12:02 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "PL/pgSQL Makefile (was: Re: [HACKERS] SQL Triggers)" }, { "msg_contents": "Done.\n\n\n> > \n> > Jan,\n> > \n> > I am dying to take our (your) new procedural language for a spin. Just one\n> > problem. I don't see a Makefile in the pl/plpgsql/src directory. Am I\n> > missing something in my configure?\n> > \n> > Jan Wieck wrote:\n> > \n> > > Take a look at PL/pgSQL and it's docs which is already in the\n> > > CVS and will be shipped with 6.4.\n> > >\n> > \n> > \n> > \n> \n> Don't know where we lost it. Appended at the end.\n> \n> Bruce, could you please put it into src/pl/pgsql/src too?\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> begin 644 Makefile\n> M(RTM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM\n> M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2T*(PHC($UA:V5F:6QE\"B,@\n> M(\"`@36%K969I;&4@9F]R('1H92!P;'!G<W%L('-H87)E9\"!O8FIE8W0*(PHC\n> M($E$14Y4249)0T%424].\"B,@(\"`@)$AE861E<CH@+W5S<B]L;V-A;\"]S<F,O\n> M<&=S<6PO<W)C+W!L+W!L<&=S<6PO<W)C+U)#4R]-86ME9FEL92QV(#$N,B`Q\n> M.3DX+S`X+S$S(#$V.C4S.C0X('!G<W%L($5X<\"!P9W-Q;\"`D\"B,*(RTM+2TM\n> M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM\n> M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2T*\"B,*(R!496QL(&UA:V4@=VAE<F4@\n> M=&AE('!O<W1G<F5S<6P@<V]U<F-E<R!L:79E\"B,*4U)#1$E2/2`N+B\\N+B\\N\n> M+@H*(PHC($EN8VQU9&4@=&AE(&=L;V)A;\"!A;F0@<&]R=\"!S<&5C:69I8R!-\n> M86ME9FEL97,*(PII;F-L=61E(\"0H4U)#1$E2*2]-86ME9FEL92YG;&]B86P*\n> M:6YC;'5D92`D*%-20T1)4BDO36%K969I;&4N<&]R=`H*0T9,04=3*ST@+4DD\n> M*$Q)0E!11$E2*2`M220H4U)#1$E2*2]I;F-L=61E\"DQ&3$%'4RL](\"UI(\"UL\n> M\"@HC($9O<B!F;6=R+F@*0T9,04=3*ST@+4DD*%-20T1)4BDO8F%C:V5N9`H*\n> M3$1!1$0K/2`M3\"0H3$E\"4%%$25(I(\"UL<'$*\"B,*(R!$3$]\"2B!I<R!T:&4@\n> M9'EN86UI8V%L;'DM;&]A9&5D(&]B:F5C=\"!F:6QE+@HC\"D1,3T)*/2!P;'!G\n> M<W%L)\"A$3%-51D9)6\"D*\"D]\"2E,]\"7!L7W!A<G-E+F\\@<&Q?:&%N9&QE<BYO\n> M('!L7V-O;7`N;R!P;%]E>&5C+F\\@<&Q?9G5N8W,N;PH*04Q,/0DD*$1,3T)*\n> M*0H*(PHC($)U:6QD('1H92!S:&%R960@;V)J96-T\"B,*86QL.B`D*$%,3\"D*\n> M\"B0H1$Q/0DHI.@DD*$]\"2E,I\"@HC\"B,@0VQE86X@\"B,*8VQE86XZ\"@ER;2`M\n> M9B`D*$%,3\"D*\"7)M(\"UF(\"HN;R!Y+G1A8BYH('!L+G1A8BYH('!L7V=R86TN\n> M8R!G<F%M+F,@<&Q?<V-A;BYC('-C86XN8PH*:6YS=&%L;#H@86QL\"@DD*$E.\n> M4U1!3$PI(\"0H24Y35$Q?3$E\"7T]05%,I(\"0H1$Q/0DHI(\"0H1$535$1)4BDD\n> M*$Q)0D1)4BDO)\"A$3$]\"2BD*\"B0H1$Q/0DHI.@DD*$]\"2E,I\"@DD*$-#*2`M\n> M<VAA<F5D(\"UO(\"1`(\"0H3T)*4RD*\"B,))\"A,1\"D@)\"A,1$9,04=37U-,*2`M\n> M;R`D0\"`D*$]\"2E,I\"@H*<&Q?:&%N9&QE<BYO.@EP;%]H86YD;&5R+F,@<&QP\n> M9W-Q;\"YH('!L+G1A8BYH\"@IP;%]C;VUP+F\\Z\"7!L7V-O;7`N8R!P;'!G<W%L\n> M+F@@<&PN=&%B+F@*\"G!L7V5X96,N;SH)<&Q?97AE8RYC('!L<&=S<6PN:\"!P\n> M;\"YT86(N:`H*<&Q?9G5N8W,N;SH)<&Q?9G5N8W,N8R!P;'!G<W%L+F@@<&PN\n> M=&%B+F@*\"G!L7W!A<G-E+F\\Z\"7!L7V=R86TN8R!P;%]S8V%N+F,@<&QP9W-Q\n> M;\"YH\"@DD*$-#*2`D*$-&3$%'4RD@+6,@+6\\@)$`@<&Q?9W)A;2YC\"@IP;%]G\n> M<F%M+F,Z\"6=R86TN8PH)<V5D(\"UE(\"=S+WEY+W!L<&=S<6Q?>7DO9R<@+64@\n> M)W,O65DO4$Q01U-13%]962]G)R`\\9W)A;2YC(#YP;%]G<F%M+F,*\"7-E9\"`M\n> M92`G<R]Y>2]P;'!G<W%L7WEY+V<G(\"UE(\"=S+UE9+U!,4$=344Q?65DO9R<@\n> M/'DN=&%B+F@@/G!L+G1A8BYH\"@IP;%]S8V%N+F,Z\"7-C86XN8PH)<V5D(\"UE\n> M(\"=S+WEY+W!L<&=S<6Q?>7DO9R<@+64@)W,O65DO4$Q01U-13%]962]G)R`\\\n> M<V-A;BYC(#YP;%]S8V%N+F,*\"F=R86TN8SH)\"6=R86TN>0H*<V-A;BYC.@D)\n> <<V-A;BYL\"@IP;\"YT86(N:#H)<&Q?9W)A;2YC\"@``\n> `\n> end\n> \n> \n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n\n", "msg_date": "Fri, 25 Sep 1998 11:50:03 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PL/pgSQL Makefile (was: Re: [HACKERS] SQL Triggers)" }, { "msg_contents": "Thus spake Jan Wieck\n> > darcy=> CREATE FUNCTION function_dead(int)\n> > darcy-> RETURNS int\n> > darcy-> AS 'UPDATE bid SET live = \\'f\\' WHERE item_id = $1;\n> > darcy'> SELECT 1 AS ignore_this'\n> > darcy-> LANGUAGE 'sql';\n> > CREATE\n> > darcy=> CREATE TRIGGER trigger_dead BEFORE INSERT OR UPDATE\n> > darcy-> ON bid\n> > darcy-> FOR EACH ROW\n> > darcy-> EXECUTE PROCEDURE function_dead (item_id);\n> > ERROR: CreateTrigger: function function_dead () does not exist\n> > darcy=> SELECT function_dead(1);\n> > function_dead\n> > -------------\n> > 1\n> > (1 row)\n> \n> The arguments aren't right and the return type too. Trigger\n> procedures take no arguments in their definition and return\n> OPAQUE type. They really return a tuple of the table they are\n> actually fired for.\n\nNot sure I follow. The argument is an int (or int4 as it defaults to)\nand I tried various combos of int and int4 in the procedure definition\n\nAs for the opaque type return, I get an error message when I try to\ncreate an SQL function returning opaque. The \"SELECT 1 AS ignore_this\"\nis taken straight from the examples.\n\n> Take a look at PL/pgSQL and it's docs which is already in the\n> CVS and will be shipped with 6.4.\n\nI have the current sources (I sup daily) but I couldn't find any examples\nof fcreate trigger.\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": "Fri, 25 Sep 1998 13:01:26 -0400 (EDT)", "msg_from": "[email protected] (D'Arcy J.M. Cain)", "msg_from_op": true, "msg_subject": "Re: [HACKERS] SQL Triggers" }, { "msg_contents": "> > The arguments aren't right and the return type too. Trigger\n> > procedures take no arguments in their definition and return\n> > OPAQUE type. They really return a tuple of the table they are\n> > actually fired for.\n>\n> Not sure I follow. The argument is an int (or int4 as it defaults to)\n> and I tried various combos of int and int4 in the procedure definition\n>\n> As for the opaque type return, I get an error message when I try to\n> create an SQL function returning opaque. The \"SELECT 1 AS ignore_this\"\n> is taken straight from the examples.\n\n To clearify on that:\n\n Trigger procedures cannot be created in the builtin SQL\n language. The trigger manager calls trigger procedures\n totally different from the process how SQL functions get\n invoked. They must be written in C or one of the procedural\n languages (PL/pgSQL or PL/Tcl).\n\n>\n> > Take a look at PL/pgSQL and it's docs which is already in the\n> > CVS and will be shipped with 6.4.\n>\n> I have the current sources (I sup daily) but I couldn't find any examples\n> of fcreate trigger.\n\n There are over 800 lines of trigger and function code written\n in PL/pgSQL. You'll find them in .../src/pl/plpgsql/test.\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, 25 Sep 1998 19:52:29 +0200 (MET DST)", "msg_from": "[email protected] (Jan Wieck)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] SQL Triggers" } ]
[ { "msg_contents": "Hi,\nI can still easily crash the backend when calling auswertung.sh\nafter loading the database foo with foo.dmp.\n\nI'm using FreeBSD-current and PostgreSQL-current.\n\nCan anyone reproduce the crash?\n\nBye!\n----\nMichael Reifenberger\nPlaut Software GmbH, R/3 Basis", "msg_date": "Sun, 20 Sep 1998 13:33:25 +0200 (CEST)", "msg_from": "Michael Reifenberger <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Indixing problems... (fwd)" } ]
[ { "msg_contents": "Somebody pleeeeease respond. I get everything to compile, I initialize the\ndatabase, start the postmaster, try to create a database, and get this:\n\nERROR: parser: parse error at or near \"create\"\ncreatedb: database creation failed on ans.\n\nSomebody had the exact same problem with NetBSD a long time ago, and he\nended up using the pre-compiled binary.\n\nI submitted a bug report, but nothing... Please, any hints? This is\nurgent!\n\n-----------------------------------------------------------------------------\nChristopher Akritides Big Dial Development\n(914) 701-5391 Page: 1-800-946-4646 1453477 ANS Communications\n\n", "msg_date": "Sun, 20 Sep 1998 13:23:21 -0400 (EDT)", "msg_from": "Christopher Akritides <[email protected]>", "msg_from_op": true, "msg_subject": "BSDI 2.1, postgresql-6.3.2 HELP!!!" } ]
[ { "msg_contents": "Hi,\nI can easily crash the backend of current- postgres on current- FreeBSD with\nloading a database with test.sql and test.dmp an executing the script x.sql.\nAnyone else?\n\nBye!\n----\nMichael Reifenberger\nPlaut Software GmbH, R/3 Basis", "msg_date": "Sun, 20 Sep 1998 20:50:59 +0200 (MET DST)", "msg_from": "Michael Reifenberger <[email protected]>", "msg_from_op": true, "msg_subject": "current- crash" }, { "msg_contents": "On Sun, 20 Sep 1998, Michael Reifenberger wrote:\n\n> Date: Sun, 20 Sep 1998 20:50:59 +0200 (MET DST)\n> From: Michael Reifenberger <[email protected]>\n> To: PostgreSQL Hackers <[email protected]>\n> Subject: [HACKERS] current- crash\n> \n> Hi,\n> I can easily crash the backend of current- postgres on current- FreeBSD with\n> loading a database with test.sql and test.dmp an executing the script x.sql.\n> Anyone else?\n> \n> Bye!\n> ----\n> Michael Reifenberger\n> Plaut Software GmbH, R/3 Basis\n> \n\n\nYes,\n\nI've posted message about query which crashes backend on my Linux box -\nit looks as yours. Also, could you check 'vacuum analyze'\non your database when you run postgres with -B 1024 option.\nOn my system it crashes.\n\n\tRegards,\n\t\n\t\tOleg\n\n\n\n\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: [email protected], http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n", "msg_date": "Sun, 20 Sep 1998 23:36:02 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] current- crash" }, { "msg_contents": "> Hi,\n> I can easily crash the backend of current- postgres on current- FreeBSD with\n> loading a database with test.sql and test.dmp an executing the script x.sql.\n> Anyone else?\n> \n> Bye!\n> ----\n> Michael Reifenberger\n> Plaut Software GmbH, R/3 Basis\nContent-Description: \n\n> CREATE TABLE b (begt datetime, kid int4);\n> CREATE TABLE a (kid int4);\n> CREATE TABLE c (a int4, b varchar(30), c int4);\n> CREATE INDEX b_0 on b using btree ( begt datetime_ops );\n> CREATE INDEX b_1 on b using btree ( kid int4_ops );\n> CREATE INDEX a_0 on a using btree ( kid int4_ops );\n> Content-Description: \n\n> COPY b FROM stdin;\n> \\.\n> COPY a FROM stdin;\n> \\.\n> COPY c FROM stdin;\n> 1\tfoo\t1\n> 2\tfoo bar\t2\n> 3\t\\N\t3\n> 4\t\\\\server\bla\t4\n> \\.\n> Content-Description: \n\n> explain SELECT a.kid as foo\n> \tFROM a, b WHERE\n> \ta.kid = b.kid AND\n> \t( b.kid = 23 OR\n> \t b.kid = 36 );\n> \n\nThis is a known problem, and is going on the open items list. The\nproblem is the new OR indexing code, and an attempt to test for a\nMERGEJOIN where it really should not be. I can see why it is happening,\nand will have to research it.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Sun, 20 Sep 1998 22:20:16 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] current- crash" }, { "msg_contents": "Michael Reifenberger wrote:\n> \n> Hi,\n> I can easily crash the backend of current- postgres on current- FreeBSD with\n> loading a database with test.sql and test.dmp an executing the script x.sql.\n> Anyone else?\n> \n> Bye!\n> ----\n> Michael Reifenberger\n> Plaut Software GmbH, R/3 Basis\n> \n> ------------------------------------------------------------------------\n> CREATE TABLE b (begt datetime, kid int4);\n> CREATE TABLE a (kid int4);\n> CREATE TABLE c (a int4, b varchar(30), c int4);\n> CREATE INDEX b_0 on b using btree ( begt datetime_ops );\n> CREATE INDEX b_1 on b using btree ( kid int4_ops );\n> CREATE INDEX a_0 on a using btree ( kid int4_ops );\n> \n> ------------------------------------------------------------------------\n> COPY b FROM stdin;\n> \\.\n> COPY a FROM stdin;\n> \\.\n> COPY c FROM stdin;\n> 1 foo 1\n> 2 foo bar 2\n> 3 \\N 3\n> 4 \\\\server\bla 4\n> \\.\n> \n> ------------------------------------------------------------------------\n> explain SELECT a.kid as foo\n> FROM a, b WHERE\n> a.kid = b.kid AND\n> ( b.kid = 23 OR\n> b.kid = 36 );\n\n\nI tried your script but I can't see nothing wrong. :)\n\nCREATE TABLE b (begt datetime, kid int4);\nCREATE\nCREATE TABLE a (kid int4);\nCREATE\nCREATE TABLE c (a int4, b varchar(30), c int4);\nCREATE\nCREATE INDEX b_0 on b using btree ( begt datetime_ops );\nCREATE\nCREATE INDEX b_1 on b using btree ( kid int4_ops );\nCREATE\nCREATE INDEX a_0 on a using btree ( kid int4_ops );\nCREATE\n\nCOPY b FROM stdin;\nCOPY a FROM stdin;\n\nCOPY c FROM stdin;\n\nselect * from c;\na|b |c\n-+---------+-\n1|foo |1\n2|foo bar |2\n3| |3\n4|\\\\servela|4\n(4 rows)\n\nexplain SELECT a.kid as foo\n FROM a, b WHERE\n a.kid = b.kid AND\n ( b.kid = 23 OR\n b.kid = 36 );\nNOTICE: QUERY PLAN:\n\nMerge Join (cost=0.00 size=1 width=8)\n -> Seq Scan (cost=0.00 size=0 width=0)\n -> Sort (cost=0.00 size=0 width=0)\n -> Seq Scan on a (cost=0.00 size=0 width=4)\n -> Seq Scan (cost=0.00 size=0 width=0)\n -> Sort (cost=0.00 size=0 width=0)\n -> Seq Scan on b (cost=0.00 size=0 width=4)\n\nEXPLAIN\n\n Jose'\n", "msg_date": "Tue, 22 Sep 1998 11:12:17 +0200", "msg_from": "\"Jose' Soares\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] current- crash" }, { "msg_contents": "> Michael Reifenberger wrote:\n> > \n> > Hi,\n> > I can easily crash the backend of current- postgres on current- FreeBSD with\n> > loading a database with test.sql and test.dmp an executing the script x.sql.\n> > Anyone else?\n> > \n> > Bye!\n> > ----\n> > Michael Reifenberger\n> > Plaut Software GmbH, R/3 Basis\n> > \n> > ------------------------------------------------------------------------\n> > CREATE TABLE b (begt datetime, kid int4);\n> > CREATE TABLE a (kid int4);\n> > CREATE TABLE c (a int4, b varchar(30), c int4);\n> > CREATE INDEX b_0 on b using btree ( begt datetime_ops );\n> > CREATE INDEX b_1 on b using btree ( kid int4_ops );\n> > CREATE INDEX a_0 on a using btree ( kid int4_ops );\n> > \n> > ------------------------------------------------------------------------\n> > COPY b FROM stdin;\n> > \\.\n> > COPY a FROM stdin;\n> > \\.\n> > COPY c FROM stdin;\n> > 1 foo 1\n> > 2 foo bar 2\n> > 3 \\N 3\n> > 4 \\\\server\bla 4\n> > \\.\n> > \n> > ------------------------------------------------------------------------\n> > explain SELECT a.kid as foo\n> > FROM a, b WHERE\n> > a.kid = b.kid AND\n> > ( b.kid = 23 OR\n> > b.kid = 36 );\n> \n> \n> I tried your script but I can't see nothing wrong. :)\n> \n> CREATE TABLE b (begt datetime, kid int4);\n> CREATE\n> CREATE TABLE a (kid int4);\n> CREATE\n> CREATE TABLE c (a int4, b varchar(30), c int4);\n> CREATE\n> CREATE INDEX b_0 on b using btree ( begt datetime_ops );\n> CREATE\n> CREATE INDEX b_1 on b using btree ( kid int4_ops );\n> CREATE\n> CREATE INDEX a_0 on a using btree ( kid int4_ops );\n> CREATE\n> \n> COPY b FROM stdin;\n> COPY a FROM stdin;\n> \n> COPY c FROM stdin;\n> \n> select * from c;\n> a|b |c\n> -+---------+-\n> 1|foo |1\n> 2|foo bar |2\n> 3| |3\n> 4|\\\\servela|4\n> (4 rows)\n> \n> explain SELECT a.kid as foo\n> FROM a, b WHERE\n> a.kid = b.kid AND\n> ( b.kid = 23 OR\n> b.kid = 36 );\n> NOTICE: QUERY PLAN:\n> \n> Merge Join (cost=0.00 size=1 width=8)\n> -> Seq Scan (cost=0.00 size=0 width=0)\n> -> Sort (cost=0.00 size=0 width=0)\n> -> Seq Scan on a (cost=0.00 size=0 width=4)\n> -> Seq Scan (cost=0.00 size=0 width=0)\n> -> Sort (cost=0.00 size=0 width=0)\n> -> Seq Scan on b (cost=0.00 size=0 width=4)\n> \n> EXPLAIN\n\nPerhaps because I fixed it two days ago.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 22 Sep 1998 15:41:00 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] current- crash" }, { "msg_contents": "On Tue, 22 Sep 1998, Bruce Momjian wrote:\n...\n> > I tried your script but I can't see nothing wrong. :)\nRight!\nThe crash is fixed.\nThanks Bruce!\nNow, shouldn't I see Index Scans below or is it a optimizer feature\nbecause the tables are too empty?\n> > Merge Join (cost=0.00 size=1 width=8)\n> > -> Seq Scan (cost=0.00 size=0 width=0)\n> > -> Sort (cost=0.00 size=0 width=0)\n> > -> Seq Scan on a (cost=0.00 size=0 width=4)\n> > -> Seq Scan (cost=0.00 size=0 width=0)\n> > -> Sort (cost=0.00 size=0 width=0)\n> > -> Seq Scan on b (cost=0.00 size=0 width=4)\n\nBye!\n----\nMichael Reifenberger\nPlaut Software GmbH, R/3 Basis\n\n", "msg_date": "Tue, 22 Sep 1998 23:23:18 +0200 (CEST)", "msg_from": "Michael Reifenberger <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] current- crash" }, { "msg_contents": "> On Tue, 22 Sep 1998, Bruce Momjian wrote:\n> ...\n> > > I tried your script but I can't see nothing wrong. :)\n> Right!\n> The crash is fixed.\n> Thanks Bruce!\n> Now, shouldn't I see Index Scans below or is it a optimizer feature\n> because the tables are too empty?\n> > > Merge Join (cost=0.00 size=1 width=8)\n> > > -> Seq Scan (cost=0.00 size=0 width=0)\n> > > -> Sort (cost=0.00 size=0 width=0)\n> > > -> Seq Scan on a (cost=0.00 size=0 width=4)\n> > > -> Seq Scan (cost=0.00 size=0 width=0)\n> > > -> Sort (cost=0.00 size=0 width=0)\n> > > -> Seq Scan on b (cost=0.00 size=0 width=4)\n\nNot sure. Joins usually don't use index scans if the table is used in\nthe outer part of the join loop because it is just quicker to sort them.\nAlso the tables must have a significant amount of data in them to use\nindexes.\n\nI am also not sure how the system handles an OR and a join on the same\ncolumn. I would think it does not use an index, but perhaps it does the\nrestriction using an index, then does the join. That is what it should\ndo. \n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 22 Sep 1998 18:00:47 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] current- crash" }, { "msg_contents": "Hi, \n\nDocuments stat that datetime type allows \"far into future.\"\nSo I did some testing.\n\ntest=> select datetime '3276900-12-01';\n?column? \n--------------------------\nTue Aug 27 00:00:00 337095\n(1 row)\n\ntest=> select '32769000-12-01'::datetime;\n?column? \n--------------------------\nThu Jan 07 00:00:00 431143\n(1 row)\n\ntest=> select '327690000-12-01'::datetime;\n?column? \n---------------------------\nSat Aug 27 00:00:00 1371616\n(1 row)\n\nI suspect this is due to the limitation of the timezone database\nin my system. Is that correct? If so, how can I know how far we\ncan go into the future using the datetime type?\n\nBTW, dt.c seems to have problem with date_part() function.\n\ntest=> select date_part('microsecond','1998/9/23 12:04:05.1234'::datetime);\ndate_part\n---------\n 123.4\n(1 row)\n\ntest=> select date_part('millisecond','1998/9/23 12:04:05.1234'::datetime);\ndate_part\n---------\n 123.4\n\nIncluded patches should fix this.\n\n*** dt.c.orig\tWed Sep 23 16:03:44 1998\n--- dt.c\tWed Sep 23 16:06:10 1998\n***************\n*** 2199,2205 ****\n \t{INVALID, RESERV, DTK_INVALID},\t\t/* \"invalid\" reserved for invalid\n \t\t\t\t\t\t\t\t\t\t * time */\n \t{\"m\", UNITS, DTK_MINUTE},\t/* \"minute\" relative time units */\n! \t{\"microsecon\", UNITS, DTK_MILLISEC},\t\t/* \"microsecond\" relative\n \t\t\t\t\t\t\t\t\t\t\t\t * time units */\n \t{\"mil\", UNITS, DTK_MILLENIUM},\t\t/* \"millenium\" relative time units */\n \t{\"mils\", UNITS, DTK_MILLENIUM},\t\t/* \"millenia\" relative time units */\n--- 2199,2205 ----\n \t{INVALID, RESERV, DTK_INVALID},\t\t/* \"invalid\" reserved for invalid\n \t\t\t\t\t\t\t\t\t\t * time */\n \t{\"m\", UNITS, DTK_MINUTE},\t/* \"minute\" relative time units */\n! \t{\"microsecon\", UNITS, DTK_MICROSEC},\t\t/* \"microsecond\" relative\n \t\t\t\t\t\t\t\t\t\t\t\t * time units */\n \t{\"mil\", UNITS, DTK_MILLENIUM},\t\t/* \"millenium\" relative time units */\n \t{\"mils\", UNITS, DTK_MILLENIUM},\t\t/* \"millenia\" relative time units */\n--\nTatsuo Ishii\[email protected]\n\n", "msg_date": "Wed, 23 Sep 1998 16:54:38 +0900", "msg_from": "[email protected] (Tatsuo Ishii)", "msg_from_op": false, "msg_subject": "datetime questions and fix to dt.c" }, { "msg_contents": "Applied.\n\n\n\n---------------------------------------------------------------------------\n\n\nDocuments stat that datetime type allows \"far into future.\"\nSo I did some testing.\n\ntest=> select datetime '3276900-12-01';\n?column? \n--------------------------\nTue Aug 27 00:00:00 337095\n(1 row)\n\ntest=> select '32769000-12-01'::datetime;\n?column? \n--------------------------\nThu Jan 07 00:00:00 431143\n(1 row)\n\ntest=> select '327690000-12-01'::datetime;\n?column? \n---------------------------\nSat Aug 27 00:00:00 1371616\n(1 row)\n\nI suspect this is due to the limitation of the timezone database\nin my system. Is that correct? If so, how can I know how far we\ncan go into the future using the datetime type?\n\nBTW, dt.c seems to have problem with date_part() function.\n\ntest=> select date_part('microsecond','1998/9/23 12:04:05.1234'::datetime);\ndate_part\n---------\n 123.4\n(1 row)\n\ntest=> select date_part('millisecond','1998/9/23 12:04:05.1234'::datetime);\ndate_part\n---------\n 123.4\n\nIncluded patches should fix this.\n\n*** dt.c.orig\tWed Sep 23 16:03:44 1998\n--- dt.c\tWed Sep 23 16:06:10 1998\n***************\n*** 2199,2205 ****\n \t{INVALID, RESERV, DTK_INVALID},\t\t/* \"invalid\" reserved for invalid\n \t\t\t\t\t\t\t\t\t\t * time */\n \t{\"m\", UNITS, DTK_MINUTE},\t/* \"minute\" relative time units */\n! \t{\"microsecon\", UNITS, DTK_MILLISEC},\t\t/* \"microsecond\" relative\n \t\t\t\t\t\t\t\t\t\t\t\t * time units */\n \t{\"mil\", UNITS, DTK_MILLENIUM},\t\t/* \"millenium\" relative time units */\n \t{\"mils\", UNITS, DTK_MILLENIUM},\t\t/* \"millenia\" relative time units */\n--- 2199,2205 ----\n \t{INVALID, RESERV, DTK_INVALID},\t\t/* \"invalid\" reserved for invalid\n \t\t\t\t\t\t\t\t\t\t * time */\n \t{\"m\", UNITS, DTK_MINUTE},\t/* \"minute\" relative time units */\n! \t{\"microsecon\", UNITS, DTK_MICROSEC},\t\t/* \"microsecond\" relative\n \t\t\t\t\t\t\t\t\t\t\t\t * time units */\n \t{\"mil\", UNITS, DTK_MILLENIUM},\t\t/* \"millenium\" relative time units */\n \t{\"mils\", UNITS, DTK_MILLENIUM},\t\t/* \"millenia\" relative time units */\n--\nTatsuo Ishii\[email protected]\n\n\n\n[Charset iso-2022-jp unsupported, skipping...]\n\n\n-- \n Bruce Momjian | [email protected]\n 830 Blythe Avenue | http://www.op.net/~candle\n Drexel Hill, Pennsylvania 19026 | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. | \n", "msg_date": "Wed, 23 Sep 1998 13:52:44 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] datetime questions and fix to dt.c" } ]
[ { "msg_contents": "Bruce Momjian <[email protected]> writes:\n> Tom Lane wrote:\n>> BTW, I bumped the package version number from 1.2 to 1.3. Is this\n>> premature? Does someone run around and do that routinely before\n>> each pgsql release?\n\n> What verison numbers? I didn't know we had any version numbers excepct\n> PG_VERSION, and I update that one\n\nThere are version numbers all over the place in the various frontend\nlibraries. The particular one I was speaking of was libpgtcl's number\nas seen by the Tcl \"package require\" command. However, we also need\na strategy for dealing with the shared library version numbering of\nlibpq, libpgtcl, and anything else that is compilable as a shared lib\n(is libpq++?). I think that the perl5 interface also has some kind of\nversion number that's seen by Perl's package version control.\n\nMaking all these numbers match PG_VERSION would probably be a loser,\nbecause they generally have semantics of their own: a shlib major\nversion number indicates whether you can expect to use it with an\nexisting application without relinking, for example. You want to bump\na shlib's version number when its API changes, not when the backend\nchanges. Therefore, each one of these libraries requires individual\nattention to the version number :-(\n\nI think that it would be a good idea to have as part of the standard\npre-release checklist (there is one, no?) an item \"what should we do\nto the version numbers of libraries a,b,c,d,...\"\n\nWhile we're on the subject, I was going to propose bumping the shlib\nversion number of libpq itself from 1.0 to 2.0 for this release,\nbecause (a) I don't think it's entirely binary compatible with the\nprevious libpq release (depends on whether people were touching the\nPGconn struct directly...) and (b) people might want to keep around both\nlibpq 1.0 and 2.0 to talk to backends of different vintages. I'm not\nsure whether any of the other frontend libs need a major version bump.\n\nComments?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 20 Sep 1998 21:46:04 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Version numbers (was Re: [PATCHES] Several libpgtcl fixes)" }, { "msg_contents": "> Bruce Momjian <[email protected]> writes:\n> > Tom Lane wrote:\n> >> BTW, I bumped the package version number from 1.2 to 1.3. Is this\n> >> premature? Does someone run around and do that routinely before\n> >> each pgsql release?\n> \n> > What verison numbers? I didn't know we had any version numbers excepct\n> > PG_VERSION, and I update that one\n> \n> There are version numbers all over the place in the various frontend\n> libraries. The particular one I was speaking of was libpgtcl's number\n> as seen by the Tcl \"package require\" command. However, we also need\n> a strategy for dealing with the shared library version numbering of\n> libpq, libpgtcl, and anything else that is compilable as a shared lib\n> (is libpq++?). I think that the perl5 interface also has some kind of\n> version number that's seen by Perl's package version control.\n> \n> Making all these numbers match PG_VERSION would probably be a loser,\n> because they generally have semantics of their own: a shlib major\n> version number indicates whether you can expect to use it with an\n> existing application without relinking, for example. You want to bump\n> a shlib's version number when its API changes, not when the backend\n> changes. Therefore, each one of these libraries requires individual\n> attention to the version number :-(\n> \n> I think that it would be a good idea to have as part of the standard\n> pre-release checklist (there is one, no?) an item \"what should we do\n> to the version numbers of libraries a,b,c,d,...\"\n\npgsql/src/tools/RELEASE_CHANGES is the file that shows the changes\nrequired.\n\n> While we're on the subject, I was going to propose bumping the shlib\n> version number of libpq itself from 1.0 to 2.0 for this release,\n> because (a) I don't think it's entirely binary compatible with the\n> previous libpq release (depends on whether people were touching the\n> PGconn struct directly...) and (b) people might want to keep around both\n> libpq 1.0 and 2.0 to talk to backends of different vintages. I'm not\n> sure whether any of the other frontend libs need a major version bump.\n\nNot sure how to handle these.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Sun, 20 Sep 1998 23:25:43 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Version numbers (was Re: [PATCHES] Several libpgtcl\n\tfixes)" }, { "msg_contents": "On Sun, 20 Sep 1998, Tom Lane wrote:\n\n> Bruce Momjian <[email protected]> writes:\n> > Tom Lane wrote:\n> >> BTW, I bumped the package version number from 1.2 to 1.3. Is this\n> >> premature? Does someone run around and do that routinely before\n> >> each pgsql release?\n> \n> > What verison numbers? I didn't know we had any version numbers excepct\n> > PG_VERSION, and I update that one\n> \n> There are version numbers all over the place in the various frontend\n> libraries. The particular one I was speaking of was libpgtcl's number\n> as seen by the Tcl \"package require\" command. However, we also need\n> a strategy for dealing with the shared library version numbering of\n> libpq, libpgtcl, and anything else that is compilable as a shared lib\n> (is libpq++?). I think that the perl5 interface also has some kind of\n> version number that's seen by Perl's package version control.\n> \n> Making all these numbers match PG_VERSION would probably be a loser,\n> because they generally have semantics of their own: a shlib major\n> version number indicates whether you can expect to use it with an\n> existing application without relinking, for example. You want to bump\n> a shlib's version number when its API changes, not when the backend\n> changes. Therefore, each one of these libraries requires individual\n> attention to the version number :-(\n> \n> I think that it would be a good idea to have as part of the standard\n> pre-release checklist (there is one, no?) an item \"what should we do\n> to the version numbers of libraries a,b,c,d,...\"\n> \n> While we're on the subject, I was going to propose bumping the shlib\n> version number of libpq itself from 1.0 to 2.0 for this release,\n> because (a) I don't think it's entirely binary compatible with the\n> previous libpq release (depends on whether people were touching the\n> PGconn struct directly...) and (b) people might want to keep around both\n> libpq 1.0 and 2.0 to talk to backends of different vintages. I'm not\n> sure whether any of the other frontend libs need a major version bump.\n> \n> Comments?\n\n\tI have a c) ... wouldn't up'ng the shlib major/minor numbers at\nrelease time serve to eliminate that \"bug\" about 'Heap tuple is not \\9'\n(or however that error went?)...?\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 21 Sep 1998 03:04:45 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Version numbers (was Re: [PATCHES] Several libpgtcl\n\tfixes)" } ]
[ { "msg_contents": "Possible additions\n------------------\ncidr/IP address type(Tom Helbekkmo)\nrewrite system(Jan)\nforeign key?(Vadim)\n\nSerious Bugs\n------------\nchange pg args for platforms that don't support argv changes\n\t(setproctitle()?, sendmail hack?)\npg_user dumps core on some platforms\nhave psql dump out rules text with new function\nman pages/sgml synchronization\ngenerate html/postscript documentation\ngenerate postmaster pid file and remove flock/fcntl lock code\nregproc dumps name_oid, which fails on CREATE TYPE\nCREATE TABLE test (x text, s serial) fails if no database creation permission\nSELECT * FROM pg_rules WHERE pg_rules.oid = pg_class.oid crashes\nhandle oid's on views by either disallowing it or meaningful results\ncertain AND/OR WHERE clauses crash backend\nselect not bool_field from t1 crashes\nCREATE TABLE bar (id serial, name varchar(32)) fails\n\nNew Bugs\n--------\ncnf-ify still can exhaust memory, make SET KSQO more generic\npermissions on indexes: what do they do? should it be prevented?\nremove PARSEDEBUG defines if not longer needed\nlow level locking - work-in-progress for 6.5\nimprove reporting of syntax errors by showing location of error in query\nuse index with constants on functions\nallow chaining of pages to allow >8k tuples\nallow multiple generic operators in expressions without the use of parentheses\ndocument/trigger/rule so changes to pg_shadow create pg_pwd\nlarge objects orphanage\nimprove group handling\nno min/max for oid type\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Sun, 20 Sep 1998 22:28:14 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Open 6.4 Items" }, { "msg_contents": "> Bruce Momjian wrote:\n> > allow chaining of pages to allow >8k tuples\n> \n> How transparent is this going to be? Am I going to need to specify that a\n> table needs to be 'chainable', or is it just going to do it when I create\n> tables that can have records containing >8k of data? I have several databases\n> that I would like to move over to a postgres backend from 4th Dimension, but\n> many tables have the potential of creating tuples greater than 8k.\n> \n> Thanks,\n> Nick\n> \n\nAutomatically. We have had no one offer to do it, yet.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 22 Sep 1998 22:32:54 -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> allow chaining of pages to allow >8k tuples\n\nHow transparent is this going to be? Am I going to need to specify that a\ntable needs to be 'chainable', or is it just going to do it when I create\ntables that can have records containing >8k of data? I have several databases\nthat I would like to move over to a postgres backend from 4th Dimension, but\nmany tables have the potential of creating tuples greater than 8k.\n\nThanks,\nNick\n", "msg_date": "Tue, 22 Sep 1998 22:23:04 -0600", "msg_from": "Nick Bastin <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 Items" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> > Bruce Momjian wrote:\n> > > allow chaining of pages to allow >8k tuples\n> >\n> > How transparent is this going to be? Am I going to need to specify that a\n> > table needs to be 'chainable', or is it just going to do it when I create\n> > tables that can have records containing >8k of data? I have several databases\n> > that I would like to move over to a postgres backend from 4th Dimension, but\n> > many tables have the potential of creating tuples greater than 8k.\n> >\n> > Thanks,\n> > Nick\n> >\n> \n> Automatically. We have had no one offer to do it, yet.\n\nAhh, well...bummer, then.. ;-)\n\nNick\n", "msg_date": "Tue, 22 Sep 1998 23:08:14 -0600", "msg_from": "Nick Bastin <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 6.4 Items" } ]
[ { "msg_contents": "Bruce,\n\nafter sending you email I made an experiment to verify if locale\nsettings effect to failures of some regression tests.\nI did a clean recompilation of latest cvs with --enable-locale option.\nFirst time I run regression test strictly follow instructions in\nINSTALL document. Almost all tests run ok except geometry and random.\nSecond time I start postmster as I usually run on production machine - \ni.e. I specified LC_CTYPE and LC_COLLATE env. variables ( koi8-r).\nAgain geometry fails but random ok (strange) and \nselect_implicit .. failed\nselect_having .. failed\nselect_views .. failed\n\nSo, certainly something either in locale code or in my system locale is broken.\nBut as far as I remember there were no problem with 6.3.2 and there is\nnothing locale specific ( I mean national characters) in regression test.\nSo, most probable there is a bug in a code. \nDifferences are only in the order of rows returned from query,\nfor example:\ndv:~/cvs/pgsql/src/test/regress/results$ diff select_having.out ../expected/select_having.out \n33d32\n< bbbb | 5\n34a34\n> bbbb | 5\nI run all these tests on regular Linux box, nothing bleeding edge - \nLinux dv 2.0.34 #7 Wed Aug 26 14:05:30 MSD 1998 i586 unknown\nKernel modules found\nGnu C 2.7.2.3\nBinutils 2.8.1.0.23\nLinux C Library 5.4.44\nDynamic Linker (ld.so) 1.9.7\nLinux C++ Library 27.2.8\nProcps 1.2.6\nProcinfo 12\nMount 2.7l\nNet-tools 1.432.\nKbd 0.94\nSh-utils 1.16\n\n\nIt would be great if other linux users could verify my results.\n\n\tBest regards,\n\n\t\tOleg\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\n\n", "msg_date": "Mon, 21 Sep 1998 06:33:17 +0400 (MSK DST)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] query crashes backend - cvs (fwd)" } ]
[ { "msg_contents": "\\df command of psql crashes the backend.\n\n(\\df generates following query)\n\nSELECT t.typname as result, p.proname as function,\nsubstr(oid8types(p.proargtypes),1,14) as arguments,\nsubstr(obj_description(p.oid),1,34) as description FROM pg_proc p,\npg_type t WHERE p.prorettype = t.oid and (pronargs = 0 or\noid8types(p.proargtypes) != '') ORDER BY result, function, arguments;\n\nHere is the backtrace info.\n\nProgram received signal SIGSEGV, Segmentation fault.\n0xc76a7 in oid8types (oidArray=0x1bec94) at regproc.c:234\n234\t\t\tif (*sp != InvalidOid)\n(gdb) where\n#0 0xc76a7 in oid8types (oidArray=0x1bec94) at regproc.c:234\n#1 0xd3129 in fmgr_c (finfo=0x351198, values=0xefbfb12c, isNull=0xefbfb1cb \"\")\n at fmgr.c:104\n#2 0x3b56a in ExecMakeFunctionResult (node=0x2c5050, arguments=0x2c4250, \n econtext=0x2cb090, isNull=0xefbfb1cb \"\", isDone=0xefbfb1ff \"\\001P?,\")\n at execQual.c:827\n#3 0x3b607 in ExecEvalFunc (funcClause=0x2c5010, econtext=0x2cb090, \n isNull=0xefbfb1cb \"\", isDone=0xefbfb1ff \"\\001P?,\") at execQual.c:933\n#4 0x3b8c9 in ExecEvalExpr (expression=0x2c5010, econtext=0x2cb090, \n isNull=0xefbfb1cb \"\", isDone=0xefbfb1ff \"\\001P?,\") at execQual.c:1222\n#5 0x3b324 in ExecEvalFuncArgs (fcache=0x351010, econtext=0x2cb090, \n argList=0x2c4270, argV=0xefbfb200, argIsDone=0xefbfb1ff \"\\001P?,\")\n at execQual.c:631\n#6 0x3b416 in ExecMakeFunctionResult (node=0x2c3fd0, arguments=0x2c4270, \n econtext=0x2cb090, isNull=0xefbfb2d7 \"\", \n isDone=0xefbfb24f \"\\001p\u001b$B2?o8\u001b(B8\\003\") at execQual.c:714\n#7 0x3b5ba in ExecEvalOper (opClause=0x2c3f90, econtext=0x2cb090, \n isNull=0xefbfb2d7 \"\") at execQual.c:889\n#8 0x3b8b8 in ExecEvalExpr (expression=0x2c3f90, econtext=0x2cb090, \n isNull=0xefbfb2d7 \"\", isDone=0xefbfb29b \"\\001\u001b$B<2?oX8\u001b(B\\003\")\n at execQual.c:1219\n#9 0x3b68f in ExecEvalOr (orExpr=0x2c3e50, econtext=0x2cb090, \n isNull=0xefbfb2d7 \"\") at execQual.c:1024\n#10 0x3b8d8 in ExecEvalExpr (expression=0x2c3e50, econtext=0x2cb090, \n isNull=0xefbfb2d7 \"\", isDone=0xefbfb2d6 \"\\001\") at execQual.c:1225\n#11 0x3b96f in ExecQualClause (clause=0x2c3e50, econtext=0x2cb090)\n at execQual.c:1281\n#12 0x3b9ae in ExecQual (qual=0x2c9af0, econtext=0x2cb090) at execQual.c:1347\n#13 0x3bd4e in ExecScan (node=0x2c7510, accessMtd=0x41a30 <SeqNext>)\n at execScan.c:142\n#14 0x41b0b in ExecSeqScan (node=0x2c7510) at nodeSeqscan.c:130\n#15 0x3a186 in ExecProcNode (node=0x2c7510, parent=0x2c7690)\n at execProcnode.c:267\n#16 0x3fa93 in ExecHashJoinOuterGetTuple (node=0x2c7510, parent=0x2c7690, \n hjstate=0x2c7890) at nodeHashjoin.c:582\n#17 0x3f650 in ExecHashJoin (node=0x2c7690) at nodeHashjoin.c:208\n#18 0x3a226 in ExecProcNode (node=0x2c7690, parent=0x2c7710)\n at execProcnode.c:315\n#19 0xd7d61 in createfirstrun (node=0x2c7710) at psort.c:402\n#20 0xd7b38 in initialrun (node=0x2c7710) at psort.c:293\n#21 0xd79dc in psort_begin (node=0x2c7710, nkeys=3, key=0x2c7f10)\n at psort.c:155\n#22 0x41e49 in ExecSort (node=0x2c7710) at nodeSort.c:156\n#23 0x3a1d6 in ExecProcNode (node=0x2c7710, parent=0x2c7710)\n at execProcnode.c:295\n#24 0x39774 in ExecutePlan (estate=0x2c7790, plan=0x2c7710, \n parseTree=0x288790, operation=CMD_SELECT, numberTuples=0, \n direction=ForwardScanDirection, printfunc=0x36b0 <debugtup>)\n at execMain.c:734\n#25 0x39181 in ExecutorRun (queryDesc=0x2ca350, estate=0x2c7790, feature=3, \n count=0) at execMain.c:232\n#26 0xa890b in ProcessQueryDesc (queryDesc=0x2ca350) at pquery.c:333\n#27 0xa8976 in ProcessQuery (parsetree=0x288790, plan=0x2c7710, dest=Debug)\n at pquery.c:376\n#28 0xa68ee in pg_exec_query_dest (\n query_string=0xefbfb5c0 \"SELECT t.typname as result, p.proname as function, substr(oid8types(p.proargtypes),1,14) as arguments, substr(obj_description(p.oid),1,34) as description FROM pg_proc p, pg_type t WHERE p.prorettype =\"..., \n dest=Debug, aclOverride=0) at postgres.c:798\n#29 0xa6784 in pg_exec_query (\n query_string=0xefbfb5c0 \"SELECT t.typname as result, p.proname as function, substr(oid8types(p.proargtypes),1,14) as arguments, substr(obj_description(p.oid),1,34) as description FROM pg_proc p, pg_type t WHERE p.prorettype =\"...)\n at postgres.c:697\n#30 0xa8128 in PostgresMain (argc=4, argv=0xefbfd60c, real_argc=4, \n real_argv=0xefbfd60c) at postgres.c:1611\n#31 0x4c96c in main (argc=4, argv=0xefbfd60c) at main.c:103\n(gdb) \n--\nTatsuo Ishii\[email protected]\n", "msg_date": "Mon, 21 Sep 1998 12:31:53 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": true, "msg_subject": "yet another query to crash the backend" }, { "msg_contents": "> \\df command of psql crashes the backend.\n> \n> (\\df generates following query)\n> \n> SELECT t.typname as result, p.proname as function,\n> substr(oid8types(p.proargtypes),1,14) as arguments,\n> substr(obj_description(p.oid),1,34) as description FROM pg_proc p,\n> pg_type t WHERE p.prorettype = t.oid and (pronargs = 0 or\n> oid8types(p.proargtypes) != '') ORDER BY result, function, arguments;\n\nIs this on an empty database. I think this was fixed last week. Are\nyou seeing this with current sources?\n\n> \n> Here is the backtrace info.\n> \n> Program received signal SIGSEGV, Segmentation fault.\n> 0xc76a7 in oid8types (oidArray=0x1bec94) at regproc.c:234\n> 234\t\t\tif (*sp != InvalidOid)\n> (gdb) where\n> #0 0xc76a7 in oid8types (oidArray=0x1bec94) at regproc.c:234\n> #1 0xd3129 in fmgr_c (finfo=0x351198, values=0xefbfb12c, isNull=0xefbfb1cb \"\")\n> at fmgr.c:104\n> #2 0x3b56a in ExecMakeFunctionResult (node=0x2c5050, arguments=0x2c4250, \n> econtext=0x2cb090, isNull=0xefbfb1cb \"\", isDone=0xefbfb1ff \"\\001P?,\")\n> at execQual.c:827\n> #3 0x3b607 in ExecEvalFunc (funcClause=0x2c5010, econtext=0x2cb090, \n> isNull=0xefbfb1cb \"\", isDone=0xefbfb1ff \"\\001P?,\") at execQual.c:933\n> #4 0x3b8c9 in ExecEvalExpr (expression=0x2c5010, econtext=0x2cb090, \n> isNull=0xefbfb1cb \"\", isDone=0xefbfb1ff \"\\001P?,\") at execQual.c:1222\n> #5 0x3b324 in ExecEvalFuncArgs (fcache=0x351010, econtext=0x2cb090, \n> argList=0x2c4270, argV=0xefbfb200, argIsDone=0xefbfb1ff \"\\001P?,\")\n> at execQual.c:631\n> #6 0x3b416 in ExecMakeFunctionResult (node=0x2c3fd0, arguments=0x2c4270, \n> econtext=0x2cb090, isNull=0xefbfb2d7 \"\", \n> isDone=0xefbfb24f \"\\001p\u001b$B2?o8\u001b(B8\\003\") at execQual.c:714\n> #7 0x3b5ba in ExecEvalOper (opClause=0x2c3f90, econtext=0x2cb090, \n> isNull=0xefbfb2d7 \"\") at execQual.c:889\n> #8 0x3b8b8 in ExecEvalExpr (expression=0x2c3f90, econtext=0x2cb090, \n> isNull=0xefbfb2d7 \"\", isDone=0xefbfb29b \"\\001\u001b$B<2?oX8\u001b(B\\003\")\n> at execQual.c:1219\n> #9 0x3b68f in ExecEvalOr (orExpr=0x2c3e50, econtext=0x2cb090, \n> isNull=0xefbfb2d7 \"\") at execQual.c:1024\n> #10 0x3b8d8 in ExecEvalExpr (expression=0x2c3e50, econtext=0x2cb090, \n> isNull=0xefbfb2d7 \"\", isDone=0xefbfb2d6 \"\\001\") at execQual.c:1225\n> #11 0x3b96f in ExecQualClause (clause=0x2c3e50, econtext=0x2cb090)\n> at execQual.c:1281\n> #12 0x3b9ae in ExecQual (qual=0x2c9af0, econtext=0x2cb090) at execQual.c:1347\n> #13 0x3bd4e in ExecScan (node=0x2c7510, accessMtd=0x41a30 <SeqNext>)\n> at execScan.c:142\n> #14 0x41b0b in ExecSeqScan (node=0x2c7510) at nodeSeqscan.c:130\n> #15 0x3a186 in ExecProcNode (node=0x2c7510, parent=0x2c7690)\n> at execProcnode.c:267\n> #16 0x3fa93 in ExecHashJoinOuterGetTuple (node=0x2c7510, parent=0x2c7690, \n> hjstate=0x2c7890) at nodeHashjoin.c:582\n> #17 0x3f650 in ExecHashJoin (node=0x2c7690) at nodeHashjoin.c:208\n> #18 0x3a226 in ExecProcNode (node=0x2c7690, parent=0x2c7710)\n> at execProcnode.c:315\n> #19 0xd7d61 in createfirstrun (node=0x2c7710) at psort.c:402\n> #20 0xd7b38 in initialrun (node=0x2c7710) at psort.c:293\n> #21 0xd79dc in psort_begin (node=0x2c7710, nkeys=3, key=0x2c7f10)\n> at psort.c:155\n> #22 0x41e49 in ExecSort (node=0x2c7710) at nodeSort.c:156\n> #23 0x3a1d6 in ExecProcNode (node=0x2c7710, parent=0x2c7710)\n> at execProcnode.c:295\n> #24 0x39774 in ExecutePlan (estate=0x2c7790, plan=0x2c7710, \n> parseTree=0x288790, operation=CMD_SELECT, numberTuples=0, \n> direction=ForwardScanDirection, printfunc=0x36b0 <debugtup>)\n> at execMain.c:734\n> #25 0x39181 in ExecutorRun (queryDesc=0x2ca350, estate=0x2c7790, feature=3, \n> count=0) at execMain.c:232\n> #26 0xa890b in ProcessQueryDesc (queryDesc=0x2ca350) at pquery.c:333\n> #27 0xa8976 in ProcessQuery (parsetree=0x288790, plan=0x2c7710, dest=Debug)\n> at pquery.c:376\n> #28 0xa68ee in pg_exec_query_dest (\n> query_string=0xefbfb5c0 \"SELECT t.typname as result, p.proname as function, substr(oid8types(p.proargtypes),1,14) as arguments, substr(obj_description(p.oid),1,34) as description FROM pg_proc p, pg_type t WHERE p.prorettype =\"..., \n> dest=Debug, aclOverride=0) at postgres.c:798\n> #29 0xa6784 in pg_exec_query (\n> query_string=0xefbfb5c0 \"SELECT t.typname as result, p.proname as function, substr(oid8types(p.proargtypes),1,14) as arguments, substr(obj_description(p.oid),1,34) as description FROM pg_proc p, pg_type t WHERE p.prorettype =\"...)\n> at postgres.c:697\n> #30 0xa8128 in PostgresMain (argc=4, argv=0xefbfd60c, real_argc=4, \n> real_argv=0xefbfd60c) at postgres.c:1611\n> #31 0x4c96c in main (argc=4, argv=0xefbfd60c) at main.c:103\n> (gdb) \n> --\n> Tatsuo Ishii\n> [email protected]\n> \n> \n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Mon, 21 Sep 1998 00:09:44 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] yet another query to crash the backend" }, { "msg_contents": ">> \\df command of psql crashes the backend.\n>>=20\n>> (\\df generates following query)\n>>=20\n>> SELECT t.typname as result, p.proname as function,\n>> substr(oid8types(p.proargtypes),1,14) as arguments,\n>> substr(obj_description(p.oid),1,34) as description FROM pg_proc p,\n>> pg_type t WHERE p.prorettype =3D t.oid and (pronargs =3D 0 or\n>> oid8types(p.proargtypes) !=3D '') ORDER BY result, function, arguments;\n>\n>Is this on an empty database. I think this was fixed last week. Are\n>you seeing this with current sources?\n\nNo, this is BETA1. I will check current source.\n--\nTatsuo Ishii\[email protected]\n", "msg_date": "Mon, 21 Sep 1998 13:31:02 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] yet another query to crash the backend " } ]
[ { "msg_contents": "I don't know if this is the correct place to post\nthis message or if the bug in question has already\nbeen fixed but the following query crashed the \nbackend. Note however, that when there is only one\nconstant in the IN () list, the query works:\n\nflock error for /tmp/.s.PGSQL.5432\ndebug info:\n\tUser = mmsadmin\n\tRemoteHost = localhost\n\tRemotePort = 0\n\tDatabaseName = mms\n\tVerbose = 5\n\tNoversion = f\n\ttimings = f\n\tdates = Normal\n\tbufsize = 64\n\tsortmem = 512\n\tquery echo = f\nInitPostgres\nStartTransactionCommand\nquery: SELECT employees.lastname, employees.firstname, employees.email, \nemployees.phoneno, employees.department, employees.title,\nemployees.employee FROM employees, engineers WHERE employees.employee = \nengineers.employee AND engineers.costcntr IN ('63100','60100');\nparser outputs:\n{ QUERY \n :command 1 \n :utility <> \n :resultRelation 0 \n :into <> \n :isPortal false \n :isBinary false \n :unionall false \n :unique <> \n :sortClause <> \n :rtable (\n { RTE \n :relname employees \n :refname employees \n :relid 315967 \n :inh false \n :inFromCl true \n :skipAcl false\n }\n \n { RTE \n :relname engineers \n :refname engineers \n :relid 316336 \n :inh false \n :inFromCl true \n :skipAcl false\n }\n )\n \n :targetlist (\n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 1 \n :restype 1043 \n :restypmod 24 \n :resname \"lastname\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 2 \n :vartype 1043 \n :vartypmod 24 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 2 \n }\n }\n \n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 2 \n :restype 1043 \n :restypmod 20 \n :resname \"firstname\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 3 \n :vartype 1043 \n :vartypmod 20 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 3 \n }\n }\n \n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 3 \n :restype 1043 \n :restypmod 54 \n :resname \"email\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 5 \n :vartype 1043 \n :vartypmod 54 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 5 \n }\n }\n \n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 4 \n :restype 1043 \n :restypmod 20 \n :resname \"phoneno\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 6 \n :vartype 1043 \n :vartypmod 20 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 6 \n }\n }\n \n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 5 \n :restype 1043 \n :restypmod 36 \n :resname \"department\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 7 \n :vartype 1043 \n :vartypmod 36 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 7 \n }\n }\n \n postmaster: reaping dead processes...\npostmaster: CleanupProc: pid 2769 exited with status 139\npostmaster: CleanupProc: reinitializing shared memory and semaphores\nbinding ShmemCreate(key=52e325, size=831176)\nnk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 8 \n :vartype 1043 \n :vartypmod 36 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 8 \n }\n }\n \n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 7 \n :restype 1043 \n :restypmod 14 \n :resname \"employee\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 1 \n :vartype 1043 \n :vartypmod 14 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 1 \n }\n }\n )\n \n :qual \n { EXPR \n :typeOid 16 \n :opType and \n :oper <> \n :args (\n { EXPR \n :typeOid 16 \n :opType op \n :oper \n { OPER \n :opno 1062 \n :opid 0 \n :opresulttype 16 \n }\n \n :args (\n { VAR \n :varno 1 \n :varattno 1 \n :vartype 1043 \n :vartypmod 14 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 1 \n }\n \n { VAR \n :varno 2 \n :varattno 1 \n :vartype 1043 \n :vartypmod 14 \n :varlevelsup 0 \n :varnoold 2 \n :varoattno 1 \n }\n )\n }\n \n { EXPR \n :typeOid 16 \n :opType or \n :oper <> \n :args (\n { EXPR \n :typeOid 16 \n :opType op \n :oper \n { OPER \n :opno 1062 \n :opid 0 \n :opresulttype 16 \n }\n \n :args (\n { VAR \n :varno 2 \n :varattno 2 \n :vartype 1043 \n :vartypmod 9 \n :varlevelsup 0 \n :varnoold 2 \n :varoattno 2 \n }\n \n { CONST \n :consttype 1043 \n :constlen -1 \n :constisnull false \n :constvalue 9 [ 9 0 0 0 54 51 49 48 48 ] \n :constbyval true\n }\n )\n }\n \n { EXPR \n :typeOid 16 \n :opType op \n :oper \n { OPER \n :opno 1062 \n :opid 0 \n :opresulttype 16 \n }\n \n :args (\n { VAR \n :varno 2 \n :varattno 2 \n :vartype 1043 \n :vartypmod 9 \n :varlevelsup 0 \n :varnoold 2 \n :varoattno 2 \n }\n \n { CONST \n :consttype 1043 \n :constlen -1 \n :constisnull false \n :constvalue 9 [ 9 0 0 0 54 48 49 48 48 ] \n :constbyval true\n }\n )\n }\n )\n }\n )\n }\n \n :groupClause <> \n :havingQual <> \n :hasAggs false \n :hasSubLinks false \n :unionClause <>\n }\nafter rewriting:\n{ QUERY \n :command 1 \n :utility <> \n :resultRelation 0 \n :into <> \n :isPortal false \n :isBinary false \n :unionall false \n :unique <> \n :sortClause <> \n :rtable (\n { RTE \n :relname employees \n :refname employees \n :relid 315967 \n :inh false \n :inFromCl true \n :skipAcl false\n }\n \n { RTE \n :relname engineers \n :refname engineers \n :relid 316336 \n :inh false \n :inFromCl true \n :skipAcl false\n }\n )\n \n :targetlist (\n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 1 \n :restype 1043 \n :restypmod 24 \n :resname \"lastname\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 2 \n :vartype 1043 \n :vartypmod 24 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 2 \n }\n }\n \n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 2 \n :restype 1043 \n :restypmod 20 \n :resname \"firstname\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 3 \n :vartype 1043 \n :vartypmod 20 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 3 \n }\n }\n \n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 3 \n :restype 1043 \n :restypmod 54 \n :resname \"email\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 5 \n :vartype 1043 \n :vartypmod 54 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 5 \n }\n }\n \n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 4 \n :restype 1043 \n :restypmod 20 \n :resname \"phoneno\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 6 \n :vartype 1043 \n :vartypmod 20 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 6 \n }\n }\n \n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 5 \n :restype 1043 \n :restypmod 36 \n :resname \"department\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 7 \n :vartype 1043 \n :vartypmod 36 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 7 \n }\n }\n \n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 6 \n :restype 1043 \n :restypmod 36 \n :resname \"title\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 8 \n :vartype 1043 \n :vartypmod 36 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 8 \n }\n }\n \n { TARGETENTRY \n :resdom \n { RESDOM \n :resno 7 \n :restype 1043 \n :restypmod 14 \n :resname \"employee\" \n :reskey 0 \n :reskeyop 0 \n :resjunk 0 \n }\n \n :expr \n { VAR \n :varno 1 \n :varattno 1 \n :vartype 1043 \n :vartypmod 14 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 1 \n }\n }\n )\n \n :qual \n { EXPR \n :typeOid 16 \n :opType and \n :oper <> \n :args (\n { EXPR \n :typeOid 16 \n :opType op \n :oper \n { OPER \n :opno 1062 \n :opid 0 \n :opresulttype 16 \n }\n \n :args (\n { VAR \n :varno 1 \n :varattno 1 \n :vartype 1043 \n :vartypmod 14 \n :varlevelsup 0 \n :varnoold 1 \n :varoattno 1 \n }\n \n { VAR \n :varno 2 \n :varattno 1 \n :vartype 1043 \n :vartypmod 14 \n :varlevelsup 0 \n :varnoold 2 \n :varoattno 1 \n }\n )\n }\n \n { EXPR \n :typeOid 16 \n :opType or \n :oper <> \n :args (\n { EXPR \n :typeOid 16 \n :opType op \n :oper \n { OPER \n :opno 1062 \n :opid 0 \n :opresulttype 16 \n }\n \n :args (\n { VAR \n :varno 2 \n :varattno 2 \n :vartype 1043 \n :vartypmod 9 \n :varlevelsup 0 \n :varnoold 2 \n :varoattno 2 \n }\n \n { CONST \n :consttype 1043 \n :constlen -1 \n :constisnull false \n :constvalue 9 [ 9 0 0 0 54 51 49 48 48 ] \n :constbyval false\n }\n )\n }\n \n { EXPR \n :typeOid 16 \n :opType op \n :oper \n { OPER \n :opno 1062 \n :opid 0 \n :opresulttype 16 \n }\n \n :args (\n { VAR \n :varno 2 \n :varattno 2 \n :vartype 1043 \n :vartypmod 9 \n :varlevelsup 0 \n :varnoold 2 \n :varoattno 2 \n }\n \n { CONST \n :consttype 1043 \n :constlen -1 \n :constisnull false \n :constvalue 9 [ 9 0 0 0 54 48 49 48 48 ] \n :constbyval false\n }\n )\n }\n )\n }\n )\n }\n \n :groupClause <> \n :havingQual <> \n :hasAggs false \n :hasSubLinks false \n :unionClause <>\n }\nshmem_exit(0) [#0]\npmdie 2\nproc_exit(0) [#0]\nshmem_exit(0) [#0]\nexit(0)\n \nAgain, if the same query is issued, but there is only\nonce constact in the IN () list, i.e.:\n\nSELECT employees.lastname, employees.firstname, employees.email, \nemployees.phoneno, employees.department, employees.title,\nemployees.employee FROM employees, engineers WHERE employees.employee = \nengineers.employee AND engineers.costcntr IN ('63100');\n\nthe backend succeeds without a problem.\n\nThe table definitions are as follows:\n\nTable = employees\n+----------------------------------+----------------------------------+-------+\n| Field | Type \n| Length|\n+----------------------------------+----------------------------------+-------+\n| employee | varchar() not null \n| 10 |\n| lastname | varchar() not null \n| 20 |\n| firstname | varchar() not null \n| 16 |\n| reportsto | varchar() not null \n| 10 |\n| email | varchar() not null \n| 50 |\n| phoneno | varchar() not null \n| 16 |\n| department | varchar() not null \n| 32 |\n| title | varchar() not null \n| 32 |\n+----------------------------------+----------------------------------+-------+\nIndex: k_employees\n\n\nTable = engineers\n+----------------------------------+----------------------------------+-------+\n| Field | Type \n| Length|\n+----------------------------------+----------------------------------+-------+\n| employee | varchar() not null \n| 10 |\n| costcntr | varchar() not null \n| 5 |\n+----------------------------------+----------------------------------+-------+\nIndex: k_engineers \n\n\nThe backend is the Beta1 release of 6.4 running on \nLinux slackware 2.0.35 with gcc 2.7.2.2 on a Pentium\n200 Mhz, 32M RAM, and the following libraries:\n\nldconfig: version 1.9.5\n/usr/local/lib:\n/usr/X11R6/lib:\n\tlibXtst.so.6 => libXtst.so.6.1\n\tlibXt.so.6 => libXt.so.6.0\n\tlibXp.so.6 => libXp.so.6.2\n\tlibXmu.so.6 => libXmu.so.6.0\n\tlibXi.so.6 => libXi.so.6.0\n\tlibXext.so.6 => libXext.so.6.3\n\tlibXaw.so.6 => libXaw.so.6.1\n\tlibXIE.so.6 => libXIE.so.6.0\n\tlibX11.so.6 => libX11.so.6.1\n\tlibSM.so.6 => libSM.so.6.0\n\tlibPEX5.so.6 => libPEX5.so.6.0\n\tlibICE.so.6 => libICE.so.6.3\n\tlibXpm.so.4 => libXpm.so.4.3\n/usr/i486-linuxaout/lib:\n\tlibPEX5.so.6 => libPEX5.so.6.0\n\tlibXpm.so.4 => libXpm.so.4.3\n\tlibXt.so.6 => libXt.so.6.0\n\tlibXaw.so.6 => libXaw.so.6.0\n\tlibXIE.so.6 => libXIE.so.6.0\n\tlibX11.so.6 => libX11.so.6.0\n\tlibXt.so.3 => libXt.so.3.1.0\n\tlibXaw.so.3 => libXaw.so.3.1.0\n\tlibX11.so.3 => libX11.so.3.1.0\n\tlibdb.so.1 => libdb.so.1.85.1\n\tlibvga.so.1 => libvga.so.1.2.9\n/usr/openwin/lib:\n\tlibsspkg.so.1 => libsspkg.so.1.0.0\n\tlibxview.so.3 => libxview.so.3.2.2\n\tlibolgx.so.3 => libolgx.so.3.2.2\n/usr/local/pgsql/lib:\n\tlibpq++.so.1 => libpq++.so.1\n\tlibecpg.so.2 => libecpg.so.2.6.1\n\tlibpq.so.1 => libpq.so.1\n/usr/lib:\n\tlibforms.so.0.88 => libforms.so.0.88\n\tlibz.so.1 => libz.so.1.0.2\n\tlibtiff.so.3 => libtiff.so.3.4.33\n\tlibrle.so.1 => librle.so.1.0.0\n\tlibppm.so.1 => libppm.so.1.0.0\n\tlibpnm.so.1 => libpnm.so.1.0.0\n\tlibpng.so.1 => libpng.so.1.0.89\n\tlibpgm.so.1 => libpgm.so.1.0.0\n\tlibpbm.so.1 => libpbm.so.1.0.0\n\tlibjpeg.so.6 => libjpeg.so.6.0.1\n\tlibfbm.so.1 => libfbm.so.1.0.0\n\tlibtkx.so.1 => libtkx.so.1.4.1\n\tlibtclx.so.1 => libtclx.so.1.7.5\n\tlibtk.so.1 => libtk.so.1.4.1\n\tlibtcl.so.1 => libtcl.so.1.7.5\n\tlibform.so.3.0 => libform.so.3.0.0\n\tlibmenu.so.3.0 => libmenu.so.3.0.0\n\tlibpanel.so.3.0 => libpanel.so.3.0.0\n\tlibbfd.so.2.8.1.0.1 => libbfd.so.2.8.1.0.1\n\tlibopcodes.so.2.8.1.0.1 => libopcodes.so.2.8.1.0.1\n\tlibgpm.so.1 => libgpm.so.1.10\n\tlibdb.so.1 => libdb.so.1.85.4\n\tlibgdbm.so.2 => libgdbm.so.2.0.0\n\tlibdb.so.2 => libdb.so.2.0.0\n\tlibg++.so.27 => libg++.so.27.2.1\n\tlibstdc++.so.27 => libstdc++.so.27.2.1\n\tlibvgagl.so.1 => libvgagl.so.1.2.10\n\tlibvga.so.1 => libvga.so.1.2.10\n/lib:\n\tlibncp.so.1 => libncp.so.1.0\n\tlibdl.so.1 => libdl.so.1.9.5\n\tld-linux.so.1 => ld-linux.so.1.9.5\n\tlibtermcap.so.2 => libtermcap.so.2.0.8\n\tlibm.so.5 => libm.so.5.0.9\n\tlibgdbm.so.1 => libgdbm.so.1.7.3\n\tlibcurses.so.1 => libcurses.so.1.0.0\n\tlibc.so.5 => libc.so.5.4.33\n\tlibncurses.so.3.0 => libncurses.so.3.0.0\n\tlibe2p.so.2 => libe2p.so.2.3\n\tlibext2fs.so.2 => libext2fs.so.2.3\n\tlibss.so.2 => libss.so.2.0\n\tlibuuid.so.1 => libuuid.so.1.1\n\tlibcom_err.so.2 => libcom_err.so.2.0\n\tlibc.so.4 => libc.so.4.7.6\n\tlibm.so.4 => libm.so.4.6.27\n\tlibcurses.so.0 => libcurses.so.0.1.2\n\nThe backend was built without any options...just\n./configure ; make ; make install.\nI hope this can be fixed as I love the feature richness\nof postgresql.\n\nMarcus Mascari\n\n\n\n\n\n_________________________________________________________\nDO YOU YAHOO!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Mon, 21 Sep 1998 03:12:19 -0700 (PDT)", "msg_from": "Marcus Mascari <[email protected]>", "msg_from_op": true, "msg_subject": "6.4 beta crashed backend" } ]
[ { "msg_contents": "> Ok. I've already sent perl-script generated test table.\n> Here are sql commands:\n> \n> drop table t0;\n> create table t0 ( a_id int4 NOT NULL, a varchar(10), a_t1_id int4, a_t2_id int4);\n> create index a_id_t0 on t0 (a_id);\n> create index a_t1_id_t0 on t0 (a_t1_id);\n> create index a_t2_id_t0 on t0 (a_t2_id);\n> COPY t0 FROM STDIN USING DELIMITERS '|';\n> 1|at0|1|1\n> 2|at0|2|2\n> \\.\n> \n> \n> 5:35[dv]:~>psql test\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=> \\d t0\n> \n> Table = t0\n> +----------------------------------+----------------------------------+-------+\n> | Field | Type | Length|\n> +----------------------------------+----------------------------------+-------+\n> | a_id | int4 not null | 4 |\n> | a | varchar() | 10 |\n> | a_t1_id | int4 | 4 |\n> | a_t2_id | int4 | 4 |\n> +----------------------------------+----------------------------------+-------+\n> Indices: a_id_t0\n> a_t1_id_t0\n> a_t2_id_t0\n> test=> explain select * from t0 where a_id=1 or a_id=2 and a_t1_id > 2;\n> NOTICE: QUERY PLAN:\n> \n> Index Scan using a_id_t0 on t0 (cost=0.00 size=0 width=24)\n> \n> EXPLAIN\n> test=> explain select * from t0 where (a_id=1 or a_id=2) and a_t1_id > 2;\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> Notice, that\n> test=> explain select * from t0 where (a_id=1 and a_id=2) and a_t1_id > 2;\n> NOTICE: QUERY PLAN:\n> \n> Index Scan using a_id_t0 on t0 (cost=0.00 size=0 width=24)\n> \n> EXPLAIN\n> \n> works also fine. \n> Another problem with 'vacuum analyze':\n> works if I run postmaster -i -S -D/usr/local/pgsql/data/ -o '-Fe'\n> vacuum analyze works as expected:\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: regression\n> \n> regression=> vacuum analyze;\n> VACUUM\n> regression=> \n> \n> but when I start postmaster with -B 1024 it fails\n> \n> dv:~$ psql regression\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: regression\n> \n> regression=> vacuum analyze;\n> NOTICE: AbortTransaction and not in in-progress state \n> NOTICE: AbortTransaction and not in in-progress state \n> regression=> \n> \n> These problem I experience on several Linux boxes with different\n> compilers, kernels but with 6.4. In all cases 6.3.2 works ok !\n> \n> Also It seems that some locale code is broken: \n> select_implicit and select_having tests produce different order of rows\n> in results, for example:\n> dv:~/cvs/pgsql/src/test/regress/results$ diff select_having.out ../expected/select_having.out \n> 33d32\n> < bbbb | 5\n> 34a34\n> > bbbb | 5\n> \n> \n> There are also couple of strange things happens with 6.4 on my home machine\n> which running bleeding edge egcs 1.1b and linux 2.1.122 but I'm\n> not ready to give you some results. \n> \n> \n> \tBest regards,\n> \n> \t\tOleg\n\nI am working on the first bug you list now. Keep in mind, both cases\nare using new 6.4 features, indexing of OR's and HAVING.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Mon, 21 Sep 1998 07:23:22 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] query crashes backend - cvs" } ]
[ { "msg_contents": "> > No one has told me the diffence between:\n> > \n> > \tint **var \n> > \n> > and\n> > \n> > \tint (*var)[]\n> > \n> > but that was the fix.\n> \n> If anyone does - please let me know! I thought the two were\n> equivalent.\n\nSomehow different. It may be the difference between a pointer to a list\nof int pointers, and a pointer to a pointer to a list of ints. Does\nthat make sense?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Mon, 21 Sep 1998 08:35:11 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [[email protected]: Re: [HACKERS] BUG: NOT boolfield kills\n\tbackend]" }, { "msg_contents": "Hey Bruce! I've got some questions for the original topic, which was the\nfailure of\n\n select not b from t;\n\nwhere b is a boolean type in table t. \n\nIt looks to me that the NOT_EXPR expression node is being constructed\ncorrectly in the parser, but somewhere between the parser and the\nexecutor (at ExecSeqScan()) it is being transformed into a deficient\nOP_EXPR expression node. Any hints on other places where this query tree\nmight be getting transformed or manipulated? If I brute force substitute\nthe expression type to be NOT_EXPR in ExecEvalExpr() then the query\ncompletes successfully:\n\npostgres=> select not b from t1;\n?column?\n--------\nf\nt\n(2 rows)\n\nHints are appreciated, or if this is touching on areas you are already\nfamiliar with I can send my debugging patches...\n\n - Tom\n", "msg_date": "Tue, 22 Sep 1998 03:55:48 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: NOT boolfield kills backend" }, { "msg_contents": "> Hey Bruce! I've got some questions for the original topic, which was the\n> failure of\n> \n> select not b from t;\n> \n> where b is a boolean type in table t. \n> \n> It looks to me that the NOT_EXPR expression node is being constructed\n> correctly in the parser, but somewhere between the parser and the\n> executor (at ExecSeqScan()) it is being transformed into a deficient\n> OP_EXPR expression node. Any hints on other places where this query tree\n> might be getting transformed or manipulated? If I brute force substitute\n> the expression type to be NOT_EXPR in ExecEvalExpr() then the query\n> completes successfully:\n> \n> postgres=> select not b from t1;\n> ?column?\n> --------\n> f\n> t\n> (2 rows)\n> \n> Hints are appreciated, or if this is touching on areas you are already\n> familiar with I can send my debugging patches...\n\nI would guess something in the optimizer. Let me take a look at it.\n\nDebugging patches, ah. No gdb yet?\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 22 Sep 1998 15:20:44 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: NOT boolfield kills backend" }, { "msg_contents": "> Hey Bruce! I've got some questions for the original topic, which was the\n> failure of\n> \n> select not b from t;\n> \n> where b is a boolean type in table t. \n> \n> It looks to me that the NOT_EXPR expression node is being constructed\n> correctly in the parser, but somewhere between the parser and the\n> executor (at ExecSeqScan()) it is being transformed into a deficient\n> OP_EXPR expression node. Any hints on other places where this query tree\n> might be getting transformed or manipulated? If I brute force substitute\n> the expression type to be NOT_EXPR in ExecEvalExpr() then the query\n> completes successfully:\n> \n> postgres=> select not b from t1;\n> ?column?\n> --------\n> f\n> t\n> (2 rows)\n> \n> Hints are appreciated, or if this is touching on areas you are already\n> familiar with I can send my debugging patches...\n> \n> - Tom\n> \n\nFixed. The last part of the 'if' statement in flatten_tlistentry() was\ncreating an expr that was assumed to be an OP_EXPR, while it was not in\nthis case.\n\n---------------------------------------------------------------------------\n\n\t\n\ttest=> select x from test;\n\tx\n\t-\n\tf\n\t(1 row)\n\t\n\ttest=> select not x from test;\n\t?column?\n\t--------\n\tt \n\t(1 row)\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 22 Sep 1998 17:20:12 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: NOT boolfield kills backend" }, { "msg_contents": "> Debugging patches, ah. No gdb yet?\n\n(I see that you fixed it. Great!)\n\nI just cleaned up a little code; enabling some of the debugging\nstatements already in this area caused some breakage. Yeah, I'm now\ngdb-enabled with Postgres, and it is very nice, but not if you don't\nknow where the code is headed. I could see the parse tree at the back of\nthe parser, and I could see the tree at the executor, but had no idea\nwhere it went in between. Stepping through code didn't seem like a good\nbet since afaik there are hundreds of calls in between...\n\n - Tom\n", "msg_date": "Wed, 23 Sep 1998 01:27:28 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: NOT boolfield kills backend" }, { "msg_contents": "> > Debugging patches, ah. No gdb yet?\n> \n> (I see that you fixed it. Great!)\n> \n> I just cleaned up a little code; enabling some of the debugging\n> statements already in this area caused some breakage. Yeah, I'm now\n> gdb-enabled with Postgres, and it is very nice, but not if you don't\n> know where the code is headed. I could see the parse tree at the back of\n> the parser, and I could see the tree at the executor, but had no idea\n> where it went in between. Stepping through code didn't seem like a good\n> bet since afaik there are hundreds of calls in between...\n> \n> - Tom\n> \n\nI suspected the optimizer, and the postmaster -d output showed the parse\nand rewrite were ok, but the plan was wrong, so it had to be the\noptimizer. (New debugging levels cause -d 99 to have to be used to see\nthe query trees.)\n\nI then went to the optimizer and looked for a reference to OP_EXPR,\nwhich is the new value the expression was getting. I saw it in\nmake_opclause(). I set a breakpoint on that function and executed the\nquery inside gdb. It showed only one call to the function for that\nquery, and a backtrace on the breakpoint showed flatten_tlistentry()\nmaking the call, and it was clear after that.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 22 Sep 1998 21:43:31 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: NOT boolfield kills backend" } ]
[ { "msg_contents": "I've been using transactions fairly heavily as a means of ensuring that\na group of related updates would look atomic to other processes watching\nthe database. For some reason I'd never thought twice about the\nimplications of a transaction block for error recovery. But they're\nthere, and they're nasty: if one command in a transaction fails (and\nthis is a failure in the server's terms, not according to what the\napplication's logic is) then every subsequent command gets ignored\nuntil an END TRANSACTION is seen.\n\nI made the mistake of writing some code that did an INSERT it knew\nmight fail (due to key collision in a unique index). The code was\nprepared to deal with the failure. No problem. Except it was being\nexecuted in an application that likes to wrap a transaction block\naround rather large chunks of processing. Result: hundreds of\nsubsequent commands were ignored, silently. OK, there were notices\ngetting printed on stderr, but that didn't help the application any.\nDidn't help the user either in this particular case, because he had\niconized the shell window he'd started the application from. He\nlost several hours' work, and I'm looking at a total redesign of the\napplication logic to get around this.\n\nThe reason I say \"total redesign\" is that I'm afraid to just rewrite\nthe chunk of code that does the one INSERT. Now that I've been bit\nonce, I know that transactions are horribly dangerous: get an error\nthat you *think* you've recovered from, and you're still screwed if\nyou forgot to issue an END or ABORT TRANSACTION. Your code won't\nrecover until you shut down and restart your app. So I'm going to\nhave to find a way to guarantee that all possible paths of execution\nwill do the END TRANSACTION, and that looks painful.\n\nIs there, or could there be, such a thing as a \"CONTINUE TRANSACTION\"\ncommand to clear the \"aborted transaction\" status after an expected\nerror? Without that, either I can't use transactions, or I can never\ndare use a command that might return a failure message.\n\nAlso, I feel that it's a mistake to treat \"queries ignored until END\"\nas a mere informational message. It ought to be transmitted to the\nfrontend as an *error condition*. Your command did not execute, and\npretending that there's not something wrong is not helpful, especially\nnot to application code that's not designed to pay close attention to\nNOTICE messages.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Sep 1998 10:58:25 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Errors inside transactions" }, { "msg_contents": "> I made the mistake of writing some code that did an INSERT it knew\n> might fail (due to key collision in a unique index). The code was\n> prepared to deal with the failure. No problem. Except it was being\n> executed in an application that likes to wrap a transaction block\n> around rather large chunks of processing. Result: hundreds of\n> subsequent commands were ignored, silently.\n> ... I'm afraid to just rewrite\n> the chunk of code that does the one INSERT. Now that I've been bit\n> once, I know that transactions are horribly dangerous: get an error\n> that you *think* you've recovered from, and you're still screwed if\n> you forgot to issue an END or ABORT TRANSACTION. Your code won't\n> recover until you shut down and restart your app. So I'm going to\n> have to find a way to guarantee that all possible paths of execution\n> will do the END TRANSACTION, and that looks painful.\n> \n> Is there, or could there be, such a thing as a \"CONTINUE TRANSACTION\"\n> command to clear the \"aborted transaction\" status after an expected\n> error? Without that, either I can't use transactions, or I can never\n> dare use a command that might return a failure message.\n\nWhy not have your error handler issue a new BEGIN statement? Or an\nEND/BEGIN pair if that is what is needed? afaik that wouldn't be any\ndifferent than the proposed \"CONTINUE TRANSACTION\" statement.\n\nOr do you really want to commit the previous statements in the\ntransaction rather than throw them away? If so, you didn't really need\nthe transaction block there anyway, since you are willing to accept a\npartial result.\n\nBut I'm vaguely recalling that my Ingres apps used to be able to choose\nbetween COMMIT and ROLLBACK when an error occurred in a transaction.\nI'll bet that is the behavior you are asking for. Don't know whether the\nPostgres backend knows what the state prior to the current command was.\n\n> Also, I feel that it's a mistake to treat \"queries ignored until END\"\n> as a mere informational message. It ought to be transmitted to the\n> frontend as an *error condition*. Your command did not execute, and\n> pretending that there's not something wrong is not helpful, especially\n> not to application code that's not designed to pay close attention to\n> NOTICE messages.\n\nThat sounds like a good idea to me too. Are there any downsides to it?\n\n - Tom\n", "msg_date": "Mon, 21 Sep 1998 15:45:48 +0000", "msg_from": "\"Thomas G. Lockhart\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Errors inside transactions" }, { "msg_contents": "\"Thomas G. Lockhart\" <[email protected]> writes:\n> Why not have your error handler issue a new BEGIN statement? Or an\n> END/BEGIN pair if that is what is needed? afaik that wouldn't be any\n> different than the proposed \"CONTINUE TRANSACTION\" statement.\n> Or do you really want to commit the previous statements in the\n> transaction rather than throw them away? If so, you didn't really need\n> the transaction block there anyway, since you are willing to accept a\n> partial result.\n\nYou're right, I don't especially need or want the rollback aspect of\ntransactions. This is a shared database with half a dozen processes\nwatching it, and what I do want is to ensure that the other processes\nwill not see the logically-inconsistent state that occurs while updating\nseveral related tuples with multiple UPDATE commands.\n\nI guess what I'd really like is to be able to separate the atomic-update\nand rollback features of transactions. If I could use \"LOCK relation\"\nwithout having to be inside a transaction, I'd be a much happier camper.\n(This'd at least imply an UNLOCK statement, I suppose. Are there deeper\nrelationships between locks and transactions?)\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Sep 1998 12:46:56 -0400", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Errors inside transactions " } ]
[ { "msg_contents": "unsibscribe pgsql-hackers\n", "msg_date": "Mon, 21 Sep 1998 10:04:08 -0500", "msg_from": "jkraai <[email protected]>", "msg_from_op": true, "msg_subject": "None" } ]
[ { "msg_contents": "unsubscribe pgsql-hackers\n", "msg_date": "Mon, 21 Sep 1998 10:06:14 -0500", "msg_from": "jkraai <[email protected]>", "msg_from_op": true, "msg_subject": "None" } ]
[ { "msg_contents": "> \n> Also, I checked through the example given by the Russian contributor:\n> \n> create table t0 (a_id int4 not null, a varchar, a_t1_id int4);\n> insert into t0 values (1, 'at0', 0);\n> insert into t0 values (2, 'at0', 0);\n> create index a_id_t0 on t0 (a_id);\n> create index a_t1_id_t0 on t0 (a_t1_id);\n> select * from t0 where (a_id = 1 or a_id = 2) and a_t1_id < 1;\n> \n> This is crashing in optimizer/util/ordering.c at line 57 trying to\n> compute path_ordering1->ord.merge->left_operator because the merge\n> field in ord is NULL. No suggestions; this is deeper in the guts\n> than I'm qualified to hack just now. ;-)\n\nOK, fixed. There were cases where the ordtype was defaulting to\nMERGE_ORDER, while it should have been SORTOP_ORDER. Hence, the\nmergejoin fields where being reference when they should not have been.\n\nYour supplied query now works.\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Mon, 21 Sep 1998 11:42:26 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] oid8types() borken?" } ]
[ { "msg_contents": "Hi All,\nI've changed the check_primary_key() function code to allow for either\nthe \"automatic insert key rule\" or \"dependent insert key rule\".\nPreviously it restricted the addtion of a child entry if the\ncorresponding parent entry was not there. Now if the option is\n\"automatic\" it will add an entry in the parent too ( it will be\nsuccessful if there are no no-null fields in the parent apart from the\nprimary key).\nThe way to use it now is:\n/*\n * check_primary_key () -- check that key in tuple being\ninserted/updated\n * references existing tuple in \"primary\" table.\n * Though it's called without args You have to specify referenced\n * table/keys while creating trigger: key field names in triggered\ntable,\n * referenced table name, referenced key field names,type of action\n[automatic|dependent]:\n * EXECUTE PROCEDURE\n * check_primary_key ('Fkey1', 'Fkey2', 'Ptable', 'Pkey1', 'Pkey2',\n'[automatic|dependent]').\n */\nI am attaching the new ../contrib/spi/refint.c file which will do this.\nI will be glad to help in case of any problems.\n\n- Anand.", "msg_date": "Mon, 21 Sep 1998 12:05:52 -0700", "msg_from": "Anand Surelia <[email protected]>", "msg_from_op": true, "msg_subject": "Foreign Keys: check_primary_function" }, { "msg_contents": "Applied.\n\n\n> Hi All,\n> I've changed the check_primary_key() function code to allow for either\n> the \"automatic insert key rule\" or \"dependent insert key rule\".\n> Previously it restricted the addtion of a child entry if the\n> corresponding parent entry was not there. Now if the option is\n> \"automatic\" it will add an entry in the parent too ( it will be\n> successful if there are no no-null fields in the parent apart from the\n> primary key).\n> The way to use it now is:\n> /*\n> * check_primary_key () -- check that key in tuple being\n> inserted/updated\n> * references existing tuple in \"primary\" table.\n> * Though it's called without args You have to specify referenced\n> * table/keys while creating trigger: key field names in triggered\n> table,\n> * referenced table name, referenced key field names,type of action\n> [automatic|dependent]:\n> * EXECUTE PROCEDURE\n> * check_primary_key ('Fkey1', 'Fkey2', 'Ptable', 'Pkey1', 'Pkey2',\n> '[automatic|dependent]').\n> */\n> I am attaching the new ../contrib/spi/refint.c file which will do this.\n> I will be glad to help in case of any problems.\n> \n> - Anand.\n> \n> \n\n> /*\n> * refint.c --\tset of functions to define referential integrity\n> *\t\tconstraints using general triggers.\n> */\n> \n> #include \"executor/spi.h\"\t\t/* this is what you need to work with SPI */\n> #include \"commands/trigger.h\"\t/* -\"- and triggers */\n> #include <ctype.h>\t\t\t\t/* tolower () */\n> \n> HeapTuple\tcheck_primary_key(void);\n> HeapTuple\tcheck_foreign_key(void);\n> \n> \n> typedef struct\n> {\n> \tchar\t *ident;\n> \tint\t\t\tnplans;\n> \tvoid\t **splan;\n> }\t\t\tEPlan;\n> \n> static EPlan *FPlans = NULL;\n> static int\tnFPlans = 0;\n> static EPlan *PPlans = NULL;\n> static int\tnPPlans = 0;\n> \n> static EPlan *find_plan(char *ident, EPlan ** eplan, int *nplans);\n> \n> /*\n> * check_primary_key () -- check that key in tuple being inserted/updated\n> *\t\t\t references existing tuple in \"primary\" table.\n> * Though it's called without args You have to specify referenced\n> * table/keys while creating trigger: key field names in triggered table,\n> * referenced table name, referenced key field names,type of action [automatic|dependent]:\n> * EXECUTE PROCEDURE\n> * check_primary_key ('Fkey1', 'Fkey2', 'Ptable', 'Pkey1', 'Pkey2','[automatic|dependent]').\n> */\n> \n> HeapTuple\t\t\t\t\t\t/* have to return HeapTuple to Executor */\n> check_primary_key()\n> {\n> \tTrigger *trigger;\t\t/* to get trigger name */\n> \tint\t\t\tnargs;\t\t\t/* # of args specified in CREATE TRIGGER */\n> \tchar\t **args;\t\t\t/* arguments: column names and table name */\n> \tint\t\t\tnkeys;\t\t\t/* # of key columns (= (nargs-1) / 2) */\n> \tDatum\t *kvals;\t\t\t/* key values */\n> \tchar\t *relname;\t\t/* referenced relation name */\n> \tchar\t *action; /* action on insert or update*/\n> \tRelation\trel;\t\t\t/* triggered relation */\n> \tHeapTuple\ttuple = NULL;\t/* tuple to return */\n> \tTupleDesc\ttupdesc;\t\t/* tuple description */\n> \tEPlan\t *plan;\t\t\t/* prepared plan */\n> \tOid\t\t *argtypes = NULL;/* key types to prepare execution plan */\n> \tbool\t\tisnull;\t\t\t/* to know is some column NULL or not */\n> \tchar\t\tident[2 * NAMEDATALEN]; /* to identify myself */\n> \tint\t\t\tret;\n> \tint\t\t\ti;\n> \n> \t/*\n> \t * Some checks first...\n> \t */\n> \n> \t/* Called by trigger manager ? */\n> \tif (!CurrentTriggerData)\n> \t\telog(ERROR, \"check_primary_key: triggers are not initialized\");\n> \n> \t/* Should be called for ROW trigger */\n> \tif (TRIGGER_FIRED_FOR_STATEMENT(CurrentTriggerData->tg_event))\n> \t\telog(ERROR, \"check_primary_key: can't process STATEMENT events\");\n> \n> \t/* If INSERTion then must check Tuple to being inserted */\n> \tif (TRIGGER_FIRED_BY_INSERT(CurrentTriggerData->tg_event))\n> \n> \t\ttuple = CurrentTriggerData->tg_trigtuple;\n> \n> \t/* Not should be called for DELETE */\n> \telse if (TRIGGER_FIRED_BY_DELETE(CurrentTriggerData->tg_event))\n> \n> \t\telog(ERROR, \"check_primary_key: can't process DELETE events\");\n> \n> \t/* If UPDATion the must check new Tuple, not old one */\n> \telse\n> \t\ttuple = CurrentTriggerData->tg_newtuple;\n> \n> \ttrigger = CurrentTriggerData->tg_trigger;\n> \tnargs = trigger->tgnargs;\n> \targs = trigger->tgargs;\n> \n> \tif ((nargs-1) % 2 != 1)\t\t\t/* odd number of arguments! */\n> \t\telog(ERROR, \"check_primary_key: even number of arguments should be specified\");\n> \n> \tnkeys = (nargs-1) / 2;\n> \taction=args[nargs -1];\n> \tif (strcmp(action,\"automatic\") && strcmp(action,\"dependent\"))\n> \t\telog(ERROR,\"check_primary_key: unknown action\");\n> \tnargs=nargs-1;\n> \trelname = args[nkeys];\n> \trel = CurrentTriggerData->tg_relation;\n> \ttupdesc = rel->rd_att;\n> \n> \t/*\n> \t * Setting CurrentTriggerData to NULL prevents direct calls to trigger\n> \t * functions in queries. Normally, trigger functions have to be called\n> \t * by trigger manager code only.\n> \t */\n> \tCurrentTriggerData = NULL;\n> \n> \t/* Connect to SPI manager */\n> \tif ((ret = SPI_connect()) < 0)\n> \t\telog(ERROR, \"check_primary_key: SPI_connect returned %d\", ret);\n> \n> \t/*\n> \t * We use SPI plan preparation feature, so allocate space to place key\n> \t * values.\n> \t */\n> \tkvals = (Datum *) palloc(nkeys * sizeof(Datum));\n> \n> \t/*\n> \t * Construct ident string as TriggerName $ TriggeredRelationId and try\n> \t * to find prepared execution plan.\n> \t */\n> \tsprintf(ident, \"%s$%u\", trigger->tgname, rel->rd_id);\n> \tplan = find_plan(ident, &PPlans, &nPPlans);\n> \n> \t/* if there is no plan then allocate argtypes for preparation */\n> \tif (plan->nplans <= 0)\n> \t\targtypes = (Oid *) palloc(nkeys * sizeof(Oid));\n> \n> \t/* For each column in key ... */\n> \tfor (i = 0; i < nkeys; i++)\n> \t{\n> \t\t/* get index of column in tuple */\n> \t\tint\t\t\tfnumber = SPI_fnumber(tupdesc, args[i]);\n> \n> \t\t/* Bad guys may give us un-existing column in CREATE TRIGGER */\n> \t\tif (fnumber < 0)\n> \t\t\telog(ERROR, \"check_primary_key: there is no attribute %s in relation %s\",\n> \t\t\t\t args[i], SPI_getrelname(rel));\n> \n> \t\t/* Well, get binary (in internal format) value of column */\n> \t\tkvals[i] = SPI_getbinval(tuple, tupdesc, fnumber, &isnull);\n> \n> \t\t/*\n> \t\t * If it's NULL then nothing to do! DON'T FORGET call SPI_finish\n> \t\t * ()! DON'T FORGET return tuple! Executor inserts tuple you're\n> \t\t * returning! If you return NULL then nothing will be inserted!\n> \t\t */\n> \t\tif (isnull)\n> \t\t{\n> \t\t\tSPI_finish();\n> \t\t\treturn (tuple);\n> \t\t}\n> \n> \t\tif (plan->nplans <= 0)\t/* Get typeId of column */\n> \t\t\targtypes[i] = SPI_gettypeid(tupdesc, fnumber);\n> \t}\n> \n> \t/*\n> \t * If we have to prepare plan ...\n> \t */\n> \tif (plan->nplans <= 0)\n> \t{\n> \t\tvoid\t *pplan;\n> \t\tchar\t\tsql[8192];\n> \n> \t\t/*\n> \t\t * Construct query: SELECT 1 FROM _referenced_relation_ WHERE\n> \t\t * Pkey1 = $1 [AND Pkey2 = $2 [...]]\n> \t\t */\n> \t\tsprintf(sql, \"select 1 from %s where \", relname);\n> \t\tfor (i = 0; i < nkeys; i++)\n> \t\t{\n> \t\t\tsprintf(sql + strlen(sql), \"%s = $%d %s\",\n> \t\t\t args[i + nkeys + 1], i + 1, (i < nkeys - 1) ? \"and \" : \"\");\n> \t\t}\n> \n> \t\t/* Prepare plan for query */\n> \t\tpplan = SPI_prepare(sql, nkeys, argtypes);\n> \t\tif (pplan == NULL)\n> \t\t\telog(ERROR, \"check_primary_key: SPI_prepare returned %d\", SPI_result);\n> \n> \t\t/*\n> \t\t * Remember that SPI_prepare places plan in current memory context\n> \t\t * - so, we have to save plan in Top memory context for latter\n> \t\t * use.\n> \t\t */\n> \t\tpplan = SPI_saveplan(pplan);\n> \t\tif (pplan == NULL)\n> \t\t\telog(ERROR, \"check_primary_key: SPI_saveplan returned %d\", SPI_result);\n> \t\tplan->splan = (void **) malloc(sizeof(void *));\n> \t\t*(plan->splan) = pplan;\n> \t\tplan->nplans = 1;\n> \t}\n> \n> \t/*\n> \t * Ok, execute prepared plan.\n> \t */\n> \tret = SPI_execp(*(plan->splan), kvals, NULL, 1);\n> \t/* we have no NULLs - so we pass ^^^^ here */\n> \n> \tif (ret < 0)\n> \t\telog(ERROR, \"check_primary_key: SPI_execp returned %d\", ret);\n> \n> \t/*\n> \t * If there are no tuples returned by SELECT then ...\n> \t */\n> \tif (SPI_processed == 0 && strcmp(action,\"dependent\")==0)\n> \t\telog(ERROR, \"%s: tuple references non-existing key in %s\",\n> \t\t\t trigger->tgname, relname);\n> \telse if (strcmp(action,\"automatic\")==0) \n> \t{\n> \t\t/* insert tuple in parent with only primary keys */\n> \t\t/* prepare plan */\n> \t\tvoid\t *pplan;\n> \t\tchar\t\tsql[8192];\n> \n> \t\t/*\n> \t\t * Construct query:INSERT INTO relname (Pkey1[,Pkey2]*) values ($1,$2..); \n> \t\t */\n> \t\tsprintf(sql, \"insert into %s ( \", relname);\n> \t\tfor (i = 0; i < nkeys; i++)\n> \t\t{\n> \t\t\tsprintf(sql + strlen(sql), \"%s%s \", args[i + nkeys + 1],(i<nkeys-1) ? \",\":\"\");\n> \t\t}\n> \t\tsprintf(sql+strlen(sql),\") values (\");\n> \t\tfor (i=0;i<nkeys; i++)\n> \t\t{\n> \t\t\tsprintf(sql+strlen(sql),\"$%d%s \",i+1,(i<nkeys-1) ? \",\":\"\");\n> \t\t} \n> \t\tsprintf(sql+strlen(sql),\")\");\n> \n> \t\t/* Prepare plan for query */\n> \t\tpplan = SPI_prepare(sql, nkeys, argtypes);\n> \t\tif (pplan == NULL)\n> \t\t\telog(ERROR, \"check_primary_key: SPI_prepare returned %d\", SPI_result);\n> \n> \t\t/*\n> \t\t * Remember that SPI_prepare places plan in current memory context\n> \t\t * - so, we have to save plan in Top memory context for latter\n> \t\t * use.\n> \t\t */\n> \t\tpplan = SPI_saveplan(pplan);\n> \t\tif (pplan == NULL)\n> \t\t\telog(ERROR, \"check_primary_key: SPI_saveplan returned %d\", SPI_result);\n> \t\tplan->splan = (void **) malloc(sizeof(void *));\n> \t\t*(plan->splan) = pplan;\n> \t\tplan->nplans = 1;\n> \t/*\n> \t * Ok, execute prepared plan.\n> \t */\n> \tret = SPI_execp(*(plan->splan), kvals, NULL, 1);\n> \t/* we have no NULLs - so we pass ^^^^ here */\n> \n> \tif (ret < 0)\n> \t\telog(ERROR, \"check_primary_key: SPI_execp returned %d\", ret);\n> \n> \t/*\n> \t * If there are no tuples returned by INSERT then ...\n> \t */\n> \tif (SPI_processed == 0)\n> \t\telog(ERROR, \"error: can't enter automatically in %s\",relname);\n> \t}\n> \n> \tSPI_finish();\n> \n> \treturn (tuple);\n> }\n> \n> /*\n> * check_foreign_key () -- check that key in tuple being deleted/updated\n> *\t\t\t is not referenced by tuples in \"foreign\" table(s).\n> * Though it's called without args You have to specify (while creating trigger):\n> * number of references, action to do if key referenced\n> * ('restrict' | 'setnull' | 'cascade'), key field names in triggered\n> * (\"primary\") table and referencing table(s)/keys:\n> * EXECUTE PROCEDURE\n> * check_foreign_key (2, 'restrict', 'Pkey1', 'Pkey2',\n> * 'Ftable1', 'Fkey11', 'Fkey12', 'Ftable2', 'Fkey21', 'Fkey22').\n> */\n> \n> HeapTuple\t\t\t\t\t\t/* have to return HeapTuple to Executor */\n> check_foreign_key()\n> {\n> \tTrigger *trigger;\t\t/* to get trigger name */\n> \tint\t\t\tnargs;\t\t\t/* # of args specified in CREATE TRIGGER */\n> \tchar\t **args;\t\t\t/* arguments: as described above */\n> \tint\t\t\tnrefs;\t\t\t/* number of references (== # of plans) */\n> \tchar\t\taction;\t\t\t/* 'R'estrict | 'S'etnull | 'C'ascade */\n> \tint\t\t\tnkeys;\t\t\t/* # of key columns */\n> \tDatum\t *kvals;\t\t\t/* key values */\n> \tchar\t *relname;\t\t/* referencing relation name */\n> \tRelation\trel;\t\t\t/* triggered relation */\n> \tHeapTuple\ttrigtuple = NULL;\t\t/* tuple to being changed */\n> \tHeapTuple\tnewtuple = NULL;/* tuple to return */\n> \tTupleDesc\ttupdesc;\t\t/* tuple description */\n> \tEPlan\t *plan;\t\t\t/* prepared plan(s) */\n> \tOid\t\t *argtypes = NULL;/* key types to prepare execution plan */\n> \tbool\t\tisnull;\t\t\t/* to know is some column NULL or not */\n> \tbool\t\tisequal = true; /* are keys in both tuples equal (in\n> \t\t\t\t\t\t\t\t * UPDATE) */\n> \tchar\t\tident[2 * NAMEDATALEN]; /* to identify myself */\n> \tint\t\t\tret;\n> \tint\t\t\ti,\n> \t\t\t\tr;\n> \n> \t/*\n> \t * Some checks first...\n> \t */\n> \n> \t/* Called by trigger manager ? */\n> \tif (!CurrentTriggerData)\n> \t\telog(ERROR, \"check_foreign_key: triggers are not initialized\");\n> \n> \t/* Should be called for ROW trigger */\n> \tif (TRIGGER_FIRED_FOR_STATEMENT(CurrentTriggerData->tg_event))\n> \t\telog(ERROR, \"check_foreign_key: can't process STATEMENT events\");\n> \n> \t/* Not should be called for INSERT */\n> \tif (TRIGGER_FIRED_BY_INSERT(CurrentTriggerData->tg_event))\n> \n> \t\telog(ERROR, \"check_foreign_key: can't process INSERT events\");\n> \n> \t/* Have to check tg_trigtuple - tuple being deleted */\n> \ttrigtuple = CurrentTriggerData->tg_trigtuple;\n> \n> \t/*\n> \t * But if this is UPDATE then we have to return tg_newtuple. Also, if\n> \t * key in tg_newtuple is the same as in tg_trigtuple then nothing to\n> \t * do.\n> \t */\n> \tif (TRIGGER_FIRED_BY_UPDATE(CurrentTriggerData->tg_event))\n> \t\tnewtuple = CurrentTriggerData->tg_newtuple;\n> \n> \ttrigger = CurrentTriggerData->tg_trigger;\n> \tnargs = trigger->tgnargs;\n> \targs = trigger->tgargs;\n> \n> \tif (nargs < 5)\t\t\t\t/* nrefs, action, key, Relation, key - at\n> \t\t\t\t\t\t\t\t * least */\n> \t\telog(ERROR, \"check_foreign_key: too short %d (< 5) list of arguments\", nargs);\n> \tnrefs = pg_atoi(args[0], sizeof(int), 0);\n> \tif (nrefs < 1)\n> \t\telog(ERROR, \"check_foreign_key: %d (< 1) number of references specified\", nrefs);\n> \taction = tolower(*(args[1]));\n> \tif (action != 'r' && action != 'c' && action != 's')\n> \t\telog(ERROR, \"check_foreign_key: invalid action %s\", args[1]);\n> \tnargs -= 2;\n> \targs += 2;\n> \tnkeys = (nargs - nrefs) / (nrefs + 1);\n> \tif (nkeys <= 0 || nargs != (nrefs + nkeys * (nrefs + 1)))\n> \t\telog(ERROR, \"check_foreign_key: invalid number of arguments %d for %d references\",\n> \t\t\t nargs + 2, nrefs);\n> \n> \trel = CurrentTriggerData->tg_relation;\n> \ttupdesc = rel->rd_att;\n> \n> \t/*\n> \t * Setting CurrentTriggerData to NULL prevents direct calls to trigger\n> \t * functions in queries. Normally, trigger functions have to be called\n> \t * by trigger manager code only.\n> \t */\n> \tCurrentTriggerData = NULL;\n> \n> \t/* Connect to SPI manager */\n> \tif ((ret = SPI_connect()) < 0)\n> \t\telog(ERROR, \"check_foreign_key: SPI_connect returned %d\", ret);\n> \n> \t/*\n> \t * We use SPI plan preparation feature, so allocate space to place key\n> \t * values.\n> \t */\n> \tkvals = (Datum *) palloc(nkeys * sizeof(Datum));\n> \n> \t/*\n> \t * Construct ident string as TriggerName $ TriggeredRelationId and try\n> \t * to find prepared execution plan(s).\n> \t */\n> \tsprintf(ident, \"%s$%u\", trigger->tgname, rel->rd_id);\n> \tplan = find_plan(ident, &FPlans, &nFPlans);\n> \n> \t/* if there is no plan(s) then allocate argtypes for preparation */\n> \tif (plan->nplans <= 0)\n> \t\targtypes = (Oid *) palloc(nkeys * sizeof(Oid));\n> \n> \t/*\n> \t * else - check that we have exactly nrefs plan(s) ready\n> \t */\n> \telse if (plan->nplans != nrefs)\n> \t\telog(ERROR, \"%s: check_foreign_key: # of plans changed in meantime\",\n> \t\t\t trigger->tgname);\n> \n> \t/* For each column in key ... */\n> \tfor (i = 0; i < nkeys; i++)\n> \t{\n> \t\t/* get index of column in tuple */\n> \t\tint\t\t\tfnumber = SPI_fnumber(tupdesc, args[i]);\n> \n> \t\t/* Bad guys may give us un-existing column in CREATE TRIGGER */\n> \t\tif (fnumber < 0)\n> \t\t\telog(ERROR, \"check_foreign_key: there is no attribute %s in relation %s\",\n> \t\t\t\t args[i], SPI_getrelname(rel));\n> \n> \t\t/* Well, get binary (in internal format) value of column */\n> \t\tkvals[i] = SPI_getbinval(trigtuple, tupdesc, fnumber, &isnull);\n> \n> \t\t/*\n> \t\t * If it's NULL then nothing to do! DON'T FORGET call SPI_finish\n> \t\t * ()! DON'T FORGET return tuple! Executor inserts tuple you're\n> \t\t * returning! If you return NULL then nothing will be inserted!\n> \t\t */\n> \t\tif (isnull)\n> \t\t{\n> \t\t\tSPI_finish();\n> \t\t\treturn ((newtuple == NULL) ? trigtuple : newtuple);\n> \t\t}\n> \n> \t\t/*\n> \t\t * If UPDATE then get column value from new tuple being inserted\n> \t\t * and compare is this the same as old one. For the moment we use\n> \t\t * string presentation of values...\n> \t\t */\n> \t\tif (newtuple != NULL)\n> \t\t{\n> \t\t\tchar\t *oldval = SPI_getvalue(trigtuple, tupdesc, fnumber);\n> \t\t\tchar\t *newval;\n> \n> \t\t\t/* this shouldn't happen! SPI_ERROR_NOOUTFUNC ? */\n> \t\t\tif (oldval == NULL)\n> \t\t\t\telog(ERROR, \"check_foreign_key: SPI_getvalue returned %d\", SPI_result);\n> \t\t\tnewval = SPI_getvalue(newtuple, tupdesc, fnumber);\n> \t\t\tif (newval == NULL || strcmp(oldval, newval) != 0)\n> \t\t\t\tisequal = false;\n> \t\t}\n> \n> \t\tif (plan->nplans <= 0)\t/* Get typeId of column */\n> \t\t\targtypes[i] = SPI_gettypeid(tupdesc, fnumber);\n> \t}\n> \tnargs -= nkeys;\n> \targs += nkeys;\n> \n> \t/*\n> \t * If we have to prepare plans ...\n> \t */\n> \tif (plan->nplans <= 0)\n> \t{\n> \t\tvoid\t *pplan;\n> \t\tchar\t\tsql[8192];\n> \t\tchar\t **args2 = args;\n> \n> \t\tplan->splan = (void **) malloc(nrefs * sizeof(void *));\n> \n> \t\tfor (r = 0; r < nrefs; r++)\n> \t\t{\n> \t\t\trelname = args2[0];\n> \n> \t\t\t/*\n> \t\t\t * For 'R'estrict action we construct SELECT query - SELECT 1\n> \t\t\t * FROM _referencing_relation_ WHERE Fkey1 = $1 [AND Fkey2 =\n> \t\t\t * $2 [...]] - to check is tuple referenced or not.\n> \t\t\t */\n> \t\t\tif (action == 'r')\n> \n> \t\t\t\tsprintf(sql, \"select 1 from %s where \", relname);\n> \n> \t\t\t/*\n> \t\t\t * For 'C'ascade action we construct DELETE query - DELETE\n> \t\t\t * FROM _referencing_relation_ WHERE Fkey1 = $1 [AND Fkey2 =\n> \t\t\t * $2 [...]] - to delete all referencing tuples.\n> \t\t\t */\n> \t\t\telse if (action == 'c')\n> \n> \t\t\t\tsprintf(sql, \"delete from %s where \", relname);\n> \n> \t\t\t/*\n> \t\t\t * For 'S'etnull action we construct UPDATE query - UPDATE\n> \t\t\t * _referencing_relation_ SET Fkey1 null [, Fkey2 null [...]]\n> \t\t\t * WHERE Fkey1 = $1 [AND Fkey2 = $2 [...]] - to set key\n> \t\t\t * columns in all referencing tuples to NULL.\n> \t\t\t */\n> \t\t\telse if (action == 's')\n> \t\t\t{\n> \t\t\t\tsprintf(sql, \"update %s set \", relname);\n> \t\t\t\tfor (i = 1; i <= nkeys; i++)\n> \t\t\t\t{\n> \t\t\t\t\tsprintf(sql + strlen(sql), \"%s = null%s\",\n> \t\t\t\t\t\t\targs2[i], (i < nkeys) ? \", \" : \"\");\n> \t\t\t\t}\n> \t\t\t\tstrcat(sql, \" where \");\n> \t\t\t}\n> \n> \t\t\t/* Construct WHERE qual */\n> \t\t\tfor (i = 1; i <= nkeys; i++)\n> \t\t\t{\n> \t\t\t\tsprintf(sql + strlen(sql), \"%s = $%d %s\",\n> \t\t\t\t\t\targs2[i], i, (i < nkeys) ? \"and \" : \"\");\n> \t\t\t}\n> \n> \t\t\t/* Prepare plan for query */\n> \t\t\tpplan = SPI_prepare(sql, nkeys, argtypes);\n> \t\t\tif (pplan == NULL)\n> \t\t\t\telog(ERROR, \"check_foreign_key: SPI_prepare returned %d\", SPI_result);\n> \n> \t\t\t/*\n> \t\t\t * Remember that SPI_prepare places plan in current memory\n> \t\t\t * context - so, we have to save plan in Top memory context\n> \t\t\t * for latter use.\n> \t\t\t */\n> \t\t\tpplan = SPI_saveplan(pplan);\n> \t\t\tif (pplan == NULL)\n> \t\t\t\telog(ERROR, \"check_foreign_key: SPI_saveplan returned %d\", SPI_result);\n> \n> \t\t\tplan->splan[r] = pplan;\n> \n> \t\t\targs2 += nkeys + 1; /* to the next relation */\n> \t\t}\n> \t\tplan->nplans = nrefs;\n> \t}\n> \n> \t/*\n> \t * If UPDATE and key is not changed ...\n> \t */\n> \tif (newtuple != NULL && isequal)\n> \t{\n> \t\tSPI_finish();\n> \t\treturn (newtuple);\n> \t}\n> \n> \t/*\n> \t * Ok, execute prepared plan(s).\n> \t */\n> \tfor (r = 0; r < nrefs; r++)\n> \t{\n> \n> \t\t/*\n> \t\t * For 'R'estrict we may to execute plan for one tuple only, for\n> \t\t * other actions - for all tuples.\n> \t\t */\n> \t\tint\t\t\ttcount = (action == 'r') ? 1 : 0;\n> \n> \t\trelname = args[0];\n> \n> \t\tret = SPI_execp(plan->splan[r], kvals, NULL, tcount);\n> \t\t/* we have no NULLs - so we pass ^^^^ here */\n> \n> \t\tif (ret < 0)\n> \t\t\telog(ERROR, \"check_foreign_key: SPI_execp returned %d\", ret);\n> \n> \t\t/* If action is 'R'estrict ... */\n> \t\tif (action == 'r')\n> \t\t{\n> \t\t\t/* If there is tuple returned by SELECT then ... */\n> \t\t\tif (SPI_processed > 0)\n> \t\t\t\telog(ERROR, \"%s: tuple referenced in %s\",\n> \t\t\t\t\t trigger->tgname, relname);\n> \t\t}\n> #ifdef REFINT_VERBOSE\n> \t\telse\n> \t\t\telog(NOTICE, \"%s: %d tuple(s) of %s are %s\",\n> \t\t\t\t trigger->tgname, SPI_processed, relname,\n> \t\t\t\t (action == 'c') ? \"deleted\" : \"setted to null\");\n> #endif\n> \t\targs += nkeys + 1;\t\t/* to the next relation */\n> \t}\n> \n> \tSPI_finish();\n> \n> \treturn ((newtuple == NULL) ? trigtuple : newtuple);\n> }\n> \n> static EPlan *\n> find_plan(char *ident, EPlan ** eplan, int *nplans)\n> {\n> \tEPlan\t *newp;\n> \tint\t\t\ti;\n> \n> \tif (*nplans > 0)\n> \t{\n> \t\tfor (i = 0; i < *nplans; i++)\n> \t\t{\n> \t\t\tif (strcmp((*eplan)[i].ident, ident) == 0)\n> \t\t\t\tbreak;\n> \t\t}\n> \t\tif (i != *nplans)\n> \t\t\treturn (*eplan + i);\n> \t\t*eplan = (EPlan *) realloc(*eplan, (i + 1) * sizeof(EPlan));\n> \t\tnewp = *eplan + i;\n> \t}\n> \telse\n> \t{\n> \t\tnewp = *eplan = (EPlan *) malloc(sizeof(EPlan));\n> \t\t(*nplans) = i = 0;\n> \t}\n> \n> \tnewp->ident = (char *) malloc(strlen(ident) + 1);\n> \tstrcpy(newp->ident, ident);\n> \tnewp->nplans = 0;\n> \tnewp->splan = NULL;\n> \t(*nplans)++;\n> \n> \treturn (newp);\n> }\n\n\n-- \n Bruce Momjian | http://www.op.net/~candle\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sun, 14 Mar 1999 19:34:27 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] Foreign Keys: check_primary_function" } ]
[ { "msg_contents": "By the way, what are all the regress.* and regression.* files in the\nsnapshot test/regress directory?\n\nShould they really be there? Are they in the CVS tree?\n\nCheers,\nBrook\n", "msg_date": "Mon, 21 Sep 1998 14:42:35 -0600 (MDT)", "msg_from": "Brook Milligan <[email protected]>", "msg_from_op": true, "msg_subject": "regress[ion].* files?" }, { "msg_contents": "On Mon, 21 Sep 1998, Brook Milligan wrote:\n\n> By the way, what are all the regress.* and regression.* files in the\n> snapshot test/regress directory?\n> \n> Should they really be there? Are they in the CVS tree?\n\n\tYes, and yes...they are \"expected\" results for the various\noperating system due to slight variations i the operating system\nthemselves...\n\nMarc G. Fournier \nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n", "msg_date": "Mon, 21 Sep 1998 21:50:26 -0300 (ADT)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] regress[ion].* files?" }, { "msg_contents": "> By the way, what are all the regress.* and regression.* files in the\n> snapshot test/regress directory?\n> \n> Should they really be there? Are they in the CVS tree?\n> \n> Cheers,\n> Brook\n> \n> \n\nI have:\n\t\n\t#$ lf\n\tCVS/ regress.c\n\tGNUmakefile regress.sh*\n\tID@ regression.Aix41\n\tMakefile regression.FreeBSD\n\tREADME regression.Solaris-Sparc\n\tcheckresults* regression.Solaris-i386\n\tdata/ regression.diffs\n\texpected/ results/\n\tinput/ sql/\n\tlog tags@\n\toutput/\n\t#$ \n\nLooks OK to me.\n\n\n-- \nBruce Momjian | 830 Blythe Avenue\[email protected] | Drexel Hill, Pennsylvania 19026\nhttp://www.op.net/~candle | (610) 353-9879(w)\n + If your life is a hard drive, | (610) 853-3000(h)\n + Christ can be your backup. |\n", "msg_date": "Tue, 22 Sep 1998 12:51:38 -0400 (EDT)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] regress[ion].* files?" } ]
[ { "msg_contents": "I do not know if this is the correct place to post this\nmessage but here goes...\nI read the previous postings regarding the query \noptimizer crashing with regards to ANDS and ORS and \napparently it is this same code which will crash the\nfollowing query:\n\nselect supply, location, chgdate from charges where\nsupply in ('111111', '222222') and location in ('4 EAST') \n\nbecause the optimizer is reducing the location in ('4 EAST') to\nlocation = '4 EAST', and then hitting the \nbug in the optimizer. Therefore, I have to always \ngenerate queries as follows:\n\nselect supply, location, chgdate from charges where\nsupply in ('111111', '222222') and location in \n('4 EAST', 'garbage to trick postgres')\n\nand I receive the expected results.\n\nHere is the backtrace:\n\nCore was generated by `/usr/local/pgsql/bin/postgres localhost\nmmsadmin m'.\nProgram terminated with signal 11, Segmentation fault.\nReading symbols from /lib/libdl.so.1...done.\nReading symbols from /lib/libm.so.5...done.\nReading symbols from /lib/libtermcap.so.2...done.\nReading symbols from /lib/libncurses.so.3.0...done.\nReading symbols from /lib/libc.so.5...done.\nReading symbols from /lib/ld-linux.so.1...done.\n#0 0x80af4e0 in equal_path_path_ordering ()\n(gdb) bt\n#0 0x80af4e0 in equal_path_path_ordering ()\n#1 0x80af6d3 in better_path ()\n#2 0x80af648 in add_pathlist ()\n#3 0x80a5618 in find_rel_paths ()\n#4 0x80a5583 in find_paths ()\n#5 0x80aa19d in subplanner ()\n#6 0x80aa0d4 in query_planner ()\n#7 0x80aa71f in union_planner ()\n#8 0x80aa5d1 in planner ()\n#9 0x80d5fc0 in pg_parse_and_plan ()\n#10 0x80d60eb in pg_exec_query_dest ()\n#11 0x80d60ac in pg_exec_query ()\n#12 0x80d7114 in PostgresMain ()\n#13 0x80c3580 in DoBackend ()\n#14 0x80c30ce in BackendStartup ()\n#15 0x80c2856 in ServerLoop ()\n#16 0x80c2468 in PostmasterMain ()\n#17 0x809bec0 in main ()\n#18 0x80606fe in _start ()\n\nI hope this helps. I love postgres except for this \nsingle bug which rears its ugly head on one-to-many \nan occassion.\n\nMarcus Mascari\n\n\n\n\n\n\n\n_________________________________________________________\nDO YOU YAHOO!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Mon, 21 Sep 1998 19:38:35 -0700 (PDT)", "msg_from": "Marcus Mascari <[email protected]>", "msg_from_op": true, "msg_subject": "backend crashes under 6.4beta" } ]