threads
listlengths
1
2.99k
[ { "msg_contents": "Is there a formal way of submiting something to the\ncontrib section of the distribution?\n\n__________________________________________________\nGet personalized email addresses from Yahoo! Mail - only $35 \na year! http://personal.mail.yahoo.com/\n", "msg_date": "Sun, 4 Feb 2001 19:37:25 -0800 (PST)", "msg_from": "m w <mttf2000@yahoo.com>", "msg_from_op": true, "msg_subject": "contrib" }, { "msg_contents": "> Is there a formal way of submiting something to the\n> contrib section of the distribution?\n\nNot really. Just throw it over to patches, and we will check it out.\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 4 Feb 2001 22:42:10 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: contrib" }, { "msg_contents": "> > Is there a formal way of submiting something to the\n> > contrib section of the distribution?\n>\n> Not really. Just throw it over to patches, and we will check it out.\n>\n>\n> --\n> Bruce Momjian | http://candle.pha.pa.us\n\nWhile thinking about how to implement TABLE_PRIVILEGES view per SQL92, I\nrealized that a function is needed to dynamically return the current\ndatabase name, and current database owner. I also remembered that I have\nneeded the first function before and could not find anything. Attached is a\ngroup of 4 functions, suitable (I think) for contrib, as follows:\n\ncurrent_dbname() - returns name of current database\ncurrent_dboid() - retuns oid of current database\ncurrent_dbownername() - returns owner name of current database (based on\ndatdba)\ncurrent_dbownerid() - returns owner usesysid (well, more accurately datdba)\n\nInstallation:\ncopy to contrib\ntar -xzvf current_db.tgz\ncd current_db\n./install.sh (or alternatively make; make install; psql -U postgres\nyour_db_name < current_db.sql)\n\nI'd like to have this considered for inclusion in contrib if deemed useful\nto others. Is there anything specific I need to do to in addition to the\nattached?\n\nThanks,\n\n-- Joe", "msg_date": "Mon, 14 May 2001 20:54:46 -0700", "msg_from": "\"Joe Conway\" <joe@conway-family.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] contrib" }, { "msg_contents": "Wouldn't this be better as part of PostgreSQL's standard functions,\ninstead of being in contrib?\n\nFeels like this kind of function is useful \"for everyone\".\n\n???\n\n:-)\n\nRegards and best wishes,\n\nJustin Clift\n\nJoe Conway wrote:\n> \n> > > Is there a formal way of submiting something to the\n> > > contrib section of the distribution?\n> >\n> > Not really. Just throw it over to patches, and we will check it out.\n> >\n> >\n> > --\n> > Bruce Momjian | http://candle.pha.pa.us\n> \n> While thinking about how to implement TABLE_PRIVILEGES view per SQL92, I\n> realized that a function is needed to dynamically return the current\n> database name, and current database owner. I also remembered that I have\n> needed the first function before and could not find anything. Attached is a\n> group of 4 functions, suitable (I think) for contrib, as follows:\n> \n> current_dbname() - returns name of current database\n> current_dboid() - retuns oid of current database\n> current_dbownername() - returns owner name of current database (based on\n> datdba)\n> current_dbownerid() - returns owner usesysid (well, more accurately datdba)\n> \n> Installation:\n> copy to contrib\n> tar -xzvf current_db.tgz\n> cd current_db\n> ./install.sh (or alternatively make; make install; psql -U postgres\n> your_db_name < current_db.sql)\n> \n> I'd like to have this considered for inclusion in contrib if deemed useful\n> to others. Is there anything specific I need to do to in addition to the\n> attached?\n> \n> Thanks,\n> \n> -- Joe\n> \n> ------------------------------------------------------------------------\n> Name: current_db.tgz\n> current_db.tgz Type: application/x-compressed\n> Encoding: base64\n> \n> ------------------------------------------------------------------------\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org\n", "msg_date": "Tue, 15 May 2001 13:58:39 +1000", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": false, "msg_subject": "Re: Re: [HACKERS] contrib" }, { "msg_contents": "\"Joe Conway\" <joe@conway-family.com> writes:\n> While thinking about how to implement TABLE_PRIVILEGES view per SQL92, I\n> realized that a function is needed to dynamically return the current\n> database name, and current database owner.\n\nJust out of curiosity, why are these needed for TABLE_PRIVILEGES?\n\n> current_dbname() - returns name of current database\n> current_dboid() - retuns oid of current database\n> current_dbownername() - returns owner name of current database (based on\n> datdba)\n> current_dbownerid() - returns owner usesysid (well, more accurately datdba)\n\nOne thing to bear in mind is that the existing notion of databases\nmay need to be rethought when we implement SQL-style schemas (which\nI hope will happen for 7.2). It might be best to refrain from inventing\nmore functions until we see how the schema work settles out.\n\nI haven't yet heard any serious discussion about how to integrate\nthe SQL-defined schema concepts with Postgres' traditional concept of\nindependent databases within an installation. It's about time to have\nthat discussion though ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 15 May 2001 00:42:51 -0400", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Re: [HACKERS] contrib " }, { "msg_contents": ">\n> Just out of curiosity, why are these needed for TABLE_PRIVILEGES?\n>\n\nOnly one is really needed for that purpose, current_dbname. TABLE_PRIVILEGES\ndefines the field TABLE_CATALOG which should be set to the current database\nname. In MSSQL7 you can get the current database using a function called\nDB_NAME(). In Oracle, you can get it by querying for NAME from V_$DATABASE.\n\n-- Joe\n\n\n", "msg_date": "Mon, 14 May 2001 23:19:01 -0700", "msg_from": "\"Joe Conway\" <joe@conway-family.com>", "msg_from_op": false, "msg_subject": "Re: Re: [HACKERS] contrib " } ]
[ { "msg_contents": "FreeBSD 4.2, PostgreSQL 7.0.3\n\nThe attached file is the schema and data to the app_degrees table. Now check\nthis out :\n\nselect * from app_degrees gives (expected) :\n\n degree_id | abbr | description\n-----------+--------+------------------------------------------\n 1818 | ACC | Accounting [ACC]\n 1819 | ACD | Acoustics [ACD]\n 1820 | ADV | Advertising [ADV]\n\nselect * from app_degrees order by abbr ASC gives :\n\n degree_id | abbr | description\n-----------+--------+------------------------------------------\n 1818 | ACC | Accounting [ACC]\n 1818 | ACC | Accounting [ACC]\n 1819 | ACD | Acoustics [ACD]\n 1819 | ACD | Acoustics [ACD]\n 1820 | ADV | Advertising [ADV]\n 1820 | ADV | Advertising [ADV]\n\nEither I'm seeing double or something isn't right here :-)\n\nThanks for any insights.\n\n-Mitch\n\n\n", "msg_date": "Sun, 4 Feb 2001 23:00:08 -0500", "msg_from": "\"Mitch Vincent\" <mitch@venux.net>", "msg_from_op": true, "msg_subject": "Very odd order by behavior" }, { "msg_contents": "I found the problem. User error, it's been a long Sunday.\n\nSorry!\n\n-Mitch\n\n----- Original Message -----\nFrom: \"Mitch Vincent\" <mitch@venux.net>\nTo: <pgsql-hackers@postgresql.org>\nSent: Sunday, February 04, 2001 11:00 PM\nSubject: Very odd order by behavior\n\n\n> FreeBSD 4.2, PostgreSQL 7.0.3\n>\n> The attached file is the schema and data to the app_degrees table. Now\ncheck\n> this out :\n>\n> select * from app_degrees gives (expected) :\n>\n> degree_id | abbr | description\n> -----------+--------+------------------------------------------\n> 1818 | ACC | Accounting [ACC]\n> 1819 | ACD | Acoustics [ACD]\n> 1820 | ADV | Advertising [ADV]\n>\n> select * from app_degrees order by abbr ASC gives :\n>\n> degree_id | abbr | description\n> -----------+--------+------------------------------------------\n> 1818 | ACC | Accounting [ACC]\n> 1818 | ACC | Accounting [ACC]\n> 1819 | ACD | Acoustics [ACD]\n> 1819 | ACD | Acoustics [ACD]\n> 1820 | ADV | Advertising [ADV]\n> 1820 | ADV | Advertising [ADV]\n>\n> Either I'm seeing double or something isn't right here :-)\n>\n> Thanks for any insights.\n>\n> -Mitch\n>\n>\n>\n\n", "msg_date": "Sun, 4 Feb 2001 23:05:13 -0500", "msg_from": "\"Mitch Vincent\" <mitch@venux.net>", "msg_from_op": true, "msg_subject": "Re: Very odd order by behavior - followup" } ]
[ { "msg_contents": "Has anyone got PostgreSQL 7.0.3 working on m68k architecture?\n\nRussell is trying to install it on m68k and is consistently getting a\nstuck spinlock in initdb. He used to have 6.3.2 working. Both 6.5.3\nand 7.0.3 fail.\n\nHis message shows that the first attempt to set a lock fails.\n\n------- Forwarded Message\n\nDate: Mon, 05 Feb 2001 09:03:21 -0500\nFrom: Russell Hires <rhires@earthlink.net>\nTo: Oliver.Elphick@lfix.co.uk\nSubject: Stuck Spinlock\n\nHey, here is the spinlock test results...\n\nThanks!\n\nRussell\n\n\nrusty@smurfette:~/postgresql-7.0.3/src/backend/storage/buffer$ make\ns_lock_test\ngcc -I../../../include -I../../../backend -O2 -g -g3 -Wall\n- -Wmissing-prototypes -Wmissing-declarations -I../.. -DS_LOCK_TEST=1 s_lock.c\n- -o s_lock_test\ns_lock.c:251: warning: return type of `main' is not `int'\n./s_lock_test\n\nFATAL: s_lock(80002974) at s_lock.c:260, stuck spinlock. Aborting.\n\nFATAL: s_lock(80002974) at s_lock.c:260, stuck spinlock. Aborting.\nmake: *** [s_lock_test] Aborted\nmake: *** Deleting file `s_lock_test'\n\n\n\n\n------- End of Forwarded Message\n\n\n-- \nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight http://www.lfix.co.uk/oliver\nPGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Lift up your heads, O ye gates; and be ye lift up, ye \n everlasting doors; and the King of glory shall come \n in. Who is this King of glory? The LORD strong and \n mighty, the LORD mighty in battle.\" \n Psalms 24:7,8 \n\n\n", "msg_date": "Mon, 05 Feb 2001 14:29:33 +0000", "msg_from": "\"Oliver Elphick\" <olly@lfix.co.uk>", "msg_from_op": true, "msg_subject": "Stuck Spinlock (fwd) - m68k architecture, 7.0.3" }, { "msg_contents": "\"Oliver Elphick\" <olly@lfix.co.uk> writes:\n> Has anyone got PostgreSQL 7.0.3 working on m68k architecture?\n> Russell is trying to install it on m68k and is consistently getting a\n> stuck spinlock in initdb. He used to have 6.3.2 working. Both 6.5.3\n> and 7.0.3 fail.\n> His message shows that the first attempt to set a lock fails.\n\nThere was no TAS() support for m68k before 6.5, so 6.3.2 could have\n\"worked\" only for rather small values of \"work\".\n\nJust eyeballing the m68k TAS assembly code, I think it is incorrectly\nassuming that the result register will start off as zeroes. Please try\nthe following patch in src/include/storage/s_lock.h:\n\n static __inline__ int\n tas(volatile slock_t *lock)\n {\n register int rv;\n \n __asm__ __volatile__(\n+ \" clrl %0 \\n\"\n \" tas %1 \\n\"\n \" sne %0 \\n\"\n : \"=d\"(rv), \"=m\"(*lock)\n : \"1\"(*lock)\n : \"cc\");\n \n return rv;\n }\n\n(This is against the current CVS file; the code is formatted differently\nin 6.5, but is equivalent.)\n\nDon't forget to \"make clean\" and rebuild the whole backend after\napplying the patch, unless you've set up proper dependency tracking.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 05 Feb 2001 10:26:36 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Stuck Spinlock (fwd) - m68k architecture, 7.0.3 " } ]
[ { "msg_contents": "Hi,\n\tIm building a server that uses libpq to connect to a database and\nauthenticate the users that connect.\n\tI do PQfinish for the conn and PQclear for the result so there cant be\na memory leak there.\n\tIf I remove the function where I authenticate my server can handle as\nmuch clients as I want.\n\tIf I authenticate every clients with connections to the database it\ncrashes on PQconnectdb at th 1024th client without returning an error(it just\nsegfaults).\n\tMy ulimit -n is more than 1024 btw.\n\n\tDid anybody encounter such problem?? I've been trying to fix this one\nfor a long time...\n\n\t\t\t\t\t\tThanks\n\t\t\t\t\t\t-Mat\n\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Mon, 5 Feb 2001 10:01:36 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "1024 limit?" } ]
[ { "msg_contents": "Hi,\n \tIm building a server that uses libpq to connect to a database and\nauthenticate the users that connect.\n\tI do PQfinish for the conn and PQclear for the result so there cant be\na memory leak there.\n \tIf I remove the function where I authenticate my server can handle as\nmuch clients as I want.\n \tIf I authenticate every clients with connections to the database it\ncrashes on PQconnectdb at th 1024th client without returning an error(it just\nsegfaults).\n \tMy ulimit -n is more than 1024 btw.\n\n \tDid anybody encounter such problem?? I've been trying to fix this one\nfor a long time...\n\n Thanks\n -Mat\n\n\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Mon, 5 Feb 2001 10:11:21 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "1024 limit??" } ]
[ { "msg_contents": "Hi,\n\nOK full text searching. Will the full text index\ncatch changes in verb tense? i.e. will a search for\nwoman catch women?\n\nI'm researching before I dive in to this later in the\nweek so please excuse this incompletely informed\nquestion: Will I need to rebuild postgresql with the\nfull-text index module included? Unfortunately I'm\naway from my linux machine-- would someone be willing\nto email me the README?\n\nThanks in advance,\n\nCulley\n\n__________________________________________________\nGet personalized email addresses from Yahoo! Mail - only $35 \na year! http://personal.mail.yahoo.com/\n", "msg_date": "Mon, 5 Feb 2001 07:22:49 -0800 (PST)", "msg_from": "Culley Harrelson <culleyharrelson@yahoo.com>", "msg_from_op": true, "msg_subject": "full text searching" }, { "msg_contents": "> Hi,\n>\n> OK full text searching. Will the full text index\n> catch changes in verb tense? i.e. will a search for\n> woman catch women?\n>\n> I'm researching before I dive in to this later in the\n> week so please excuse this incompletely informed\n> question: Will I need to rebuild postgresql with the\n> full-text index module included? Unfortunately I'm\n> away from my linux machine-- would someone be willing\n> to email me the README?\n\nRegardless of indexing, you're still searching for a specific string (if you\nsearch using the = operator).\n\nSELECT * from people WHERE whatever = 'woman';\n\n-- Isn't going to catch anything but the literal string \"woman\".. (it's case\nsensitive too, mind you)\n\nSELECT * from people WHERE whatever LIKE 'wom%n';\n\n-- Should check either.\n\nA regex search is going to get more specific but when using the regex\nsearch, you can't use indexes.\n\nAnyone, please correct me if I'm wrong.\n\n-Mitch\n\n\n", "msg_date": "Mon, 5 Feb 2001 11:28:45 -0500", "msg_from": "\"Mitch Vincent\" <mitch@venux.net>", "msg_from_op": false, "msg_subject": "Re: full text searching" }, { "msg_contents": "Another thing..\n\nFull text indexing, last time I checked, was just a trigger/function, you\ndon't have to rebuild anything that I'm aware of to include it..\n\n-Mitch\n\n> Hi,\n>\n> OK full text searching. Will the full text index\n> catch changes in verb tense? i.e. will a search for\n> woman catch women?\n>\n> I'm researching before I dive in to this later in the\n> week so please excuse this incompletely informed\n> question: Will I need to rebuild postgresql with the\n> full-text index module included? Unfortunately I'm\n> away from my linux machine-- would someone be willing\n> to email me the README?\n>\n> Thanks in advance,\n>\n> Culley\n>\n> __________________________________________________\n> Get personalized email addresses from Yahoo! Mail - only $35\n> a year! http://personal.mail.yahoo.com/\n>\n\n", "msg_date": "Mon, 5 Feb 2001 11:32:55 -0500", "msg_from": "\"Mitch Vincent\" <mitch@venux.net>", "msg_from_op": false, "msg_subject": "Re: full text searching" }, { "msg_contents": "\"Mitch Vincent\" <mitch@venux.net> writes:\n\n> -- Isn't going to catch anything but the literal string \"woman\".. (it's case\n> sensitive too, mind you)\n> \n> SELECT * from people WHERE whatever LIKE 'wom%n';\n> \n> -- Should check either.\n\nWell you wouldn't want to start building these kind of rules in your\napplication - better to have them in the search engine. The fulltextindex\nin the contrib package does of course not offer anything like this, it\nwould be nice to see a third party addon provide fulltext capabilities for\nPostgresql. \n\nregards, \n\n\tGunnar\n", "msg_date": "06 Feb 2001 14:29:33 +0100", "msg_from": "Gunnar R|nning <gunnar@candleweb.no>", "msg_from_op": false, "msg_subject": "Re: full text searching" }, { "msg_contents": "> Well you wouldn't want to start building these kind of rules in your\n> application - better to have them in the search engine. The fulltextindex\n> in the contrib package does of course not offer anything like this, it\n> would be nice to see a third party addon provide fulltext capabilities for\n> Postgresql.\n\nWell, the search engine isn't the database, IMHO. The search \"engine\" is\nyour application... The database will go get anything you tell it to, you\njust have to know how to tell it and make sure that your application tells\nit in the correct way.\n\nTeaching an application or database the English language is going to be a\nhell of a project, good luck!\n\n Personally, I think the FTI trigger and function that's in contrib is\npretty bad. It's not usable in a lot of situations, I re-wrote it to remove\nduplicates and index whole words but it still didn't work out for me...\nNamely when you have fairly large chunks of text (30k or so), one for each\nrecord in a row (and you have 10,000 rows).. Well, ripping out and indexing\n30k*10k text chunks is a lot by itself but then when you search it you have\nto join the two tables... It becomes a mess and was actually slower than\nwhen I used LIKE to search the big text fields in my single table. It only\ntake a few seconds for the seq scan and the index scan on the FTI table but\nwith FTI updating became a 30 second job (of course there were like 4\nmillion rows and each app did have 30k of text or so).. I don't have too\nmany small databases, so maybe this works for a lot of people :-)\n\nAnyway. Moral of the story.. I'd like to see native PostgreSQL full text\nindexing before we go adding on to the contrib'd trigger/function\nimplementation...\n\n-Mitch\n\n", "msg_date": "Tue, 6 Feb 2001 11:15:59 -0500", "msg_from": "\"Mitch Vincent\" <mitch@venux.net>", "msg_from_op": false, "msg_subject": "Re: full text searching" }, { "msg_contents": "\"Mitch Vincent\" <mitch@venux.net> writes:\n\n\n> Well, the search engine isn't the database, IMHO. The search \"engine\" is\n> your application... The database will go get anything you tell it to, you\n> just have to know how to tell it and make sure that your application tells\n> it in the correct way.\n> \n> Teaching an application or database the English language is going to be a\n> hell of a project, good luck!\n\nWell, I don't want to write another search engine. What I would like to see\nis a way to integrate with different third party products. It would be cool\nwith Lucene or some other free search engine as an optional add on\nfor PostgreSQL. \n\n> Anyway. Moral of the story.. I'd like to see native PostgreSQL full text\n> indexing before we go adding on to the contrib'd trigger/function\n> implementation...\n\nWell, I think any attempt at a \"complete\" full text indexing implementation\nin the database itself is futile. Find a way to move this out of the\ndatabase and integrate with another product. \n\nI've been using a variant of the FTI system in an application, but this is\nfar from sufficient when it comes to matching. Speed is OK, but the quality\nof the results could have been a lot better. \n\nRegards, \n\n\tGunnar\n", "msg_date": "06 Feb 2001 21:26:59 +0100", "msg_from": "Gunnar R|nning <gunnar@candleweb.no>", "msg_from_op": false, "msg_subject": "Re: full text searching" }, { "msg_contents": "> > Well, the search engine isn't the database, IMHO. The search \"engine\" is\n> > your application... The database will go get anything you tell it to,\nyou\n> > just have to know how to tell it and make sure that your application\ntells\n> > it in the correct way.\n> >\n> > Teaching an application or database the English language is going to be\na\n> > hell of a project, good luck!\n>\n> Well, I don't want to write another search engine. What I would like to\nsee\n> is a way to integrate with different third party products. It would be\ncool\n> with Lucene or some other free search engine as an optional add on\n> for PostgreSQL.\n>\n> > Anyway. Moral of the story.. I'd like to see native PostgreSQL full text\n> > indexing before we go adding on to the contrib'd trigger/function\n> > implementation...\n>\n> Well, I think any attempt at a \"complete\" full text indexing\nimplementation\n> in the database itself is futile. Find a way to move this out of the\n> database and integrate with another product.\n\nFutile? Nah, I don't think it's futile anymore than indexing for any other\nfield is futile. If you could have both then well, that would rock.\n\nI'm talking about indexing from the standpoint of fast searching, not really\nsmart searching (I wouldn't want a search for \"woman\" to return results with\n\"women\"). I put it upon myself to generate the queries needed to give the\nproper results.. I work for a custom software shop and so far every\napplication I've written needs a search and the client needs it to do a very\ncustomized, very specific thing. I can't help but write it from scratch (of\ncourse all I'm really doing is writing a frontend to PostgreSQL).. I'm not\nsure that a generic search engine would work for me because all the clients\nI've worked with have very specific needs.. PostgreSQL is my generic search\nengine for all intents and ppurposes and I make it give me what I want..\nWith regard to FTI, I just want it to search large chunks of text faster...\n\n> I've been using a variant of the FTI system in an application, but this is\n> far from sufficient when it comes to matching. Speed is OK, but the\nquality\n> of the results could have been a lot better.\n\nReally? How are you using it? If it's better than the one I wrote (and it\nalmost has to be!) I'd love to take a look.. Speed is OK on the machine I'm\nsearching through large text chunks with now because of a combination of a\ngood database (PostgreSQL) and a hefty machine (Dual PII 800, 512M ECC RAM,\nUltra 160 SCSI drives).. Still it's only doing sequential scans and using\nLIKE to give me matches.. My search is generic SELECT * from whatever WHERE\ntextfield LIKE '%<searched word>%'; ----- That's fairly fast -- it would\nbe a hell of a lot faster if I could do an index scan there.. Of course it\nwas, it's just that updating and inserting suffered too much; something that\nwill happen anytime you're indexing large amount of data on the fly, I would\njust like to see it suffer less, which might happen if FTI was built into\nPG.. I'm just talking here, I don't know how FTI would be implemented better\nif it was built in, other than I'm sure the person doing it would know more\nabout the internals of PG and more about C then me (Sadly I'm not all that\ngood with C anymore)..\n\nHave a good one!\n\n\n-Mitch\n\n\n\n\n\n\n", "msg_date": "Tue, 6 Feb 2001 16:27:11 -0500", "msg_from": "\"Mitch Vincent\" <mitch@venux.net>", "msg_from_op": false, "msg_subject": "Re: full text searching" }, { "msg_contents": "\"Mitch Vincent\" <mitch@venux.net> writes:\n\n> > I've been using a variant of the FTI system in an application, but this is\n> > far from sufficient when it comes to matching. Speed is OK, but the\n> quality\n> > of the results could have been a lot better.\n> \n> Really? How are you using it? If it's better than the one I wrote (and it\n> almost has to be!) I'd love to take a look.. Speed is OK on the machine I'm\n\nIt is really not based on the FTI code in PostgreSQL, since with we started\nout with a Progress database last year before porting to PostgreSQL. The\nidea is the same though, a separate lookup table containing the words for\nexact matching. Last time I had a look at the clients database it had about\n50-60K rows in the content table, which amounted to about ~3500K rows in\nthe lookup table. Searches return results instantly even though most of\nthem are joins involving 3-4 tables. The database(7.0.2) is running on a\nSun 220R with one 450MHZ processor, 10000RPM disks, 1GB RAM and Solaris\n7. (As a curiosity my P466 laptop with Linux is actually running PostgreSQL\nfaster...)\n\nSince we're only doing exact searches, the index is utilized. But the\nquality isn't good enough - I would love to have language sensitive\nsearches. \"car\" should match \"cars\" but not cartography and \"ship\"\nshould/could match \"boat\" etc. \n\nRegards, \n\n\tGunnar\n", "msg_date": "07 Feb 2001 16:39:32 +0100", "msg_from": "Gunnar R|nning <gunnar@candleweb.no>", "msg_from_op": false, "msg_subject": "Re: full text searching" }, { "msg_contents": "On 7 Feb 2001, Gunnar R|nning wrote:\n> It is really not based on the FTI code in PostgreSQL, since with we started\n> out with a Progress database last year before porting to PostgreSQL. The\n> idea is the same though, a separate lookup table containing the words for\n> exact matching. Last time I had a look at the clients database it had about\n> 50-60K rows in the content table, which amounted to about ~3500K rows in\n> the lookup table. Searches return results instantly even though most of\n> them are joins involving 3-4 tables. The database(7.0.2) is running on a\n> Sun 220R with one 450MHZ processor, 10000RPM disks, 1GB RAM and Solaris\n> 7. (As a curiosity my P466 laptop with Linux is actually running PostgreSQL\n> faster...)\n> \n> Since we're only doing exact searches, the index is utilized. But the\n> quality isn't good enough - I would love to have language sensitive\n> searches. \"car\" should match \"cars\" but not cartography and \"ship\"\n> should/could match \"boat\" etc. \n\nyou can use ispell prefix/suffix for searching base words.\n\n", "msg_date": "Wed, 7 Feb 2001 11:40:30 -0600 (CST)", "msg_from": "\"Thomas T. Thai\" <tom@minnesota.com>", "msg_from_op": false, "msg_subject": "Re: full text searching" }, { "msg_contents": "At 11:40 AM 07-02-2001 -0600, Thomas T. Thai wrote:\n>On 7 Feb 2001, Gunnar R|nning wrote:\n>> \n>> Since we're only doing exact searches, the index is utilized. But the\n>> quality isn't good enough - I would love to have language sensitive\n>> searches. \"car\" should match \"cars\" but not cartography and \"ship\"\n>> should/could match \"boat\" etc. \n>\n>you can use ispell prefix/suffix for searching base words.\n\nSometimes I want it literal too. e.g. I'm searching for car I want car and\nnothing else.\n\nWhat I figured first was to create yet another dictionary of meanings. \n\nWhere ship is converted to meaning1 (verb), meaning2 (noun), etc.\nAnd boat is converted to meaning2 (noun).\n\nBut then boat is not really the same as ship. So they should actually be\nseparate meanings maybe linked by a weight. Maybe we should make use of\nPostgresql's polygon stuff, and stick a boat polygon somewhere where it\nintersects a ship polygon and a canoe polygon.\n\nIn the end it seems too complex. I'm starting to think it may be better to\nkeep things literal but fast, and do the smart stuff at the client (do\nmultiple searches if necessary).\n\nCheerio,\nLink.\n\n", "msg_date": "Thu, 08 Feb 2001 10:54:56 +0800", "msg_from": "Lincoln Yeoh <lyeoh@pop.jaring.my>", "msg_from_op": false, "msg_subject": "Re: full text searching" }, { "msg_contents": "Lincoln Yeoh <lyeoh@pop.jaring.my> writes:\n\n> Sometimes I want it literal too. e.g. I'm searching for car I want car and\n> nothing else.\n\nOf course, you want this as well. \n\n> In the end it seems too complex. I'm starting to think it may be better to\n> keep things literal but fast, and do the smart stuff at the client (do\n> multiple searches if necessary).\n\nYou got commercial products like Verity that is able to these kind of\nthings. I've used Verity in conjunction with Sybase, apart from stability\nproblems, that was a very nice combination on doing free text searches. I\ncould define which columns I wanted indexed, and then I could do you joins\nagainst a proxy table(the index) to do synonym searches, word searches,\nregex searches, soundex searches etc. \n\nVerity was running in a separate process and that Sybase forwards the free\ntext search to when you join against the proxy table. Maybe we could have a\nsimilar architecture in PostgreSQL as well some day. \n\nDoes anybody know how Oracle has implemented their \"context\" search or\nwhatever it is called nowadays ?\n\nregards, \n\n\tGunnar \n\n\n\n\n", "msg_date": "08 Feb 2001 16:36:24 +0100", "msg_from": "Gunnar R|nning <gunnar@candleweb.no>", "msg_from_op": false, "msg_subject": "Re: full text searching" }, { "msg_contents": "(bcc'ed to -hackers)\n\nGunnar R|nning wrote:\n\n> Does anybody know how Oracle has implemented their \"context\" search or\n> whatever it is called nowadays ?\n\nThey're calling it Intermedia now ... http://www.oracle.com/intermedia/\n\nI have yet to meet an Oracle customer who likes it.\n\nI think there's a lot of agreement that this is an area where Postgres \ncould use some work. I know Oleg Bartunov has done some interesting \nwork with Postgres and the search engine at the Russian portal site \n\"Rambler\" ... http://www.rambler.ru/ . Oleg, could you talk a bit about \nwhat you guys did?\n\nIf there's interest in spinning up a separate project to sit outside the \ndatabase, a la Intermedia or Verity, we'd be happy to sponsor such a \nthing on our GreatBridge.org project hosting site (CVS, bug tracking, \nmail lists, etc.)\n\nRegards,\nNed\n\n-- \n----------------------------------------------------\nNed Lilly e: ned@greatbridge.com\nVice President w: www.greatbridge.com\nEvangelism / Hacker Relations v: 757.233.5523\nGreat Bridge, LLC f: 757.233.5555\n\n", "msg_date": "Thu, 08 Feb 2001 11:34:15 -0500", "msg_from": "Ned Lilly <ned@greatbridge.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] Re: full text searching" }, { "msg_contents": "On Thu, 8 Feb 2001, Ned Lilly wrote:\n\n> (bcc'ed to -hackers)\n>\n> Gunnar R|nning wrote:\n>\n> > Does anybody know how Oracle has implemented their \"context\" search or\n> > whatever it is called nowadays ?\n>\n> They're calling it Intermedia now ... http://www.oracle.com/intermedia/\n>\n> I have yet to meet an Oracle customer who likes it.\n>\n> I think there's a lot of agreement that this is an area where Postgres\n> could use some work. I know Oleg Bartunov has done some interesting\n> work with Postgres and the search engine at the Russian portal site\n> \"Rambler\" ... http://www.rambler.ru/ . Oleg, could you talk a bit about\n> what you guys did?\n\nWell, we have FTS engine fully based on postgresql. It was developed\nspecifically for indexing dynamic text collections like online\nnews. It has support of morphology, uses coordinate information and\nsophisticated ranking of search results. Search and ranking are built\nin postgres. Currently the biggest collection we have is about 300,000\nmessages. We're not very happy with performance on such size collection\nand specifically to improve it we did researching in GiST area.\nUsing GiST we did index support for integer arrays which greatly\nimproves search performance ! Right now we are trying to understand\nhow to improve sort performance, which is a final (we hope) stopper\nfor our FTS. Let me explain a bit:\nSearch performance is great, but in real life application we have to\ndisplay result of search on Web page, page by page. Results could be sorted\nby relevancy or another parameter. In case of online news or mailing\nlist archive results are sorted by publication date. We found that most\ntime is spent to sort full set of results while we need just\n10-15 rows to display on Web page (using ORDER BY .. LIMIT,OFFSET)\nSome queries in our case produce\nabout 50,000 rows (search \"Putin\" for example) ! Sort time is enormous and\neats all the performance gain we did for search. One solution we currently\ninvestigating is implementation of partial sort into postgres.\nWe don't need to sort full set. Currently LIMIT provides rather simple\noptimization - only part of results are transferred from backend to client.\nWe propose stop sorting after getting those part of results already\nsorted. From our experience and literature we know that 95% of all\nhits gets 2 first pages of search results. In our worst case with\n50,000 rows we could get first page to display about 5-6 times faster\nif we do partial sorting. I understand it looks rather limited area\nfor optimization but many people would appreciate such optimization.\nI remember when I asked Jan to implement LIMIT feature many friends\nmomentally moved from mysql to postgres. This feature isn't standard\nbut it's Web friendly and most web applications utilize it.\nWe have a patch for 7.1, well, just a sketch we did for benchmarking\npurposes. Tom isn't happy and we still need some help from core developers.\nBut time is for 7.1 release and we dont' want to bother developers\nright now. Anyway, for medium size collection our FTS is good enough\neven using plain 7.0.3. We was planning to release FTS as open source\nbefore new year but were messed with organizational problem (still have :-(\n\n>\n> If there's interest in spinning up a separate project to sit outside the\n> database, a la Intermedia or Verity, we'd be happy to sponsor such a\n> thing on our GreatBridge.org project hosting site (CVS, bug tracking,\n> mail lists, etc.)\n\nWe plan to develope sample application - searching postgres mail archives\n( I have collection from 1995) and present it for testing. If people will\nhappy with performance and quality of results we could install it\non www.postgresql.org.\n\n>\n> Regards,\n> Ned\n>\n>\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n\n", "msg_date": "Fri, 9 Feb 2001 00:07:15 +0300 (GMT)", "msg_from": "Oleg Bartunov <oleg@sai.msu.su>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] Re: full text searching" }, { "msg_contents": "On Fri, 9 Feb 2001, Oleg Bartunov wrote:\n\n> We plan to develope sample application - searching postgres mail archives\n> ( I have collection from 1995) and present it for testing. If people will\n> happy with performance and quality of results we could install it\n> on www.postgresql.org.\n\nYou tell me what resources you need, and, hell, what access you need for\ntesting, and I'll happily provide it ... :)\n\n\n", "msg_date": "Thu, 8 Feb 2001 18:35:22 -0400 (AST)", "msg_from": "The Hermit Hacker <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] Re: full text searching" }, { "msg_contents": "Hi!\n\nI will be setting up a 3-way replicated server setup over the next\nweek or two, so this is probably a good time to make sure I know\nexactly what I'm in for. To my knowledge, rserv is the only currently\navailable replication server for Postgres - is that correct?\n\n1) Is there a way to designate 1 server as master, and do transparent\nclustering by just connecting to that one server? Or does the\nclustering have to be handled on the client end by making a connection\nto each server and doing a \"round-robin\" for picking the server for\neach query (multi-threaded application)?\n\n2) If a server fails, how can it be resynchronised with the rest of\nthe cluster? I am asuming that inserts all have to be channeled\nthrough the same server, in order to avoid race conditions. Is this\ncorrect? If a server fails, and inserts are constantly being made,\nthen I am guessing that a dump/restore will not work properly if the\nmaster (insert) server is not taken off-line and inserts are stopped.\nIs this the case? How can this be done without taking the master\nserver off-line? Taking any server off line would take it out of sync,\nso just doing a restore from another secondary server would then\nresult in two servers being out of sync. How is this worked around?\n\n3) I know this has been asked before, and I've managed to get a few\nresponses about how to implement a quick and useable solution to this,\nbut I seem to have misplaced the emails, so please forgive me for\nasking this again.\n\nIs it possible to run Linux + Mosix + GFS to achieve the functionality\nof a truly distributed database system? The bandwidth of communication\nbetween the servers is not a huge problem, because I have the option\nof connecting them either in a \"star\" configuration with 100 Mb\nethernet, connect them to a switch, or use a fiber link between them.\nI've been told that \"postmaster\" won't get migrated properly due to\nIPC and shared memory issues. Can anyone suggest a work-around? DIPC,\nperhaps? I can't see how to work around the shared memory, though...\n\nI know Oracle has a full distributed clustering support, but I have\nmade a decision to stick with open source software all the way (plus\nthe cost of running Oracle on a commercial setup is quite\nprohibitive).\n\nStill, even if the answer to the fully distributed database question\nhere is still just big, fat, flat \"NO!\", I'd really appreciate some\ninput regarding failure recovery and insert handling on a replicated\ndatabase cluster.\n\nRegards.\n\nGordan\n\n\n", "msg_date": "Mon, 23 Apr 2001 11:38:00 +0100", "msg_from": "\"Gordan Bobic\" <gordan@freeuk.com>", "msg_from_op": false, "msg_subject": "Replication and on-line recovery" }, { "msg_contents": "Hi Gordan,\n\nWhilst probably not really useful just yet, (as I presently know very\nlittle about replication, but I'm learning), I have just begun writing\nup my initial attempts with rserv and Usogres (another PostgreSQL\nreplication approach).\n\ntechdocs.postgresql.org/installguides.html#replication\n\nIf you get it all setup and working in good order, can you write up a\nguide on doing it, as I haven't found anything \"out there\" about it,\nwhich is why I'm starting?\n\n:-)\n\nRegards and best wishes,\n\nJustin Clift\n\nGordan Bobic wrote:\n> \n> Hi!\n> \n> I will be setting up a 3-way replicated server setup over the next\n> week or two, so this is probably a good time to make sure I know\n> exactly what I'm in for. To my knowledge, rserv is the only currently\n> available replication server for Postgres - is that correct?\n> \n> 1) Is there a way to designate 1 server as master, and do transparent\n> clustering by just connecting to that one server? Or does the\n> clustering have to be handled on the client end by making a connection\n> to each server and doing a \"round-robin\" for picking the server for\n> each query (multi-threaded application)?\n> \n> 2) If a server fails, how can it be resynchronised with the rest of\n> the cluster? I am asuming that inserts all have to be channeled\n> through the same server, in order to avoid race conditions. Is this\n> correct? If a server fails, and inserts are constantly being made,\n> then I am guessing that a dump/restore will not work properly if the\n> master (insert) server is not taken off-line and inserts are stopped.\n> Is this the case? How can this be done without taking the master\n> server off-line? Taking any server off line would take it out of sync,\n> so just doing a restore from another secondary server would then\n> result in two servers being out of sync. How is this worked around?\n> \n> 3) I know this has been asked before, and I've managed to get a few\n> responses about how to implement a quick and useable solution to this,\n> but I seem to have misplaced the emails, so please forgive me for\n> asking this again.\n> \n> Is it possible to run Linux + Mosix + GFS to achieve the functionality\n> of a truly distributed database system? The bandwidth of communication\n> between the servers is not a huge problem, because I have the option\n> of connecting them either in a \"star\" configuration with 100 Mb\n> ethernet, connect them to a switch, or use a fiber link between them.\n> I've been told that \"postmaster\" won't get migrated properly due to\n> IPC and shared memory issues. Can anyone suggest a work-around? DIPC,\n> perhaps? I can't see how to work around the shared memory, though...\n> \n> I know Oracle has a full distributed clustering support, but I have\n> made a decision to stick with open source software all the way (plus\n> the cost of running Oracle on a commercial setup is quite\n> prohibitive).\n> \n> Still, even if the answer to the fully distributed database question\n> here is still just big, fat, flat \"NO!\", I'd really appreciate some\n> input regarding failure recovery and insert handling on a replicated\n> database cluster.\n> \n> Regards.\n> \n> Gordan\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Mon, 23 Apr 2001 20:44:35 +1000", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": false, "msg_subject": "Re: Replication and on-line recovery" }, { "msg_contents": "> I will be setting up a 3-way replicated server setup over the next\n> week or two, so this is probably a good time to make sure I know\n> exactly what I'm in for. To my knowledge, rserv is the only currently\n> available replication server for Postgres - is that correct?\n\nPostgreSQL Replicator (http://pgreplicator.sourceforge.net/) appears to be\nanother. Justin has also mentioned Usogres (which I think is at\nhttp://usogres.good-day.net/ but appears to be down at the moment).\n\nI'm starting to do some research (kinda sorta) on replication and I'd love\nto hear anything about either of these three servers. I'll try to do the\nsame if my time allows.\n\nGreg\n\n", "msg_date": "Mon, 23 Apr 2001 11:42:39 -0400", "msg_from": "\"Gregory Wood\" <gregw@com-stock.com>", "msg_from_op": false, "msg_subject": "Re: Replication and on-line recovery" } ]
[ { "msg_contents": "Hi,\n \tIm building a server that uses libpq to connect to a database and\nauthenticate the users that connect.\n \tI do PQfinish for the conn and PQclear for the result so there cant be\na memory leak there.\n \tIf I remove the function where I authenticate my server can handle as\nmuch clients as I want.\n\tIf I authenticate every clients with connections to the database it\ncrashes on PQconnectdb at th 1024th client without returning an error(it just\nsegfaults).\n \tMy ulimit -n is more than 1024 btw.\n\n \tDid anybody encounter such problem?? I've been trying to fix this one\nfor a long time...\n\n \t\t Thanks\n \t\t -Mat\n\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Mon, 5 Feb 2001 10:41:41 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "1024 limits??" }, { "msg_contents": "Mathieu Dube <mathieu_dube@videotron.ca> writes:\n> \tIf I remove the function where I authenticate my server can handle as\n> much clients as I want.\n\nWhich authentication method do you use?\n\n> \tIf I authenticate every clients with connections to the database it\n> crashes on PQconnectdb at th 1024th client without returning an error(it just\n> segfaults).\n\nPlease provide a backtrace from the segfault ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 05 Feb 2001 11:11:37 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: 1024 limits?? " }, { "msg_contents": "I just do a select on a user table with the username and password\n\npretty upfront and normal query\n\nyou would like me to use PQtrace???\nit doesnt say much\n\nif I do bt on gdb it says: 0x4b3003d in ?? ()\n\nOn Mon, 05 Feb 2001, you wrote:\n> Mathieu Dube <mathieu_dube@videotron.ca> writes:\n> > \tIf I remove the function where I authenticate my server can handle as\n> > much clients as I want.\n> \n> Which authentication method do you use?\n> \n> > \tIf I authenticate every clients with connections to the database it\n> > crashes on PQconnectdb at th 1024th client without returning an error(it just\n> > segfaults).\n> \n> Please provide a backtrace from the segfault ...\n> \n> \t\t\tregards, tom lane\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Mon, 5 Feb 2001 11:20:47 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "Re: 1024 limits??" }, { "msg_contents": "Im currently using rpms \nis there a way to just remove an rpm(the API one) and compile only that??\n\nwhere can I find libpq sources?\n\nmy app is already compiled with -g\n\nOn Mon, 05 Feb 2001, you wrote:\n> Mathieu Dube <mathieu_dube@videotron.ca> writes:\n> > if I do bt on gdb it says: 0x4b3003d in ?? ()\n> \n> You'll need to recompile libpq and your application with -g in CFLAGS\n> to get a more useful backtrace from gdb.\n> \n> \t\t\tregards, tom lane\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Mon, 5 Feb 2001 11:31:37 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "Re: 1024 limits??" }, { "msg_contents": "You need to compile PostgreSQL from source with -g ..\n\nftp.postgresql.org is the main FTP, there are many mirrors. Look for the\nsource tarball there..\n\n-Mitch\n\n----- Original Message -----\nFrom: \"Mathieu Dube\" <mathieu_dube@videotron.ca>\nTo: \"Tom Lane\" <tgl@sss.pgh.pa.us>\nCc: <pgsql-hackers@postgresql.org>\nSent: Monday, February 05, 2001 11:31 AM\nSubject: Re: 1024 limits??\n\n\n> Im currently using rpms\n> is there a way to just remove an rpm(the API one) and compile only that??\n>\n> where can I find libpq sources?\n>\n> my app is already compiled with -g\n>\n> On Mon, 05 Feb 2001, you wrote:\n> > Mathieu Dube <mathieu_dube@videotron.ca> writes:\n> > > if I do bt on gdb it says: 0x4b3003d in ?? ()\n> >\n> > You'll need to recompile libpq and your application with -g in CFLAGS\n> > to get a more useful backtrace from gdb.\n> >\n> > regards, tom lane\n> --\n> Mathieu Dube\n> Mondo-Live\n> www.flipr.com\n>\n\n", "msg_date": "Mon, 5 Feb 2001 11:47:40 -0500", "msg_from": "\"Mitch Vincent\" <mitch@venux.net>", "msg_from_op": false, "msg_subject": "Re: 1024 limits??" }, { "msg_contents": "\"Mitch Vincent\" <mitch@venux.net> writes:\n> You need to compile PostgreSQL from source with -g ..\n> ftp.postgresql.org is the main FTP, there are many mirrors. Look for the\n> source tarball there..\n\n>> Im currently using rpms\n>> is there a way to just remove an rpm(the API one) and compile only that??\n\nIf you don't want to mess with removing the RPMs, you don't have to.\nBuild the source with -g, but don't install it. Instead, copy the\nstatic libpq.a library (look in src/interfaces/libpq after building)\nto your application directory, and force your app to link against it\ninstead of against the libpq.so that's in /usr/lib (or whereever the\nRPMs installed it).\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 05 Feb 2001 11:52:35 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: 1024 limits?? " }, { "msg_contents": "cc -o therver therver.c -g -lflipr -lpq -L. -lpthread -D_REENTRANT\n./libpq.a(fe-auth.o): In function `pg_password_sendauth':\n/usr/local/postgresql-7.0.3/src/interfaces/libpq/fe-auth.c:465: undefined reference to `crypt'\ncollect2: ld returned 1 exit status\nmake: *** [therver] Error 1\n\nthis is what I get \nshould I copy other files?\n\nOn Mon, 05 Feb 2001, you wrote:\n> \"Mitch Vincent\" <mitch@venux.net> writes:\n> > You need to compile PostgreSQL from source with -g ..\n> > ftp.postgresql.org is the main FTP, there are many mirrors. Look for the\n> > source tarball there..\n> \n> >> Im currently using rpms\n> >> is there a way to just remove an rpm(the API one) and compile only that??\n> \n> If you don't want to mess with removing the RPMs, you don't have to.\n> Build the source with -g, but don't install it. Instead, copy the\n> static libpq.a library (look in src/interfaces/libpq after building)\n> to your application directory, and force your app to link against it\n> instead of against the libpq.so that's in /usr/lib (or whereever the\n> RPMs installed it).\n> \n> \t\t\tregards, tom lane\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Mon, 5 Feb 2001 12:20:45 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "Re: Re: 1024 limits??" }, { "msg_contents": "* Mathieu Dube <mathieu_dube@videotron.ca> [010205 09:32] wrote:\n> cc -o therver therver.c -g -lflipr -lpq -L. -lpthread -D_REENTRANT\n> ./libpq.a(fe-auth.o): In function `pg_password_sendauth':\n> /usr/local/postgresql-7.0.3/src/interfaces/libpq/fe-auth.c:465: undefined reference to `crypt'\n> collect2: ld returned 1 exit status\n> make: *** [therver] Error 1\n> \n> this is what I get \n> should I copy other files?\n\nno, just add -lcrypt to your LDFLAGS\n\n", "msg_date": "Mon, 5 Feb 2001 09:50:56 -0800", "msg_from": "Alfred Perlstein <bright@wintelcom.net>", "msg_from_op": false, "msg_subject": "Re: Re: 1024 limits??" }, { "msg_contents": "Which file should I read the symbol from??\n\nOn Mon, 05 Feb 2001, Mitch Vincent wrote:\n> You need to compile PostgreSQL from source with -g ..\n> \n> ftp.postgresql.org is the main FTP, there are many mirrors. Look for the\n> source tarball there..\n> \n> -Mitch\n> \n> ----- Original Message -----\n> From: \"Mathieu Dube\" <mathieu_dube@videotron.ca>\n> To: \"Tom Lane\" <tgl@sss.pgh.pa.us>\n> Cc: <pgsql-hackers@postgresql.org>\n> Sent: Monday, February 05, 2001 11:31 AM\n> Subject: Re: 1024 limits??\n> \n> \n> > Im currently using rpms\n> > is there a way to just remove an rpm(the API one) and compile only that??\n> >\n> > where can I find libpq sources?\n> >\n> > my app is already compiled with -g\n> >\n> > On Mon, 05 Feb 2001, you wrote:\n> > > Mathieu Dube <mathieu_dube@videotron.ca> writes:\n> > > > if I do bt on gdb it says: 0x4b3003d in ?? ()\n> > >\n> > > You'll need to recompile libpq and your application with -g in CFLAGS\n> > > to get a more useful backtrace from gdb.\n> > >\n> > > regards, tom lane\n> > --\n> > Mathieu Dube\n> > Mondo-Live\n> > www.flipr.com\n> >\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Mon, 5 Feb 2001 13:18:48 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "Re: Re: 1024 limits??" }, { "msg_contents": " From which file should I load the symbol for gdb??\n\n\t\t\t\t\tThanks\n\t\t\t\t\t-Mat\nOn Mon, 05 Feb 2001, you wrote:\n> \"Mitch Vincent\" <mitch@venux.net> writes:\n> > You need to compile PostgreSQL from source with -g ..\n> > ftp.postgresql.org is the main FTP, there are many mirrors. Look for the\n> > source tarball there..\n> \n> >> Im currently using rpms\n> >> is there a way to just remove an rpm(the API one) and compile only that??\n> \n> If you don't want to mess with removing the RPMs, you don't have to.\n> Build the source with -g, but don't install it. Instead, copy the\n> static libpq.a library (look in src/interfaces/libpq after building)\n> to your application directory, and force your app to link against it\n> instead of against the libpq.so that's in /usr/lib (or whereever the\n> RPMs installed it).\n> \n> \t\t\tregards, tom lane\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Mon, 5 Feb 2001 13:45:35 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "Re: Re: 1024 limits??" } ]
[ { "msg_contents": "I'd like to have pg_dump for 7.1 produce \"timestamp with time zone\" when\ndealing with timestamp type(s). That will prepare us for introducing a\ntimestamp type without time zones, while allowing reasonable upgrades to\n7.2.\n\nComments? Would a pg_dump guru be willing to take this on? Should be\n\"easy\", since afaik we already map some internal types to external\nSQL-standard names...\n\n - Thomas\n", "msg_date": "Mon, 05 Feb 2001 17:00:48 +0000", "msg_from": "Thomas Lockhart <lockhart@alumni.caltech.edu>", "msg_from_op": true, "msg_subject": "timestamp in pg_dump" }, { "msg_contents": "Thomas Lockhart writes:\n\n> I'd like to have pg_dump for 7.1 produce \"timestamp with time zone\" when\n> dealing with timestamp type(s). That will prepare us for introducing a\n> timestamp type without time zones, while allowing reasonable upgrades to\n> 7.2.\n>\n> Comments? Would a pg_dump guru be willing to take this on? Should be\n> \"easy\", since afaik we already map some internal types to external\n> SQL-standard names...\n\nDid that.\n\nBut given that 'timestamp' is really 'timestamp with time zone' and there\nis no 'timestamp without time zone', isn't there something wrong with the\ndocumentation? See User's Guide, table 3-6:\n\nhttp://www.postgresql.org/devel-corner/docs/postgres/datatype-datetime.htm\n\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Mon, 5 Feb 2001 18:43:46 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: timestamp in pg_dump" }, { "msg_contents": "> > I'd like to have pg_dump for 7.1 produce \"timestamp with time zone\" when\n> > dealing with timestamp type(s). That will prepare us for introducing a\n> > timestamp type without time zones, while allowing reasonable upgrades to\n> > 7.2.\n> Did that.\n\nGreat!\n\n> But given that 'timestamp' is really 'timestamp with time zone' and there\n> is no 'timestamp without time zone', isn't there something wrong with the\n> documentation? See User's Guide, table 3-6:\n\nHmm. Not sure *where* some of that info came from; perhaps it is a\nholdover from when timestamp was implemented as a 4 byte integer. Or it\nwas space aliens ;) Will update asap. Thanks for catching it...\n\n - Thomas\n", "msg_date": "Tue, 06 Feb 2001 04:46:47 +0000", "msg_from": "Thomas Lockhart <lockhart@alumni.caltech.edu>", "msg_from_op": true, "msg_subject": "Re: timestamp in pg_dump" } ]
[ { "msg_contents": "To build the PostgreSQL ODBC driver from CVS (or a recent\nsnapshot/beta, I presume): the following steps worked for me:\n\n+ Make sure that the psqlodbc.def file in interfaces/odbc is exactly\n as distributed or obtained from CVS, not the result of some prior build.\n\n+ Run 'configure' _without_ '--with-odbc' to build PostgreSQL.\n\n+ Follow the steps in interfaces/odbc/readme.txt to build the ODBC DLL\n using MS Visual C++.\n\nBuilding with '--with-odbc' will appear to work, but the resulting DLL\n(created by Cygwin gcc/tools) completely fails to work for me once\ninstalled. (It would have been nice if the documentation gave a hint\nabout this. Or did I miss it? The presense of the readme.txt file\ndoes not suffice to make it clear that VC++ is the _only_ correct way\nto build the module for WIN32.)\n\nI also got confused when first building the DLL from VC++, because my\nprior efforts using '--with-odbc' left behind a psqlodbc.def file that\nis incorrect. My thanks to Hiroshi Inoue for helping me get past this.\n\n-- \nFred Yankowski fred@OntoSys.com tel: +1.630.879.1312\nPrincipal Consultant www.OntoSys.com fax: +1.630.879.1370\nOntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA\n", "msg_date": "Mon, 5 Feb 2001 11:04:05 -0600", "msg_from": "Fred Yankowski <fred@ontosys.com>", "msg_from_op": true, "msg_subject": "build WIN32 ODBC using VC++, not Cygwin/gcc" }, { "msg_contents": "Fred Yankowski writes:\n\n> To build the PostgreSQL ODBC driver from CVS (or a recent\n> snapshot/beta, I presume): the following steps worked for me:\n[snip]\n> + Run 'configure' _without_ '--with-odbc' to build PostgreSQL.\n\nI doubt you need that, since you don't use the makefiles.\n\n[snip]\n\n> Building with '--with-odbc' will appear to work, but the resulting DLL\n> (created by Cygwin gcc/tools) completely fails to work for me once\n> installed. (It would have been nice if the documentation gave a hint\n> about this. Or did I miss it?\n\nSomething more detailed thatn \"completely fails to work\" might shed some\nlight onto it.\n\n> The presense of the readme.txt file does not suffice to make it clear\n> that VC++ is the _only_ correct way to build the module for WIN32.)\n\nTrue, it is not a very prominent place to hide such a thing. Maybe it\nwould be appropriate to mention it in the \"Installation on Windows\"\nchapter in the Administrator's Guide or alternatively in the ODBC chapter\nin the Programmer's Guide.\n\n\nCan somebody explain to me what this means, from said readme.txt:\n\n\"In order to use row versioning, you must overload the int4eq function for\nuse with the xid type.\"\n\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Mon, 5 Feb 2001 20:06:28 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: build WIN32 ODBC using VC++, not Cygwin/gcc" }, { "msg_contents": "On Mon, Feb 05, 2001 at 08:06:28PM +0100, Peter Eisentraut wrote:\n> > + Run 'configure' _without_ '--with-odbc' to build PostgreSQL.\n> \n> I doubt you need that, since you don't use the makefiles.\n\nI stated that point for the benefit of those, like me, who are\nbuilding all of PG from source, not just building ODBC. Using\n'--with-odbc' in such a case has two problems: 1) it builds a useless\npsqlodbc.dll; 2) it updates (AFAICT) psqlodbc.def to new data that\nwill cause a later, independent, build of psqlodbc.dll via VC++ to\nfail.\n\n> > Building with '--with-odbc' will appear to work, but the resulting DLL\n> > (created by Cygwin gcc/tools) completely fails to work for me once\n> > installed. (It would have been nice if the documentation gave a hint\n> > about this. Or did I miss it?\n> \n> Something more detailed thatn \"completely fails to work\" might shed some\n> light onto it.\n\nI had posted earlier messages with more details (which got no response\nother than from Mr. Hiroshi Inoue, who got me past the problem) so I\ndidn't repeat them in that message. Anyway, here's what happens when\nI build psqlodbc.dll as part of a complete pgsql build, having\nconfigured with '--with-odbc':\n\n+ The psqlodbc.dll file appears to build OK, with no warnings (that I\n recall).\n\n+ When I overwrite my systemroot/system32/psqlodbc.dll with the one I\n just built, I then can no longer access any ODBC functions for\n PostgreSQL. In particular:\n\n + The 'PostgreSQL' driver does appear in the list of drivers in the\n ODBC control panel. However, its version & company information\n is not available.\n\n + When I select an existing System DSN using the PostgreSQL driver\n and click Configure, I get the message \"The setup routines for\n the PostgreSQL ODBC driver could not be accessed. Please\n reinstall the driver.\"\n\n + When I try to Add a new DSN using the PostgreSQL DSN, the same\n message results.\n\n + When I try to bring up my Zope website, which employs several\n ODBC connections (and is my only application using PG ODBC),\n accessing that site results in an application error from\n Zope/python saying \"The instruction at '0x64eca3e5' referenced\n memory at '0x014f3e54'. The memory could not be 'read'.\".\n Bringing up the VC++ debugger at that point gives me the message\n \"Unhandled exception in python.exe (PSQLODBC.DLL): 0xC0000005:\n Access Violation\".\n\n\n-- \nFred Yankowski fred@OntoSys.com tel: +1.630.879.1312\nPrincipal Consultant www.OntoSys.com fax: +1.630.879.1370\nOntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA\n", "msg_date": "Mon, 5 Feb 2001 13:37:06 -0600", "msg_from": "Fred Yankowski <fred@ontosys.com>", "msg_from_op": true, "msg_subject": "Re: build WIN32 ODBC using VC++, not Cygwin/gcc" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Can somebody explain to me what this means, from said readme.txt:\n\n> \"In order to use row versioning, you must overload the int4eq function for\n> use with the xid type.\"\n\nApparently, there is something in either the ODBC driver itself or MS\nAccess that expects to be able to do \"WHERE xmin = integer\". Since we\nsupply no such operator in the standard distribution, one has to kluge\nup the operator as illustrated. Of course, this code will break if we\ngo to 8-byte XIDs ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 05 Feb 2001 14:43:27 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: build WIN32 ODBC using VC++, not Cygwin/gcc " } ]
[ { "msg_contents": "This is the debug output for the last query that seems to be throwing PHP\ninto a fit (a fit that somehow closes the backend connection - note, it\ndoesn't crash, it just closes)..\n\nI don't think anything is going on here that shouldn't be, it looks the same\nas any other query that succeeds.. I just wanted someone that could actually\nread and understand this to take a look..\n\nThanks!\n\nDebug output follows ---\n\n\nProcessQuery\nCommitTransactionCommand\nStartTransactionCommand\nquery: SELECT * FROM app_degrees\nparser outputs:\n\n{ QUERY :command 1 :utility <> :resultRelation 0 :into <> :isPortal false\n:isBinary false :isTemp false :unionall false :distinctClause <> :sortClause\n<> :rtable ({ RTE :relname app_degrees :ref { ATTR :relname app_degrees\n:attrs <>} :relid 660864 :inh false :inFromCl true :inJoinSet true :skipAcl\nfalse}) :targetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23\n:restypmod -1 :resname degree_id :reskey 0 :reskeyop 0 :ressortgroupref 0\n:resjunk false } :expr { VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1\n:varlevelsup 0 :varnoold 1 :varoattno 1}} { TARGETENTRY :resdom { RESDOM\n:resno 2 :restype 1043 :restypmod 14 :resname abbr :reskey 0 :reskeyop 0\n:ressortgroupref 0 :resjunk false } :expr { VAR :varno 1 :varattno 2\n:vartype 1043 :vartypmod 14 :varlevelsup 0 :varnoold 1 :varoattno 2}} {\nTARGETENTRY :resdom { RESDOM :resno 3 :restype 1043 :restypmod 54 :resname\ndescription :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr\n{ VAR :varno 1 :varattno 3 :vartype 1043 :vartypmod 54 :varlevelsup 0\n:varnoold 1 :varoattno 3}}) :qual <> :groupClause <> :havingQual <> :hasAggs\nfalse :hasSubLinks false :unionClause <> :intersectClause <> :limitOffset <>\n:limitCount <> :rowMark <>}\n\nafter rewriting:\n{ QUERY\n :command 1\n :utility <>\n :resultRelation 0\n :into <>\n :isPortal false\n :isBinary false\n :isTemp false\n :unionall false\n :distinctClause <>\n :sortClause <>\n :rtable (\n { RTE\n :relname app_degrees\n :ref\n { ATTR\n :relname app_degrees\n :attrs <>\n }\n\n :relid 660864\n :inh false\n :inFromCl true\n :inJoinSet true\n :skipAcl false\n }\n )\n\n :targetlist (\n { TARGETENTRY\n :resdom\n { RESDOM\n :resno 1\n :restype 23\n :restypmod -1\n :resname degree_id\n :reskey 0\n :reskeyop 0\n :ressortgroupref 0\n :resjunk false\n }\n\n :expr\n { VAR\n :varno 1\n :varattno 1\n :vartype 23\n :vartypmod -1\n :varlevelsup 0\n :varnoold 1\n :varoattno 1\n }\n }\n\n { TARGETENTRY\n :resdom\n { RESDOM\n :resno 2\n :restype 1043\n :restypmod 14\n :resname abbr\n :reskey 0\n :reskeyop 0\n :ressortgroupref 0\n :resjunk false\n }\n\n :expr\n { VAR\n :varno 1\n :varattno 2\n :vartype 1043\n :vartypmod 14\n :varlevelsup 0\n :varnoold 1\n :varoattno 2\n }\n }\n\n { TARGETENTRY\n :resdom\n { RESDOM\n :resno 3\n :restype 1043\n :restypmod 54\n :resname description\n :reskey 0\n :reskeyop 0\n :ressortgroupref 0\n :resjunk false\n }\n\n :expr\n { VAR\n :varno 1\n :varattno 3\n :vartype 1043\n :vartypmod 54\n :varlevelsup 0\n :varnoold 1\n :varoattno 3\n }\n }\n )\n\n :qual <>\n :groupClause <>\n :havingQual <>\n :hasAggs false\n :hasSubLinks false\n :unionClause <>\n :intersectClause <>\n :limitOffset <>\n :limitCount <>\n :rowMark <>\n }\n\nplan:\n\n{ SEQSCAN :startup_cost 0.00 :total_cost 20.00 :rows 1000 :width 28 :state\n<> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23\n:restypmod -1 :resname degree_id :reskey 0 :reskeyop 0 :ressortgroupref 0\n:resjunk false } :expr { VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1\n:varlevelsup 0 :varnoold 1 :varoattno 1}} { TARGETENTRY :resdom { RESDOM\n:resno 2 :restype 1043 :restypmod 14 :resname abbr :reskey 0 :reskeyop 0\n:ressortgroupref 0 :resjunk false } :expr { VAR :varno 1 :varattno 2\n:vartype 1043 :vartypmod 14 :varlevelsup 0 :varnoold 1 :varoattno 2}} {\nTARGETENTRY :resdom { RESDOM :resno 3 :restype 1043 :restypmod 54 :resname\ndescription :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr\n{ VAR :varno 1 :varattno 3 :vartype 1043 :vartypmod 54 :varlevelsup 0\n:varnoold 1 :varoattno 3}}) :qpqual <> :lefttree <> :righttree <> :extprm ()\n:locprm () :initplan <> :nprm 0 :scanrelid 1 }\n\nProcessQuery\nCommitTransactionCommand\nproc_exit(0)\nshmem_exit(0)\nexit(0)\n/usr/local/pgsql/bin/postmaster: reaping dead processes...\n/usr/local/pgsql/bin/postmaster: CleanupProc: pid 45155 exited with status 0\n\n\n\n\n\n", "msg_date": "Mon, 5 Feb 2001 13:21:17 -0500", "msg_from": "\"Mitch Vincent\" <mitch@venux.net>", "msg_from_op": true, "msg_subject": "PostgreSQL -> PHP problem" }, { "msg_contents": "In the PHP bugs I see...\n\n\n> > ===============================================[PostgreSQL\n>related]===========\n> > 5862 Open Consecutive pg_open statements cause second statement to\n>fail\n> > 6525 Open Connection problem\n> > 7007 Open The pg_close function doesn't close the connection.\n> > 7236 Open 1 is not a valid PostgreSQL link resource\n> > 7264 Open 1 is not a valid PostgreSQL link\n> > 7298 Open ... not a valid link resource... after pg_connect\n> > 7312 Open Problems with pg_connect() i pg_fetch_row()\n> > 7333 Open Connection fault in circled query\n> > 7529 Open pg_connect() returns invalid connection id\n> > 7536 Open Warning: is not a valid PostgreSQL link resource xxxx\n> > 7931 Feedback Undefined symbol \"_PQconnectdb\"\n> > 8053 Open PGSQL doesn't detects on FBSD4\n> > 8225 Open Suddenly doesnt allow multiple psql connections from one\n>php page\n> > 8317 Open postgresql table uppercase field name\n> > 8689 Open pg_Connect() seems to do some type of caching that\ndoesn't\n>quite work\n> > 8769 Open Persistent connections aren't closed when using\n>dynamically loaded module\n> > 8907 Open pg_Close on multiple connections to same host\n> > 9048 Open problem to open several connections on 4.0.4pl1 that\n>worked on 4.0.2\n\nOuch. It looks like this is exactly what is happening to me. pg_open gets\ncalled several times in these scripts.. It looks like I'll have to install\nan old version of PHP.. Son of a.... er nevermind..\n\nThanks guys..\n\n-Mitch\n\n\n", "msg_date": "Mon, 5 Feb 2001 13:28:57 -0500", "msg_from": "\"Mitch Vincent\" <mitch@venux.net>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL -> PHP problem" }, { "msg_contents": "I tell you what I'd like to see in PHP. If you're using a Postgres\npersistent connection, and it detects a 'BEGIN TRANSACTION' going thru, once\nthat script has finished, the connection should not be returned to the\nconnection pool.\n\nChris\n\n> -----Original Message-----\n> From: pgsql-hackers-owner@postgresql.org\n> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Mitch Vincent\n> Sent: Tuesday, February 06, 2001 2:29 AM\n> To: pgsql-hackers@postgresql.org\n> Subject: [HACKERS] Re: PostgreSQL -> PHP problem\n>\n>\n> In the PHP bugs I see...\n>\n>\n> > > ===============================================[PostgreSQL\n> >related]===========\n> > > 5862 Open Consecutive pg_open statements cause second\n> statement to\n> >fail\n> > > 6525 Open Connection problem\n> > > 7007 Open The pg_close function doesn't close the connection.\n> > > 7236 Open 1 is not a valid PostgreSQL link resource\n> > > 7264 Open 1 is not a valid PostgreSQL link\n> > > 7298 Open ... not a valid link resource... after pg_connect\n> > > 7312 Open Problems with pg_connect() i pg_fetch_row()\n> > > 7333 Open Connection fault in circled query\n> > > 7529 Open pg_connect() returns invalid connection id\n> > > 7536 Open Warning: is not a valid PostgreSQL link resource xxxx\n> > > 7931 Feedback Undefined symbol \"_PQconnectdb\"\n> > > 8053 Open PGSQL doesn't detects on FBSD4\n> > > 8225 Open Suddenly doesnt allow multiple psql\n> connections from one\n> >php page\n> > > 8317 Open postgresql table uppercase field name\n> > > 8689 Open pg_Connect() seems to do some type of caching that\n> doesn't\n> >quite work\n> > > 8769 Open Persistent connections aren't closed when using\n> >dynamically loaded module\n> > > 8907 Open pg_Close on multiple connections to same host\n> > > 9048 Open problem to open several connections on 4.0.4pl1 that\n> >worked on 4.0.2\n>\n> Ouch. It looks like this is exactly what is happening to me. pg_open gets\n> called several times in these scripts.. It looks like I'll have to install\n> an old version of PHP.. Son of a.... er nevermind..\n>\n> Thanks guys..\n>\n> -Mitch\n>\n>\n\n", "msg_date": "Tue, 6 Feb 2001 09:55:22 +0800", "msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>", "msg_from_op": false, "msg_subject": "RE: Re: PostgreSQL -> PHP problem" }, { "msg_contents": "Bruce said he and Rasmus (from PHP devel) were fixing this. That'll be\ngreat!\n\n-Mitch\n\n----- Original Message -----\nFrom: \"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>\nTo: <pgsql-hackers@postgresql.org>\nSent: Monday, February 05, 2001 8:55 PM\nSubject: RE: Re: PostgreSQL -> PHP problem\n\n\n> I tell you what I'd like to see in PHP. If you're using a Postgres\n> persistent connection, and it detects a 'BEGIN TRANSACTION' going thru,\nonce\n> that script has finished, the connection should not be returned to the\n> connection pool.\n>\n> Chris\n>\n> > -----Original Message-----\n> > From: pgsql-hackers-owner@postgresql.org\n> > [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Mitch Vincent\n> > Sent: Tuesday, February 06, 2001 2:29 AM\n> > To: pgsql-hackers@postgresql.org\n> > Subject: [HACKERS] Re: PostgreSQL -> PHP problem\n> >\n> >\n> > In the PHP bugs I see...\n> >\n> >\n> > > > ===============================================[PostgreSQL\n> > >related]===========\n> > > > 5862 Open Consecutive pg_open statements cause second\n> > statement to\n> > >fail\n> > > > 6525 Open Connection problem\n> > > > 7007 Open The pg_close function doesn't close the connection.\n> > > > 7236 Open 1 is not a valid PostgreSQL link resource\n> > > > 7264 Open 1 is not a valid PostgreSQL link\n> > > > 7298 Open ... not a valid link resource... after pg_connect\n> > > > 7312 Open Problems with pg_connect() i pg_fetch_row()\n> > > > 7333 Open Connection fault in circled query\n> > > > 7529 Open pg_connect() returns invalid connection id\n> > > > 7536 Open Warning: is not a valid PostgreSQL link resource\nxxxx\n> > > > 7931 Feedback Undefined symbol \"_PQconnectdb\"\n> > > > 8053 Open PGSQL doesn't detects on FBSD4\n> > > > 8225 Open Suddenly doesnt allow multiple psql\n> > connections from one\n> > >php page\n> > > > 8317 Open postgresql table uppercase field name\n> > > > 8689 Open pg_Connect() seems to do some type of caching that\n> > doesn't\n> > >quite work\n> > > > 8769 Open Persistent connections aren't closed when using\n> > >dynamically loaded module\n> > > > 8907 Open pg_Close on multiple connections to same host\n> > > > 9048 Open problem to open several connections on 4.0.4pl1 that\n> > >worked on 4.0.2\n> >\n> > Ouch. It looks like this is exactly what is happening to me. pg_open\ngets\n> > called several times in these scripts.. It looks like I'll have to\ninstall\n> > an old version of PHP.. Son of a.... er nevermind..\n> >\n> > Thanks guys..\n> >\n> > -Mitch\n> >\n> >\n>\n>\n\n", "msg_date": "Mon, 5 Feb 2001 21:12:19 -0500", "msg_from": "\"Mitch Vincent\" <mitch@venux.net>", "msg_from_op": true, "msg_subject": "Re: Re: PostgreSQL -> PHP problem" } ]
[ { "msg_contents": "We are currently developing a java RMI Server to manage database backup on\nFreeBSD 4.1 running Postgres 7.0.2 (we plan to upgrade to 7.1 when it is\nreleased). The server will pg_dump individual tables and entire databases\nat specified intervals and manage backup verification and backup file\nmaintenance.\n\nThe current postgres documentation indicates that pg_dump can either backup\none file at a time or an entire database within a single transaction in\norder to maintain data integrity. My questions are:\n\nIf I pg_dump a single table which has a foreign key constraint, and\nsubsequently backup the constraint table, won't the data be out of sync?\nEach pg_dump will run in it's own transaction, right?\n\nIs there a way to dump multiple tables within a single transaction without\nhaving to dump the entire database? If not, is it plausible for me to add\nthis option i.e. pg_dump -t <array_of_tables> ?\n\nWhat happens when I restore if the data is out of sync?\n\nAs an aside, the current documentation does not reflect all of the pg_dump\noptions, specifically the \"-f\" option which will cause pg_dump to output to\na file instead of stdout. This information is very useful to java developers\nwho need to execute external commands and direct the output to somewhere\nother than java... Is there anything I can do to help update documentation\nfor postgres configuration options in general?\n\nThanks for all comments.\n\nPeter Schmidt\nPrismedia Networks\npschmidt@prismedia.com\n\n\n\n\n", "msg_date": "Mon, 5 Feb 2001 11:09:44 -0800", "msg_from": "\"Peter Schmidt\" <peterjs@home.com>", "msg_from_op": true, "msg_subject": "pg_dump data integrity & java" }, { "msg_contents": "At 11:09 5/02/01 -0800, Peter Schmidt wrote:\n>\n>If I pg_dump a single table which has a foreign key constraint, and\n>subsequently backup the constraint table, won't the data be out of sync?\n>Each pg_dump will run in it's own transaction, right?\n\nYes.\n\n\n>Is there a way to dump multiple tables within a single transaction without\n>having to dump the entire database? If not, is it plausible for me to add\n>this option i.e. pg_dump -t <array_of_tables> ?\n\nThe version in 7.1 should allow '-t *' or '--tables' which will dump all\ntables. The ability to dump selected tables was not seen as a high priority.\n\n\n>What happens when I restore if the data is out of sync?\n\nIf it is dumped as inserts you will get RI errors. If done via copy then\nsome but not all constraints will be evaluated - I think that COPY does not\nfire triggers.\n\n\n>As an aside, the current documentation does not reflect all of the pg_dump\n>options, specifically the \"-f\" option which will cause pg_dump to output to\n\nCurrent docs do cover -f. Maybe you are looking at 7.0 docs?\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Tue, 06 Feb 2001 09:48:01 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: pg_dump data integrity & java" }, { "msg_contents": "Philip Warner <pjw@rhyme.com.au> writes:\n> If it is dumped as inserts you will get RI errors. If done via copy then\n> some but not all constraints will be evaluated - I think that COPY does not\n> fire triggers.\n\nSay what? COPY certainly does fire triggers ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 05 Feb 2001 20:16:48 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pg_dump data integrity & java " }, { "msg_contents": "At 20:16 5/02/01 -0500, Tom Lane wrote:\n>Philip Warner <pjw@rhyme.com.au> writes:\n>> If it is dumped as inserts you will get RI errors. If done via copy then\n>> some but not all constraints will be evaluated - I think that COPY does not\n>> fire triggers.\n>\n>Say what? COPY certainly does fire triggers ...\n\nIs there any difference between COPY and INSERT other than speed?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Tue, 06 Feb 2001 12:22:16 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: pg_dump data integrity & java " }, { "msg_contents": "Philip Warner <pjw@rhyme.com.au> writes:\n>> Say what? COPY certainly does fire triggers ...\n\n> Is there any difference between COPY and INSERT other than speed?\n\nCOPY does not fire ON INSERT rules. Other than that, AFAIR they're\nthe same from an integrity point of view.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 05 Feb 2001 20:28:36 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pg_dump data integrity & java " } ]
[ { "msg_contents": "Hrm- I'd love to know where this patch is. I don't see how that quite \nbreaks PG_DUMPALL though. Really if your logged in as a superuser \n(postgres) you should be able to use all the databases and dump all of the \ndata. Am I the only one that doesn't see where the problem is? How about a \npatch that says 'if the user that created the database is not the current \nuser, then reject- otherwise accept'. I could go for that. Though access \ncontrol would be nice, I could log in as a superuser, make a user with the \nability to make databases, login as that user, make the databases I need, \nthen login as postgres and revoke the privilages of creating databases. \nSuddenly you can only access databases you created and its as easy as that \n(a few PHP lines if you ask me) to make new databases. Wouldn't it just be \na simple IF statement to see if the current user is the database owner [or \nif they have the superuser ID set]?\n\nAm I not seeing the big picture?\n\n--\nMike\n\n\n>From: Kovacs Baldvin <kb136@hszk.bme.hu>\n>To: Mike Miller <temp6453@hotmail.com>\n>CC: martin@math.unl.edu.ar, mfork@toledolink.com, \n>pgsql-hackers@postgresql.org, pgsql-general@postgresql.org\n>Subject: Re: [HACKERS] Re: Re: grant privileges to a database [URGENT]\n>Date: Mon, 5 Feb 2001 20:13:38 +0100 (MET)\n>\n>Hello\n>\n>A few weeks ago I was interested in this question. My results were:\n>- Yes, this is a sorrowful but true fact that if you enable access to\n> someone to a database, she is automatically enabled to create\n> objects in it.\n>- Yes, the developers know it, and they said: there is a patch existing\n> to workaround it.\n>- No, they don't include it in 7.1. The reason: if you use that patch,\n> pg_dumpall will not work. If somebody will have the strength in\n> him to fix it, than it will be considered to include it in the base.\n>\n>After collecting these informations from more experienced people,\n>I calmed down. Since I am in the beginning of creating my project,\n>I think for the time when I will need it, it will be ready.\n>\n>Anyway, I do not know where this patch is. If you don't bother\n>about pg_dumpall, ask a developer (a am only a wannabe developer)\n>about it.\n>\n>If anyone detects that I wrote silly things, please do correct me.\n>\n>Bye,\n>Baldvin\n>\n>\n>\n>\n\n_________________________________________________________________________\nGet Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.\n\n", "msg_date": "Mon, 05 Feb 2001 20:04:50 ", "msg_from": "\"Mike Miller\" <temp6453@hotmail.com>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Re: Re: grant privileges to a database [URGENT]" }, { "msg_contents": "A step in the right direction for this to have the system catalog have\npg_user_* views. So dor databases we have:\n\ncreate view pg_user_database as\nselect * from pg_database where pg_get_userbyid(datdba) = CURRENT_USER\n\nOf course, this doesn't account for superusers, but I'm sure there is a way\nthe gurus can accomplish that.\n\n-Dan\n\n----- Original Message -----\nFrom: \"Mike Miller\" <temp6453@hotmail.com>\nTo: <kb136@hszk.bme.hu>\nCc: <martin@math.unl.edu.ar>; <mfork@toledolink.com>;\n<pgsql-hackers@postgresql.org>; <pgsql-general@postgresql.org>\nSent: Monday, February 05, 2001 8:04 PM\nSubject: [GENERAL] Re: [HACKERS] Re: Re: grant privileges to a database\n[URGENT]\n\n\n> Hrm- I'd love to know where this patch is. I don't see how that quite\n> breaks PG_DUMPALL though. Really if your logged in as a superuser\n> (postgres) you should be able to use all the databases and dump all of the\n> data. Am I the only one that doesn't see where the problem is? How about\na\n> patch that says 'if the user that created the database is not the current\n> user, then reject- otherwise accept'. I could go for that. Though access\n> control would be nice, I could log in as a superuser, make a user with the\n> ability to make databases, login as that user, make the databases I need,\n> then login as postgres and revoke the privilages of creating databases.\n> Suddenly you can only access databases you created and its as easy as that\n> (a few PHP lines if you ask me) to make new databases. Wouldn't it just\nbe\n> a simple IF statement to see if the current user is the database owner [or\n> if they have the superuser ID set]?\n>\n> Am I not seeing the big picture?\n>\n> --\n> Mike\n>\n>\n> >From: Kovacs Baldvin <kb136@hszk.bme.hu>\n> >To: Mike Miller <temp6453@hotmail.com>\n> >CC: martin@math.unl.edu.ar, mfork@toledolink.com,\n> >pgsql-hackers@postgresql.org, pgsql-general@postgresql.org\n> >Subject: Re: [HACKERS] Re: Re: grant privileges to a database [URGENT]\n> >Date: Mon, 5 Feb 2001 20:13:38 +0100 (MET)\n> >\n> >Hello\n> >\n> >A few weeks ago I was interested in this question. My results were:\n> >- Yes, this is a sorrowful but true fact that if you enable access to\n> > someone to a database, she is automatically enabled to create\n> > objects in it.\n> >- Yes, the developers know it, and they said: there is a patch existing\n> > to workaround it.\n> >- No, they don't include it in 7.1. The reason: if you use that patch,\n> > pg_dumpall will not work. If somebody will have the strength in\n> > him to fix it, than it will be considered to include it in the base.\n> >\n> >After collecting these informations from more experienced people,\n> >I calmed down. Since I am in the beginning of creating my project,\n> >I think for the time when I will need it, it will be ready.\n> >\n> >Anyway, I do not know where this patch is. If you don't bother\n> >about pg_dumpall, ask a developer (a am only a wannabe developer)\n> >about it.\n> >\n> >If anyone detects that I wrote silly things, please do correct me.\n> >\n> >Bye,\n> >Baldvin\n> >\n> >\n> >\n> >\n>\n> _________________________________________________________________________\n> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.\n>\n\n", "msg_date": "Mon, 5 Feb 2001 21:57:55 -0800", "msg_from": "\"Dan Wilson\" <phpPgAdmin@acucore.com>", "msg_from_op": false, "msg_subject": "Re: Re: [HACKERS] Re: Re: grant privileges to a database [URGENT]" } ]
[ { "msg_contents": "even after compiling with -g and using the libpq.a it still outputs that on the\nbt after the crash...\n\n(gdb) bt\n#0 0x40050768 in ?? ()\n#1 0x4004ff25 in ?? ()\n#2 0x804a3cd in main (argc=3, argv=0xbffff8e4) at therver.c:430\n#3 0x400739ee in ?? ()\n\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Mon, 5 Feb 2001 15:12:23 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "with -g and libpq.a ..." }, { "msg_contents": "Mathieu Dube <mathieu_dube@videotron.ca> writes:\n> even after compiling with -g and using the libpq.a it still outputs that on the\n> bt after the crash...\n\n> (gdb) bt\n> #0 0x40050768 in ?? ()\n> #1 0x4004ff25 in ?? ()\n> #2 0x804a3cd in main (argc=3, argv=0xbffff8e4) at therver.c:430\n> #3 0x400739ee in ?? ()\n\nSo what's the code in and around line 430 of therver.c? Probably\nyou are looking at a crash in some libc routine, perhaps we can\nguess which by seeing what was called.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 05 Feb 2001 21:21:36 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: with -g and libpq.a ... " } ]
[ { "msg_contents": "If I write a function that does a 'tolower()' on each\ncharacter of a parameter passed into my function, do I\nhave to allocate a new text object and initialize it\nand copy the data, or can I modify that object in\nplace and return it?\n\nModifying it in place will save the overhead of an\nalloc call, and on a large database, that could add\nup.\n\nright now, I am allocating a new data buffer of\nexactly the same size and it seems like a waste.\n\nSecondly, if I modify the data length of an object,\nas: VARDATA(field) = nn, making sure that 'nn' is\nsmaller than the origial length, with this affect the\nmemory management?\n\nIn short, can we modify text * objects passed to a C\nfunction, and can we shrink the length field without\nany ill effects?\n\n(Doing so will reduce quite a bit of memory allocation\noverhead I am doing.)\n\n\n__________________________________________________\nGet personalized email addresses from Yahoo! Mail - only $35 \na year! http://personal.mail.yahoo.com/\n", "msg_date": "Mon, 5 Feb 2001 12:13:56 -0800 (PST)", "msg_from": "m w <mttf2000@yahoo.com>", "msg_from_op": true, "msg_subject": "Can we modify 'text *' passed to a C function?" }, { "msg_contents": "m w <mttf2000@yahoo.com> writes:\n> If I write a function that does a 'tolower()' on each\n> character of a parameter passed into my function, do I\n> have to allocate a new text object and initialize it\n> and copy the data, or can I modify that object in\n> place and return it?\n\nYou must NEVER alter a pass-by-reference parameter, of text or\nany other data type. If you do, you are probably altering data\nin a disk buffer, thus changing the content of a tuple.\n\n> Secondly, if I modify the data length of an object,\n> as: VARDATA(field) = nn, making sure that 'nn' is\n> smaller than the origial length, with this affect the\n> memory management?\n\nIn a palloc'd temp object it's OK if the allocated size is more than\nwhat you end up using, so yes you can set VARSIZE() to less than what\nyou allocated. Some of the built-in functions do things this way to\nsimplify calculation of the palloc request size, IIRC. Again, you\ncannot scribble on a source object.\n\nIn 7.1, for toastable data types there are GETARG macros that guarantee\nto return a writable copy, see PG_GETARG_TEXT_P_COPY etc. I believe\ntolower() and similar functions use this already.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 05 Feb 2001 20:02:04 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Can we modify 'text *' passed to a C function? " }, { "msg_contents": "--- Tom Lane <tgl@sss.pgh.pa.us> wrote:\n> m w <mttf2000@yahoo.com> writes:\n> > If I write a function that does a 'tolower()' on\n> each\n> > character of a parameter passed into my function,\n> do I\n> > have to allocate a new text object and initialize\n> it\n> > and copy the data, or can I modify that object in\n> > place and return it?\n> \n> You must NEVER alter a pass-by-reference parameter,\n> of text or\n> any other data type. If you do, you are probably\n> altering data\n> in a disk buffer, thus changing the content of a\n> tuple.\n\nThanks, I was concerned that may be the case, but I\ncould never find a definitive answer on this.\n\n__________________________________________________\nGet personalized email addresses from Yahoo! Mail - only $35 \na year! http://personal.mail.yahoo.com/\n", "msg_date": "Mon, 5 Feb 2001 17:54:21 -0800 (PST)", "msg_from": "m w <mttf2000@yahoo.com>", "msg_from_op": true, "msg_subject": "Re: Can we modify 'text *' passed to a C function? " } ]
[ { "msg_contents": "So...\nIf after recompiling postgres with -g in the CFLAGS and still getting 0x40050768 in ?? ()\nin gdb, should I look elsewhere???\n\n\t\t\t\t\t\tThanks\n\t\t\t\t\t\t-Mat\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Mon, 5 Feb 2001 17:03:41 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "Should I look elsewhere??" }, { "msg_contents": "post the rest of the traceback.\n\n0x40* is the address inside some shared library, most likely libc.\n\nfull traceback will show what happened before it got to libc\n\n-alex\n\n\n\nOn Mon, 5 Feb 2001, Mathieu Dube wrote:\n\n> So...\n> If after recompiling postgres with -g in the CFLAGS and still getting 0x40050768 in ?? ()\n> in gdb, should I look elsewhere???\n> \n> \t\t\t\t\t\tThanks\n> \t\t\t\t\t\t-Mat\n> \n\n", "msg_date": "Mon, 5 Feb 2001 17:09:52 -0500 (EST)", "msg_from": "Alex Pilosov <alex@pilosoft.com>", "msg_from_op": false, "msg_subject": "Re: Should I look elsewhere??" }, { "msg_contents": "On Mon, 05 Feb 2001, you wrote:\n> You're not backtracing the same core file as before, are you?\n???\nI dont see what you mean\n\nI build postgresql with -g and then put libpq.a in my project's dir \nall my files are compiled with -g too\n\nthe only other thing I use is posix threads \n\nHow do I know what function is supposed to be in the place of ?? that gdb\noutputs\n\t\t\t\t\n\t\t\t\t\tThanks\n\t\t\t\t\t-Mat\n> \n> The core file produced by something compiled with debug symbols should be\n> much nicer to read..\n> \n> -Mitch\n> \n> ----- Original Message -----\n> From: \"Mathieu Dube\" <mathieu_dube@videotron.ca>\n> To: <pgsql-hackers@postgresql.org>\n> Sent: Monday, February 05, 2001 5:03 PM\n> Subject: Should I look elsewhere??\n> \n> \n> > So...\n> > If after recompiling postgres with -g in the CFLAGS and still getting\n> 0x40050768 in ?? ()\n> > in gdb, should I look elsewhere???\n> >\n> > Thanks\n> > -Mat\n> > --\n> > Mathieu Dube\n> > Mondo-Live\n> > www.flipr.com\n> >\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Mon, 5 Feb 2001 17:13:42 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "Re: Should I look elsewhere??" } ]
[ { "msg_contents": "\nWell, I'm not sure about the spec precisely, but I found\nout how Oracle seems to handle the delete/insert, etc\ncases for at least on delete cascade.\nIt seems that they do the action (other than no action\nobviously) immediately upon the statement, but still\ndefer the check for validity until commit time.\n\nSo, given:\ncreate table a (a int unique);\ncreate table b (b int references a(a)\n on delete cascade deferrable \n initially deferred);\ninsert into b values (3);\ninsert into a values (3);\nselect * from a; -- gives 1 row with 3\nselect * from b; -- gives 1 row with 3\ndelete from a;\nselect * from b; -- gives no rows\ninsert into a values (3);\ncommit;\nselect * from b; -- gives no rows\nselect * from a; -- gives 1 row with 3\n\n\nThis is related part 2 of how Hiroshi broke up the\nissues with the deferred FK. If Oracle's right, then\nwe'd probably want to:\n Make all non-No Action triggers not deferrable\n Add a check to the no action triggers to basically\n do a select from pk table where <each key value\n is the same as the old values> and if we get a\n row we've inserted a row with this same value\n so the constraint will be satisfied.\n\nThe latter fails for MATCH PARTIAL, but that's a \ncompletely different animal entirely...\n\n\n", "msg_date": "Mon, 5 Feb 2001 14:20:30 -0800 (PST)", "msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>", "msg_from_op": true, "msg_subject": "Foreign keys and deferrable" } ]
[ { "msg_contents": "PHP can run java code. It would be easiest, because php doesn't parse php\npages, the Zend engine is linked to php to actually parse. Which would\nmake Zend easy to add into Postgresql, (which already runs under apache,\nwhich is non-threaded).\n\nThe only issue is the Zend license..\n\nOf course, this may sound crazy and expensive, but you could throw some\napache code in there, and allow any language that works under apache work\nunder postgresql. Call me crazy, but that would allow people to run any\nparsed language inside of postgresql.\n\n\n\n", "msg_date": "Mon, 5 Feb 2001 17:12:47 -0600 (CST)", "msg_from": "Derek Young-ADSL <bleach@coconut.theshop.net>", "msg_from_op": true, "msg_subject": "Re: TODO list: Allow Java server-side programming" } ]
[ { "msg_contents": ">>> Tom Lane <tgl@sss.pgh.pa.us> 06-Feb-01 12:39:24 AM >>>\n\n> \"Nic Ferrier\" wrote:\n>>>> - the postmaster was being started without nohup\n \nOliver wrote:\n>> If postmaster is being started by init, it should not need \n>> nohup, because init never exits and postmaster is not \n>> going to get shutdown unexpectedly.\n\nI agree... I was just putting into the script what was in the man\npage about postmaster.\n\nThe man page suggests that nohup is required to init postmaster, I\nknow this isn't true but to implement an example init file and not\nmatch up with the man page seemed foolish.\n\nI guess nohup would stop postmaster doing something awfull if it\ndoesn't handle HUP properly but I very much doubt that you guys fail\nto handle HUP.\n\n\nNic\n", "msg_date": "Tue, 06 Feb 2001 00:58:07 +0000", "msg_from": "\"Nic Ferrier\" <nferrier@tapsellferrier.co.uk>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Re: syslog logging setup broken?" }, { "msg_contents": "> The man page suggests that nohup is required to init postmaster, I\n> know this isn't true but to implement an example init file and not\n> match up with the man page seemed foolish.\n> \n> I guess nohup would stop postmaster doing something awfull if it\n> doesn't handle HUP properly but I very much doubt that you guys fail\n> to handle HUP.\n\nGood point. postmaster in 7.1 uses HUP signal to re-read\npostgresql.conf. It seems we should not use nohup to start postmaster.\n--\nTatsuo Ishii\n", "msg_date": "Wed, 07 Feb 2001 10:12:52 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: syslog logging setup broken?" } ]
[ { "msg_contents": "For a project we are working on, I have created a custom postgresql data\ntype which is similar to MS SQL Server's uniqueidentifier data type. It uses\ndynamic link library extension that calls the FreeDCE library to generate\nGUIDs. Support for the data type and support functions is added to a\nPostgreSQL database using the attached SQL script. The functions all seems\nto work fine, including use of merge sorts and hash joins during SQL JOIN\nstatements when using the data type as part of a primary key. However\nadding foreign key constraints sometimes causes a problem.\n\nI never have a problem adding a foreign key to a parent table with a\nmulti-part key as long as the child table is empty. Adding data to the child\nentity afterwards seems to properly enforce RI. However, if data exists in\nthe child entity, an RI check is performed on the existing data and this\ncheck sometimes seems to break. As far as I can tell, the RI check in the\nlatter case seems to confuse the order the Key parts in either the Primary\nKey or the Foreign Key. In the case of a multi-part key RI, it was\ncomplaining that it couldn't perform a type conversion between the type of\ntwo different key parts of the primary key.\n\nSo in a database with the following table definitions (OK I know it isn't\nexactly great DB design to have 4 uniqueidentifiers in a PK, but please bear\nwith me) : \n\n--------------\n\nCREATE TABLE Mo_Cvg_Rptd (\n Emp_Grp_ID uniqueidentifier NOT NULL,\n Ben_Plan_ID uniqueidentifier NOT NULL,\n Grp_Rate_ID uniqueidentifier NOT NULL,\n Rate_Step_ID uniqueidentifier NOT NULL,\n Cvg_Yr_Mo date NOT NULL,\n Rptg_Session_ID uniqueidentifier,\n Mo_Cvg_Rptd_Sts_Cd int2,\n Mo_Except_Sts_Cd int2,\n Mo_Except_Desc varchar(150),\n Mdfy_Dt DATETIME NOT NULL DEFAULT date('now'),\n PRIMARY KEY (Emp_Grp_ID, Ben_Plan_ID, Grp_Rate_ID, \n Rate_Step_ID, Cvg_Yr_Mo)\n);\n\n\nCREATE TABLE Prior_Mo_Prd_Adjmt (\n Emp_Grp_ID uniqueidentifier NOT NULL,\n Ben_Plan_ID uniqueidentifier NOT NULL,\n Grp_Rate_ID uniqueidentifier NOT NULL,\n Rate_Step_ID uniqueidentifier NOT NULL,\n Cvg_Yr_Mo date NOT NULL,\n Prior_Prd_Adjmt_Amt int2,\n Prior_Prd_Adjmt_Desc varchar(150),\n Prior_Prd_Adjmt_Except_Sts_Cd int2,\n Prior_Prd_Adjmt_Except_Desc varchar(150),\n PRIMARY KEY (Emp_Grp_ID, Ben_Plan_ID, Grp_Rate_ID, \n Rate_Step_ID, Cvg_Yr_Mo)\n);\n\nALTER TABLE Prior_Mo_Prd_Adjmt \n ADD CONSTRAINT FK_PriorMoPrdAdjmt_MoCvgRptd FOREIGN KEY(Emp_Grp_ID, \n Ben_Plan_ID, \n Grp_Rate_ID, \n Rate_Step_ID, \n Cvg_Yr_Mo)\n REFERENCES Mo_Cvg_Rptd;\n\n--------------\n\nIf I want to change a column in Prior_Mo_Prd_Adjmt (with the aid of Erwin),\nI have to drop the table and recreate it with a script similar to the\nfollowing:\n\n**********************\n\nCREATE TABLE prior_mo_prd_adjmtL25D4340000 (emp_grp_id uniqueidentifier, \n ben_plan_id uniqueidentifier, grp_rate_id \n uniqueidentifier, rate_step_id uniqueidentifier, \n cvg_yr_mo date, prior_prd_adjmt_amt int4, prior_prd_adjmt_desc \n varchar(150), prior_prd_adjmt_except_sts_cd int2, \n prior_prd_adjmt_except_desc varchar(150));\n\n\nINSERT INTO prior_mo_prd_adjmtL25D4340000 (emp_grp_id, ben_plan_id,\ngrp_rate_id,\n rate_step_id, cvg_yr_mo, prior_prd_adjmt_amt, prior_prd_adjmt_desc,\n prior_prd_adjmt_except_sts_cd, prior_prd_adjmt_except_desc)\n SELECT emp_grp_id, ben_plan_id, grp_rate_id,\n rate_step_id, cvg_yr_mo, prior_prd_adjmt_amt, prior_prd_adjmt_desc,\n prior_prd_adjmt_except_sts_cd, prior_prd_adjmt_except_desc\n FROM prior_mo_prd_adjmt;\n\n\nDROP TABLE prior_mo_prd_adjmt;\n\n\nCREATE TABLE Prior_Mo_Prd_Adjmt (\n Emp_Grp_ID uniqueidentifier NOT NULL,\n Ben_Plan_ID uniqueidentifier NOT NULL,\n Grp_Rate_ID uniqueidentifier NOT NULL,\n Rate_Step_ID uniqueidentifier NOT NULL,\n Cvg_Yr_Mo date NOT NULL,\n Prior_Prd_Adjmt_Amt numeric(9,2),\n Prior_Prd_Adjmt_Desc varchar(150),\n Prior_Prd_Adjmt_Except_Sts_Cd int2,\n Prior_Prd_Adjmt_Except_Desc varchar(150),\n PRIMARY KEY (Emp_Grp_ID, Ben_Plan_ID, Grp_Rate_ID, \n Rate_Step_ID, Cvg_Yr_Mo)\n);\n\nCREATE UNIQUE INDEX IDX_Prior_Mo_Prd_Adjmt_PK ON Prior_Mo_Prd_Adjmt\n(\n Emp_Grp_ID,\n Ben_Plan_ID,\n Grp_Rate_ID,\n Rate_Step_ID,\n Cvg_Yr_Mo\n);\n\nALTER TABLE Prior_Mo_Prd_Adjmt \n ADD CONSTRAINT FK_PriorMoPrdAdjmt_MoCvgRptd FOREIGN KEY(Emp_Grp_ID, \n Ben_Plan_ID, \n Grp_Rate_ID, \n Rate_Step_ID, \n Cvg_Yr_Mo)\n REFERENCES Mo_Cvg_Rptd;\n\n\nINSERT INTO Prior_Mo_Prd_Adjmt (Emp_Grp_ID, Ben_Plan_ID, Grp_Rate_ID, \n Rate_Step_ID, Cvg_Yr_Mo, Prior_Prd_Adjmt_Amt, Prior_Prd_Adjmt_Desc, \n Prior_Prd_Adjmt_Except_Sts_Cd, Prior_Prd_Adjmt_Except_Desc) SELECT \n emp_grp_id, ben_plan_id, grp_rate_id, rate_step_id, cvg_yr_mo, \n prior_prd_adjmt_amt, prior_prd_adjmt_desc,\nprior_prd_adjmt_except_sts_cd, \n prior_prd_adjmt_except_desc FROM prior_mo_prd_adjmtL25D4340000;\n\n\nDROP TABLE prior_mo_prd_adjmtL25D4340000;\n\n**********************\n\nNow the interesting thing is that if the ALTER TABLE statement is placed\nafter the INSERT I get the following error:\n\npsql:upgradetohbtweb205.sql:61: NOTICE: ALTER TABLE ... ADD CONSTRAINT will\ncreate implicit trigger(s) for FOREIGN KEY check(s)\npsql:upgradetohbtweb205.sql:61: ERROR: Unable to identify an operator '='\nfor types 'uniqueidentifier' and 'date'\n You will have to retype this query using an explicit cast\n\nBut I get no error with the ALTER before the INSERT!\n\nIn this case I can work around the bug, but I can't in the case of a 3+\ntable PK chain grandparent->parent->child where I don't want to have to drop\nthe child table (and anything referring to it) to be able to change the\nparent table. (The child will have a FK to the parent which will break with\nthe above error when I try to recreate it on the new incarnation of the\nparent.)\n\nI haven't seen any references to similar foreign key problems in the lists,\nwhich is why I am not sure if the problem is a function of the extended\ntype. However since the behaviour is different - for the same data -\ndepending on whether the RI check is made when creating the FOREIGN KEY vs.\nwhen adding data after the key is entered, it seems reasonable to suspect a\nbug in the first case.\n\nAny chance this might be addressed for 7.1?\n\nThank you,\n\nPaul-Andre Panon\n\n--\nPaul-AndrePanon@SierraSystems.com\n\n <<PGUniqID.sql>>", "msg_date": "Mon, 5 Feb 2001 17:04:53 -0800 ", "msg_from": "\"Panon, Paul-Andre\" <Paul-AndrePanon@SierraSystems.com>", "msg_from_op": true, "msg_subject": "ADD CONSTRAINT ... FOREIGN KEY and custom data type." }, { "msg_contents": "\nI think you may be running into the now fixed (for 7.1) bug where \nADD CONSTRAINT ... FOREIGN KEY got the column ordering wrong when checking\nexisting data. I may be able to build a patch against 7.0.x since the\nfix is relatively minor if you don't plan to upgrade when 7.1 comes out.\n\nOn Mon, 5 Feb 2001, Panon, Paul-Andre wrote:\n\n> \n> For a project we are working on, I have created a custom postgresql data\n> type which is similar to MS SQL Server's uniqueidentifier data type. It uses\n> dynamic link library extension that calls the FreeDCE library to generate\n> GUIDs. Support for the data type and support functions is added to a\n> PostgreSQL database using the attached SQL script. The functions all seems\n> to work fine, including use of merge sorts and hash joins during SQL JOIN\n> statements when using the data type as part of a primary key. However\n> adding foreign key constraints sometimes causes a problem.\n> \n> I never have a problem adding a foreign key to a parent table with a\n> multi-part key as long as the child table is empty. Adding data to the child\n> entity afterwards seems to properly enforce RI. However, if data exists in\n> the child entity, an RI check is performed on the existing data and this\n> check sometimes seems to break. As far as I can tell, the RI check in the\n> latter case seems to confuse the order the Key parts in either the Primary\n> Key or the Foreign Key. In the case of a multi-part key RI, it was\n> complaining that it couldn't perform a type conversion between the type of\n> two different key parts of the primary key.\n> \n> So in a database with the following table definitions (OK I know it isn't\n> exactly great DB design to have 4 uniqueidentifiers in a PK, but please bear\n> with me) : \n\n", "msg_date": "Tue, 6 Feb 2001 09:08:37 -0800 (PST)", "msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>", "msg_from_op": false, "msg_subject": "Re: ADD CONSTRAINT ... FOREIGN KEY and custom data type." } ]
[ { "msg_contents": "I have put a new version of my multi-threaded\npostgresql experiment at\n\nhttp://www.sacadia.com/mtpg.html\n\nThis one actually works. I have added a server\nbased on omniORB, a CORBA 2.3 ORB from ATT. It\n is much smaller than TAO and uses the thread per\nconnection model. I haven't added the java side\nof the JNI interface yet but the C++ side is there.\n\nIt's still not stable but it is much better than\nthe last.\n\nMyron Scott\nmkscott@sacadia.com\n\n\n\n\n", "msg_date": "Mon, 5 Feb 2001 18:25:05 -0800 (PST)", "msg_from": "Myron Scott <mscott@sacadia.com>", "msg_from_op": true, "msg_subject": "Re: Using Threads?" }, { "msg_contents": "On Mon, 5 Feb 2001, Myron Scott wrote:\n\n> I have put a new version of my multi-threaded\n> postgresql experiment at\n> \n> http://www.sacadia.com/mtpg.html\n> \n> This one actually works. I have added a server\n> based on omniORB, a CORBA 2.3 ORB from ATT. It\n> is much smaller than TAO and uses the thread per\n> connection model. I haven't added the java side\n> of the JNI interface yet but the C++ side is there.\n> \n> It's still not stable but it is much better than\n> mkscott@sacadia.com\n\n Sorry I haven't time to see and test your experiment,\nbut I have a question. How you solve memory management?\nThe current mmgr is based on global variable \nCurrentMemoryContext that is very often changed and used.\n Use you for this locks? If yes it is probably problematic\npoint for perfomance.\n\n\t\t\tKarel\n\n", "msg_date": "Tue, 6 Feb 2001 10:20:08 +0100 (CET)", "msg_from": "Karel Zak <zakkr@zf.jcu.cz>", "msg_from_op": false, "msg_subject": "Re: Using Threads?" }, { "msg_contents": "\n> \n> Sorry I haven't time to see and test your experiment,\n> but I have a question. How you solve memory management?\n> The current mmgr is based on global variable \n> CurrentMemoryContext that is very often changed and used.\n> Use you for this locks? If yes it is probably problematic\n> point for perfomance.\n> \n> \t\t\tKarel\n> \n\nThere are many many globals I had to work around including all the memory\nmanagement stuff. I basically threw everything into and \"environment\"\nvariable which I stored in a thread specific using thr_setspecific.\n\nPerformance is acually very good for what I am doing. I was able to batch\ncommit transactions which cuts down on fsync calls, use prepared\nstatements from my client using CORBA, and the various locking calls for\nthe threads (cond_wait,mutex_lock, and sema_wait) seem pretty fast. I did\nsome performance tests for inserts \n\n20 clients, 900 inserts per client, 1 insert per transaction, 4 different\ntables.\n\n7.0.2 About 10:52 average completion\nmulti-threaded 2:42 average completion\n7.1beta3 1:13 average completion\n\nIf I increased the number of inserts per transaction, multi-threaded got\ncloser to 7.1 for inserts. I haven't tested other other types of\ncommands\nyet.\n\n\nMyron Scott\nmkscott@sacadia.com\n\n", "msg_date": "Tue, 6 Feb 2001 07:05:04 -0800 (PST)", "msg_from": "Myron Scott <mscott@sacadia.com>", "msg_from_op": true, "msg_subject": "Re: Using Threads" }, { "msg_contents": "\nOn Tue, 6 Feb 2001, Myron Scott wrote:\n\n> There are many many globals I had to work around including all the memory\n> management stuff. I basically threw everything into and \"environment\"\n> variable which I stored in a thread specific using thr_setspecific.\n\n Yes, it's good. I working on multi-thread application server\n(http://mape.jcu.cz) and I use for this project some things from PG (like\nmmgr), I planning use same solution.\n\n> Performance is acually very good for what I am doing. I was able to batch\n> commit transactions which cuts down on fsync calls, use prepared\n> statements from my client using CORBA, and the various locking calls for\n> the threads (cond_wait,mutex_lock, and sema_wait) seem pretty fast. I did\n> some performance tests for inserts \n> \n> 20 clients, 900 inserts per client, 1 insert per transaction, 4 different\n> tables.\n> \n> 7.0.2 About 10:52 average completion\n> multi-threaded 2:42 average completion\n> 7.1beta3 1:13 average completion\n\nIt is very very good for time for 7.1, already look forward to 7.2! :-) \n\n BTW, I not sure if you anytime in future will see threads in \nofficial PostgreSQL and if you spending time on relevant things (IMHO).\n\n\t\tKarel\n\n\n\n\n\n", "msg_date": "Tue, 6 Feb 2001 18:31:02 +0100 (CET)", "msg_from": "Karel Zak <zakkr@zf.jcu.cz>", "msg_from_op": false, "msg_subject": "Re: Using Threads" }, { "msg_contents": "On Tue, 6 Feb 2001, Karel Zak wrote:\n\n>\n> On Tue, 6 Feb 2001, Myron Scott wrote:\n>\n> > There are many many globals I had to work around including all the memory\n> > management stuff. I basically threw everything into and \"environment\"\n> > variable which I stored in a thread specific using thr_setspecific.\n>\n> Yes, it's good. I working on multi-thread application server\n> (http://mape.jcu.cz) and I use for this project some things from PG (like\n> mmgr), I planning use same solution.\n>\n> > Performance is acually very good for what I am doing. I was able to batch\n> > commit transactions which cuts down on fsync calls, use prepared\n> > statements from my client using CORBA, and the various locking calls for\n> > the threads (cond_wait,mutex_lock, and sema_wait) seem pretty fast. I did\n> > some performance tests for inserts\n> >\n> > 20 clients, 900 inserts per client, 1 insert per transaction, 4 different\n> > tables.\n> >\n> > 7.0.2 About 10:52 average completion\n> > multi-threaded 2:42 average completion\n> > 7.1beta3 1:13 average completion\n>\n> It is very very good for time for 7.1, already look forward to 7.2! :-)\n>\n> BTW, I not sure if you anytime in future will see threads in\n> official PostgreSQL and if you spending time on relevant things (IMHO).\n\nThere have been discussions about this, where we still do one process per\nclient, but the backend of that process would use threads in order to\nimprove performance on SMP boxes for that one client ...\n\n\n", "msg_date": "Tue, 6 Feb 2001 13:47:04 -0400 (AST)", "msg_from": "The Hermit Hacker <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: Using Threads" } ]
[ { "msg_contents": "On Sun, 4 Feb 2001, Peter Eisentraut wrote:\n\n> Ryan Kirkpatrick writes:\n> \n> > \tpostgresql -> This is a Linux distribution independent (or so I\n> > hope) init.d/rc.d script that makes use of pg_ctl. There is currently a\n> > few in ./contrib/linux of the pgsql source tree, but they are RedHat\n> > specific. This one is simple and self contained. Might be worth adding to\n> > the other scripts.\n> \n> I don't see how this can be more independent if it uses\n> \n> DAEMON=/home/postgres/bin/pg_ctl\n\n\tOoops.... That is my mistake... Should have been\n/usr/local/pgsql/bin/pg_ctl. I have /usr/local/pgsql/ symlinked to /home\n(where there is more, faster disk space). I can submit a patch, or can\nsome one just fix it?\n\n> LOG=\"/usr/local/pgsql/server.log\"\n\n\tWhat is wrong with that? There really is no standard on where to\nput the log file, so it is either here or /var/log.\n\n> su - postgres sh -c \"$DAEMON stop >& /dev/null\"\n\n\tHmm... What is wrong here, besides the '>&'? The '>&' can be\nreplaced with '2>&1 >' if that is more standard.\n\n> an appropriate way to stop the server in a system shutdown situation.\n\n\tUh... Isn't that the way you are supposed to stop it? pg_ctl stop?\n\n> IMHO, rather than accumulating a bunch of versions that somebody liked\n> better than the existing ones, why not provide actual scripts from actual\n> distributions? Generic scripts will just lead to generic problems.\n\n\tFine by me... I just put mine up as a suggestion, as the only\nother one in contrib was very RH specific. The one included with the\ndebian package is very debian specific (and over complex in IMHO). I just\nsubmitted mine as a possible generic Linux version that should work with\nbash on most installation. If some one has a better idea, then by all\nmeans post it.\n\tAlso, from the way I understand contrib, they are user submissions\nand are in no way assured to work on any other machine than the user's who\nsubmitted it. I take it as given anything in contrib might need a bit of\nediting to fit my needs.\n\tAnyway, just my response as one who has used Slackware, RedHat,\nand now Debian over the years, but who in no way claims to be an\nuber-Linux or Unix hacker or sysadmin. :)\n\n\tPS. I do play a part time Linux sysadmin in real though...\n\n---------------------------------------------------------------------------\n| \"For to me to live is Christ, and to die is gain.\" |\n| --- Philippians 1:21 (KJV) |\n---------------------------------------------------------------------------\n| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |\n---------------------------------------------------------------------------\n\n\n", "msg_date": "Mon, 5 Feb 2001 22:21:49 -0700 (MST)", "msg_from": "Ryan Kirkpatrick <pgsql@rkirkpat.net>", "msg_from_op": true, "msg_subject": "Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d\n\tscript...." } ]
[ { "msg_contents": "Hello!\nCan anybody tell me the website from which I can download PostgreSQL for\nWindows95.\n\nWith regards,\nSourabh\n\n", "msg_date": "Tue, 06 Feb 2001 13:56:36 +0530", "msg_from": "\"sourabh dixit\" <sourabh.dixit@wipro.com>", "msg_from_op": true, "msg_subject": "Postgre SQL for Windows" }, { "msg_contents": "Quoting sourabh dixit <sourabh.dixit@wipro.com>:\n\n> Hello!\n> Can anybody tell me the website from which I can download PostgreSQL\n> for Windows95.\n\nI'm not sure if it will run under Win95, but I have it running fine under NT \nusing Cygwin and WinIPC.\n\nWhile my linux box was down, I had to use it under NT to work on the JDBC \ndriver.\n\nPeter\n\n-- \nPeter Mount peter@retep.org.uk\nPostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/\nRetepPDF PDF library for Java: http://www.retep.org.uk/pdf/\n", "msg_date": "Tue, 06 Feb 2001 05:23:16 -0500 (EST)", "msg_from": "Peter T Mount <peter@retep.org.uk>", "msg_from_op": false, "msg_subject": "Re: Postgre SQL for Windows" } ]
[ { "msg_contents": "\n> I'd like to have pg_dump for 7.1 produce \"timestamp with time zone\" when\n> dealing with timestamp type(s). That will prepare us for introducing a\n> timestamp type without time zones, while allowing reasonable upgrades to\n> 7.2.\n\nBut the current timestamp does not store a timezone. timestamp with time zone \nis supposed to store and output the timezone that was inserted.\nThe current timestamp has it messed up (sorry), since it does not store a timezone.\nIt stores time in UTC and always converts output to the timezone derived from [PG]TZ.\n\nIMHO timestamp is currently closest to the ANSI timestamp without time zone.\nEspecially if you always omit a timezone for input and ignore the timezone that is output.\n\nA reasonably easy upgrade is imho not possible :-(\n\nAndreas\n", "msg_date": "Tue, 6 Feb 2001 11:38:47 +0100 ", "msg_from": "Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>", "msg_from_op": true, "msg_subject": "AW: timestamp in pg_dump" }, { "msg_contents": "> But the current timestamp does not store a timezone. timestamp with time zone\n> is supposed to store and output the timezone that was inserted.\n> The current timestamp has it messed up (sorry), since it does not store a timezone.\n> It stores time in UTC and always converts output to the timezone derived from [PG]TZ.\n\nGood point, but I'll disagree with the implied conclusion. imho the\nSQL9x provisions for time zone handling are fundamentally and tragically\nbroken, with absolutely no provisions for DST, time zone shifting, etc\netc. Which helps lead most folks to code other databases without time\nzones at all.\n\nDate and Darwen (1997) have essentially the same opinion (though the\nlast sentence is my own speculation).\n\n> IMHO timestamp is currently closest to the ANSI timestamp without time zone.\n> Especially if you always omit a timezone for input and ignore the timezone that is output.\n\nHmm. My thought was to implement a timestamp type without *any* time\nzone manipulation, leaving our current type as the \"zone-full\" one, but\nit should be discussed whether we need a high-fidelity implementation of\nthe fundamentally useless SQL9x version. fwiw, I did implement \"time\nwith time zone\", which was easy, mostly to \"check the feature box\" and\nI'll guess that no one bothers to use it.\n\nComments?\n\n - Thomas\n", "msg_date": "Tue, 06 Feb 2001 14:02:49 +0000", "msg_from": "Thomas Lockhart <lockhart@alumni.caltech.edu>", "msg_from_op": false, "msg_subject": "Re: AW: timestamp in pg_dump" } ]
[ { "msg_contents": "Hello,\n\nprobably you remember my crazy idea involving using indexes\ndirectly in scans (and resulting speedup).\nThe idea was given to me by experiences with M$SQL (it is\nyes another M$ soft but its planner is probably better\nthan pg's - no flames please).\nBecause I studied M$ again I've got another ideas.\nEvery SQL query can be probably translated into joins without\nneed for \"nested subquery\" executor node.\nIn M$SQL7 each join has at least two properties: logical\nand physical type. Physical types can be: {nested loop,\nhash,merge} join and logical: {left,full,inner,semi-inner,anti-semi}.\nIt is the same in pgsql except for semi joins.\nInner semijoin scans its left input outputting all rows which\nhas its pair in right input but doesn't duplicate result when\nthere are duplicates at right.\nThe WHERE IN(select...), corelated EXISTS and ANY are\nconverted to it. This semijoin is simple to efectively implement\nfor all physical join types.\nNOT IN, NOT EXISTS and ALL uses anti-semi-inner-join. The\njoin outputs lefts which can't be paired and don't duplicate\nothers. Again, simple implementation.\nAs I studied outputs from M$ planner, it uses those joins and\nlater tries to find optimal plan by combining ALL joins.\nIn pg we can't cross subplan node in optimizing (AFAIK). So\nwe can't swap relations in outer and inner plan even if it\nwould lead into mode effective plan.\nThe result is that in M$SQL7 almost all plans with [NOT]{IN,EXISTS}\nI tried was much faster both in clean time of run and in number\nof logical reads/scans.\nHave anyone thought about it ?\n\nregards, devik\n\n", "msg_date": "Tue, 6 Feb 2001 12:33:24 +0100 (CET)", "msg_from": "Devik <devik@luxik.cdi.cz>", "msg_from_op": true, "msg_subject": "optimizer/planner ideas" } ]
[ { "msg_contents": "Hello,\n\nprobably you remember my crazy idea involving using indexes\ndirectly in scans (and resulting speedup).\nThe idea was given to me by experiences with M$SQL (it is\nyes another M$ soft but its planner is probably better\nthan pg's - no flames please).\nBecause I studied M$ again I've got another ideas.\nEvery SQL query can be probably translated into joins without\nneed for \"nested subquery\" executor node.\nIn M$SQL7 each join has at least two properties: logical\nand physical type. Physical types can be: {nested loop,\nhash,merge} join and logical: {left,full,inner,semi-inner,anti-semi}.\nIt is the same in pgsql except for semi joins.\nInner semijoin scans its left input outputting all rows which\nhas its pair in right input but doesn't duplicate result when\nthere are duplicates at right.\nThe WHERE IN(select...), corelated EXISTS and ANY are\nconverted to it. This semijoin is simple to efectively implement\nfor all physical join types.\nNOT IN, NOT EXISTS and ALL uses anti-semi-inner-join. The\njoin outputs lefts which can't be paired and don't duplicate\nothers. Again, simple implementation.\nAs I studied outputs from M$ planner, it uses those joins and\nlater tries to find optimal plan by combining ALL joins.\nIn pg we can't cross subplan node in optimizing (AFAIK). So\nwe can't swap relations in outer and inner plan even if it\nwould lead into mode effective plan.\nThe result is that in M$SQL7 almost all plans with [NOT]{IN,EXISTS}\nI tried was much faster both in clean time of run and in number\nof logical reads/scans.\nHave anyone thought about it ?\n\nregards, devik\n\n\n", "msg_date": "Tue, 6 Feb 2001 12:39:06 +0100 (CET)", "msg_from": "Martin Devera <devik@cdi.cz>", "msg_from_op": true, "msg_subject": "optimizer/planner ideas (repost)" }, { "msg_contents": "Martin Devera <devik@cdi.cz> writes:\n> Inner semijoin scans its left input outputting all rows which\n> has its pair in right input but doesn't duplicate result when\n> there are duplicates at right.\n> The WHERE IN(select...), corelated EXISTS and ANY are\n> converted to it. This semijoin is simple to efectively implement\n> for all physical join types.\n> NOT IN, NOT EXISTS and ALL uses anti-semi-inner-join. The\n> join outputs lefts which can't be paired and don't duplicate\n> others. Again, simple implementation.\n\n> Have anyone thought about it ?\n\nYes, this is exactly what I was thinking of doing in 7.2 or so ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 06 Feb 2001 10:47:56 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: optimizer/planner ideas (repost) " } ]
[ { "msg_contents": "Hi,\n\nafter make clean, make failed with message:\n\nmake[2]: Entering directory /home/postgres/cvs/pgsql/src/backend'\nprereqdir=`cd parser/ && pwd` && \\\n cd ../../src/include/parser/ && rm -f parse.h && \\\n ln -s $prereqdir/parse.h .\nln: ./parser: File exists\nmake[2]: *** [../../src/include/parser/parse.h] Error 1\n\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n", "msg_date": "Tue, 6 Feb 2001 14:49:42 +0300 (GMT)", "msg_from": "Oleg Bartunov <oleg@sai.msu.su>", "msg_from_op": true, "msg_subject": "little bug in current CVS" }, { "msg_contents": "Oleg Bartunov <oleg@sai.msu.su> writes:\n> make[2]: Entering directory /home/postgres/cvs/pgsql/src/backend'\n> prereqdir=`cd parser/ && pwd` && \\\n> cd ../../src/include/parser/ && rm -f parse.h && \\\n> ln -s $prereqdir/parse.h .\n> ln: ./parser: File exists\n> make[2]: *** [../../src/include/parser/parse.h] Error 1\n\nHm. I bet your shell is failing to strip whitespace from the output of\npwd, so that the ln command ends up looking like\n\n\tln -s /home/postgres/cvs/pgsql/src/backend/parser /parse.h .\n\nCan you check that theory by inserting an 'echo'?\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 06 Feb 2001 10:54:51 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: little bug in current CVS " }, { "msg_contents": "On Tue, 6 Feb 2001, Tom Lane wrote:\n\n> Oleg Bartunov <oleg@sai.msu.su> writes:\n> > make[2]: Entering directory /home/postgres/cvs/pgsql/src/backend'\n> > prereqdir=`cd parser/ && pwd` && \\\n> > cd ../../src/include/parser/ && rm -f parse.h && \\\n> > ln -s $prereqdir/parse.h .\n> > ln: ./parser: File exists\n> > make[2]: *** [../../src/include/parser/parse.h] Error 1\n>\n> Hm. I bet your shell is failing to strip whitespace from the output of\n> pwd, so that the ln command ends up looking like\n>\n> \tln -s /home/postgres/cvs/pgsql/src/backend/parser /parse.h .\n>\n> Can you check that theory by inserting an 'echo'?\n\nyou're right. shell is BASH_VERSION='2.04.0(1)-release'\nMakefile looks too complex:\n$(top_builddir)/src/include/parser/parse.h: $(srcdir)/parser/parse.h\n prereqdir=`cd $(dir $<) && pwd` && \\\n cd $(dir $@) && rm -f $(notdir $@) && \\\n $(LN_S) $$prereqdir/$(notdir $<) .\n\nWe're already in src/backend directory, why not use\n ln -sf parser/parse.h .\n\n\n\n>\n> \t\t\tregards, tom lane\n>\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n", "msg_date": "Tue, 6 Feb 2001 20:16:26 +0300 (GMT)", "msg_from": "Oleg Bartunov <oleg@sai.msu.su>", "msg_from_op": true, "msg_subject": "Re: little bug in current CVS " }, { "msg_contents": "Oleg Bartunov writes:\n\n> after make clean, make failed with message:\n>\n> make[2]: Entering directory /home/postgres/cvs/pgsql/src/backend'\n> prereqdir=`cd parser/ && pwd` && \\\n> cd ../../src/include/parser/ && rm -f parse.h && \\\n> ln -s $prereqdir/parse.h .\n> ln: ./parser: File exists\n> make[2]: *** [../../src/include/parser/parse.h] Error 1\n\nTry changing the second line to this\n\nprereqdir=`CDPATH=: ; cd parser/ && pwd` && \\\n\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Tue, 6 Feb 2001 18:27:18 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: little bug in current CVS" } ]
[ { "msg_contents": "Just for the record:\n\nDROP FUNCTION table_count(varchar);\nCREATE FUNCTION table_count(varchar) RETURNS integer AS '\nDECLARE\n\tSQL varchar;\n\tRES integer;\nBEGIN\n\tSQL = ''SELECT * INTO temp1 FROM '' || $1;\n\tEXECUTE SQL;\n\tSELECT count(*) INTO RES FROM temp1;\n\tRETURN(RES)\nEND;\n'\nLANGUAGE 'plpgsql';\n\n...\n\n\ndev=> select table_count('switch');\n test\n------\n 6\n(1 row)\n\n\nThis function produces exactly what you would hope for, a count of rows in\nthe specified table. It's particularly inefficient at doing it, because it\ndoes a table copy (and doesn't bother to clean up after itself ;-(), so\ndon't do this on a large table ;-) but it shows the principle.\n\nWhat I couldn't get it to do was to select directly into the variable RES.\nPerhaps someone could enlighten me.\n\nCheers...\n\n\nMikeA\n\n-----Original Message-----\nFrom: David Richter [mailto:D.Richter@DKFZ-heidelberg.de]\nSent: 06 February 2001 09:39\nTo: Michael Ansley\nSubject: Re: [SQL] PL/PGSQL function with parameters\n\n\nHello!\n\nThanks a lot for Your answer!\n\nBut with my version 7.0.2. this suggestion doesn't work:\n\nIt appears: parser: parse error at or near \"exec\" or \nparser: parse error at or near \"execute\"\n\nAnd how should i design the update command in the suggested way e.g.?\n\nEXEC ''UPDATE '' ||$1 \n ''SET '' || $2 '' = psr_rec.parentoid\n WHERE chilioid = psr_rec.childoid;''\n\n\nWich exact release I will need to use this feature?\nWich one are You using?\n\nGreetings\n\nDavid\n\n\n**********************************************************************\nThis email and any files transmitted with it are confidential and\nintended solely for the use of the individual or entity to whom they\nare addressed. If you have received this email in error please notify\nNick West - Global Infrastructure Manager.\n\nThis footnote also confirms that this email message has been swept by\nMIMEsweeper for the presence of computer viruses.\n\nwww.mimesweeper.com\n**********************************************************************\n\n\n\n\n\nRE: [SQL] PL/PGSQL function with parameters\n\n\nJust for the record:\n\nDROP FUNCTION table_count(varchar);\nCREATE FUNCTION table_count(varchar) RETURNS integer AS '\nDECLARE\n        SQL varchar;\n        RES integer;\nBEGIN\n        SQL = ''SELECT * INTO temp1 FROM '' || $1;\n        EXECUTE SQL;\n        SELECT count(*) INTO RES FROM temp1;\n        RETURN(RES)\nEND;\n'\nLANGUAGE 'plpgsql';\n\n...\n\n\ndev=> select table_count('switch');\n test\n------\n    6\n(1 row)\n\n\nThis function produces exactly what you would hope for, a count of rows in the specified table.  It's particularly inefficient at doing it, because it does a table copy (and doesn't bother to clean up after itself ;-(), so don't do this on a large table ;-) but it shows the principle.\nWhat I couldn't get it to do was to select directly into the variable RES.  Perhaps someone could enlighten me.\n\nCheers...\n\n\nMikeA\n\n-----Original Message-----\nFrom: David Richter [mailto:D.Richter@DKFZ-heidelberg.de]\nSent: 06 February 2001 09:39\nTo: Michael Ansley\nSubject: Re: [SQL] PL/PGSQL function with parameters\n\n\nHello!\n\nThanks a lot for Your answer!\n\nBut with my version 7.0.2. this suggestion doesn't work:\n\nIt appears: parser: parse error at or near \"exec\" or \nparser: parse error at or near \"execute\"\n\nAnd how should i design the update command in the suggested way e.g.?\n\nEXEC ''UPDATE '' ||$1 \n                      ''SET '' || $2 '' = psr_rec.parentoid\n                        WHERE chilioid = psr_rec.childoid;''\n\n\nWich exact release I will need to use this feature?\nWich one are You using?\n\nGreetings\n\nDavid\n\n\n\n**********************************************************************\nThis email and any files transmitted with it are confidential and\nintended solely for the use of the individual or entity to whom they\nare addressed. If you have received this email in error please notify\nNick West - Global Infrastructure Manager.\n\nThis footnote also confirms that this email message has been swept by\nMIMEsweeper for the presence of computer viruses.\n\nwww.mimesweeper.com\n**********************************************************************", "msg_date": "Tue, 6 Feb 2001 13:16:06 -0000 ", "msg_from": "Michael Ansley <Michael.Ansley@intec-telecom-systems.com>", "msg_from_op": true, "msg_subject": "RE: PL/PGSQL function with parameters" }, { "msg_contents": "Michael Ansley <Michael.Ansley@intec-telecom-systems.com> writes:\n> CREATE FUNCTION table_count(varchar) RETURNS integer AS '\n> DECLARE\n> \tSQL varchar;\n> \tRES integer;\n> BEGIN\n> \tSQL = ''SELECT * INTO temp1 FROM '' || $1;\n> \tEXECUTE SQL;\n> \tSELECT count(*) INTO RES FROM temp1;\n> \tRETURN(RES)\n> END;\n> '\n> LANGUAGE 'plpgsql';\n\n> What I couldn't get it to do was to select directly into the variable RES.\n\nI tried this, and it seems that \"SELECT ... INTO foo\" is not executed\ncorrectly by EXECUTE --- the INTO is handled as an ordinary select-into-\ntable construct rather than plpgsql's select-into-variable.\n\nWhile I have not looked closely, I seem to recall that plpgsql handles\nINTO by stripping that clause out of the statement before it's passed to\nthe SQL engine. Evidently that's not happening in the EXECUTE case.\n\nJan, do you agree this is a bug? Is it reasonable to try to repair it\nfor 7.1? If we do not change the behavior of EXECUTE now, I fear it\nwill be too late --- some people will come to depend on the existing\nbehavior.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 06 Feb 2001 11:16:01 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [SQL] PL/PGSQL function with parameters " }, { "msg_contents": "Tom, Jan, Michael,\n\n> While I have not looked closely, I seem to recall that plpgsql handles\n> INTO by stripping that clause out of the statement before it's passed to\n> the SQL engine. Evidently that's not happening in the EXECUTE case.\n> \n> Jan, do you agree this is a bug? Is it reasonable to try to repair it\n> for 7.1? If we do not change the behavior of EXECUTE now, I fear it\n> will be too late --- some people will come to depend on the existing\n> behavior.\n\nIf you think that's the best way. What we're really all wanting is a wy\nin PL/pgSQL to pass a parameter as an object name. Doing it *without*\nusing EXECUTE would be even better than modifying EXECUTE to accomdate\nSELECT ... INTO variable.\n\nIf we can write queries that address tables by OID, that would give us a\nquick workaround ... get the OID from pg_class, then pass it to the\nquery as variables of type OID:\n\nSELECT column1_oid, column2_oid FROM table_oid\nWHERE column2_oid = variable1\nORDER BY column1_oid;\n\nOF course, having PL/pgSQL do this automatically would be even better,\nbut I suspect would require a *lot* of extra programming by Jan.\n\nAnd all of this should be influenced by whatever you guys are planning\nto do about Stored Procedures.\n\n-Josh Berkus\n\n-- \n______AGLIO DATABASE SOLUTIONS___________________________\n Josh Berkus\n Complete information technology josh@agliodbs.com\n and data management solutions (415) 565-7293\n for law firms, small businesses fax 621-2533\n and non-profit organizations. San Francisco\n", "msg_date": "Tue, 06 Feb 2001 09:45:58 -0800", "msg_from": "Josh Berkus <josh@agliodbs.com>", "msg_from_op": false, "msg_subject": "Re: [SQL] PL/PGSQL function with parameters" }, { "msg_contents": "> > \tSQL = ''SELECT * INTO temp1 FROM '' || $1;\n> \n> I tried this, and it seems that \"SELECT ... INTO foo\" is not executed\n> correctly by EXECUTE --- the INTO is handled as an ordinary select-into-\n> table construct rather than plpgsql's select-into-variable.\n> \n> While I have not looked closely, I seem to recall that plpgsql handles\n> INTO by stripping that clause out of the statement before it's passed to\n> the SQL engine. Evidently that's not happening in the EXECUTE case.\n\n From gram.y, yes it tries to strip the INTO by skipping over some stuff,\nmaybe the \"*\" trips it ?\n\nAnyway the syntax SELECT INTO temp1 * FROM .... should work.\n\n\nOn this same subject, the plpgsql doc says to use\n\tSELECT expression INTO var FROM ...\nbut Bruce's book, in several examples (\"PL/PGSQL Functions\" for instance,\nnode203.html) uses\n\tSELECT INTO var expression FROM ...\n\nBoth should work, but there may be there's something to straighten up here.\n\n\nCheers,\n\nFlorent\n\n\n-- \nflorent.guillaume@mail.com\n", "msg_date": "Tue, 6 Feb 2001 22:15:22 +0100", "msg_from": "Florent Guillaume <efgeor@noos.fr>", "msg_from_op": false, "msg_subject": "Re: [SQL] PL/PGSQL function with parameters" }, { "msg_contents": "Florent Guillaume <efgeor@noos.fr> writes:\n> On this same subject, the plpgsql doc says to use\n> \tSELECT expression INTO var FROM ...\n> but Bruce's book, in several examples (\"PL/PGSQL Functions\" for instance,\n> node203.html) uses\n> \tSELECT INTO var expression FROM ...\n> Both should work, but there may be there's something to straighten up here.\n\nIIRC, the plpgsql code is actually *very* lax about where you put the\nINTO; it'll suck it out from almost anyplace in the query string ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 06 Feb 2001 19:43:10 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Re: [SQL] PL/PGSQL function with parameters " }, { "msg_contents": "Josh Berkus wrote:\n> Tom, Jan, Michael,\n>\n> > While I have not looked closely, I seem to recall that plpgsql handles\n> > INTO by stripping that clause out of the statement before it's passed to\n> > the SQL engine. Evidently that's not happening in the EXECUTE case.\n> >\n> > Jan, do you agree this is a bug? Is it reasonable to try to repair it\n> > for 7.1? If we do not change the behavior of EXECUTE now, I fear it\n> > will be too late --- some people will come to depend on the existing\n> > behavior.\n>\n> If you think that's the best way. What we're really all wanting is a wy\n> in PL/pgSQL to pass a parameter as an object name. Doing it *without*\n> using EXECUTE would be even better than modifying EXECUTE to accomdate\n> SELECT ... INTO variable.\n>\n> If we can write queries that address tables by OID, that would give us a\n> quick workaround ... get the OID from pg_class, then pass it to the\n> query as variables of type OID:\n>\n> SELECT column1_oid, column2_oid FROM table_oid\n> WHERE column2_oid = variable1\n> ORDER BY column1_oid;\n>\n> OF course, having PL/pgSQL do this automatically would be even better,\n> but I suspect would require a *lot* of extra programming by Jan.\n\n Couple of problems here:\n\n 1. The main parser, which is used in turn by the SPI stuff,\n doesn't allow parameters passed in for object-\n identifiers.\n\n 2. I'm not sure if *all* statements are really supported by\n SPI_prepare() plus SPI_execp(). EXECUTE currently uses\n SPI_exec() to directly invoke the querystring.\n\n 3. PL/pgSQL needs a clean way to identify statements that\n shall not be cached. First things that come to mind are\n - statements using temporary objects\n - statements invoking utility commands (or generally\n any DDL)\n - statements having parameters for object-identifiers\n\n If identified as such non-cacheable query, PL/pgSQL\n doesn't use SPI_saveplan() but recreates a new plan every\n time.\n\n 4. PL handlers in general should have a registering\n mechanism for a callback function. On any schema change\n (i.e. shared syscache invalidation) this function is\n called, causing the PL handler to invalidate *ALL*\n function bytecodes and cached plans. Keeping track of\n things like \"var table.att%TYPE\" used in a function would\n be a mess - so better throw away anything.\n\n Yes, that's a *lot* to do.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Thu, 8 Feb 2001 06:37:22 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@Yahoo.com>", "msg_from_op": false, "msg_subject": "Re: [SQL] PL/PGSQL function with parameters" }, { "msg_contents": "Tom Lane wrote:\n> Michael Ansley <Michael.Ansley@intec-telecom-systems.com> writes:\n> > CREATE FUNCTION table_count(varchar) RETURNS integer AS '\n> > DECLARE\n> > SQL varchar;\n> > RES integer;\n> > BEGIN\n> > SQL = ''SELECT * INTO temp1 FROM '' || $1;\n> > EXECUTE SQL;\n> > SELECT count(*) INTO RES FROM temp1;\n> > RETURN(RES)\n> > END;\n> > '\n> > LANGUAGE 'plpgsql';\n>\n> > What I couldn't get it to do was to select directly into the variable RES.\n>\n> I tried this, and it seems that \"SELECT ... INTO foo\" is not executed\n> correctly by EXECUTE --- the INTO is handled as an ordinary select-into-\n> table construct rather than plpgsql's select-into-variable.\n>\n> While I have not looked closely, I seem to recall that plpgsql handles\n> INTO by stripping that clause out of the statement before it's passed to\n> the SQL engine. Evidently that's not happening in the EXECUTE case.\n>\n> Jan, do you agree this is a bug? Is it reasonable to try to repair it\n> for 7.1? If we do not change the behavior of EXECUTE now, I fear it\n> will be too late --- some people will come to depend on the existing\n> behavior.\n\n EXECUTE simply takes the string expression and throws it into\n SPI_exec() without parsing. Changing that for 7.1 is *not*\n possible.\n\n The above can be accomplished by\n\n DECLARE\n ROW record;\n RES integer;\n BEGIN\n FOR ROW IN EXECUTE\n ''SELECT count(*) AS N FROM '' || $1\n LOOP\n RES := N;\n END LOOP;\n RETURN RES;\n END;\n\n Not as elegant as it should be, but at least possible.\n There's much to be done for a future version of PL/pgSQL, but\n better support for dynamic SQL needs alot of functionality\n added to the main parser and the SPI manager in the first\n place.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Thu, 8 Feb 2001 07:22:13 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@Yahoo.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: PL/PGSQL function with parameters" }, { "msg_contents": "> Josh Berkus wrote:\n>> If you think that's the best way. What we're really all wanting is a wy\n>> in PL/pgSQL to pass a parameter as an object name. Doing it *without*\n>> using EXECUTE would be even better than modifying EXECUTE to accomdate\n>> SELECT ... INTO variable.\n>> \n>> If we can write queries that address tables by OID, that would give us a\n>> quick workaround ... get the OID from pg_class, then pass it to the\n>> query as variables of type OID:\n>> \n>> SELECT column1_oid, column2_oid FROM table_oid\n>> WHERE column2_oid = variable1\n>> ORDER BY column1_oid;\n\nThis is completely pointless, AFAICS. If you don't know what table\nis to be selected from, then you can't do *any* semantic checking or\nplanning in advance, so you might as well just do the entire processing\nat runtime. That's exactly what EXECUTE does. I don't see any\nfunctional advantage in an intermediate step between plpgsql's normal\nbehavior (caching of query plans) and EXECUTE. If it bought some\nreadability over constructing a query string for EXECUTE, then maybe,\nbut dealing in table and column OIDs is not my idea of a pleasant or\nreadable way to program ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 08 Feb 2001 10:10:39 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Re: [SQL] PL/PGSQL function with parameters " }, { "msg_contents": "Tom, Jan,\n\n> This is completely pointless, AFAICS. If you don't know what table\n> is to be selected from, then you can't do *any* semantic checking or\n> planning in advance, so you might as well just do the entire processing\n> at runtime. That's exactly what EXECUTE does. I don't see any\n> functional advantage in an intermediate step between plpgsql's normal\n> behavior (caching of query plans) and EXECUTE. If it bought some\n> readability over constructing a query string for EXECUTE, then maybe,\n> but dealing in table and column OIDs is not my idea of a pleasant or\n> readable way to program ...\n\nWell, given that between you and Jan you have addressed dynamic\nquerying, it seems that there is no point in tinkering further. Always\ngreat to find that a problem has already been solved.\n\nIf I wasn't up to my hairline in behind-schedule projects, I'd offer to\nwrite this up for the User's Manual. Actually, consider that a\nmedium-term commitment ... before the end of the year, I'll write a much\nlonger PL/pgSQL chapter which Jan can review & correct. (I think I'm in\na postion to do so, as the current app uses a large assortment of\nPL/pgSQL functions as pseudo-middleware).\n\n-Josh Berkus\n\n-- \n______AGLIO DATABASE SOLUTIONS___________________________\n Josh Berkus\n Complete information technology josh@agliodbs.com\n and data management solutions (415) 565-7293\n for law firms, small businesses fax 621-2533\n and non-profit organizations. San Francisco\n", "msg_date": "Thu, 08 Feb 2001 08:45:23 -0800", "msg_from": "Josh Berkus <josh@agliodbs.com>", "msg_from_op": false, "msg_subject": "Re: PL/PGSQL function with parameters" } ]
[ { "msg_contents": "Hi y'all,\n\tIs it a bad idea for an app to keep just a couple of connections to a\ndatabase, put semaphore/mutex on them and reuse them all through the program?\n\tOf course I would check if their PQstatus isnt at CONNECTION_BAD and\nreconnect if they were...\n\tI need some opinions on that practice...\n\t\n\t\t\t\t\t\tThanks\n\t\t\t\t\t\t -Mat\n\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Tue, 6 Feb 2001 11:08:49 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "using the same connection?" }, { "msg_contents": "On Tue, Feb 06, 2001 at 11:08:49AM -0500, Mathieu Dube wrote:\n> Hi y'all,\n> \tIs it a bad idea for an app to keep just a couple of connections to a\n> database, put semaphore/mutex on them and reuse them all through the program?\n> \tOf course I would check if their PQstatus isnt at CONNECTION_BAD and\n> reconnect if they were...\n\nYou would have to hold the lock from BEGIN until COMMIT.\nOtherwise, connection re-use is normal. \n\nNathan Myers\nncm@zembu.com\n", "msg_date": "Tue, 6 Feb 2001 11:04:06 -0800", "msg_from": "ncm@zembu.com (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: using the same connection?" }, { "msg_contents": "Well actually this particular connection is just for selects...\n\nOn Tue, 06 Feb 2001, you wrote:\n> On Tue, Feb 06, 2001 at 11:08:49AM -0500, Mathieu Dube wrote:\n> > Hi y'all,\n> > \tIs it a bad idea for an app to keep just a couple of connections to a\n> > database, put semaphore/mutex on them and reuse them all through the program?\n> > \tOf course I would check if their PQstatus isnt at CONNECTION_BAD and\n> > reconnect if they were...\n> \n> You would have to hold the lock from BEGIN until COMMIT.\n> Otherwise, connection re-use is normal. \n> \n> Nathan Myers\n> ncm@zembu.com\n-- \nMathieu Dube\t\nMondo-Live\t\t\t\nwww.flipr.com\n", "msg_date": "Tue, 6 Feb 2001 14:15:22 -0500", "msg_from": "Mathieu Dube <mathieu_dube@videotron.ca>", "msg_from_op": true, "msg_subject": "Re: using the same connection?" }, { "msg_contents": "Quoting Mathieu Dube <mathieu_dube@videotron.ca>:\n\n> Hi y'all,\n> \tIs it a bad idea for an app to keep just a couple of connections to a\n> database, put semaphore/mutex on them and reuse them all through the\n> program?\n> \tOf course I would check if their PQstatus isnt at CONNECTION_BAD and\n> reconnect if they were...\n> \tI need some opinions on that practice...\n\nIn the Java world it's called ConnectionPooling and is standard practice, \nespecially with Servlets/JSP/EJB's.\n\nPeter\n\n-- \nPeter Mount peter@retep.org.uk\nPostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/\nRetepPDF PDF library for Java: http://www.retep.org.uk/pdf/\n", "msg_date": "Wed, 07 Feb 2001 03:37:48 -0500 (EST)", "msg_from": "Peter T Mount <peter@retep.org.uk>", "msg_from_op": false, "msg_subject": "Re: using the same connection?" } ]
[ { "msg_contents": "Yes, that was why I wrote it in the way that I did. The table is\neffectively given a constant name, and the count is got from the table with\na known name. But of a kludge, but in 45sec, that was all I could come up\nwith ;-)\n\nIt would be VERY useful to see it fixed.\n\nCheers...\n\n\nMikeA\n \n\n-----Original Message-----\nFrom: Tom Lane [mailto:tgl@sss.pgh.pa.us]\nSent: 06 February 2001 16:16\nTo: Michael Ansley\nCc: Jan Wieck; sqllist; pgsql-hackers@postgresql.org\nSubject: Re: [SQL] PL/PGSQL function with parameters \n\n\nMichael Ansley <Michael.Ansley@intec-telecom-systems.com> writes:\n> CREATE FUNCTION table_count(varchar) RETURNS integer AS '\n> DECLARE\n> \tSQL varchar;\n> \tRES integer;\n> BEGIN\n> \tSQL = ''SELECT * INTO temp1 FROM '' || $1;\n> \tEXECUTE SQL;\n> \tSELECT count(*) INTO RES FROM temp1;\n> \tRETURN(RES)\n> END;\n> '\n> LANGUAGE 'plpgsql';\n\n> What I couldn't get it to do was to select directly into the variable RES.\n\nI tried this, and it seems that \"SELECT ... INTO foo\" is not executed\ncorrectly by EXECUTE --- the INTO is handled as an ordinary select-into-\ntable construct rather than plpgsql's select-into-variable.\n\nWhile I have not looked closely, I seem to recall that plpgsql handles\nINTO by stripping that clause out of the statement before it's passed to\nthe SQL engine. Evidently that's not happening in the EXECUTE case.\n\nJan, do you agree this is a bug? Is it reasonable to try to repair it\nfor 7.1? If we do not change the behavior of EXECUTE now, I fear it\nwill be too late --- some people will come to depend on the existing\nbehavior.\n\n\t\t\tregards, tom lane\n\n\n**********************************************************************\nThis email and any files transmitted with it are confidential and\nintended solely for the use of the individual or entity to whom they\nare addressed. If you have received this email in error please notify\nNick West - Global Infrastructure Manager.\n\nThis footnote also confirms that this email message has been swept by\nMIMEsweeper for the presence of computer viruses.\n\nwww.mimesweeper.com\n**********************************************************************\n\n\n\n\n\nRE: [SQL] PL/PGSQL function with parameters \n\n\nYes, that was why I wrote it in the way that I did.  The table is effectively given a constant name, and the count is got from the table with a known name.  But of a kludge, but in 45sec, that was all I could come up with ;-)\nIt would be VERY useful to see it fixed.\n\nCheers...\n\n\nMikeA\n \n\n-----Original Message-----\nFrom: Tom Lane [mailto:tgl@sss.pgh.pa.us]\nSent: 06 February 2001 16:16\nTo: Michael Ansley\nCc: Jan Wieck; sqllist; pgsql-hackers@postgresql.org\nSubject: Re: [SQL] PL/PGSQL function with parameters \n\n\nMichael Ansley <Michael.Ansley@intec-telecom-systems.com> writes:\n> CREATE FUNCTION table_count(varchar) RETURNS integer AS '\n> DECLARE\n>       SQL varchar;\n>       RES integer;\n> BEGIN\n>       SQL = ''SELECT * INTO temp1 FROM '' || $1;\n>       EXECUTE SQL;\n>       SELECT count(*) INTO RES FROM temp1;\n>       RETURN(RES)\n> END;\n> '\n> LANGUAGE 'plpgsql';\n\n> What I couldn't get it to do was to select directly into the variable RES.\n\nI tried this, and it seems that \"SELECT ... INTO foo\" is not executed\ncorrectly by EXECUTE --- the INTO is handled as an ordinary select-into-\ntable construct rather than plpgsql's select-into-variable.\n\nWhile I have not looked closely, I seem to recall that plpgsql handles\nINTO by stripping that clause out of the statement before it's passed to\nthe SQL engine.  Evidently that's not happening in the EXECUTE case.\n\nJan, do you agree this is a bug?  Is it reasonable to try to repair it\nfor 7.1?  If we do not change the behavior of EXECUTE now, I fear it\nwill be too late --- some people will come to depend on the existing\nbehavior.\n\n                        regards, tom lane\n\n\n\n**********************************************************************\nThis email and any files transmitted with it are confidential and\nintended solely for the use of the individual or entity to whom they\nare addressed. If you have received this email in error please notify\nNick West - Global Infrastructure Manager.\n\nThis footnote also confirms that this email message has been swept by\nMIMEsweeper for the presence of computer viruses.\n\nwww.mimesweeper.com\n**********************************************************************", "msg_date": "Tue, 6 Feb 2001 16:27:56 -0000 ", "msg_from": "Michael Ansley <Michael.Ansley@intec-telecom-systems.com>", "msg_from_op": true, "msg_subject": "RE: [SQL] PL/PGSQL function with parameters " } ]
[ { "msg_contents": "Certain include files are installed by src/include/Makefile and by\ninterfaces/libpq++/Makefile. However, they in turn include others that\nare not installed, thus obviating the usefulness of the ones that are.\n\nThe missing files are these:\n\naccess/heapam.h\naccess/htup.h\naccess/relscan.h\naccess/rmgr.h\naccess/sdir.h\naccess/skey.h\naccess/strat.h\naccess/transam.h\naccess/tupdesc.h\naccess/tupmacs.h\naccess/xact.h\naccess/xlogdefs.h\naccess/xlog.h\naccess/xlogutils.h\ncatalog/pg_am.h\ncatalog/pg_attribute.h\ncatalog/pg_class.h\ncatalog/pg_language.h\ncatalog/pg_proc.h\ncatalog/pg_type.h\nexecutor/execdefs.h\nexecutor/execdesc.h\nexecutor/executor.h\nexecutor/hashjoin.h\nexecutor/tuptable.h\nnodes/execnodes.h\nnodes/memnodes.h\nnodes/nodes.h\nnodes/params.h\nnodes/parsenodes.h\nnodes/pg_list.h\nnodes/plannodes.h\nnodes/primnodes.h\nnodes/relation.h\npgconnection.h\npgdatabase.h\npgtransdb.h\nrewrite/prs2lock.h\nstorage/block.h\nstorage/buffile.h\nstorage/buf.h\nstorage/bufmgr.h\nstorage/bufpage.h\nstorage/fd.h\nstorage/ipc.h\nstorage/item.h\nstorage/itemid.h\nstorage/itemptr.h\nstorage/lmgr.h\nstorage/lock.h\nstorage/off.h\nstorage/page.h\nstorage/relfilenode.h\nstorage/shmem.h\nstorage/spin.h\ntcop/dest.h\ntcop/pquery.h\ntcop/tcopprot.h\ntcop/utility.h\nutils/builtins.h\nutils/datetime.h\nutils/datum.h\nutils/fcache.h\nutils/hsearch.h\nutils/memutils.h\nutils/nabstime.h\nutils/numeric.h\nutils/portal.h\nutils/rel.h\nutils/syscache.h\nutils/timestamp.h\nutils/tqual.h\n\n\nThe list can be regenerated with the attached script.\n\nExample:\n $ pg_includes /usr/local/pgsql/include\n\n\n\n\nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight http://www.lfix.co.uk/oliver\nPGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"He hath not dealt with us after our sins; nor rewarded\n us according to our iniquities. For as the heaven is \n high above the earth, so great is his mercy toward \n them that fear him. As far as the east is from the \n west, so far hath he removed our transgressions from \n us.\" Psalms 103:10-12", "msg_date": "Tue, 06 Feb 2001 17:58:07 +0000", "msg_from": "\"Oliver Elphick\" <olly@lfix.co.uk>", "msg_from_op": true, "msg_subject": "Include files for SPI are not installed" }, { "msg_contents": "\nOn Tue, 6 Feb 2001, Oliver Elphick wrote:\n\n> Certain include files are installed by src/include/Makefile and by\n> interfaces/libpq++/Makefile. However, they in turn include others that\n> are not installed, thus obviating the usefulness of the ones that are.\n\n In your module you can use arbitrary routines from PG not only SPI, \nfor example you trigger needs work with some datetypes and for this \nneeds include anything from include/utils/ ... It expect install *all*\nheader files. Not is better download PG sources and use -I option for\nyour gcc?\n\n I expect header files on /usr/include/pgsql for client programming not\nfor SPI. \n\n\t\t\tKarel\n\n \n\n", "msg_date": "Tue, 6 Feb 2001 19:17:47 +0100 (CET)", "msg_from": "Karel Zak <zakkr@zf.jcu.cz>", "msg_from_op": false, "msg_subject": "Re: Include files for SPI are not installed" }, { "msg_contents": "Oliver Elphick wrote:\n> Certain include files are installed by src/include/Makefile and by\n> interfaces/libpq++/Makefile. However, they in turn include others that\n> are not installed, thus obviating the usefulness of the ones that are.\n \n> The missing files are these:\n[snip] \n> The list can be regenerated with the attached script.\n\nOr use this one-liner (CWD=the include directory in the source dist):\n\n/lib/cpp -M -I. -I../backend executor/spi.h | \\\n\txargs -n 1| \\\n\tgrep \\\\W| \\\n\tgrep -v ^/| \\\n\tgrep -v spi.o | \\\n\tgrep -v spi.h | \\\n\tsort\n(There are better ways of doing the regexps, I know). I use this in the\nRPM spec file to pull over the SPI headers, and have had to do so since\n6.5.x days.\n\nBruce, can we add a TODO item for make install to install _all_\nnecessary headers, including SPI ones? It is not at all necessary to\nhave a source tree lying around to do SPI development (or at least it\n_shouldn't_ be necessary). A full source tree, configured and built,\naccording to du, takes about 48MB of space (a pristine tree takes 36MB\nor so in comparison). The complete set of headers takes a little less\nthan 1MB of space. (1MB of _headers_? Yow!)\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Tue, 06 Feb 2001 14:09:06 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: Include files for SPI are not installed" }, { "msg_contents": "Karel Zak wrote:\n> On Tue, 6 Feb 2001, Oliver Elphick wrote:\n> > Certain include files are installed by src/include/Makefile and by\n> > interfaces/libpq++/Makefile. However, they in turn include others that\n> > are not installed, thus obviating the usefulness of the ones that are.\n \n> In your module you can use arbitrary routines from PG not only SPI,\n> for example you trigger needs work with some datetypes and for this\n> needs include anything from include/utils/ ... It expect install *all*\n> header files. Not is better download PG sources and use -I option for\n> your gcc?\n\nNo. Full tree takes at minimum 36MB -- even pulling the _entire_\nsrc/include tree over is only 2MB.\n \n> I expect header files on /usr/include/pgsql for client programming not\n> for SPI.\n\nWhy? I know of several people doing SPI work with no source tree\ninstalled. \n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Tue, 06 Feb 2001 14:12:06 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: Include files for SPI are not installed" }, { "msg_contents": "\nOn Tue, 6 Feb 2001, Lamar Owen wrote:\n\n> Karel Zak wrote:\n> > On Tue, 6 Feb 2001, Oliver Elphick wrote:\n> > > Certain include files are installed by src/include/Makefile and by\n> > > interfaces/libpq++/Makefile. However, they in turn include others that\n> > > are not installed, thus obviating the usefulness of the ones that are.\n> \n> > In your module you can use arbitrary routines from PG not only SPI,\n> > for example you trigger needs work with some datetypes and for this\n> > needs include anything from include/utils/ ... It expect install *all*\n> > header files. Not is better download PG sources and use -I option for\n> > your gcc?\n> \n> No. Full tree takes at minimum 36MB -- even pulling the _entire_\n> src/include tree over is only 2MB.\n\n Agree, *all* in src/include is good idea, but current /usr/include is\naway from this. Oliver's idea was include needful SPI stuff only.\n\n Before 1.5 years I wrote first trigger for PG and first thing I found\nthat /usr/include is not usable for me.\n\n> > I expect header files on /usr/include/pgsql for client programming not\n> > for SPI.\n> \n> Why? I know of several people doing SPI work with no source tree\n> installed. \n\n Hmm, it must be very limited outlook without source tree:-)\n\n\t\tKarel\n\n", "msg_date": "Tue, 6 Feb 2001 20:29:56 +0100 (CET)", "msg_from": "Karel Zak <zakkr@zf.jcu.cz>", "msg_from_op": false, "msg_subject": "Re: Include files for SPI are not installed" }, { "msg_contents": "Lamar Owen <lamar.owen@wgcr.org> writes:\n> Karel Zak wrote:\n>> I expect header files on /usr/include/pgsql for client programming not\n>> for SPI.\n\n> Why? I know of several people doing SPI work with no source tree\n> installed. \n\nI agree with Karel on this --- it's difficult to visualize doing useful\nSPI work without a source tree at hand, and it also seems unlikely that\nSPI authors would get along for long with *only* those header files\nneeded to pull in spi.h. So I think it's pretty pointless to add just\nthose header files.\n\nWhat would make more sense is for the standard install to install only\nthose headers needed for *client side* programming, and then to have\nan optional install target that installs the whole darn src/include\ntree. (Or in RPM terms, a client-devel RPM and a separate server-devel\nRPM that adds the rest of src/include.) Anything in between is\nguaranteed to be the wrong set of files.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 06 Feb 2001 19:24:29 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Include files for SPI are not installed " }, { "msg_contents": "Tom Lane wrote:\n> I agree with Karel on this --- it's difficult to visualize doing useful\n> SPI work without a source tree at hand, and it also seems unlikely that\n> SPI authors would get along for long with *only* those header files\n> needed to pull in spi.h. So I think it's pretty pointless to add just\n> those header files.\n\nI'm waiting to see what Mike Mascari says about the issue, as he is\ndoing SPI work from an RPM install (no source) and was the gadfly (in\nthe best sense of the word) that got me putting the SPI headers in in\nthe first place.\n\nBesides headers, what files are required? Makefile.global? \nMakefile.shlib? ???\n \n> What would make more sense is for the standard install to install only\n> those headers needed for *client side* programming, and then to have\n> an optional install target that installs the whole darn src/include\n> tree.\n\nI can go for that.\n\n> (Or in RPM terms, a client-devel RPM and a separate server-devel\n> RPM that adds the rest of src/include.) Anything in between is\n> guaranteed to be the wrong set of files.\n\nOk, RPM users who do SPI work, sound off. Which would you like? I'll\nadmit to liking the idea Tom has put forward, but I want more feedback. \nI would have a 'postgresql-devel' and a 'postgresql-devel-spi' -- to\nthrow out a tentative name. I am loath to split the existing -devel\nsubpackage into two packages with different names, throwing out the\noriginal, but I can do that as well, if that is the consensus.\n\nThe contents of -devel would be the headers installed by 'make install'\n-- although I question why spi.h and some friends are installed in the\nfirst place, given the 'client-side' focus (but this _is_ what Tom just\nsaid -- I'm just being a little more specific). The contents of\n-devel-spi (or maybe just -spi) would be all the other headers (no\nduplicates) (again, expounding upon what Tom said already).\n\nComments?\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Tue, 06 Feb 2001 19:34:46 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: Include files for SPI are not installed" }, { "msg_contents": "> I agree with Karel on this --- it's difficult to visualize doing useful\n> SPI work without a source tree at hand, and it also seems unlikely that\n> SPI authors would get along for long with *only* those header files\n> needed to pull in spi.h. So I think it's pretty pointless to add just\n> those header files.\n> \n> What would make more sense is for the standard install to install only\n> those headers needed for *client side* programming, and then to have\n> an optional install target that installs the whole darn src/include\n> tree. (Or in RPM terms, a client-devel RPM and a separate server-devel\n> RPM that adds the rest of src/include.) Anything in between is\n> guaranteed to be the wrong set of files.\n\nAgreed. I hesitate to copy all those *.h files when few people use them.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 6 Feb 2001 19:50:42 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Include files for SPI are not installed" }, { "msg_contents": "Lamar Owen <lamar.owen@wgcr.org> writes:\n> Tom Lane wrote:\n>> What would make more sense is for the standard install to install only\n>> those headers needed for *client side* programming, and then to have\n>> an optional install target that installs the whole darn src/include\n>> tree.\n\n> I can go for that.\n\n>> (Or in RPM terms, a client-devel RPM and a separate server-devel\n>> RPM that adds the rest of src/include.) Anything in between is\n>> guaranteed to be the wrong set of files.\n\n> Ok, RPM users who do SPI work, sound off. Which would you like? I'll\n> admit to liking the idea Tom has put forward, but I want more feedback. \n> I would have a 'postgresql-devel' and a 'postgresql-devel-spi' -- to\n> throw out a tentative name. I am loath to split the existing -devel\n> subpackage into two packages with different names, throwing out the\n> original, but I can do that as well, if that is the consensus.\n\nclient-devel and server-devel are the right division IMHO. SPI is a\nsubset of server-side development, but not all server-side code needs\nSPI. Consider user-written functions and datatypes. These guys do not\nneed SPI (usually), but they do need access to header files that aren't\ninstalled now.\n\n> The contents of -devel would be the headers installed by 'make install'\n> -- although I question why spi.h and some friends are installed in the\n> first place, given the 'client-side' focus (but this _is_ what Tom just\n> said -- I'm just being a little more specific).\n\nMy thought was that we'd remove spi.h from the minimal install, along\nwith anything else that's not useful for client-side programming. Thus\nthe standard install footprint would get smaller. I haven't looked to\nsee exactly what the list of client-side headers should be, but if\npeople like this idea I will do the legwork to make the list.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 06 Feb 2001 19:56:37 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Include files for SPI are not installed " }, { "msg_contents": "Tom Lane wrote:\n> client-devel and server-devel are the right division IMHO. SPI is a\n> subset of server-side development, but not all server-side code needs\n> SPI. Consider user-written functions and datatypes. These guys do not\n\nOk, I can do that. Obsoletes:devel here we come!\n\n> My thought was that we'd remove spi.h from the minimal install, along\n> with anything else that's not useful for client-side programming. Thus\n> the standard install footprint would get smaller. I haven't looked to\n> see exactly what the list of client-side headers should be, but if\n> people like this idea I will do the legwork to make the list.\n\nCount me as liking it.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Wed, 07 Feb 2001 15:23:31 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: Include files for SPI are not installed" } ]
[ { "msg_contents": "Hi out there,\n\n I am looking to use POSTGRESQL as a backend database. However I am\nwriting the TCP/IP data exchange protocol/and server, and I want to link\ninterface support to POSTGRESQL data files.\n\n Is there a set of files that I could compile with my application to\naccess/update the POSTGRESQL data files?\n\n\n--\nDavid C. Lane, Programmer\nMerced College\n--------------------------\nPhone: (209) 384-6183\n\nColleague: R16/HR4\nOs: AIX", "msg_date": "Tue, 06 Feb 2001 10:52:11 -0800", "msg_from": "\"David C. Lane\" <laned@merced.cc.ca.us>", "msg_from_op": true, "msg_subject": "POSTGRESQL API ..." } ]
[ { "msg_contents": "\nOn Tue, 6 Feb 2001, Guest User wrote:\n\n> Apologies if this is the wrong place to send a question\n\n Please use, hackers (or other PG) list. More heads more know, more\neyes more view :-)\n \n> Do you know if there is a patch for this bug and if so where I might be\n> able to find it? I think I'm using 7.0.3 too and I'm kind of stuck.\n\n I not sure, but it is probably fixed in 7.1 only without a backport \npatch... Comments?\n\n\t\tKarel \n\n", "msg_date": "Tue, 6 Feb 2001 20:03:42 +0100 (CET)", "msg_from": "Karel Zak <zakkr@zf.jcu.cz>", "msg_from_op": true, "msg_subject": "Re: 25 March 2001 bug" } ]
[ { "msg_contents": "I noticed that pg_attribute has rows with the same OID! You can\nverify this by running.\n\n# select count(oid),oid from pg_attribute group by oid having\ncount(oid) > 1;\n\nWe see that these duplicate OIDs appear to happen when\npg_attibute rows are inserted for indexes and primary keys.\n\nselect relname, attname\nfrom pg_attribute , pg_class\nwhere attrelid = pg_class.oid and\npg_attribute.oid in (select oid\n from pg_attribute\n group by oid\n having count(oid) > 1);\n\nI see:\n relname | attname\n ---------------------------------+--------------\n pg_aggregate_name_type_index | aggname\n pg_aggregate_name_type_index | aggbasetype\n pg_amop_opid_index | amopclaid\n pg_amop_opid_index | amopopr\n pg_amop_opid_index | amopid\n pg_amop_strategy_index | amopid\n pg_amop_strategy_index | amopclaid\n pg_amop_strategy_index | amopstrategy\n pg_attribute_relid_attnam_index | attrelid\n pg_attribute_relid_attnam_index | attname\n pg_attribute_relid_attnum_index | attrelid\n pg_attribute_relid_attnum_index | attnum\n pg_inherits_relid_seqno_index | inhrelid\n pg_inherits_relid_seqno_index | inhseqno\n pg_largeobject_loid_pn_index | loid\n pg_largeobject_loid_pn_index | pageno\n pg_listener_pid_relname_index | listenerpid\n pg_listener_pid_relname_index | relname\n pg_operator_oprname_l_r_k_index | oprname\n pg_operator_oprname_l_r_k_index | oprleft\n pg_operator_oprname_l_r_k_index | oprright\n pg_operator_oprname_l_r_k_index | oprkind\n pg_proc_proname_narg_type_index | proname\n pg_proc_proname_narg_type_index | pronargs\n pg_proc_proname_narg_type_index | proargtypes\n pg_statistic_relid_att_index | starelid\n pg_statistic_relid_att_index | staattnum\n primarytest2_pkey | col1\n primarytest2_pkey | col2\n (29 rows)\n\nWhat do people think about this issue? It doesn't seem to have\nmajor consequences now, but it should probably be fixed? When\nsystem tables have referential integrity enforced, then it will be an\nissue. Can this be put on the TODO list?\n\nRegards,\n\nJoe Mitchell\nGreat Bridge LLC\n\n\n \nI noticed that pg_attribute has rows with the same OID!  You can\nverify this by running.\n# select count(oid),oid from pg_attribute group by oid having\ncount(oid) > 1;\nWe see that these duplicate OIDs appear to happen when\npg_attibute rows are inserted for indexes and primary keys.\nselect relname, attname\nfrom pg_attribute , pg_class\nwhere attrelid = pg_class.oid and\npg_attribute.oid in (select oid\n               \nfrom pg_attribute\n               \ngroup by oid\n               \nhaving count(oid) > 1);\nI see:\n                    \nrelname            \n|   attname\n        ---------------------------------+--------------\n         pg_aggregate_name_type_index   \n| aggname\n         pg_aggregate_name_type_index   \n| aggbasetype\n         pg_amop_opid_index             \n| amopclaid\n         pg_amop_opid_index             \n| amopopr\n         pg_amop_opid_index             \n| amopid\n         pg_amop_strategy_index         \n| amopid\n         pg_amop_strategy_index         \n| amopclaid\n         pg_amop_strategy_index         \n| amopstrategy\n         pg_attribute_relid_attnam_index\n| attrelid\n         pg_attribute_relid_attnam_index\n| attname\n         pg_attribute_relid_attnum_index\n| attrelid\n         pg_attribute_relid_attnum_index\n| attnum\n         pg_inherits_relid_seqno_index  \n| inhrelid\n         pg_inherits_relid_seqno_index  \n| inhseqno\n         pg_largeobject_loid_pn_index   \n| loid\n         pg_largeobject_loid_pn_index   \n| pageno\n         pg_listener_pid_relname_index  \n| listenerpid\n         pg_listener_pid_relname_index  \n| relname\n         pg_operator_oprname_l_r_k_index\n| oprname\n         pg_operator_oprname_l_r_k_index\n| oprleft\n         pg_operator_oprname_l_r_k_index\n| oprright\n         pg_operator_oprname_l_r_k_index\n| oprkind\n         pg_proc_proname_narg_type_index\n| proname\n         pg_proc_proname_narg_type_index\n| pronargs\n         pg_proc_proname_narg_type_index\n| proargtypes\n         pg_statistic_relid_att_index   \n| starelid\n         pg_statistic_relid_att_index   \n| staattnum\n         primarytest2_pkey              \n| col1\n         primarytest2_pkey              \n| col2\n        (29 rows)\nWhat do people think about this issue?  It doesn't seem to have\nmajor consequences now, but it should probably be fixed?  When\nsystem tables have referential integrity enforced, then it will be\nan\nissue.  Can this be put on the TODO list?\nRegards,\nJoe Mitchell\nGreat Bridge LLC", "msg_date": "Tue, 06 Feb 2001 14:52:47 -0500", "msg_from": "Joe Mitchell <jmitchell@greatbridge.com>", "msg_from_op": true, "msg_subject": "Duplicate OIDs in pg_attribute" }, { "msg_contents": "Joe Mitchell <jmitchell@greatbridge.com> writes:\n> I noticed that pg_attribute has rows with the same OID!\n\nJoe previously asked me about this off-list, and I replied thus:\n\nThis appears to be due to the incredibly grotty coding used in\nAppendAttributeTuples in src/backend/catalog/index.c --- rather than\nbuilding tuples in any of several sane fashions, it's using an unholy\ncombination of memmove and heap_modifytuple to update a single tuple\nobject into successive states that correspond to the rows it needs to\nadd to the table. Unfortunately the OID assigned by the first\nheap_insert gets carried along to the subsequent states, so the later\ncalls to heap_insert don't think they should assign new OIDs.\n\nGood catch, Joe! This bug has probably been there since the beginning\nof time. It's evidently got no serious consequences (since in reality,\nOID uniqueness is not assumed for this table), but it ought to be fixed.\nA quick-hack solution would be to zero out the tuple's OID before each\nheap_insert, but really AppendAttributeTuples should be rewritten to\nconstruct each tuple independently in the first place.\n\nA quick 'glimpse' shows no other uses of heap_modifytuple except to\nupdate an existing tuple, so evidently no one was foolish enough to\ncopy this technique.\n\nI recommend putting this on the TODO for 7.2. We can't fix it now\nunless we want to force an initdb.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 06 Feb 2001 19:46:44 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Duplicate OIDs in pg_attribute " }, { "msg_contents": "> Good catch, Joe! This bug has probably been there since the beginning\n> of time. It's evidently got no serious consequences (since in reality,\n> OID uniqueness is not assumed for this table), but it ought to be fixed.\n> A quick-hack solution would be to zero out the tuple's OID before each\n> heap_insert, but really AppendAttributeTuples should be rewritten to\n> construct each tuple independently in the first place.\n> \n> A quick 'glimpse' shows no other uses of heap_modifytuple except to\n> update an existing tuple, so evidently no one was foolish enough to\n> copy this technique.\n> \n> I recommend putting this on the TODO for 7.2. We can't fix it now\n> unless we want to force an initdb.\n\nAdded to TODO:\n\n\t* Prevent pg_attribute from having duplicate oids for indexes\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 6 Feb 2001 19:52:27 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Duplicate OIDs in pg_attribute" } ]
[ { "msg_contents": "\n(In psql:)\nI need to modify the 2nd prompt. So i looked at the sources:\nI leave the validity test (of the name of the option/param) to SetVariable !!\n\n\n\nHere is the patch:\n\ndiff -c /internet/cvs/pgsql/src/bin/psql/command.c.~1~ /internet/cvs/pgsql/src/bin/psql/command.c\n*** /internet/cvs/pgsql/src/bin/psql/command.c.~1~\tTue Feb 6 22:26:00 2001\n--- /internet/cvs/pgsql/src/bin/psql/command.c\tTue Feb 6 22:26:00 2001\n***************\n*** 1745,1750 ****\n--- 1745,1760 ----\n \t}\n \n \n+ \n+ \t/* toggle use of pager */\n+ \telse if (strncmp(param, \"PROMPT\",6) == 0)\n+ \t{\n+ \t SetVariable(pset.vars, param, value);\t/* SetVariable takes care of whether param is actually valid !! */\n+ \t}\n+ \n+ \n+ \n+ \n \telse\n \t{\n \t\tpsql_error(\"\\\\pset: unknown option: %s\\n\", param);\n\n\n\n\n\ndiff -c /internet/cvs/pgsql/src/bin/psql/tab-complete.c.~2~ /internet/cvs/pgsql/src/bin/psql/tab-complete.c\n*** /internet/cvs/pgsql/src/bin/psql/tab-complete.c.~2~\tTue Feb 6 22:24:06 2001\n--- /internet/cvs/pgsql/src/bin/psql/tab-complete.c\tTue Feb 6 22:24:06 2001\n***************\n*** 706,713 ****\n \telse if (strcmp(prev_wd, \"\\\\pset\") == 0)\n \t{\n \t\tchar\t *my_list[] = {\"format\", \"border\", \"expanded\", \"null\", \"fieldsep\",\n! \t\t\t\"tuples_only\", \"title\", \"tableattr\", \"pager\",\n! \t\t\"recordsep\", NULL};\n \n \t\tCOMPLETE_WITH_LIST(my_list);\n \t}\n--- 706,713 ----\n \telse if (strcmp(prev_wd, \"\\\\pset\") == 0)\n \t{\n \t\tchar\t *my_list[] = {\"format\", \"border\", \"expanded\", \"null\", \"fieldsep\",\n! \t\t\t\t\t \"tuples_only\", \"title\", \"tableattr\", \"pager\", \n! \t\t\t\t\t \"PROMPT1\",\"PROMPT2\",\"PROMPT3\",\"recordsep\", NULL};\n \n \t\tCOMPLETE_WITH_LIST(my_list);\n \t}\n\n", "msg_date": "Tue, 6 Feb 2001 22:32:41 +0100 (MET)", "msg_from": "\"Michal Maru���ka\" <mmc@maruska.dyndns.org>", "msg_from_op": true, "msg_subject": "psql: why not pset PROMPT[0-2] ?" }, { "msg_contents": "Because pset sets parameters of the table output. Prompts have nothing to\ndo with table output.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Tue, 6 Feb 2001 23:43:00 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: psql: why not pset PROMPT[0-2] ?" } ]
[ { "msg_contents": "Hi,\n\nI've written a small function that should go into contrib for 7.1\n\nAs locale issues are quite tricky, being able to find out what locale \nbackend thinks it is in is a good thing ;)\n\nfrom my README.getlocale:\n\ngetlocale('category')\n---------------------\n\nreturn the locale setting of the backend\n(see '> man setlocale for definitions)\n\nIf category is one of LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY,\nLC_NUMERIC, LC_TIME the corresponding setting is returned.\n\n[hannu@taru contrib]$ psql -c \"select getlocale('LC_COLLATE')\"\n getlocale \n-----------\n en_US\n(1 row)\n\n\nfor LC_ALL (and anything else) a string like the following is returned\n\n\n[hannu@taru getlocale]$ psql -c \"select getlocale('*')\"\n getlocale\n----------------------------------------------------------------------------------------\n\nLC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=en_US;LC_MONETARY=en_US;LC_MESSAGES=C\n(1 row)\n\n\nIMHO some form of it should end up in the main distribution, probably by\n7.2.\n\n---------------------------------\nHannu Krosing <hannu@krosing.net>", "msg_date": "Wed, 07 Feb 2001 01:34:18 +0200", "msg_from": "Hannu Krosing <hannu@tm.ee>", "msg_from_op": true, "msg_subject": "a contrib function to query current locale values" }, { "msg_contents": "\nOn Wed, 7 Feb 2001, Hannu Krosing wrote:\n\n> \n> Hi,\n> \n> I've written a small function that should go into contrib for 7.1\n> \n> As locale issues are quite tricky, being able to find out what locale \n> backend thinks it is in is a good thing ;)\n\n hmm, see you PG sources -- pg_locale.c file?\n\n I mean that is not good lavish the sources with same code. If this is\nreally needful will better add your idea into this file and use\nPGLC_current() instead add to sources again new setlocale() call.\n\n The current backend (unfortunately) disable change locales on the fly \n-- this means your function will returns always same result :-)\n\n IMHO more nice will some function 'environment()' returns *all* backend\nenvironment values (locales, debug mode ... etc) or command \"SHOW LOCALE\"\nor something like this.\n\n\t\t\tKarel\n\n\n", "msg_date": "Wed, 7 Feb 2001 10:20:35 +0100 (CET)", "msg_from": "Karel Zak <zakkr@zf.jcu.cz>", "msg_from_op": false, "msg_subject": "Re: a contrib function to query current locale values" }, { "msg_contents": "Karel Zak wrote:\n\n> On Wed, 7 Feb 2001, Hannu Krosing wrote:\n> \n> \n>> Hi,\n>> \n>> I've written a small function that should go into contrib for 7.1\n>> \n>> As locale issues are quite tricky, being able to find out what locale \n>> backend thinks it is in is a good thing ;)\n> \n> \n> hmm, see you PG sources -- pg_locale.c file?\n> \n> I mean that is not good lavish the sources with same code. If this is\n> really needful will better add your idea into this file and use\n> PGLC_current() instead add to sources again new setlocale() call.\n\nYes, pg_locale.c is where I want them to end up, but it is probably \nconsidered \"a feature\" and not \"a bugfix\" so it has to wait at least\nuntil 7.2.\n\nOTOH, piggipacking it upon PGLC_current() seems like an overkill as most \nof the code is not aboult setlocale(CONST,NULL) but for interfacing to \npostgres and 'LC_XXX' --> const LC_XXX conversions.\n\n> The current backend (unfortunately) disable change locales on the fly \n\nI think that is a well-founded restriction, we don't allow changing int4 \nto char(4) on the fly either ;)\n\nBTW, does anyone know if setlocale() is an expensive function ?\n\nI.e. would it be a huge performance hog if called before each and every \ncompare of each and every VARCHAR() or TEXT field that has COLLATE defined.\n\nI'd guess it is, but if if it is not, we could use system-native locale \nsupport for STRING COLLATE.\n\n> -- this means your function will returns always same result :-)\n\nSo does \"select version();\" which I still use quite often.\n\nMy concern is about knowing that \"same\" result - currently my ways for \nfinding out about the locale included things like \"select \nupper('����');\" and sorting a small specially created table - not most \nintuitive.\n\nI needed to do it when I had to find out the simplest way to start \npostgres with different locale than the system default - the init \nscripts in the RPM's are several levels deep so I tried setting LC_ALL \nand/or friends at several levels (init.d/postgres, pg_ctl, \n~postgres/.bash_profile) and was quite unhappy by not being able to\nknow if it worked.\n\n> IMHO more nice will some function 'environment()' returns *all* backend\n> environment values (locales, debug mode ... etc) or command \"SHOW LOCALE\"\n> or something like this.\n\nI'd prefer a separate function, as it seems most portable between \ndifferent front-ends (no front-end changes needed ;).\n\nIt could have a special name, like pg_getlocale() to avoid\nname-space pollution. (maybe version()->pg_version() would also\nbe a good move).\n\n---------------\nHannu\n\n\n\n\n\n", "msg_date": "Wed, 07 Feb 2001 15:48:08 +0200", "msg_from": "Hannu Krosing <hannu@tm.ee>", "msg_from_op": true, "msg_subject": "Re: a contrib function to query current locale values" }, { "msg_contents": "Hannu Krosing <hannu@tm.ee> writes:\n> BTW, does anyone know if setlocale() is an expensive function ?\n\nThe variant where you're just querying the current setting should not be\ntoo expensive. I'd expect the variant where you are changing the\nsetting to be very expensive, however; most likely, it goes out and\nreads/parses the locale definition files.\n\n> I.e. would it be a huge performance hog if called before each and every \n> compare of each and every VARCHAR() or TEXT field that has COLLATE defined.\n\nI do not think we will be able to get away with that in standard\nimplementations of the locale functions. We will need to roll our own\nimplementation that caches and reuses pre-loaded locale information for\nmultiple locales at once.\n\nDoesn't seem like an appetizing prospect, but I think there's no other\nway to support per-column locales...\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 07 Feb 2001 10:16:48 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: a contrib function to query current locale values " }, { "msg_contents": "Tom Lane wrote:\n> \n> Hannu Krosing <hannu@tm.ee> writes:\n> > BTW, does anyone know if setlocale() is an expensive function ?\n> \n> The variant where you're just querying the current setting should not be\n> too expensive. I'd expect the variant where you are changing the\n> setting to be very expensive, however; most likely, it goes out and\n> reads/parses the locale definition files.\n> \n> > I.e. would it be a huge performance hog if called before each and every\n> > compare of each and every VARCHAR() or TEXT field that has COLLATE defined.\n> \n> I do not think we will be able to get away with that in standard\n> implementations of the locale functions. We will need to roll our own\n> implementation that caches and reuses pre-loaded locale information for\n> multiple locales at once.\n> \n> Doesn't seem like an appetizing prospect, but I think there's no other\n> way to support per-column locales...\n> \n> regards, tom lane\n\nThere seems to be a library released by IBM that we could use, see at:\n\nhttp://oss.software.ibm.com/developerworks/opensource/icu/project/\n\ncould someone review its license :\n\nhttp://oss.software.ibm.com/developer/opensource/license10.html \n\nfor compatibility with postgres.\n\nAt cursory reading it seems to have the same flaws that GPL :\n---8<--------8<-------8<-------8<-------8<----\nWhen the Program is made available in source code form: \n\n a) it must be made available under this Agreement; and \n\n b) a copy of this Agreement must be included with each copy of\nthe Program. \n---8<--------8<-------8<-------8<-------8<----\ni.e. forcing its own license. \n\nOTOH it\n\n1) allows distribution in object-code form under other licenses\n\n2) is in fact a library not a \"Program\" ;)\n\n\n3) it claims commercial distribution to be ok.\n---8<--------8<-------8<-------8<-------8<----\n4. COMMERCIAL DISTRIBUTION \n\n Commercial distributors of software may accept certain\nresponsibilities with \n respect to end users, business partners and the like. While this\nlicense is \n intended to facilitate the commercial use of the Program, the\nContributor \n who includes the Program in a commercial product offering should do so\nin a \n manner which does not create potential liability for other\nContributors. \n Therefore, if a Contributor includes the Program in a commercial\nproduct \n offering, such Contributor (\"Commercial Contributor\") hereby agrees to\ndefend\n and indemnify every other Contributor (\"Indemnified Contributor\")\nagainst any\n losses, damages and costs (collectively \"Losses\") arising from claims,\nlawsuits\n and other legal actions brought by a third party against the\nIndemnified\n Contributor to the extent caused by the acts or omissions of such\nCommercial\n Contributor in connection with its distribution of the Program in a\ncommercial\n product offering. The obligations in this section do not apply to any\nclaims or\n Losses relating to any actual or alleged intellectual property\ninfringement.\n In order to qualify, an Indemnified Contributor must: a) promptly\nnotify the\n Commercial Contributor in writing of such claim, and b) allow the\nCommercial\n Contributor to control, and cooperate with the Commercial Contributor\nin, the\n defense and any related settlement negotiations. The Indemnified\nContributor\n may participate in any such claim at its own expense. \n\n For example, a Contributor might include the Program in a commercial\nproduct\n offering, Product X. That Contributor is then a Commercial\nContributor. If\n that Commercial Contributor then makes performance claims, or offers\nwarranties\n related to Product X, those performance claims and warranties are such\n Commercial Contributor's responsibility alone. Under this section, the\n Commercial Contributor would have to defend claims against the other\n Contributors related to those performance claims and warranties, and\nif a\n court requires any other Contributor to pay any damages as a result,\nthe\n Commercial Contributor must pay those damages. \n---8<--------8<-------8<-------8<-------8<----\n--------\nHannu\n", "msg_date": "Wed, 07 Feb 2001 23:14:20 +0200", "msg_from": "Hannu Krosing <hannu@tm.ee>", "msg_from_op": true, "msg_subject": "Re: a contrib function to query current locale values" } ]
[ { "msg_contents": "Is it a feasible idea that PostgreSQL could detect when an index would be\nhandy, and create it itself, or at least log that a table is being queried\nbut the indices are not appropriate?\n\nI suggest this as it's a feature of most windows databases, and MySQL does\nit. I think it would be a great timesaver as we have hundreds of different\nqueries, and it's a real pain to have to EXPLAIN them all, etc. Is that\npossible? Feasible?\n\nChris\n\n--\nChristopher Kings-Lynne\nFamily Health Network (ACN 089 639 243)\n\n", "msg_date": "Wed, 7 Feb 2001 10:10:24 +0800", "msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>", "msg_from_op": true, "msg_subject": "Auto-indexing" }, { "msg_contents": "* Christopher Kings-Lynne <chriskl@familyhealth.com.au> [010206 18:29] wrote:\n> Is it a feasible idea that PostgreSQL could detect when an index would be\n> handy, and create it itself, or at least log that a table is being queried\n> but the indices are not appropriate?\n> \n> I suggest this as it's a feature of most windows databases, and MySQL does\n> it. I think it would be a great timesaver as we have hundreds of different\n> queries, and it's a real pain to have to EXPLAIN them all, etc. Is that\n> possible? Feasible?\n\nProbably both, but if it's done there should be options to:\n\n.) disable it completely or by table/database or even threshold or\n disk free parameters (indicies can be large)\n.) log any auto-created databases to inform the DBA.\n.) if disabled optionally log when it would have created an index on\n the fly. (suggest an index)\n.) expire old and unused auto-created indecies.\n\nGenerally Postgresql assumes the user knows what he's doing, but\nit couldn't hurt too much to provide an option to have it assist\nthe user.\n\n-- \n-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Tue, 6 Feb 2001 18:36:16 -0800", "msg_from": "Alfred Perlstein <bright@wintelcom.net>", "msg_from_op": false, "msg_subject": "Re: Auto-indexing" }, { "msg_contents": "> Probably both, but if it's done there should be options to:\n> \n> .) disable it completely or by table/database or even threshold or\n> disk free parameters (indicies can be large)\n> .) log any auto-created databases to inform the DBA.\n> .) if disabled optionally log when it would have created an index on\n> the fly. (suggest an index)\n> .) expire old and unused auto-created indecies.\n> \n> Generally Postgresql assumes the user knows what he's doing, but\n> it couldn't hurt too much to provide an option to have it assist\n> the user.\n\nI want to implement a SET PERFORMANCE_TIPS, hopefully for 7.2:\n\n\t* Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM\n\t ANALYZE, and CLUSTER\n\nI think suggesting items to the adminstrator is the way to go.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 6 Feb 2001 22:14:17 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Auto-indexing" } ]
[ { "msg_contents": "Well... still no CORBA? I thought someone would pick it up... then\nagain, I haven't seen that many people using it. JDBC seems to be more\npopular...\n\nP.S. Cc: me, I'm not on the list.\n\n-- \nTaral <taral@taral.net>\nPlease use PGP/GPG to send me mail.\n\"Never ascribe to malice what can as easily be put down to stupidity.\"", "msg_date": "Tue, 6 Feb 2001 22:27:49 -0600", "msg_from": "JP Sugarbroad <taral@taral.net>", "msg_from_op": true, "msg_subject": "CORBA?" }, { "msg_contents": "At 22:27 06/02/01 -0600, JP Sugarbroad wrote:\n>Well... still no CORBA? I thought someone would pick it up... then\n>again, I haven't seen that many people using it. JDBC seems to be more\n>popular...\n\ngoing by the amount of emails I get it is ;-)\n\nPS: There's several corba bits floating around, but there is some \nCorba/JDBC stuff new for 7.1 (finishing touches to it at the moment).\n\nPeter\n\n", "msg_date": "Wed, 07 Feb 2001 22:05:23 +0000", "msg_from": "Peter Mount <peter@retep.org.uk>", "msg_from_op": false, "msg_subject": "Re: CORBA?" } ]
[ { "msg_contents": "Reliable rumor has it that Deja.com (formerly Dejanews) is going out of\nbusiness, possibly as early as this week, and pulling the plug completely\n(I worked there '97-'99). They've already laid off all but a small\nhandful of the peak of ~125 employees. That was the premier source for\ntechnical archives, IMO. What a loss.\n\nQuestion: What's the next best site/tool for searching technical usenet\narchives??\n\nRegards,\nEd Loehr\n", "msg_date": "Wed, 07 Feb 2001 00:57:20 -0600", "msg_from": "Ed Loehr <eloehr@austin.rr.com>", "msg_from_op": true, "msg_subject": "Off-topic: usenet sources?" } ]
[ { "msg_contents": "I have a problem with 7.1 beta 4\n\nSetup :\nDebian 2.3(?) (unstable)\nKernel 2.18pre23 (the stock Debian kernel)\nPostgreSQL 7.1beta4 as packaged for Debian by Oliver Elphick\nunixODBC 2.0.3 compiled from unixODBC.org's sources against the installed and\nworking PG 7.1b4.\n\nThe problem is that an ODBC connection (from StarOffice or unixODBC's\nDatamanager tool) is correctly opened, but no tables show up.\n\nThis problem seems limited : the ODBC driver has some function, as proved by\nan attempt to use the RODBC package of the R statistical program :\n\n> ch1<-odbcConnect(\"Essai1\",\"XXXXXXXX\",\"XXXXXXXX\") -- username and password masked\n> sqlTables(ch1)\n[1] -1 \t\t\t-- That means \"error\". However :\n> sqlQuery(ch1,\"select * from tablea;\") -- send a query absed on previous knowledge\n keya val\t\t\t\t-- Result is OK.\n1 1 Prem's\n2 2 Deuz\n3 3 Troiz\nWarning message: \t-- Not unusual when reading text fields with RODBC.\na column has been truncated in: sqlGetResults(channel, errors = errors, ...) \n> odbcClose(ch1)\n[1] 1\n\nSo my question is : what has changed in the protocol ?\n\nAnd, BTW : what has happened to pgaccess ? Views doesn't show up, while psql\nsees them.\n\n--\nEmmanuel Charpentier\n", "msg_date": "Wed, 07 Feb 2001 09:14:25 +0100", "msg_from": "Emmanuel Charpentier <charpent@bacbuc.dyndns.org>", "msg_from_op": true, "msg_subject": "ODBC protocol changes in 7.1 ? And to pgaccess ?" } ]
[ { "msg_contents": "Hi,\n\nHaving seen that the driver I distribute doesn't work against 7.1 Beta\n4, and not wanting to continue the split between the two versions,\nI have tried to get the driver in the beta working with unixODBC, but\nI have come against a couple of problems, one a show stopper.\n\nFirst let me say that I want to stop the split between the version, If\nI can just point people to your distribution, thats fine by me, but it\nneeds to work :-). I am not trying to get you to standardise on\nunixODBC, just to provide the option.\n\nInitially I had to link my system odbc.ini to a user odbc, because the\ndriver looks in the home account. This would be SO much better if there\nwas a build option to link with libodbcini.so, not saying it should be\nthe default, just that the option would be great.\n\nAfter this, it still didn't find the entries, I fould the problem was\nthe code couldn't handle spaces in the ini file, so\n\n[dsn]\nServername=fred\n\nworks, but\n\n[dsn]\nServername = fred\n\ndoesn't. Not a major point, but again the ini lib would fix this.\n\nThen having sorted this out, I get a core dump, that I have traced to\nCC_lookup_pg_version, the code did\n\n CC_lookup_pg_version(ConnectionClass *self)\n {\n HSTMT hstmt;\n StatementClass *stmt;\n RETCODE result;\n char *szVersion = \"0.0\";\n static char *func = \"CC_lookup_pg_version\";\n\nThen later did a\n\n sprintf( szVersion... );\n\nThis seems to be trying to write into, what the compiler is marking as\nread only storage. A quick change to\n\n CC_lookup_pg_version(ConnectionClass *self)\n {\n HSTMT hstmt;\n StatementClass *stmt;\n RETCODE result;\n char szVersion[ 3 ];\n static char *func = \"CC_lookup_pg_version\";\n\n strcpy( szVersion, \"0.0\" );\n\nFixes the problem, and it connects. I will continue testing, with some\napps and see how it gets on\n\n--\nNick Gorham\nEasysoft Ltd\n\n\n\n", "msg_date": "Wed, 07 Feb 2001 13:04:34 +0000", "msg_from": "Nick Gorham <nick@easysoft.com>", "msg_from_op": true, "msg_subject": "unixODBC (again)" }, { "msg_contents": "Nick Gorham writes:\n\n> First let me say that I want to stop the split between the version, If\n> I can just point people to your distribution, thats fine by me, but it\n> needs to work :-). I am not trying to get you to standardise on\n> unixODBC, just to provide the option.\n\nThis is nice, but it contradicts your earlier patches, because it would\ncreate a circular dependency: You need PostgreSQL's ODBC to get unixODBC\nset up, but you need [--with-]unixODBC to get PostgreSQL prepared for\nunixODBC. That said if there are improvements in your version, why not\nsend patches to improve our version, rather than providing patches to link\nour version against your version? That doesn't make sense to me.\n\nI'm not trying to annoy you, I'm just wondering.\n\n> Initially I had to link my system odbc.ini to a user odbc, because the\n> driver looks in the home account. This would be SO much better if there\n> was a build option to link with libodbcini.so, not saying it should be\n> the default, just that the option would be great.\n\nWhy not have us include that libodbcini.so in our distribution?\nCertainly, no one would get upset if we had better config/ini file\nparsing.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Wed, 7 Feb 2001 19:43:06 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: unixODBC (again)" }, { "msg_contents": "Nick Gorham wrote:\n\n> \n> Then having sorted this out, I get a core dump, that I have traced to\n> CC_lookup_pg_version, the code did\n> \n> CC_lookup_pg_version(ConnectionClass *self)\n> {\n> HSTMT hstmt;\n> StatementClass *stmt;\n> RETCODE result;\n> char *szVersion = \"0.0\";\n> static char *func = \"CC_lookup_pg_version\";\n> \n> Then later did a\n> \n> sprintf( szVersion... );\n> \n> This seems to be trying to write into, what the compiler is marking as\n> read only storage. A quick change to\n> \n\nYou are right, it seems a misuse of char *.\n\n> CC_lookup_pg_version(ConnectionClass *self)\n> {\n> HSTMT hstmt;\n> StatementClass *stmt;\n> RETCODE result;\n> char szVersion[ 3 ];\n> static char *func = \"CC_lookup_pg_version\";\n> \n> strcpy( szVersion, \"0.0\" );\n> \n\nszVersion[3] seems too short.\nI would increase the length and commit it soon.\n\nRegards,\nHiroshi Inoue\n", "msg_date": "Thu, 08 Feb 2001 09:35:21 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: unixODBC (again)" } ]
[ { "msg_contents": "> On Sun, 28 Jan 2001 07:57:43 +0000\n> \"Oliver Elphick\" <olly@lfix.co.uk> wrote:\n> \n> > Hannu Krosing wrote:\n> > >If it's all your code, then you are free to license it under any licence\n> > >you desire.\n> > ...\n> > >What you probably can't do is to revoke the GPL license.\n> > \n> > You can't revoke it from existing copies \"out there\", but you can from any\n> > copies you release from now on, even of the same code..\n\n> Thanks. I'll release it under BSD - in few days.\n\nOK, his conversion tool has been release under a BSD license. Can\nsomeone review his and Thomas's and merge them? You can download it\nfrom:\n\n\thttp://ziet.zhitomir.ua/~fonin/code\n\nThanks.\n\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Wed, 7 Feb 2001 11:06:17 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Re: [GENERAL] MySQL -> Postgres dump converter" } ]
[ { "msg_contents": "In the current CVS, the PYTHON build sets LDSHARED to ld -G, not\ncc -G. It passes -Wl,-h,... to the ld command, and breaks. \n\nALL shared library builds on UnixWare should use cc -G or CC -g as \nappropriate. \n\nI don't see right off where this is set.\n\nPeter E, can you fix?\n\nThanks!\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 E-Mail: ler@lerctr.org\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n", "msg_date": "Wed, 7 Feb 2001 10:27:39 -0600", "msg_from": "Larry Rosenman <ler@lerctr.org>", "msg_from_op": true, "msg_subject": "python build/Current CVS/UnixWare" }, { "msg_contents": "Larry Rosenman writes:\n\n> In the current CVS, the PYTHON build sets LDSHARED to ld -G, not\n> cc -G. It passes -Wl,-h,... to the ld command, and breaks.\n>\n> ALL shared library builds on UnixWare should use cc -G or CC -g as\n> appropriate.\n\nI have arranged for the -Wl,-h to be left out in the Python build. The ld\nvs cc thing you have to take up with the Python folks. I'm not convinced\ntheir infrastructure works too well. For example, we might have to pull\nthe same kludge as we do for the Perl interface build on some platforms.\n\nEventually we might be able to write our own rules for this and not use\nthe Python build infrastructure. Not now, though.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Wed, 7 Feb 2001 19:34:21 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: python build/Current CVS/UnixWare" }, { "msg_contents": "I submitted a bug to their SourceForge Bug List.\n\nThanks!\n\nLER\n\n\n-----Original Message-----\nFrom: Peter Eisentraut [mailto:peter_e@gmx.net]\nSent: Wednesday, February 07, 2001 12:34 PM\nTo: Larry Rosenman\nCc: PostgreSQL Hackers List\nSubject: Re: python build/Current CVS/UnixWare\n\n\nLarry Rosenman writes:\n\n> In the current CVS, the PYTHON build sets LDSHARED to ld -G, not\n> cc -G. It passes -Wl,-h,... to the ld command, and breaks.\n>\n> ALL shared library builds on UnixWare should use cc -G or CC -g as\n> appropriate.\n\nI have arranged for the -Wl,-h to be left out in the Python build. The ld\nvs cc thing you have to take up with the Python folks. I'm not convinced\ntheir infrastructure works too well. For example, we might have to pull\nthe same kludge as we do for the Perl interface build on some platforms.\n\nEventually we might be able to write our own rules for this and not use\nthe Python build infrastructure. Not now, though.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n", "msg_date": "Wed, 7 Feb 2001 12:58:15 -0600", "msg_from": "\"Larry Rosenman\" <ler@lerctr.org>", "msg_from_op": false, "msg_subject": "RE: python build/Current CVS/UnixWare" } ]
[ { "msg_contents": "I thought I'd tried pgAccess back in the dim past with success, but as\nof current sources it fails on HPUX 10.20 and Tcl 8.3.2:\n\n$ pgaccess regression\nError in startup script: couldn't load file \"libpgtcl.sl\": no such file or directory\n while executing\n\"load libpgtcl[info sharedlibextension]\"\n (procedure \"main\" line 3)\n invoked from within\n\"main $argc $argv\"\n (file \"/home/postgres/testversion/share/pgaccess/main.tcl\" line 249)\n$\n\nThe problem here is that Tcl does not do dynamic path searching, even\nif you give it the necessary environment-variable setting:\n\n$ SHLIB_PATH=\"/home/postgres/testversion/lib:.\" wish\n% load libpgtcl.sl\n/usr/lib/dld.sl: Can't open shared library: libpgtcl.sl\n/usr/lib/dld.sl: No such file or directory\ncouldn't load file \"libpgtcl.sl\": no such file or directory\n% load /home/postgres/testversion/lib/libpgtcl.sl\n[ works fine ]\n\nAnd the reason for *that* is that Tcl doesn't pass the DYNAMIC_PATH flag\nto shl_load(). I find that sourceforge.net already has a couple of bug\nreports posted on this, so perhaps the Tcl guys will get their act\ntogether and add the flag in Tcl 8.4, but in the meantime I think we\nhave very little choice except to specify the full path to the library\nin pgaccess' load command.\n\nDoes anyone object if I modify pgaccess so that it always specifies the\nfull path to the library? That seems like it'd be a good idea even on\nOSes without this quirk, because it'd ensure getting the matching\nversion of libpgtcl and libpq even if your SHLIB_PATH/LD_LIBRARY_PATH\npoints to some other version.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 07 Feb 2001 13:34:58 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "pgAccess fails to launch on HPUX" }, { "msg_contents": "On Wed, Feb 07, 2001 at 01:34:58PM -0500, Tom Lane wrote:\n> I thought I'd tried pgAccess back in the dim past with success, but as\n> of current sources it fails on HPUX 10.20 and Tcl 8.3.2:\n> \n<SNIP problem with dynamic load and Tcl>\n\n> And the reason for *that* is that Tcl doesn't pass the DYNAMIC_PATH flag\n> to shl_load(). I find that sourceforge.net already has a couple of bug\n> reports posted on this, so perhaps the Tcl guys will get their act\n> together and add the flag in Tcl 8.4, but in the meantime I think we\n> have very little choice except to specify the full path to the library\n> in pgaccess' load command.\n\nYep, the Tcl team changed dynamic loading in 8.2->8.3 This bit me on NT,\nfirst.\n\n> \n> Does anyone object if I modify pgaccess so that it always specifies the\n> full path to the library? That seems like it'd be a good idea even on\n> OSes without this quirk, because it'd ensure getting the matching\n> version of libpgtcl and libpq even if your SHLIB_PATH/LD_LIBRARY_PATH\n> points to some other version.\n\nSounds like a good idea, to me. Getting the wrong library loaded leads to\nnon-obvious error messages, as well.\n\nRoss\n", "msg_date": "Wed, 7 Feb 2001 12:49:13 -0600", "msg_from": "\"Ross J. Reedstrom\" <reedstrm@rice.edu>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] pgAccess fails to launch on HPUX" }, { "msg_contents": "Tom Lane writes:\n\n> Does anyone object if I modify pgaccess so that it always specifies the\n> full path to the library?\n\nIf I had known that this was possible I would have done it myself already.\n;-) This is a good idea in general because in a default installation\npgaccess won't find libpgtcl on any system because it doesn't have the\nbenefit of the -rpath/-R business. Please review/remove the note at the\nend of the pgaccess ref page if you fix this to your satisfaction.\n\n> That seems like it'd be a good idea even on\n> OSes without this quirk, because it'd ensure getting the matching\n> version of libpgtcl and libpq even if your SHLIB_PATH/LD_LIBRARY_PATH\n> points to some other version.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Wed, 7 Feb 2001 20:20:16 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: pgAccess fails to launch on HPUX" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Tom Lane writes:\n>> Does anyone object if I modify pgaccess so that it always specifies the\n>> full path to the library?\n\n> If I had known that this was possible I would have done it myself already.\n> ;-) This is a good idea in general because in a default installation\n> pgaccess won't find libpgtcl on any system because it doesn't have the\n> benefit of the -rpath/-R business.\n\nRight, even with a cooperative Tcl+kernel, you need to set LD_LIBRARY_PATH\nto make pgaccess work. Perhaps this will fix that. AFAICT, specifying\na full path in the Tcl 'load' command is legal on all systems. However,\nwe still have to rely on the dynamic linker to do the right thing with\nthe indirect dependency on libpq.so, so there may be systems that still\nneed LD_LIBRARY_PATH to find libpq.so.\n\n> Please review/remove the note at the\n> end of the pgaccess ref page if you fix this to your satisfaction.\n\nThanks for the pointer, I probably wouldn't have noticed that. But\ngiven the above consideration, I'm not sure I want to remove the note\nyet.\n\nBTW, I'm also thinking about fixing pgaccess so that it honors the\n--with-pgport configure setting and PGPORT environment variable, rather\nthan having the default port number 5432 hard-wired in.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 07 Feb 2001 14:50:04 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: pgAccess fails to launch on HPUX " }, { "msg_contents": "\"Ross J. Reedstrom\" wrote:\n\n> > Does anyone object if I modify pgaccess so that it always specifies the\n> > full path to the library? That seems like it'd be a good idea even on\n> > OSes without this quirk, because it'd ensure getting the matching\n> > version of libpgtcl and libpq even if your SHLIB_PATH/LD_LIBRARY_PATH\n> > points to some other version.\n>\n> Sounds like a good idea, to me. Getting the wrong library loaded leads to\n> non-obvious error messages, as well.\n>\n> Ross\n\nYes. The full path to libpgtcl might be specified directly in pgaccess.\nBut libpq library need to be found automatically because it isn't in a \"load\"\nexplicit command.\n\nConstantin Teodorescu\n\n\n\n", "msg_date": "Wed, 07 Feb 2001 22:53:25 +0200", "msg_from": "Constantin Teodorescu <teo@flex.ro>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] pgAccess fails to launch on HPUX" }, { "msg_contents": "Constantin Teodorescu <teo@flex.ro> writes:\n> Yes. The full path to libpgtcl might be specified directly in pgaccess.\n\nI have committed pgaccess changes to do this.\n\n> But libpq library need to be found automatically because it isn't in a \"load\"\n> explicit command.\n\nAt least on HPUX 10, this seems to work anyway, presumably because the\ncorrect search path is embedded into libpgtcl.sl. I imagine that not\nall platforms have 'rpath' info embedded into shlibs, so there may be\nother platforms where you still need to set LD_LIBRARY_PATH to find\nlibpq.so.\n\nThought: would it be out of line for pgaccess.sh to set LD_LIBRARY_PATH\nexplicitly to cover this possibility?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 07 Feb 2001 16:42:08 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: [INTERFACES] pgAccess fails to launch on HPUX " }, { "msg_contents": "> If I had known that this was possible I would have done it myself already.\n> ;-) This is a good idea in general because in a default installation\n> pgaccess won't find libpgtcl on any system because it doesn't have the\n> benefit of the -rpath/-R business. Please review/remove the note at the\n\nReally? On my RedHat 6.2 derived Linux distribution pgaccess\nsuccessfully finds libpgtcl.so without any problem. (using Tcl8.0)\n--\nTatsuo Ishii\n", "msg_date": "Sun, 11 Feb 2001 13:27:38 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": false, "msg_subject": "Re: pgAccess fails to launch on HPUX" }, { "msg_contents": "Tatsuo Ishii writes:\n\n> > If I had known that this was possible I would have done it myself already.\n> > ;-) This is a good idea in general because in a default installation\n> > pgaccess won't find libpgtcl on any system because it doesn't have the\n> > benefit of the -rpath/-R business. Please review/remove the note at the\n>\n> Really? On my RedHat 6.2 derived Linux distribution pgaccess\n> successfully finds libpgtcl.so without any problem. (using Tcl8.0)\n\nThen you probably have LD_LIBRARY_PATH set, or you have the linker\nconfigured to look into the directory by default.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Sun, 11 Feb 2001 12:11:56 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: pgAccess fails to launch on HPUX" }, { "msg_contents": "> > > If I had known that this was possible I would have done it myself already.\n> > > ;-) This is a good idea in general because in a default installation\n> > > pgaccess won't find libpgtcl on any system because it doesn't have the\n> > > benefit of the -rpath/-R business. Please review/remove the note at the\n> >\n> > Really? On my RedHat 6.2 derived Linux distribution pgaccess\n> > successfully finds libpgtcl.so without any problem. (using Tcl8.0)\n> \n> Then you probably have LD_LIBRARY_PATH set, or you have the linker\n> configured to look into the directory by default.\n\nI thought the point in these discussions is libpgtl.so could not be\nloaded even if LD_LIBRARY_PATH or whatever is set.\n--\nTatsuo Ishii\n", "msg_date": "Sun, 11 Feb 2001 23:57:26 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] Re: pgAccess fails to launch on HPUX" }, { "msg_contents": "Tatsuo Ishii writes:\n\n> I thought the point in these discussions is libpgtl.so could not be\n> loaded even if LD_LIBRARY_PATH or whatever is set.\n\nNo, the point is that we are trying to avoid the requirement that\nLD_LIBRARY_PATH has to be set before the system can be used. This works\nokay with C linkage programs because of the \"rpath\" feature, but pgaccess\ndoes not have the benefit of that so we needed another way for it to find\nlibpgtcl.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Sun, 11 Feb 2001 18:42:15 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] Re: pgAccess fails to launch on HPUX" } ]
[ { "msg_contents": "\tI've got a system in which a row is being created by one process,\na notify is sent, and another process finds and then deletes the\nrow. This whole interchange seems to be taking about a second, which\nseems oddly slow. As far as I know, I have the fsync-on-anything\nturned off (*).\n\n\tI'm mainly wondering if I should index/not index the key of the\ntable, and if I should blame the hardware or Postgres? The hard\ndrive on the R&D server is pretty slow, although the CPU is pretty\ndang fast. I could also blame the notification system but that\nshouldn't be a problem, right?\n\n\n* Is there a good way to find out if this option is on/off?\n\n-- \nAdam Haberlach |A cat spends her life conflicted between a\nadam@newsnipple.com |deep, passionate, and profound desire for\nhttp://www.newsnipple.com |fish and an equally deep, passionate, and\n'88 EX500 '00 >^< |profound desire to avoid getting wet.\n", "msg_date": "Wed, 7 Feb 2001 11:27:55 -0800", "msg_from": "Adam Haberlach <adam@newsnipple.com>", "msg_from_op": true, "msg_subject": "Sluggish inserts/updates ?" }, { "msg_contents": "Adam Haberlach wrote:\n> \n> I've got a system in which a row is being created by one process,\n> a notify is sent, and another process finds and then deletes the\n> row. This whole interchange seems to be taking about a second, which\n> seems oddly slow. \n\nIf you do it enough times without vacuum, the table grows quite big,\neven \nthough it may look empty...\n\n> As far as I know, I have the fsync-on-anything\n> turned off (*).\n> \n> I'm mainly wondering if I should index/not index the key of the\n> table, and if I should blame the hardware or Postgres?\n\nIndex would very likely help. (BTW, the best way to find out is to try\nit -\nyou can always drop it later ;)\n\n> The hard\n> drive on the R&D server is pretty slow, although the CPU is pretty\n> dang fast. I could also blame the notification system but that\n> shouldn't be a problem, right?\n\nHow do you read the notify ?\n\n----------\nHannu\n", "msg_date": "Thu, 08 Feb 2001 00:27:32 +0200", "msg_from": "Hannu Krosing <hannu@tm.ee>", "msg_from_op": false, "msg_subject": "Re: Sluggish inserts/updates ?" } ]
[ { "msg_contents": "Hi !! \nI am trying to install Postgresql-7.0.3 on the solaris 5.6 machine and\ni am trying to configure it as a user and not as a root because i don't\nhave root access as it is my computer science departmental machine.\nwhen i run a make it gives the following error:\n\n\ngmake[3]: Leaving directory\n`/cis/mira/projects/temp/postgresql-7.0.3/src/backen\nd/utils/time'\nsh Gen_fmgrtab.sh ../../include/catalog/pg_proc.h\n/usr/local/bin/gcc -I../../include -I../../backend -I.. -c fmgrtab.c\n-o fm\ngrtab.o\nld -r -o SUBSYS.o fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o error/SUBSYS.o\nfmgr/SUBS\nYS.o hash/SUBSYS.o init/SUBSYS.o misc/SUBSYS.o mmgr/SUBSYS.o sort/SUBSYS.o\ntime/\nSUBSYS.o\ngmake[2]: Leaving directory\n`/cis/mira/projects/temp/postgresql-7.0.3/src/backen\nd/utils'\n/usr/local/bin/gcc -I../include -I../backend -o postgres\naccess/SUBSYS.o boot\nstrap/SUBSYS.o catalog/SUBSYS.o commands/SUBSYS.o executor/SUBSYS.o\nlib/SUBSYS.o\n libpq/SUBSYS.o main/SUBSYS.o parser/SUBSYS.o nodes/SUBSYS.o\noptimizer/SUBSYS.o\nport/SUBSYS.o postmaster/SUBSYS.o regex/SUBSYS.o rewrite/SUBSYS.o\nstorage/SUBSYS\n.o tcop/SUBSYS.o utils/SUBSYS.o ../utils/version.o -lgen -lcrypt -lnsl\n-lsocket\n -ldl -lm -lreadline -ltermcap -lncurses\nlibpq/SUBSYS.o: In function `be_recvauth':\nlibpq/SUBSYS.o(.text+0x5038): undefined reference to `__inet_ntoa'\nlibpq/SUBSYS.o: In function `process_hba_record':\nlibpq/SUBSYS.o(.text+0x60b0): undefined reference to `__inet_aton'\nlibpq/SUBSYS.o(.text+0x6114): undefined reference to `__inet_aton'\nlibpq/SUBSYS.o: In function `ident':\nlibpq/SUBSYS.o(.text+0x6cbc): undefined reference to `__inet_ntoa'\nlibpq/SUBSYS.o(.text+0x6dd0): undefined reference to `__inet_ntoa'\nlibpq/SUBSYS.o(.text+0x6ea0): undefined reference to `__inet_ntoa'\ntcop/SUBSYS.o: In function `PostgresMain':\ntcop/SUBSYS.o(.text+0x30e8): undefined reference to `__inet_ntoa'\ngmake[1]: *** [postgres] Error 1\ngmake[1]: Leaving directory\n`/cis/mira/projects/temp/postgresql-7.0.3/src/backen\nd'\ngmake: *** [all] Error 2\n\nPlease if someone can help me out.\nI was getting the same trouble with installing Apache WebServer in my\naccount and had to go and modify the \"makefiles\" to include\n-lbind option in them. Do i have to do the same thing here as well, i\ntried doing that though and it didn't work.\n\nRegards,\nAmit\n\n-------------------------------------------------------------------------------\n\"Let Noble thoughts come to us from all directions.\" \n -Rig Veda \n-------------------------------------------------------------------------------\nHome:\t\t\t\t\t\t Office:\nAmit Sharma,\t\t\t\t\t Amit Sharma,\n1119,Kearney st.,\t\t\t\t Graduate Assistant,\nAppt # 8,\t\t\t\t\t Dept. Of Mathematics,\nManhattan,\t\t\t\t\t Kansas State Univ.,\nKansas,66502.\t\t\t\t\t Kansas,66502.\nPh. No. 1-785-5373052\t\t\t\t Ph. No.1-785-5320561.\n\n", "msg_date": "Wed, 7 Feb 2001 14:59:08 -0600 (CST)", "msg_from": "Amit Sharma <amit@math.ksu.edu>", "msg_from_op": true, "msg_subject": "Solaris 5.6 install problem" }, { "msg_contents": "Amit Sharma writes:\n\n> libpq/SUBSYS.o(.text+0x5038): undefined reference to `__inet_ntoa'\n\n> I was getting the same trouble with installing Apache WebServer in my\n> account and had to go and modify the \"makefiles\" to include\n> -lbind option in them. Do i have to do the same thing here as well, i\n> tried doing that though and it didn't work.\n\nI think you need to add -lresolv. Edit src/Makefile.global, the line\nLIBS=...\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Mon, 12 Feb 2001 16:44:53 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Solaris 5.6 install problem" } ]
[ { "msg_contents": "I had a need to read such things as the backend locale and the catalog\nversion number from the current database, and couldn't find any existing\nprogram to do that.\n\nThe attached utility produces this output:\n\nlinda:~$ pg_controldata\nLog file id: 0\nLog file segment: 5\nLast modified: Wed Feb 7 19:35:47 2001\nDatabase block size: 8192\nBlocks per segment of large relation: 131072\nCatalog version number: 200101061\nLC_COLLATE: en_GB\nLC_CTYPE: en_GB\nLog archive directory: \n\n\n\n\nOliver Elphick Oliver.Elphick@lfix.co.uk\nIsle of Wight http://www.lfix.co.uk/oliver\nPGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"But the LORD is in his holy temple; let all the earth \n keep silence before him.\" Habakkuk 2:20", "msg_date": "Wed, 07 Feb 2001 21:36:31 +0000", "msg_from": "\"Oliver Elphick\" <olly@lfix.co.uk>", "msg_from_op": true, "msg_subject": "Utility program to read parameters of the current database" }, { "msg_contents": "I have added this to /contrib. It meets the needs of several posters.\n\n\n> I had a need to read such things as the backend locale and the catalog\n> version number from the current database, and couldn't find any existing\n> program to do that.\n> \n> The attached utility produces this output:\n> \n> linda:~$ pg_controldata\n> Log file id: 0\n> Log file segment: 5\n> Last modified: Wed Feb 7 19:35:47 2001\n> Database block size: 8192\n> Blocks per segment of large relation: 131072\n> Catalog version number: 200101061\n> LC_COLLATE: en_GB\n> LC_CTYPE: en_GB\n> Log archive directory: \n> \n> \nContent-Description: pg_controldata.c\n\n[ Attachment, skipping... ]\n\n> Oliver Elphick Oliver.Elphick@lfix.co.uk\n> Isle of Wight http://www.lfix.co.uk/oliver\n> PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47\n> GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n> ========================================\n> \"But the LORD is in his holy temple; let all the earth \n> keep silence before him.\" Habakkuk 2:20 \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Fri, 23 Feb 2001 15:38:45 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Utility program to read parameters of the current database" } ]
[ { "msg_contents": "I've implemented the following changes in pg_ctl:\n\n* Make -w the default for shut down, add -W option to specify no wait.\n\n* Add -l option to name log file. If the option is omitted, then the\npostmaster log goes to stdout, so you can use 'pg_ctl ... > log' and still\nget pg_ctl's stderr on the terminal.\n\n* Proper file descriptor redirection to allow postmaster to detach from\nshell's process group.\n\n* Add -s option to turn off informational messages, so as to not mess up\nthe carefully crafted Red Hat-style startup screens. Error messages still\nshow up.\n\nThis should make pg_ctl a lot more suitable for startup scripts and\noverall. If this is okay then I'll also try to merge the contrib/linux\nand contrib/init.d scripts and reflect these changes there.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Wed, 7 Feb 2001 23:16:11 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": true, "msg_subject": "pg_ctl changes" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> I've implemented the following changes in pg_ctl:\n\nSounds good to me.\n\n> * Add -l option to name log file. If the option is omitted, then the\n> postmaster log goes to stdout, so you can use 'pg_ctl ... > log' and still\n> get pg_ctl's stderr on the terminal.\n\nLet's see if I've got this straight --- the postmaster's stdout and\nstderr go to the -l file (by default pg_ctl's stdout), while pg_ctl's\nown stderr is kept separate for failure notices? That seems like it\nwill work ... in particular one could imagine doing\n\tpg_ctl start | log_splitter_process\nto handle log rotation stuff.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 07 Feb 2001 17:19:58 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pg_ctl changes " }, { "msg_contents": "Peter Eisentraut wrote:\n> I've implemented the following changes in pg_ctl:\n[snip]\n> This should make pg_ctl a lot more suitable for startup scripts and\n> overall. If this is okay then I'll also try to merge the contrib/linux\n> and contrib/init.d scripts and reflect these changes there.\n\nSounds good to me. It appears that you haven't checked in your changes\nto CVS as of a few minutes ago, but I like the looks of what you've\nposted.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Wed, 07 Feb 2001 17:27:00 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: pg_ctl changes" } ]
[ { "msg_contents": "Philip, the last element of the chain has caused a big problem for me\nchanging from 7.0.2 to 7.1beta4: dumping the database out and putting\nback.\n\nAs you might not know, at my place getting the data from the database is\nnot a simple pg_dump, but the data come through complex filter programs\n(awk scripts and others). And loading the data back is also contains\nseveral scripts transforming the modified dump. So I am in a terrible need\nto have the same output in 7.1beta4 as in 7.0.2. I used pg_dump\nwith -acnD and -acnd switches in 7.0.2.\n\nThe old binary of pg_dump could not be used due to the changed database\ninternals... :-(\n\nIs there any (maybe undocumented) switches satisfying my needs?\n\nTIA, Zoltan\n-- \n Kov\\'acs, Zolt\\'an\n kovacsz@pc10.radnoti-szeged.sulinet.hu\n http://www.math.u-szeged.hu/~kovzol\n ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz\n\n\n", "msg_date": "Wed, 7 Feb 2001 23:46:17 +0100 (CET)", "msg_from": "Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>", "msg_from_op": true, "msg_subject": "pg_dump: oldie but goldie" } ]
[ { "msg_contents": "\nIn today's (2/7/2k1) snapshot from hub, I'm getting this:\n\ngcc -pipe -O2 -Wall -Wmissing-prototypes -Wmissing-declarations\n-I../../../../src/include -I./../include -DMAJOR_VERSION=2 -DMINOR_VERSION=8 -DPATCHLEVEL=0\n-DINCLUDE_PATH=\\\"/usr/local/pgsql/include\\\" -c -o preproc.o preproc.c\npreproc.y:3957: syntax error at null character\n\n\nI'm not 100% convinced that it's not something squirrelly with this\nmachine. But it's a brand new FreeBSD 4.2-R installation. I haven't\ntried building a kernel yet with it but the postgres compile hasn't\ngone without bumps which is why I'm suspicious.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n\n", "msg_date": "Wed, 7 Feb 2001 17:57:19 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": true, "msg_subject": "preproc.y error" }, { "msg_contents": "Vince Vielhaber <vev@michvhf.com> writes:\n> In today's (2/7/2k1) snapshot from hub, I'm getting this:\n\n> gcc -pipe -O2 -Wall -Wmissing-prototypes -Wmissing-declarations\n> -I../../../../src/include -I./../include -DMAJOR_VERSION=2 -DMINOR_VERSION=8 -DPATCHLEVEL=0\n> -DINCLUDE_PATH=\\\"/usr/local/pgsql/include\\\" -c -o preproc.o preproc.c\n> preproc.y:3957: syntax error at null character\n\nWorks fine here, and there's nothing visibly wrong with line 3957 and\nneighbors in my copy. Try removing preproc.c and letting the system\nrebuild it.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 07 Feb 2001 19:45:30 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: preproc.y error " }, { "msg_contents": "On Wed, 7 Feb 2001, Tom Lane wrote:\n\n> Vince Vielhaber <vev@michvhf.com> writes:\n> > In today's (2/7/2k1) snapshot from hub, I'm getting this:\n>\n> > gcc -pipe -O2 -Wall -Wmissing-prototypes -Wmissing-declarations\n> > -I../../../../src/include -I./../include -DMAJOR_VERSION=2 -DMINOR_VERSION=8 -DPATCHLEVEL=0\n> > -DINCLUDE_PATH=\\\"/usr/local/pgsql/include\\\" -c -o preproc.o preproc.c\n> > preproc.y:3957: syntax error at null character\n>\n> Works fine here, and there's nothing visibly wrong with line 3957 and\n> neighbors in my copy. Try removing preproc.c and letting the system\n> rebuild it.\n\nNow I get:\n\nbyacc -d preproc.y\nbyacc: f - maximum table size exceeded\ngmake[4]: *** [preproc.c] Error 2\n\nHowever it failed building a kernel, I may have some bad ram. I'm\nsupposed to have 256M coming any day - actually I thought it'd be\nhere by now.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n\n", "msg_date": "Wed, 7 Feb 2001 19:57:58 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": true, "msg_subject": "Re: preproc.y error " }, { "msg_contents": "Vince Vielhaber <vev@michvhf.com> writes:\n> Now I get:\n> byacc -d preproc.y\n> byacc: f - maximum table size exceeded\n> gmake[4]: *** [preproc.c] Error 2\n\nBetter install bison if you want to work with CVS sources ...\nthe lack of bison probably explains why it's failing for you on\nthis system when it's OK on other FreeBSD boxes.\n\nI wonder if we ought not accept byacc as a suitable yacc in configure?\nPeter, what do you think?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 07 Feb 2001 20:15:00 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: preproc.y error " }, { "msg_contents": "BTW, I pulled down the current snapshot, and there doesn't seem to be\nanything wrong with preproc.c in it. So the lack of bison on your\nmachine wasn't the issue anyway; it should've compiled the preproc.c\nfrom the snapshot without complaint.\n\nIt does sound like there may be some outright flakiness in your new\nmachine :-(\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 07 Feb 2001 20:22:02 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: preproc.y error " }, { "msg_contents": "* Tom Lane <tgl@sss.pgh.pa.us> [010207 17:24] wrote:\n> Vince Vielhaber <vev@michvhf.com> writes:\n> > Now I get:\n> > byacc -d preproc.y\n> > byacc: f - maximum table size exceeded\n> > gmake[4]: *** [preproc.c] Error 2\n> \n> Better install bison if you want to work with CVS sources ...\n> the lack of bison probably explains why it's failing for you on\n> this system when it's OK on other FreeBSD boxes.\n> \n> I wonder if we ought not accept byacc as a suitable yacc in configure?\n> Peter, what do you think?\n\nI think I reported this broken a couple of months ago, but it was\ntoo late to add the check to configure for 7.0. byacc doesn't work,\nyou need bison (or maybe some special flags to byacc).\n\n-- \n-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Wed, 7 Feb 2001 17:33:06 -0800", "msg_from": "Alfred Perlstein <bright@wintelcom.net>", "msg_from_op": false, "msg_subject": "Re: preproc.y error" }, { "msg_contents": "On Wed, 7 Feb 2001, Tom Lane wrote:\n\n> BTW, I pulled down the current snapshot, and there doesn't seem to be\n> anything wrong with preproc.c in it. So the lack of bison on your\n> machine wasn't the issue anyway; it should've compiled the preproc.c\n> from the snapshot without complaint.\n>\n> It does sound like there may be some outright flakiness in your new\n> machine :-(\n\nHopefully the new ram will show tomorrow. I need to build a kernel\nand know enough to not bother with one built on bad ram. Thanks for\nthe double check.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n\n", "msg_date": "Wed, 7 Feb 2001 20:46:30 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": true, "msg_subject": "Re: preproc.y error " }, { "msg_contents": "On 07 Feb 2001 at 20:15 (-0500), Tom Lane wrote:\n| Vince Vielhaber <vev@michvhf.com> writes:\n| > Now I get:\n| > byacc -d preproc.y\n| > byacc: f - maximum table size exceeded\n| > gmake[4]: *** [preproc.c] Error 2\n| \n| Better install bison if you want to work with CVS sources ...\n| the lack of bison probably explains why it's failing for you on\n| this system when it's OK on other FreeBSD boxes.\n\nI concur that bison is required -- A fresh OpenBSD install failed\nto build with the same error mentioned above until I installed bison.\n\n| I wonder if we ought not accept byacc as a suitable yacc in configure?\n| Peter, what do you think?\n\nI can agree with this approach, unless there is some magic to get\nbyacc to work. In any case, there should be a note in the installation\ndocs stating that bison must be used when working with the CVS src.\n\n brent\n", "msg_date": "Thu, 8 Feb 2001 09:58:44 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: preproc.y error" }, { "msg_contents": "Brent Verner <brent@rcfile.org> writes:\n> | I wonder if we ought not accept byacc as a suitable yacc in configure?\n\n> I can agree with this approach, unless there is some magic to get\n> byacc to work.\n\nIt's very probably possible to make it work by feeding byacc enough\ntable-enlarging options. (I have some now-outdated notes in the\nFAQ_HPUX doc file about what options are needed to build with the\nvendor's yacc on HPUX.) However, I don't think we want to bother with\ntrying to maintain a workable set of byacc options in the makefiles.\nThey'd not get enough testing, since the developers all have bison\ninstalled and most other people use tarballs in which the parser files\nare prebuilt. So it seems to me that the right approach is for\nconfigure to never select byacc or yacc by default, but instead to\nuse a 'missing' script like we do when flex isn't found. As with the\nflex case, the user could override configure's choice, but if he does\nthen it's his problem to make it work.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 08 Feb 2001 10:33:47 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Re: preproc.y error " }, { "msg_contents": "Brent Verner writes:\n\n> I can agree with this approach, unless there is some magic to get\n> byacc to work. In any case, there should be a note in the installation\n> docs stating that bison must be used when working with the CVS src.\n\nThere is.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Thu, 8 Feb 2001 16:44:38 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Re: preproc.y error" }, { "msg_contents": "Tom Lane writes:\n\n> So it seems to me that the right approach is for configure to never\n> select byacc or yacc by default, but instead to use a 'missing' script\n> like we do when flex isn't found. As with the flex case, the user\n> could override configure's choice, but if he does then it's his\n> problem to make it work.\n\nI like that.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Thu, 8 Feb 2001 17:19:55 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Re: preproc.y error " } ]
[ { "msg_contents": "At 23:39 7/02/01 +0100, Kovacs Zoltan wrote:\n>So I am in a terrible need\n>to have the same output in 7.1beta4 as in 7.0.2. I used pg_dump\n>with -acnD and -acnd switches in 7.0.2.\n>\n>The old binary of pg_dump could not be used due to the changed database\n>internals... :-(\n>\n>Is there any (maybe undocumented) switches satisfying my needs?\n>\n\nI don't think so. Due to changes in PG, it is simply not possible to dump\nin the same format as 7.0.2. Are there any specific differences that you\nwould like to see?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Thu, 08 Feb 2001 10:43:17 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": true, "msg_subject": "Re: pg_dump: oldie but goldie" } ]
[ { "msg_contents": "I have looked a little bit at what it'd take to make SELECT INTO inside\nan EXECUTE work the same as it does in plain plpgsql --- that is, the\nINTO should reference plpgsql variables, not a destination table.\nIt looks to me like this is possible but would require some nontrivial\nre-engineering inside plpgsql. What I'm visualizing is that EXECUTE\nshould read its string argument not just as an SPI_exec() string, but\nas an arbitrary plpgsql proc_stmt. This would offer some interesting\ncapabilities, like building a whole FOR-loop for dynamic execution.\nBut there are a number of problems to be surmounted, notably arranging\nfor the parsetree built by the plpgsql compiler not to be irretrievably\nmemory-leaked. (That ties into something I'd wanted to do anyway,\nwhich is to have the plpgsql compiler build its trees in a memory\ncontext associated with the function, not via malloc().)\n\nThis does not look like something to be tackling when we're already\nin late beta, unfortunately. So we have to decide what to do for 7.1.\nIf we do nothing now, and then implement this feature in 7.2, we will\nhave a backwards compatibility problem: EXECUTE 'SELECT INTO ...'\nwill completely change in meaning.\n\nI am inclined to keep our options open by forbidding EXECUTE 'SELECT\nINTO ...' for now. That's more than a tad annoying, because that leaves\nno useful way to do a dynamically-built SELECT, but if we don't forbid\nit I think we'll regret it later.\n\nComments?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 07 Feb 2001 22:15:02 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "PL/pgsql EXECUTE 'SELECT INTO ...'" }, { "msg_contents": "Tom,\n\n> I have looked a little bit at what it'd take to make\n> SELECT INTO inside\n> an EXECUTE work the same as it does in plain plpgsql ---\n> that is, the\n> INTO should reference plpgsql variables, not a\n> destination table.\n> It looks to me like this is possible but would require\n> some nontrivial\n> re-engineering inside plpgsql. What I'm visualizing is\n<snip>\n> (That ties into something I'd wanted to\n> do anyway,\n> which is to have the plpgsql compiler build its trees in\n> a memory\n> context associated with the function, not via malloc().)\n\nAll of this sounds good, but as a *heavy* PL/pgSQL user,\nit's still going off on somewhat of a tangent. As far as\nI'm concerned, the EXECUTE method was just a workaround for\nthe lack \"object\" variables. What I always would rather\nhave had is simply being able to drop a variable ... or an\nOID ... into a SELECT statement and not bothering with\nEXECUTE at all.\n\n> This does not look like something to be tackling when\n> we're already\n> in late beta, unfortunately.\n\nI'd agree with that. :-)\n\n> I am inclined to keep our options open by forbidding\n> EXECUTE 'SELECT\n> INTO ...' for now. That's more than a tad annoying,\n> because that leaves\n> no useful way to do a dynamically-built SELECT, but if we\n> don't forbid\n> it I think we'll regret it later.\n\nUnfortunately, I have already used EXECUTE in several\nfunctions ... my search routines will be hard to run without\nit. Perhaps you could turn off EXECUTE by default, but\nallow it as a compile-time option for those of us wise\nenough to understand the dangers?\n\n-Josh Berkus\n\n______AGLIO DATABASE SOLUTIONS___________________________\n Complete information technology josh@agliodbs.com\n and data management solutions (415) 565-7293\n for law firms, small businesses fax 621-2533\n and non-profit organizations. San Francisco\n", "msg_date": "Wed, 07 Feb 2001 20:49:52 -0800", "msg_from": "\"Josh Berkus\" <josh@agliodbs.com>", "msg_from_op": false, "msg_subject": "Re: PL/pgsql EXECUTE 'SELECT INTO ...'" }, { "msg_contents": "On Wed, Feb 07, 2001 at 10:15:02PM -0500, Tom Lane wrote:\n> I have looked a little bit at what it'd take to make SELECT INTO inside\n> an EXECUTE work the same as it does in plain plpgsql ...\n> If we do nothing now, and then implement this feature in 7.2, we will\n> have a backwards compatibility problem: EXECUTE 'SELECT INTO ...'\n> will completely change in meaning.\n> \n> I am inclined to keep our options open by forbidding EXECUTE 'SELECT\n> INTO ...' for now. ... if [not] I think we'll regret it later.\n\nI agree, disable it. But put a backpatch into contrib along with \na reference to this last e-mail. Anybody who cares enough can\napply the patch, and will be prepared for the incompatibility.\n\nNathan Myers\nncm@zembu.com\n", "msg_date": "Wed, 7 Feb 2001 21:33:47 -0800", "msg_from": "ncm@zembu.com (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: PL/pgsql EXECUTE 'SELECT INTO ...'" }, { "msg_contents": "Tom Lane wrote:\n> I have looked a little bit at what it'd take to make SELECT INTO inside\n> an EXECUTE work the same as it does in plain plpgsql --- that is, the\n> INTO should reference plpgsql variables, not a destination table.\n> It looks to me like this is possible but would require some nontrivial\n> re-engineering inside plpgsql. What I'm visualizing is that EXECUTE\n> should read its string argument not just as an SPI_exec() string, but\n> as an arbitrary plpgsql proc_stmt. This would offer some interesting\n> capabilities, like building a whole FOR-loop for dynamic execution.\n> But there are a number of problems to be surmounted, notably arranging\n> for the parsetree built by the plpgsql compiler not to be irretrievably\n> memory-leaked. (That ties into something I'd wanted to do anyway,\n> which is to have the plpgsql compiler build its trees in a memory\n> context associated with the function, not via malloc().)\n>\n> This does not look like something to be tackling when we're already\n> in late beta, unfortunately. So we have to decide what to do for 7.1.\n> If we do nothing now, and then implement this feature in 7.2, we will\n> have a backwards compatibility problem: EXECUTE 'SELECT INTO ...'\n> will completely change in meaning.\n>\n> I am inclined to keep our options open by forbidding EXECUTE 'SELECT\n> INTO ...' for now. That's more than a tad annoying, because that leaves\n> no useful way to do a dynamically-built SELECT, but if we don't forbid\n> it I think we'll regret it later.\n\n You can do something like\n\n FOR record_var IN EXECUTE <string-expr> LOOP\n ...\n END LOOP;\n\n In this case, the <string-expr> executed over SPI_exec() must\n return tuples (0-n). Otherwise you'll get a runtime error.\n\n Inside the loop you have access to the tuples via the record.\n Is that the dynamically-built SELECT capability you've been\n missing?\n\n There's not that much need for mucking with temp tables in\n EXECUTE as all this discussion looks to me.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Thu, 8 Feb 2001 08:29:49 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@Yahoo.com>", "msg_from_op": false, "msg_subject": "Re: PL/pgsql EXECUTE 'SELECT INTO ...'" }, { "msg_contents": "Jan Wieck <janwieck@Yahoo.com> writes:\n>> I am inclined to keep our options open by forbidding EXECUTE 'SELECT\n>> INTO ...' for now. That's more than a tad annoying, because that leaves\n>> no useful way to do a dynamically-built SELECT, but if we don't forbid\n>> it I think we'll regret it later.\n\n> You can do something like\n> FOR record_var IN EXECUTE <string-expr> LOOP\n> ...\n> END LOOP;\n\nOkay, that solves the concern I had about not being able to get the\nresult of an EXECUTEd select at all. I'll go ahead and forbid\nEXECUTE 'SELECT INTO' for the time being, and we can talk about\nimproving plpgsql later.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 08 Feb 2001 10:03:55 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: [SQL] Re: PL/pgsql EXECUTE 'SELECT INTO ...' " }, { "msg_contents": "Tom Lane writes:\n\n> I am inclined to keep our options open by forbidding EXECUTE 'SELECT\n> INTO ...' for now. That's more than a tad annoying, because that leaves\n> no useful way to do a dynamically-built SELECT, but if we don't forbid\n> it I think we'll regret it later.\n\nYou can always use CREATE TABLE AS.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Thu, 8 Feb 2001 20:37:16 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: PL/pgsql EXECUTE 'SELECT INTO ...'" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Tom Lane writes:\n>> I am inclined to keep our options open by forbidding EXECUTE 'SELECT\n>> INTO ...' for now. That's more than a tad annoying, because that leaves\n>> no useful way to do a dynamically-built SELECT, but if we don't forbid\n>> it I think we'll regret it later.\n\n> You can always use CREATE TABLE AS.\n\nDoes SPI_exec() support that? (Tries it ... seems to work ...)\nCool. OK, we have the bases covered then; there's no need to allow\nSELECT INTO inside EXECUTE until we can make it work as expected.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 08 Feb 2001 14:49:26 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: PL/pgsql EXECUTE 'SELECT INTO ...' " } ]
[ { "msg_contents": "\n> > But the current timestamp does not store a timezone. timestamp with time zone\n> > is supposed to store and output the timezone that was inserted.\n> > The current timestamp has it messed up (sorry), since it does not store a timezone.\n> > It stores time in UTC and always converts output to the timezone derived from [PG]TZ.\n> \n> Good point, but I'll disagree with the implied conclusion. imho the\n> SQL9x provisions for time zone handling are fundamentally and tragically\n> broken, with absolutely no provisions for DST, time zone shifting, etc\n> etc. Which helps lead most folks to code other databases without time\n> zones at all.\n\nOk, so you would be free to create a differently named type that does whatever\nyou like, but imho an ANSI standard type should behave exactly as defined.\nEspecially if it has such a verbose name as \"timestamp with time zone\".\n\nMy experience is, that developers don't use database supplied time types,\nbecause they all behave differently, not because they are not useful. \nI think we should not create yet another behavior.\n\nAndreas\n", "msg_date": "Thu, 8 Feb 2001 10:17:34 +0100 ", "msg_from": "Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>", "msg_from_op": true, "msg_subject": "AW: AW: timestamp in pg_dump" } ]
[ { "msg_contents": "On 7/02/01 at 18:05, JP Sugarbroad <taral@taral.net> wrote:\n\n> Well... still no CORBA? I thought someone would pick it up... then\n> again, I haven't seen that many people using it. JDBC seems to be more\n> popular...\n> \n> P.S. Cc: me, I'm not on the list.\n> \n> -- \n> Taral <taral@taral.net>\n> Please use PGP/GPG to send me mail.\n> \"Never ascribe to malice what can as easily be put down to stupidity.\"\n\n>From the 4Suite Readme at <http://services.4Suite.org/documents/4Suite/README> :\n\n 4ODS (Object Database System) is an Object Database Management Group\n (ODMG) 3.0 standard object database management system for Python.\n 4ODS supports the Object Definition Language (ODL) with the\n exception of a few types, and operations. A small subset of the\n Object Query Language (OQL) is also supported. Most of the Object\n Interchange Format (OIF) is supported.\n\n The actual data storage is performed by a driver. The default driver\n> is for the PostgresQL database. There is also a beta Oracle driver,\n and a beta AnyDbm Driver. [cut]\n \nI've not yet seen this one mentioned on PostgreSQL lists...\n\nGeorges Martin\n--\nGeorges Martin <mailto:georges.martin@pi.be>\n", "msg_date": "Thu, 8 Feb 2001 11:24:22 +0100", "msg_from": "Georges Martin <georges.martin@pi.be>", "msg_from_op": true, "msg_subject": "CORBA?" }, { "msg_contents": "Ok, a bit late but ;-)\n\na few weeks ago I had an Advanced Java course, and the tutor actually \ndemonstrated the Python Corba interface.\n\nLooked pretty good. He even showed JPython & corba (which is Python written \nin Java).\n\nPeter\n\nAt 11:24 08/02/01 +0100, Georges Martin wrote:\n>On 7/02/01 at 18:05, JP Sugarbroad <taral@taral.net> wrote:\n>\n> > Well... still no CORBA? I thought someone would pick it up... then\n> > again, I haven't seen that many people using it. JDBC seems to be more\n> > popular...\n> >\n> > P.S. Cc: me, I'm not on the list.\n> >\n> > --\n> > Taral <taral@taral.net>\n> > Please use PGP/GPG to send me mail.\n> > \"Never ascribe to malice what can as easily be put down to stupidity.\"\n>\n> >From the 4Suite Readme at \n> <http://services.4Suite.org/documents/4Suite/README> :\n>\n> 4ODS (Object Database System) is an Object Database Management Group\n> (ODMG) 3.0 standard object database management system for Python.\n> 4ODS supports the Object Definition Language (ODL) with the\n> exception of a few types, and operations. A small subset of the\n> Object Query Language (OQL) is also supported. Most of the Object\n> Interchange Format (OIF) is supported.\n>\n> The actual data storage is performed by a driver. The default driver\n> > is for the PostgresQL database. There is also a beta Oracle driver,\n> and a beta AnyDbm Driver. [cut]\n>\n>I've not yet seen this one mentioned on PostgreSQL lists...\n>\n>Georges Martin\n>--\n>Georges Martin <mailto:georges.martin@pi.be>\n\n", "msg_date": "Sat, 17 Feb 2001 10:22:18 +0000", "msg_from": "Peter Mount <peter@retep.org.uk>", "msg_from_op": false, "msg_subject": "Re: CORBA?" } ]
[ { "msg_contents": "What I wrote wasn't about temp tables, it was about selecting into plpgsql\nvariables. It would appear that Jan's syntax gets around this problem.\n\nMikeA\n\n\n-----Original Message-----\nFrom: Jan Wieck [mailto:janwieck@Yahoo.com]\nSent: 08 February 2001 13:30\nTo: Tom Lane\nCc: Jan Wieck; pgsql-hackers@postgreSQL.org; pgsql-sql@postgreSQL.org\nSubject: [SQL] Re: PL/pgsql EXECUTE 'SELECT INTO ...'\n\n\nTom Lane wrote:\n> I have looked a little bit at what it'd take to make SELECT INTO inside\n> an EXECUTE work the same as it does in plain plpgsql --- that is, the\n> INTO should reference plpgsql variables, not a destination table.\n> It looks to me like this is possible but would require some nontrivial\n> re-engineering inside plpgsql. What I'm visualizing is that EXECUTE\n> should read its string argument not just as an SPI_exec() string, but\n> as an arbitrary plpgsql proc_stmt. This would offer some interesting\n> capabilities, like building a whole FOR-loop for dynamic execution.\n> But there are a number of problems to be surmounted, notably arranging\n> for the parsetree built by the plpgsql compiler not to be irretrievably\n> memory-leaked. (That ties into something I'd wanted to do anyway,\n> which is to have the plpgsql compiler build its trees in a memory\n> context associated with the function, not via malloc().)\n>\n> This does not look like something to be tackling when we're already\n> in late beta, unfortunately. So we have to decide what to do for 7.1.\n> If we do nothing now, and then implement this feature in 7.2, we will\n> have a backwards compatibility problem: EXECUTE 'SELECT INTO ...'\n> will completely change in meaning.\n>\n> I am inclined to keep our options open by forbidding EXECUTE 'SELECT\n> INTO ...' for now. That's more than a tad annoying, because that leaves\n> no useful way to do a dynamically-built SELECT, but if we don't forbid\n> it I think we'll regret it later.\n\n You can do something like\n\n FOR record_var IN EXECUTE <string-expr> LOOP\n ...\n END LOOP;\n\n In this case, the <string-expr> executed over SPI_exec() must\n return tuples (0-n). Otherwise you'll get a runtime error.\n\n Inside the loop you have access to the tuples via the record.\n Is that the dynamically-built SELECT capability you've been\n missing?\n\n There's not that much need for mucking with temp tables in\n EXECUTE as all this discussion looks to me.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n\n**********************************************************************\nThis email and any files transmitted with it are confidential and\nintended solely for the use of the individual or entity to whom they\nare addressed. If you have received this email in error please notify\nNick West - Global Infrastructure Manager.\n\nThis footnote also confirms that this email message has been swept by\nMIMEsweeper for the presence of computer viruses.\n\nwww.mimesweeper.com\n**********************************************************************\n\n\n\n\n\nRE: [SQL] Re: PL/pgsql EXECUTE 'SELECT INTO ...'\n\n\nWhat I wrote wasn't about temp tables, it was about selecting into plpgsql variables.  It would appear that Jan's syntax gets around this problem.\nMikeA\n\n\n-----Original Message-----\nFrom: Jan Wieck [mailto:janwieck@Yahoo.com]\nSent: 08 February 2001 13:30\nTo: Tom Lane\nCc: Jan Wieck; pgsql-hackers@postgreSQL.org; pgsql-sql@postgreSQL.org\nSubject: [SQL] Re: PL/pgsql EXECUTE 'SELECT INTO ...'\n\n\nTom Lane wrote:\n> I have looked a little bit at what it'd take to make SELECT INTO inside\n> an EXECUTE work the same as it does in plain plpgsql --- that is, the\n> INTO should reference plpgsql variables, not a destination table.\n> It looks to me like this is possible but would require some nontrivial\n> re-engineering inside plpgsql.  What I'm visualizing is that EXECUTE\n> should read its string argument not just as an SPI_exec() string, but\n> as an arbitrary plpgsql proc_stmt.  This would offer some interesting\n> capabilities, like building a whole FOR-loop for dynamic execution.\n> But there are a number of problems to be surmounted, notably arranging\n> for the parsetree built by the plpgsql compiler not to be irretrievably\n> memory-leaked.  (That ties into something I'd wanted to do anyway,\n> which is to have the plpgsql compiler build its trees in a memory\n> context associated with the function, not via malloc().)\n>\n> This does not look like something to be tackling when we're already\n> in late beta, unfortunately.  So we have to decide what to do for 7.1.\n> If we do nothing now, and then implement this feature in 7.2, we will\n> have a backwards compatibility problem: EXECUTE 'SELECT INTO ...'\n> will completely change in meaning.\n>\n> I am inclined to keep our options open by forbidding EXECUTE 'SELECT\n> INTO ...' for now.  That's more than a tad annoying, because that leaves\n> no useful way to do a dynamically-built SELECT, but if we don't forbid\n> it I think we'll regret it later.\n\n    You can do something like\n\n        FOR record_var IN EXECUTE <string-expr> LOOP\n            ...\n        END LOOP;\n\n    In this case, the <string-expr> executed over SPI_exec() must\n    return tuples (0-n). Otherwise you'll get a runtime error.\n\n    Inside the loop you have access to the tuples via the record.\n    Is  that  the dynamically-built SELECT capability you've been\n    missing?\n\n    There's not that much need for mucking with  temp  tables  in\n    EXECUTE as all this discussion looks to me.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me.                                  #\n#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n\n\n**********************************************************************\nThis email and any files transmitted with it are confidential and\nintended solely for the use of the individual or entity to whom they\nare addressed. If you have received this email in error please notify\nNick West - Global Infrastructure Manager.\n\nThis footnote also confirms that this email message has been swept by\nMIMEsweeper for the presence of computer viruses.\n\nwww.mimesweeper.com\n**********************************************************************", "msg_date": "Thu, 8 Feb 2001 13:35:14 -0000 ", "msg_from": "Michael Ansley <Michael.Ansley@intec-telecom-systems.com>", "msg_from_op": true, "msg_subject": "RE: [SQL] Re: PL/pgsql EXECUTE 'SELECT INTO ...'" } ]
[ { "msg_contents": "Now that waiting for shutdown is the default, it seems that the default\nshutdown mode should also be one where there's a high chance of the\nshutdown actually happening. As it stands, if there are connected\nclients, pg_ctl will wait for 60 or so seconds before proclaiming that the\npostmaster won't shut down. This is not intuitive.\n\nThe signal is still delivered, though, so the postmaster may silently shut\ndown at any later time. This can cause confusion.\n\nWhile the \"smart\" shutdown is a cute feature, a *stop* script should\nreally stop the thing by default and allow the unusual behaviour to be\nselected with an option.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Thu, 8 Feb 2001 17:45:38 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": true, "msg_subject": "pg_ctl default shutdown mode" }, { "msg_contents": "Since there were no comments, I'm going to make fast shutdown the default.\n\nI wrote:\n\n> Now that waiting for shutdown is the default, it seems that the default\n> shutdown mode should also be one where there's a high chance of the\n> shutdown actually happening. As it stands, if there are connected\n> clients, pg_ctl will wait for 60 or so seconds before proclaiming that the\n> postmaster won't shut down. This is not intuitive.\n>\n> The signal is still delivered, though, so the postmaster may silently shut\n> down at any later time. This can cause confusion.\n>\n> While the \"smart\" shutdown is a cute feature, a *stop* script should\n> really stop the thing by default and allow the unusual behaviour to be\n> selected with an option.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Sat, 10 Feb 2001 02:01:05 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": true, "msg_subject": "Re: pg_ctl default shutdown mode" }, { "msg_contents": "> -----Original Message-----\n> From: Peter Eisentraut\n>\n> Since there were no comments, I'm going to make fast shutdown the default.\n>\n\nOh I've misunderstood.\nI object to the change.\n\nRegards,\nHiroshi Inoue\n\n", "msg_date": "Sat, 10 Feb 2001 15:35:35 +0900", "msg_from": "\"Hiroshi Inoue\" <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "RE: Re: pg_ctl default shutdown mode" }, { "msg_contents": "Hiroshi Inoue writes:\n\n> > Since there were no comments, I'm going to make fast shutdown the default.\n> >\n>\n> Oh I've misunderstood.\n> I object to the change.\n\nDo you feel the current behaviour is more intuitive? Just curious. I\njust think that waiting by default and smart shutdown don't really mix\nwell.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Sat, 10 Feb 2001 10:20:35 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": true, "msg_subject": "RE: Re: pg_ctl default shutdown mode" }, { "msg_contents": "> -----Original Message-----\n> From: Peter Eisentraut [mailto:peter_e@gmx.net]\n> \n> Hiroshi Inoue writes:\n> \n> > > Since there were no comments, I'm going to make fast shutdown \n> the default.\n> > >\n> >\n> > Oh I've misunderstood.\n> > I object to the change.\n> \n> Do you feel the current behaviour is more intuitive?\n\nYes.\n\n> Just curious. I\n> just think that waiting by default and smart shutdown don't really mix\n> well.\n> \n\nCurrent behavior prevents manual shutdown from cancelling\nrunning sessions carelessly. \nOTOH it's the dba's responsibilty to write appropriate shutdown\nscripts and it's not good to rely on default in writing them in the\nfirst place.\n\nRegards,\nHiroshi Inoue\n", "msg_date": "Sat, 10 Feb 2001 23:22:08 +0900", "msg_from": "\"Hiroshi Inoue\" <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "RE: Re: pg_ctl default shutdown mode" }, { "msg_contents": "> > Just curious. I\n> > just think that waiting by default and smart shutdown don't really mix\n> > well.\n> > \n> \n> Current behavior prevents manual shutdown from cancelling\n> running sessions carelessly. \n> OTOH it's the dba's responsibilty to write appropriate shutdown\n> scripts and it's not good to rely on default in writing them in the\n> first place.\n\nYes, but too many people do stupid things. If they are smart enough to\nwrite a script, they are smart enough to use a flag to make it do what\nthey want it to do.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 10:17:15 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Re: pg_ctl default shutdown mode" }, { "msg_contents": "\"Hiroshi Inoue\" <Inoue@tpf.co.jp> writes:\n>> From: Peter Eisentraut [mailto:peter_e@gmx.net]\n>> Just curious. I\n>> just think that waiting by default and smart shutdown don't really mix\n>> well.\n\n> Current behavior prevents manual shutdown from cancelling\n> running sessions carelessly. \n\nSeems that pg_ctl is being made to serve two different purposes:\none, manual shutdown, and two, automated shutdown during system-wide\nshutdown. In the second case, 'fast' shutdown is the appropriate thing,\nbut in the first case I think 'smart' shutdown is definitely the safer\nand more appropriate default.\n\nSo, how to resolve that conflict? I think it's better for the script\ndefault to cater to the manual-invocation case, because you're more\nlikely to forget to add the switch when you're entering the command by\nhand. When pg_ctl is invoked from a system shutdown script, you only\nhave to get it right once, and then the script remembers for you ;-).\n\nIn short: I agree with Hiroshi on this one. Let's leave the script\ndefault at 'smart' shutdown, and make it clear in the documentation\nthat \"-mode fast\" is the best way to invoke it from a system-shutdown\nscript.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 10 Feb 2001 11:51:09 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Re: pg_ctl default shutdown mode " }, { "msg_contents": "> So, how to resolve that conflict? I think it's better for the script\n> default to cater to the manual-invocation case, because you're more\n> likely to forget to add the switch when you're entering the command by\n> hand. When pg_ctl is invoked from a system shutdown script, you only\n> have to get it right once, and then the script remembers for you ;-).\n> \n> In short: I agree with Hiroshi on this one. Let's leave the script\n> default at 'smart' shutdown, and make it clear in the documentation\n> that \"-mode fast\" is the best way to invoke it from a system-shutdown\n> script.\n\nAgreed. Default to the best mode for manual usage.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 12:06:31 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Re: pg_ctl default shutdown mode" } ]
[ { "msg_contents": "Hi\n\n1. Subj is implemented and is ON by default in current.\nThere is flag - fixbtree - to turn this feature OFF.\nI've run some tests: 100 clients inserted big tuples (1700-1800\nbytes) into single table with index. After splitting root page\nelog(ERROR) was forced, as well as after each ~ 5th non-root page\nsplit, so there was what to fix. After this I've run selects for\neach key to check that index structure is correct.\n\n2. During tests I've got stuck spin aborts couple of times.\nSo I've increased S_MAX_BUSY, placed elog(NOTICE, \"WOULD BE STUCK\")\nfor spins == 20001 in s_lock_sleep() and rerun tests.\nI've got *many* \"WOULD BE STUCK\" notices but no one abort.\n\nDoes it explain why I tried to avoid spin stuck \"detection\" code\nin WAL? -:)\n\nShouldn't we increase S_MAX_BUSY and use ERROR instead of FATAL?\n\nVadim\n", "msg_date": "Thu, 8 Feb 2001 12:03:42 -0800 ", "msg_from": "\"Mikheev, Vadim\" <vmikheev@SECTORBASE.COM>", "msg_from_op": true, "msg_subject": "Btree runtime recovery. Stuck spins." }, { "msg_contents": "\"Mikheev, Vadim\" <vmikheev@SECTORBASE.COM> writes:\n> 2. During tests I've got stuck spin aborts couple of times.\n> So I've increased S_MAX_BUSY, placed elog(NOTICE, \"WOULD BE STUCK\")\n> for spins == 20001 in s_lock_sleep() and rerun tests.\n> I've got *many* \"WOULD BE STUCK\" notices but no one abort.\n> Does it explain why I tried to avoid spin stuck \"detection\" code\n> in WAL? -:)\n> Shouldn't we increase S_MAX_BUSY and use ERROR instead of FATAL?\n\nNo. If you have delays exceeding a minute, or that are even a visible\nfraction of a minute, then a spinlock is NOT the correct mechanism to be\nusing to wait ... because guess what, it's spinning, and consuming\nprocessor time to no purpose. You should be using a lock instead for\nanything that involves more than a trivial amount of delay.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 08 Feb 2001 15:48:49 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Btree runtime recovery. Stuck spins. " }, { "msg_contents": "> > Shouldn't we increase S_MAX_BUSY and use ERROR instead of FATAL?\n> \n> No. If you have delays exceeding a minute, or that are even a visible\n> fraction of a minute, then a spinlock is NOT the correct mechanism to be\n> using to wait ... because guess what, it's spinning, and consuming\n> processor time to no purpose. You should be using a lock instead for\n> anything that involves more than a trivial amount of delay.\n\n\"Amount of delay\" depends on system load - something we can't control...\n\nBtree uses spins to lock buffers (as all other access methods) and so\nI could use only spins in new code. And though tree recovery locks buffers\nfor longer time than normal insert operations it's possible to get\n\"stuck\" spins when using concurrent buffers locks *everywhere* under\nheavy load (especially with WAL which requires holding buffer locks\nfor duration of logging).\n\nSo, probably we have to use some kind of light locks (without deadlock\ndetection) for buffers, in future.\n\nVadim\n\n\n", "msg_date": "Thu, 8 Feb 2001 18:58:38 -0800", "msg_from": "\"Vadim Mikheev\" <vmikheev@sectorbase.com>", "msg_from_op": false, "msg_subject": "Re: Btree runtime recovery. Stuck spins. " }, { "msg_contents": "\"Vadim Mikheev\" <vmikheev@sectorbase.com> writes:\n> Shouldn't we increase S_MAX_BUSY and use ERROR instead of FATAL?\n>> \n>> No. If you have delays exceeding a minute, or that are even a visible\n>> fraction of a minute, then a spinlock is NOT the correct mechanism to be\n>> using to wait ... because guess what, it's spinning, and consuming\n>> processor time to no purpose. You should be using a lock instead for\n>> anything that involves more than a trivial amount of delay.\n\n> \"Amount of delay\" depends on system load - something we can't control...\n\n> Btree uses spins to lock buffers (as all other access methods) and so\n> I could use only spins in new code. And though tree recovery locks buffers\n> for longer time than normal insert operations it's possible to get\n> \"stuck\" spins when using concurrent buffers locks *everywhere* under\n> heavy load (especially with WAL which requires holding buffer locks\n> for duration of logging).\n\nHm. It was OK to use spinlocks to control buffer access when the max\ndelay was just the time to read or write one disk page. But it sounds\nlike we've pushed the code way past what it was designed to do. I think\nthis needs some careful thought, not just a quick hack like increasing\nthe timeout interval.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 09 Feb 2001 01:30:31 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Btree runtime recovery. Stuck spins. " }, { "msg_contents": "I wrote:\n> \"Vadim Mikheev\" <vmikheev@sectorbase.com> writes:\n>> Btree uses spins to lock buffers (as all other access methods) and so\n>> I could use only spins in new code. And though tree recovery locks buffers\n>> for longer time than normal insert operations it's possible to get\n>> \"stuck\" spins when using concurrent buffers locks *everywhere* under\n>> heavy load (especially with WAL which requires holding buffer locks\n>> for duration of logging).\n\n> Hm. It was OK to use spinlocks to control buffer access when the max\n> delay was just the time to read or write one disk page. But it sounds\n> like we've pushed the code way past what it was designed to do. I think\n> this needs some careful thought, not just a quick hack like increasing\n> the timeout interval.\n\nAfter thinking more about this, simply increasing S_MAX_BUSY is clearly\nNOT a good answer. If you are under heavy load then processes that are\nspinning are making things worse, not better, because they are sucking\nCPU cycles that would be better spent on the processes that are holding\nthe locks.\n\nIt would not be very difficult to replace the per-disk-buffer spinlocks\nwith regular lockmanager locks. Advantages:\n * Processes waiting for a buffer lock aren't sucking CPU cycles.\n * Deadlocks will be detected and handled reasonably. (The more stuff\n that WAL does while holding a buffer lock, the bigger the chances\n of deadlock. I think this is a significant concern now.)\nOf course the major disadvantage is:\n * the lock setup/teardown overhead is much greater than for a\n spinlock, and the overhead is just wasted when there's no contention.\n\nA reasonable alternative would be to stick with the spinlock mechanism,\nbut use a different locking routine (maybe call it S_SLOW_LOCK) that is\ndesigned to deal with locks that may be held for a long time. It would\nuse much longer delay intervals than the regular S_LOCK code, and would\nhave either a longer time till ultimate timeout, or no timeout at all.\nThe main problem with this idea is choosing an appropriate timeout\nbehavior. As I said, I am concerned about the possibility of deadlocks\nin WAL-recovery scenarios, so I am not very happy with the thought of\nno timeout at all. But it's hard to see what a reasonable timeout would\nbe if a minute or more isn't enough in your test cases; seems to me that\nthat suggests that for very large indexes, you might need a *long* time.\n\nComments, preferences, better ideas?\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 09 Feb 2001 13:05:18 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Btree runtime recovery. Stuck spins. " }, { "msg_contents": "> > Hm. It was OK to use spinlocks to control buffer access when the max\n> > delay was just the time to read or write one disk page. But it sounds\n> > like we've pushed the code way past what it was designed to do. I think\n> > this needs some careful thought, not just a quick hack like increasing\n> > the timeout interval.\n> \n> After thinking more about this, simply increasing S_MAX_BUSY is clearly\n> NOT a good answer. If you are under heavy load then processes that are\n> spinning are making things worse, not better, because they are sucking\n> CPU cycles that would be better spent on the processes that are holding\n> the locks.\n\nOur spinlocks don't go into an infinite test loop, right? They back off\nand retest at random intervals.\n\nI can't imagine we don't have similar btree lock needs other places in\nthe code were a solution already exists.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Fri, 9 Feb 2001 13:12:56 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Btree runtime recovery. Stuck spins." }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Our spinlocks don't go into an infinite test loop, right? They back off\n> and retest at random intervals.\n\nNot very random --- either 0 or 10 milliseconds. (I think there was\nsome discussion of changing that, but it died off without agreeing on\nanything.) The point though is that the code is tuned for use with\nspinlocks protecting shared-memory data structures, where no one is\nsupposed to be holding the lock for long; so a short retry delay is\nappropriate, and we don't need a very long time before declaring \"stuck\nspinlock\" either. This is not optimal for cases where someone may be\nholding the lock for a good while, but detuning the code so that it\nworks less well for the shmem-structure case isn't the answer.\n\nWe need two different mechanisms.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 09 Feb 2001 13:23:35 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Btree runtime recovery. Stuck spins. " }, { "msg_contents": "On Fri, Feb 09, 2001 at 01:23:35PM -0500, Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > Our spinlocks don't go into an infinite test loop, right? They back off\n> > and retest at random intervals.\n> \n> Not very random --- either 0 or 10 milliseconds. (I think there was\n> some discussion of changing that, but it died off without agreeing on\n> anything.) ...\n\nI think we agreed that 0 was just wrong, but nobody changed it.\nChanging it to 1 microsecond would be the smallest reasonable \nchange. As it is, it just does a bunch of no-op syscalls each time it\nwakes up after a 10ms sleep, without yielding the CPU.\n\nNathan Myers\nncm@zembu.com\n", "msg_date": "Fri, 9 Feb 2001 11:44:05 -0800", "msg_from": "ncm@zembu.com (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: Btree runtime recovery. Stuck spins." }, { "msg_contents": "> > Hm. It was OK to use spinlocks to control buffer access when the max\n> > delay was just the time to read or write one disk page. But it sounds\n\nActually, btree split requires 3 simult. buffers locks and after that\n_bt_getstackbuf may read *many* parent buffers while holding locks on\n2 buffers. AFAIR, the things are even worse in hash.\n\nAnd anyway, there is always probability that someone else will get just\nfreed lock while you're waiting next 0.01 sec. The problem is that\nthere is no priority/ordering while waiting for spin lock.\n\n> > like we've pushed the code way past what it was designed to do. I think\n> > this needs some careful thought, not just a quick hack like increasing\n> > the timeout interval.\n\nI fear there is not enough time -:(\n\n> After thinking more about this, simply increasing S_MAX_BUSY is clearly\n> NOT a good answer. If you are under heavy load then processes that are\n> spinning are making things worse, not better, because they are sucking\n> CPU cycles that would be better spent on the processes that are holding\n> the locks.\n> \n> It would not be very difficult to replace the per-disk-buffer spinlocks\n> with regular lockmanager locks. Advantages:\n> * Processes waiting for a buffer lock aren't sucking CPU cycles.\n> * Deadlocks will be detected and handled reasonably. (The more stuff\n> that WAL does while holding a buffer lock, the bigger the chances\n> of deadlock. I think this is a significant concern now.)\n\nI disagree. Lmgr needs in deadlock detection code because of deadlock\nmay be caused by *user application* design and we must not count on\n*user application* correctness. But we must not use deadlock detection\ncode when we protected from deadlock by *our* design. Well, anyone can\nmake mistake and break order of lock acquiring - we should just fix\nthose bugs -:)\nSo, it doesn't matter *how much stuff that WAL does while holding buffer\nlocks* as long as WAL itself doesn't acquire buffer locks.\n\n> Of course the major disadvantage is:\n> * the lock setup/teardown overhead is much greater than for a\n> spinlock, and the overhead is just wasted when there's no contention.\n\nExactly.\n\n> A reasonable alternative would be to stick with the spinlock mechanism,\n> but use a different locking routine (maybe call it S_SLOW_LOCK) that is\n> designed to deal with locks that may be held for a long time. It would\n> use much longer delay intervals than the regular S_LOCK code, and would\n> have either a longer time till ultimate timeout, or no timeout at all.\n> The main problem with this idea is choosing an appropriate timeout\n> behavior. As I said, I am concerned about the possibility of deadlocks\n> in WAL-recovery scenarios, so I am not very happy with the thought of\n> no timeout at all. But it's hard to see what a reasonable timeout would\n\nAnd I'm unhappy with timeouts -:) It's not solution at all. We should\ndo right design instead.\n\n> be if a minute or more isn't enough in your test cases; seems to me that\n> that suggests that for very large indexes, you might need a *long* time.\n> \n> Comments, preferences, better ideas?\n\nFor any spins which held while doing IO ops we should have queue of\nwaiting backend' PROCs. As I said - some kind of lightweight lock manager.\nJust two kind of locks - shared & exclusive. No structures to find locked\nobjects. No deadlock detection code. Backends should wait on their\nsemaphores, without timeouts.\n\nFor \"true\" spins (held for really short time when accessing control\nstructures in shmem) we should not sleep 0.01 sec! tv_usec == 1 would be\nreasonable - just to yield CPU. Actually, mutexes would be much better...\n\nVadim\n\n\n", "msg_date": "Fri, 9 Feb 2001 12:48:46 -0800", "msg_from": "\"Vadim Mikheev\" <vmikheev@sectorbase.com>", "msg_from_op": false, "msg_subject": "Re: Btree runtime recovery. Stuck spins. " } ]
[ { "msg_contents": "I have been looking at making a split between client-side and server-side\ninclude files as we discussed earlier this week (pghackers thread\n\"Include files for SPI are not installed\", if you missed it). It turns\nout that the major issue here is not just divvying up the files; the\nproblem is that we have never had a clear concept of such a division\nbefore, and so the core include files like postgres.h, c.h, config.h\ncontain a rather unholy mixture of things that are definitely\nbackend-only with things that are relevant to both clients and backends.\nI think we need to start by clarifying the roles of these include files\nand moving their contents around as necessary.\n\nCurrently, almost every .c in the distribution starts out by including\npostgres.h, which in turn includes these other files:\n\npostgres.h\n\tpostgres_ext.h\n\tc.h\n\t\tconfig.h\n\t\t\tos.h\n\tutils/elog.h\n\tutils/palloc.h\n\nNow elog.h and palloc.h are server-only facilities and certainly don't\nbelong in a client file's include set. I think what we want to do is\ndecree that postgres.h is the primary include file for backend .c files\nonly, and that frontend .c files should include something else.\n\npostgres_ext.h would be a candidate to be that something else, except\nthat it's included by libpq-fe.h, so anything we add to postgres_ext.h\nrepresents namespace pollution for libpq clients. I think we should be\nvery wary about adding a lot of stuff to postgres_ext.h. This suggests\nthat we'd best create a new primary include file for client-side .c files,\nsay \"postgres_fe.h\" or \"postgres_client.h\". (Anyone have a better naming\nidea? Does the old 14-character limit still pose a problem anywhere?)\n\nThat would leave us with include trees like this:\n\nbackend .c file:\n\tpostgres.h\n\t\tpostgres_ext.h\n\t\tc.h\n\t\t\tconfig.h\n\t\t\t\tos.h\n\t\tutils/elog.h\n\t\tutils/palloc.h\n\nfrontend .c file:\n\tpostgres_fe.h\n\t\tpostgres_ext.h\n\t\tc.h\n\t\t\tconfig.h\n\t\t\t\tos.h\n\nwhere the include files have these roles:\n\npostgres_ext.h: definitions needed in frontend, backend, *and* by clients;\n\tby design an extremely small file\n\npostgres.h: backend-wide definitions\n\npostgres_fe.h: definitions common to all client-side interface libraries\n\nc.h: basic typedefs and macros needed by both frontend and backend, but\n\tnot intended to be exported to clients of frontend libraries\n\nconfig.h: configuration definitions, not intended to be client-visible\n\nos.h: platform-specific configuration hacks, not intended to be\n\tclient-visible (this comes from one of the src/include/port files)\n\nconfig.h and os.h don't need to change, I think, but I'll go through the\ndefinitions in the other four files and make sure everything is classified\nreasonably.\n\nIt's possible that postgres_fe.h will end up containing nothing except\nthe inclusions of postgres_ext.h and c.h, in which case we wouldn't really\nneed to invent that file, but I'm still inclined to do so. I think it's\ngood practice to have a single include file that's the basic \"must haves\"\nfor all client-side code.\n\n\nNow, since the intent is that the basic install provide headers needed\nfor client-side programming, we'd want to add postgres_fe.h to the\ninstalled header set. But the following files can be removed from the\nbasic install:\n\naccess/attnum.h\ncommands/trigger.h\nexecutor/spi.h\nfmgr.h\npostgres.h\nutils/elog.h\nutils/geo_decls.h\nutils/palloc.h\n\nWe might also remove utils/fmgroids.h. I'm uncertain about this one.\nThe function OID macros it contains are potentially useful to clients,\nbut do we really want people hard-wiring function OIDs on the client\nside? I doubt it.\n\nThere are two or three other include files, such as lib/dllist.h, that are\nneeded on the client side only because libpq-int.h includes them, and we\nwant to support client code that includes libpq-int.h. I am going to look\nat skinnying that list down too. libpq-fs.h, in particular, looks like\nmostly legacy junk ...\n\nAs we discussed, there'll be an additional install target (or RPM) that\ninstalls these files and everything else from the src/include tree.\n\nComments?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 08 Feb 2001 17:38:17 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Plan for straightening out the include-file mess" }, { "msg_contents": "Great! :)\n\nIt might also clean up something that I've been fighting against for\nawhile: when I include files needed for SPI, it drags also a lot of other\ngarbage in, which conflicts with other things (namely, trying to get a\nfile to simultaneously include SPI and perl headers is impossible). \n\nI realise it might be a lot of pain to clean up, but, you may consider\nhaving a separate top-level include for SPI, which would not define (by\ndefault) things like DEBUG, USE_LOCALE, union semun, etc. \n\nIMHO, it should really include only definitions of relevant data\nstructures which interface with SPI code...\n\nI realize that complete split for SPI/module from \"core backend\" might be\nvery hard, so a thing to consider would be to have (like linux kernel code\nhas) #define IN_CORE (you are welcome to come up with better name), and\ninclude \"core backend\"-specific things conditionally on that being\ndefined.\n\n\n-alex\n\nOn Thu, 8 Feb 2001, Tom Lane wrote:\n\n> I have been looking at making a split between client-side and server-side\n> include files as we discussed earlier this week (pghackers thread\n> \"Include files for SPI are not installed\", if you missed it). It turns\n> out that the major issue here is not just divvying up the files; the\n> problem is that we have never had a clear concept of such a division\n> before, and so the core include files like postgres.h, c.h, config.h\n> contain a rather unholy mixture of things that are definitely\n> backend-only with things that are relevant to both clients and backends.\n> I think we need to start by clarifying the roles of these include files\n> and moving their contents around as necessary.\n> \n> Currently, almost every .c in the distribution starts out by including\n> postgres.h, which in turn includes these other files:\n> \n> postgres.h\n> \tpostgres_ext.h\n> \tc.h\n> \t\tconfig.h\n> \t\t\tos.h\n> \tutils/elog.h\n> \tutils/palloc.h\n> \n> Now elog.h and palloc.h are server-only facilities and certainly don't\n> belong in a client file's include set. I think what we want to do is\n> decree that postgres.h is the primary include file for backend .c files\n> only, and that frontend .c files should include something else.\n> \n> postgres_ext.h would be a candidate to be that something else, except\n> that it's included by libpq-fe.h, so anything we add to postgres_ext.h\n> represents namespace pollution for libpq clients. I think we should be\n> very wary about adding a lot of stuff to postgres_ext.h. This suggests\n> that we'd best create a new primary include file for client-side .c files,\n> say \"postgres_fe.h\" or \"postgres_client.h\". (Anyone have a better naming\n> idea? Does the old 14-character limit still pose a problem anywhere?)\n> \n> That would leave us with include trees like this:\n> \n> backend .c file:\n> \tpostgres.h\n> \t\tpostgres_ext.h\n> \t\tc.h\n> \t\t\tconfig.h\n> \t\t\t\tos.h\n> \t\tutils/elog.h\n> \t\tutils/palloc.h\n> \n> frontend .c file:\n> \tpostgres_fe.h\n> \t\tpostgres_ext.h\n> \t\tc.h\n> \t\t\tconfig.h\n> \t\t\t\tos.h\n> \n> where the include files have these roles:\n> \n> postgres_ext.h: definitions needed in frontend, backend, *and* by clients;\n> \tby design an extremely small file\n> \n> postgres.h: backend-wide definitions\n> \n> postgres_fe.h: definitions common to all client-side interface libraries\n> \n> c.h: basic typedefs and macros needed by both frontend and backend, but\n> \tnot intended to be exported to clients of frontend libraries\n> \n> config.h: configuration definitions, not intended to be client-visible\n> \n> os.h: platform-specific configuration hacks, not intended to be\n> \tclient-visible (this comes from one of the src/include/port files)\n> \n> config.h and os.h don't need to change, I think, but I'll go through the\n> definitions in the other four files and make sure everything is classified\n> reasonably.\n> \n> It's possible that postgres_fe.h will end up containing nothing except\n> the inclusions of postgres_ext.h and c.h, in which case we wouldn't really\n> need to invent that file, but I'm still inclined to do so. I think it's\n> good practice to have a single include file that's the basic \"must haves\"\n> for all client-side code.\n> \n> \n> Now, since the intent is that the basic install provide headers needed\n> for client-side programming, we'd want to add postgres_fe.h to the\n> installed header set. But the following files can be removed from the\n> basic install:\n> \n> access/attnum.h\n> commands/trigger.h\n> executor/spi.h\n> fmgr.h\n> postgres.h\n> utils/elog.h\n> utils/geo_decls.h\n> utils/palloc.h\n> \n> We might also remove utils/fmgroids.h. I'm uncertain about this one.\n> The function OID macros it contains are potentially useful to clients,\n> but do we really want people hard-wiring function OIDs on the client\n> side? I doubt it.\n> \n> There are two or three other include files, such as lib/dllist.h, that are\n> needed on the client side only because libpq-int.h includes them, and we\n> want to support client code that includes libpq-int.h. I am going to look\n> at skinnying that list down too. libpq-fs.h, in particular, looks like\n> mostly legacy junk ...\n> \n> As we discussed, there'll be an additional install target (or RPM) that\n> installs these files and everything else from the src/include tree.\n> \n> Comments?\n> \n> \t\t\tregards, tom lane\n> \n> \n\n-- \n--\nAlex Pilosov | http://www.acecape.com/dsl\nCTO - Acecape, Inc. | AceDSL:The best ADSL in Bell Atlantic area\n325 W 38 St. Suite 1005 | (Stealth Marketing Works! :)\nNew York, NY 10018 |\n\n\n\n\n", "msg_date": "Thu, 8 Feb 2001 18:11:30 -0500 (EST)", "msg_from": "Alex Pilosov <alex@acecape.com>", "msg_from_op": false, "msg_subject": "Re: Plan for straightening out the include-file mess" }, { "msg_contents": "On Thu, 8 Feb 2001, Alex Pilosov wrote:\n\n> Great! :)\n> \n> It might also clean up something that I've been fighting against for\n> awhile: when I include files needed for SPI, it drags also a lot of other\n> garbage in, which conflicts with other things (namely, trying to get a\n> file to simultaneously include SPI and perl headers is impossible). \n> \n> I realise it might be a lot of pain to clean up, but, you may consider\n> having a separate top-level include for SPI, which would not define (by\n> default) things like DEBUG, USE_LOCALE, union semun, etc. \n> \n> IMHO, it should really include only definitions of relevant data\n> structures which interface with SPI code...\n> \n> I realize that complete split for SPI/module from \"core backend\" might be\n> very hard, so a thing to consider would be to have (like linux kernel code\n> has) #define IN_CORE (you are welcome to come up with better name), and\n> include \"core backend\"-specific things conditionally on that being\n> defined.\n> \n> \n> -alex\n>\n> On Thu, 8 Feb 2001, Tom Lane wrote:\n> \n> > I have been looking at making a split between client-side and server-side\n> > include files as we discussed earlier this week (pghackers thread\n> > \"Include files for SPI are not installed\", if you missed it). It turns\n> > out that the major issue here is not just divvying up the files; the\n> > problem is that we have never had a clear concept of such a division\n> > before, and so the core include files like postgres.h, c.h, config.h\n> > contain a rather unholy mixture of things that are definitely\n> > backend-only with things that are relevant to both clients and backends.\n> > I think we need to start by clarifying the roles of these include files\n> > and moving their contents around as necessary.\n> > \n> > Currently, almost every .c in the distribution starts out by including\n> > postgres.h, which in turn includes these other files:\n> > \n> > postgres.h\n> > \tpostgres_ext.h\n> > \tc.h\n> > \t\tconfig.h\n> > \t\t\tos.h\n> > \tutils/elog.h\n> > \tutils/palloc.h\n> > \n> > Now elog.h and palloc.h are server-only facilities and certainly don't\n> > belong in a client file's include set. I think what we want to do is\n> > decree that postgres.h is the primary include file for backend .c files\n> > only, and that frontend .c files should include something else.\n> > \n> > postgres_ext.h would be a candidate to be that something else, except\n> > that it's included by libpq-fe.h, so anything we add to postgres_ext.h\n> > represents namespace pollution for libpq clients. I think we should be\n> > very wary about adding a lot of stuff to postgres_ext.h. This suggests\n> > that we'd best create a new primary include file for client-side .c files,\n> > say \"postgres_fe.h\" or \"postgres_client.h\". (Anyone have a better naming\n> > idea? Does the old 14-character limit still pose a problem anywhere?)\n> > \n> > That would leave us with include trees like this:\n> > \n> > backend .c file:\n> > \tpostgres.h\n> > \t\tpostgres_ext.h\n> > \t\tc.h\n> > \t\t\tconfig.h\n> > \t\t\t\tos.h\n> > \t\tutils/elog.h\n> > \t\tutils/palloc.h\n> > \n> > frontend .c file:\n> > \tpostgres_fe.h\n> > \t\tpostgres_ext.h\n> > \t\tc.h\n> > \t\t\tconfig.h\n> > \t\t\t\tos.h\n> > \n> > where the include files have these roles:\n> > \n> > postgres_ext.h: definitions needed in frontend, backend, *and* by clients;\n> > \tby design an extremely small file\n> > \n> > postgres.h: backend-wide definitions\n> > \n> > postgres_fe.h: definitions common to all client-side interface libraries\n> > \n> > c.h: basic typedefs and macros needed by both frontend and backend, but\n> > \tnot intended to be exported to clients of frontend libraries\n> > \n> > config.h: configuration definitions, not intended to be client-visible\n> > \n> > os.h: platform-specific configuration hacks, not intended to be\n> > \tclient-visible (this comes from one of the src/include/port files)\n> > \n> > config.h and os.h don't need to change, I think, but I'll go through the\n> > definitions in the other four files and make sure everything is classified\n> > reasonably.\n> > \n> > It's possible that postgres_fe.h will end up containing nothing except\n> > the inclusions of postgres_ext.h and c.h, in which case we wouldn't really\n> > need to invent that file, but I'm still inclined to do so. I think it's\n> > good practice to have a single include file that's the basic \"must haves\"\n> > for all client-side code.\n> > \n> > \n> > Now, since the intent is that the basic install provide headers needed\n> > for client-side programming, we'd want to add postgres_fe.h to the\n> > installed header set. But the following files can be removed from the\n> > basic install:\n> > \n> > access/attnum.h\n> > commands/trigger.h\n> > executor/spi.h\n> > fmgr.h\n> > postgres.h\n> > utils/elog.h\n> > utils/geo_decls.h\n> > utils/palloc.h\n> > \n> > We might also remove utils/fmgroids.h. I'm uncertain about this one.\n> > The function OID macros it contains are potentially useful to clients,\n> > but do we really want people hard-wiring function OIDs on the client\n> > side? I doubt it.\n> > \n> > There are two or three other include files, such as lib/dllist.h, that are\n> > needed on the client side only because libpq-int.h includes them, and we\n> > want to support client code that includes libpq-int.h. I am going to look\n> > at skinnying that list down too. libpq-fs.h, in particular, looks like\n> > mostly legacy junk ...\n> > \n> > As we discussed, there'll be an additional install target (or RPM) that\n> > installs these files and everything else from the src/include tree.\n> > \n> > Comments?\n> > \n> > \t\t\tregards, tom lane\n> > \n> > \n> \n> \n\n\n", "msg_date": "Thu, 8 Feb 2001 18:15:16 -0500 (EST)", "msg_from": "Alex Pilosov <alex@pilosoft.com>", "msg_from_op": false, "msg_subject": "Re: Plan for straightening out the include-file mess" }, { "msg_contents": "Alex Pilosov <alex@acecape.com> writes:\n> when I include files needed for SPI, it drags also a lot of other\n> garbage in, which conflicts with other things (namely, trying to get a\n> file to simultaneously include SPI and perl headers is impossible). \n> I realise it might be a lot of pain to clean up, but, you may consider\n> having a separate top-level include for SPI, which would not define (by\n> default) things like DEBUG, USE_LOCALE, union semun, etc. \n\nUnless you want to write SPI code that never calls elog(), it's gonna be\ntough to avoid the conflict on DEBUG. I suppose sooner or later we'll\nhave to rename the elog severity symbols ... but it's not a change that\nI'm looking forward to making.\n\nIn any case there's too much time pressure to consider wide-ranging code\nchanges for 7.1. Right now I don't want to do more than rearrange the\ncontents of a small number of include files.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 08 Feb 2001 18:29:02 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Plan for straightening out the include-file mess " }, { "msg_contents": "On Thu, 8 Feb 2001, Tom Lane wrote:\n\n> Alex Pilosov <alex@acecape.com> writes:\n> > when I include files needed for SPI, it drags also a lot of other\n> > garbage in, which conflicts with other things (namely, trying to get a\n> > file to simultaneously include SPI and perl headers is impossible). \n> > I realise it might be a lot of pain to clean up, but, you may consider\n> > having a separate top-level include for SPI, which would not define (by\n> > default) things like DEBUG, USE_LOCALE, union semun, etc. \n> \n> Unless you want to write SPI code that never calls elog(), it's gonna be\n> tough to avoid the conflict on DEBUG. I suppose sooner or later we'll\n> have to rename the elog severity symbols ... but it's not a change that\n> I'm looking forward to making.\nYes, how about ELOG_DEBUG, etc? Global search and replace should get it\ncorrectly, shouldn't be TOO painful.\n\nIt would indeed break other people's internally-written modules, I don't\nknow a good solution. Maybe do it like perl, have a #define ELOG_POLLUTE\nwhich would pull in defined by their old names?\n\n> In any case there's too much time pressure to consider wide-ranging code\n> changes for 7.1. Right now I don't want to do more than rearrange the\n> contents of a small number of include files.\nOh no, I'd plan SPI cleanup for 7.2 timeframe, if possible.\n\n-- \n--\nAlex Pilosov | http://www.acecape.com/dsl\nCTO - Acecape, Inc. | AceDSL:The best ADSL in Bell Atlantic area\n325 W 38 St. Suite 1005 | (Stealth Marketing Works! :)\nNew York, NY 10018 |\n\n", "msg_date": "Thu, 8 Feb 2001 18:40:21 -0500 (EST)", "msg_from": "Alex Pilosov <alex@pilosoft.com>", "msg_from_op": false, "msg_subject": "Re: Plan for straightening out the include-file mess " }, { "msg_contents": "Tom Lane writes:\n\n> where the include files have these roles:\n\nThis plan looks good in general. It's the same I've been pondering for a\nwhile. But maybe this should receive more extensive thought than what\nwould be appropriate to implement now.\n\n> postgres_ext.h: definitions needed in frontend, backend, *and* by clients;\n> \tby design an extremely small file\n\nThe problem here will be that when we move to 8 byte oids as an option\nthis file will depend on config.h, so this \"design\" will break. I have\nworked on a private branch with 8 byte oids a while ago and stumbled over\nthis.\n\nThis is only part of a larger problem, namely that over time it gets more\nlikely that some public header file will depend on config.h. For example,\nthe libpq++ one's already do. The SSL support in libpq currently requires\nthe user to define USE_SSL themselves. int8 support in ecpg also requires\nconfiguration information.\n\nInstalling config.h is a pretty drastic namespace violation. No other\npackage that links against some PostgreSQL component can use Autoconf out\nof the box.\n\nThis \"may I install config.h\" is a very heated debate around the autotools\ndiscussion fora. I don't see a consensus, but most people agree that you\nneed to butcher config.h is some way before installing it, like prefixing\nall defines with a string, and renaming the file to <package>-config.h.\n\n>\n> postgres.h: backend-wide definitions\n>\n> postgres_fe.h: definitions common to all client-side interface libraries\n>\n> c.h: basic typedefs and macros needed by both frontend and backend, but\n> \tnot intended to be exported to clients of frontend libraries\n>\n> config.h: configuration definitions, not intended to be client-visible\n>\n> os.h: platform-specific configuration hacks, not intended to be\n> \tclient-visible (this comes from one of the src/include/port files)\n>\n> config.h and os.h don't need to change, I think, but I'll go through the\n> definitions in the other four files and make sure everything is classified\n> reasonably.\n>\n> It's possible that postgres_fe.h will end up containing nothing except\n> the inclusions of postgres_ext.h and c.h, in which case we wouldn't really\n> need to invent that file, but I'm still inclined to do so. I think it's\n> good practice to have a single include file that's the basic \"must haves\"\n> for all client-side code.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Fri, 9 Feb 2001 01:08:53 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Plan for straightening out the include-file mess" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> This is only part of a larger problem, namely that over time it gets more\n> likely that some public header file will depend on config.h. For example,\n> the libpq++ one's already do. The SSL support in libpq currently requires\n> the user to define USE_SSL themselves. int8 support in ecpg also requires\n> configuration information.\n\nYes, I had noticed that but didn't have a solution, so I was just\nleaving the issue at status quo for now. As you say, pulling config.h\ninto client-visible headers is a big pollution of their namespace,\nso we need to avoid it if possible.\n\nAs far as the Oid typedef goes, it'd be possible to have configure\ngenerate postgres_ext.h from postgres_ext.h.in and insert the proper\ntypedef, so that there's no added namespace pollution there. This\nanswer does not scale real well, but it might be enough for Oid and\nint8 support.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 08 Feb 2001 19:10:50 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Plan for straightening out the include-file mess " }, { "msg_contents": "I have committed changes implementing the plan I sketched yesterday.\nA basic install now installs just the include files needed for\nclient-side programming; to get all the include files, also say\n\tmake install-all-headers\n\nI have verified that the header files installed by default are enough\nto build the /interfaces and /bin directories, with two exceptions:\n\n1. pg_dump.c includes a bunch of backend header files, mostly from the\nsrc/include/catalog directory. This could perhaps be worked around,\nbut since pg_dump has always been pretty closely tied to the backend,\nI'm not sure it's worth the trouble.\n\n2. libpq's MULTIBYTE support pulls in a number of backend source files\nwhich in turn want to include some backend-only headers. I'm going to\nleave it to the MULTIBYTE gurus to clean that up if they feel like it.\n\nWe had talked about making separate 'client' and 'server' devel RPMs\nto correspond to the minimal and full header sets. However, I measure\nthe extra install footprint at not very much over a megabyte, so maybe\nit's not worth the trouble. If Lamar wants to just install the full\nheader set as part of the existing postgres-devel RPM, I won't object.\n\nBTW, I have not done anything about Peter E's concern about config.h\npolluting client namespaces. That's a valid concern but we'll have\nto come back to it another day.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 09 Feb 2001 21:47:32 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Plan for straightening out the include-file mess " } ]
[ { "msg_contents": "Hi all,\n\nI'm starting to program with the SPI interface with PG 7.0.3. I can get\neverything to work up until I use SPI_exec (successfully) using a query\nlike 'SELECT foobar, baz1 from test1'.\n\nThe return code from SPI_exec indicates SPI_OK_SELECT and the variable\nSPI_processed is 2 (meaning there are two 'results' available from the\nselect);\n\nThe trouble is that when I try and access the global variable\nSPI_tuptable, I get the error 'dereferencing pointer to incomplete\ntype'.\n\nThe offending line in question in my source code is :\n\nelog(NOTICE, \"\\nSPI_tuptable->alloced = %u\\n\\0\", SPI_tuptable->alloced);\n\n\nThe feeling I get is something is incorrect in the header files I'm\nusing. So far I've been able to point to the installed include files\n(/opt/postgresql/include) and have everything work. Now that I'm\ngetting errors I've decided to try pointing to the source code\n(/install/postgresql-7.0.3/src/include and\n/install/postgresql-7.0.3/src/backend) in the hope the include files are\nmore complete.\n\nThis is where I get the error \"dereferencing pointer to incomplete type\"\nwith the above line of code.\n\nThe exact command I'm using to compile is \"gcc -fpic -shared\n-I/install/postgresql-7.0.3/src/include/\n-I/install/postgresql-7.0.3/src/backend\n-L/install/postgresql-7.0.3/src/lib -o booking_sp_id.so booking_sp_id.c\"\n\nCan someone please give me some pointers as to what I'm doing wrong?\n\nRegards and best wishes,\n\nJustin Clift\nDatabase Administrator\n", "msg_date": "Fri, 09 Feb 2001 13:01:42 +1100", "msg_from": "Justin Clift <aa2@bigpond.net.au>", "msg_from_op": true, "msg_subject": "SPI_exec - Trying to access SPI_tuptable - error of 'dereferencing\n\tpointer to incomplete type'" } ]
[ { "msg_contents": "Hi all,\n\nI'm starting to program with the SPI interface with PG 7.0.3. I can get\neverything to work up until I use SPI_exec (successfully) using a query\nlike 'SELECT foobar, baz1 from test1'.\n\nThe return code from SPI_exec indicates SPI_OK_SELECT and the variable\nSPI_processed is 2 (meaning there are two 'results' available from the\nselect);\n\nThe trouble is that when I try and access the global variable\nSPI_tuptable, I get the error 'dereferencing pointer to incomplete\ntype'.\n\nThe offending line in question in my source code is :\n\nelog(NOTICE, \"\\nSPI_tuptable->alloced = %u\\n\\0\", SPI_tuptable->alloced);\n\n\nThe feeling I get is something is incorrect in the header files I'm\nusing. So far I've been able to point to the installed include files\n(/opt/postgresql/include) and have everything work. Now that I'm\ngetting errors I've decided to try pointing to the source code\n(/install/postgresql-7.0.3/src/include and\n/install/postgresql-7.0.3/src/backend) in the hope the include files are\nmore complete.\n\nThis is where I get the error \"dereferencing pointer to incomplete type\"\nwith the above line of code.\n\nThe exact command I'm using to compile is \"gcc -fpic -shared\n-I/install/postgresql-7.0.3/src/include/\n-I/install/postgresql-7.0.3/src/backend\n-L/install/postgresql-7.0.3/src/lib -o booking_sp_id.so booking_sp_id.c\"\n\nCan someone please give me some pointers as to what I'm doing wrong?\n\nI'm using Mandrake Linux 7.2, with non-rpm (compiled) version of PG\n7.0.3 in /opt/postgresql\n\nRegards and best wishes,\n\nJustin Clift\nDatabase Administrator\n", "msg_date": "Fri, 09 Feb 2001 13:33:30 +1100", "msg_from": "Justin Clift <aa2@bigpond.net.au>", "msg_from_op": true, "msg_subject": "SPI_exec - Trying to access SPI_tuptable - error of 'dereferencing\n\tpointer to incomplete type'" } ]
[ { "msg_contents": "Hi,\n\nI've trolled the archives and the FAQ and the closest I could come up with was\nthe following mailing list message:\n\n http://www.postgresql.org/mhonarc/pgsql-general/2001-01/msg01632.html\n\nwhich advises that you can do something like this to create a case-insensitive\nunique index:\n\n CREATE UNIQUE INDEX indexname ON tablename (lower(fieldname))\n\nhowever, that doesn't work under 7.0.2 at least, I get:\n\nmydb=> create unique index forward_rr on forward (lower(name));\nERROR: DefineIndex: function 'lower(varchar)' does not exist\n\nFuthermore, I want to create the case-insensitive unique index on a tuple of\nvarchar fields, ie.:\n\n CREATE UNIQUE INDEX indexname ON tablename (lower(field1), lower(field2), lower(field3))\n\nhowever, looking at the docs at:\n\n http://www.postgresql.org/users-lounge/docs/7.0/user/sql-createindex.htm\n\nit looks like I will need to instead declare a function f such that it can be used as:\n\n CREATE UNIQUE INDEX indexname ON tablename (f(field1, field2, field3))\n\nand f(n1, n2, n3) returns a unique value for unique combinations of n1, n2 and\nn3...\n\nSince this sounds like something someone must have already done, or should be\na FAQ, any hints? pointers? functions? PL/SQL code?\n\nThanks,\nAdi\n\n", "msg_date": "Thu, 8 Feb 2001 19:39:28 -0800", "msg_from": "lists <lists@lists.grot.org>", "msg_from_op": true, "msg_subject": "case insensitive unique index (part 2)" }, { "msg_contents": "lists <lists@lists.grot.org> writes:\n> mydb=> create unique index forward_rr on forward (lower(name));\n> ERROR: DefineIndex: function 'lower(varchar)' does not exist\n\nIf you change the name column to type 'text' it will work. Or you\ncan make an extra pg_proc entry that relabels lower(text) as\nlower(varchar) --- that's safe because text and varchar have the\nsame representation. I'm too lazy to reconstruct the necessary\ncommand right now, but this has been described in the mail lists before.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 08 Feb 2001 22:59:22 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: case insensitive unique index (part 2) " }, { "msg_contents": "Can someone suggest an addition to the FAQ for this? Does ILIKE, ~* use\nsuch indexes automatically?\n\n\n> Hi,\n> \n> I've trolled the archives and the FAQ and the closest I could come up with was\n> the following mailing list message:\n> \n> http://www.postgresql.org/mhonarc/pgsql-general/2001-01/msg01632.html\n> \n> which advises that you can do something like this to create a case-insensitive\n> unique index:\n> \n> CREATE UNIQUE INDEX indexname ON tablename (lower(fieldname))\n> \n> however, that doesn't work under 7.0.2 at least, I get:\n> \n> mydb=> create unique index forward_rr on forward (lower(name));\n> ERROR: DefineIndex: function 'lower(varchar)' does not exist\n> \n> Futhermore, I want to create the case-insensitive unique index on a tuple of\n> varchar fields, ie.:\n> \n> CREATE UNIQUE INDEX indexname ON tablename (lower(field1), lower(field2), lower(field3))\n> \n> however, looking at the docs at:\n> \n> http://www.postgresql.org/users-lounge/docs/7.0/user/sql-createindex.htm\n> \n> it looks like I will need to instead declare a function f such that it can be used as:\n> \n> CREATE UNIQUE INDEX indexname ON tablename (f(field1, field2, field3))\n> \n> and f(n1, n2, n3) returns a unique value for unique combinations of n1, n2 and\n> n3...\n> \n> Since this sounds like something someone must have already done, or should be\n> a FAQ, any hints? pointers? functions? PL/SQL code?\n> \n> Thanks,\n> Adi\n> \n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Mon, 19 Mar 2001 17:06:49 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] case insensitive unique index (part 2)" }, { "msg_contents": "I have added the following patch to the FAQ to mention the use of\nfunctional indexes for case-insensitive equality comparisons.\n\n\n> Hi,\n> \n> I've trolled the archives and the FAQ and the closest I could come up with was\n> the following mailing list message:\n> \n> http://www.postgresql.org/mhonarc/pgsql-general/2001-01/msg01632.html\n> \n> which advises that you can do something like this to create a case-insensitive\n> unique index:\n> \n> CREATE UNIQUE INDEX indexname ON tablename (lower(fieldname))\n> \n> however, that doesn't work under 7.0.2 at least, I get:\n> \n> mydb=> create unique index forward_rr on forward (lower(name));\n> ERROR: DefineIndex: function 'lower(varchar)' does not exist\n> \n> Futhermore, I want to create the case-insensitive unique index on a tuple of\n> varchar fields, ie.:\n> \n> CREATE UNIQUE INDEX indexname ON tablename (lower(field1), lower(field2), lower(field3))\n> \n> however, looking at the docs at:\n> \n> http://www.postgresql.org/users-lounge/docs/7.0/user/sql-createindex.htm\n> \n> it looks like I will need to instead declare a function f such that it can be used as:\n> \n> CREATE UNIQUE INDEX indexname ON tablename (f(field1, field2, field3))\n> \n> and f(n1, n2, n3) returns a unique value for unique combinations of n1, n2 and\n> n3...\n> \n> Since this sounds like something someone must have already done, or should be\n> a FAQ, any hints? pointers? functions? PL/SQL code?\n> \n> Thanks,\n> Adi\n> \n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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\nIndex: doc/src/FAQ/FAQ.html\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/FAQ/FAQ.html,v\nretrieving revision 1.66\ndiff -c -r1.66 FAQ.html\n*** doc/src/FAQ/FAQ.html\t2001/04/27 00:55:49\t1.66\n--- doc/src/FAQ/FAQ.html\t2001/05/07 19:50:27\n***************\n*** 112,118 ****\n <A href=\"#4.11\">4.11</A>) What is an R-tree index?<BR>\n <A href=\"#4.12\">4.12</A>) What is the Genetic Query Optimizer?<BR>\n <A href=\"#4.13\">4.13</A>) How do I perform regular expression\n! searches and case-insensitive regular expression searches?<BR>\n <A href=\"#4.14\">4.14</A>) In a query, how do I detect if a field\n is <SMALL>NULL</SMALL>?<BR>\n <A href=\"#4.15\">4.15</A>) What is the difference between the\n--- 112,119 ----\n <A href=\"#4.11\">4.11</A>) What is an R-tree index?<BR>\n <A href=\"#4.12\">4.12</A>) What is the Genetic Query Optimizer?<BR>\n <A href=\"#4.13\">4.13</A>) How do I perform regular expression\n! searches and case-insensitive regular expression searches? How do I\n! use an index for case-insensitive searches?<BR>\n <A href=\"#4.14\">4.14</A>) In a query, how do I detect if a field\n is <SMALL>NULL</SMALL>?<BR>\n <A href=\"#4.15\">4.15</A>) What is the difference between the\n***************\n*** 957,968 ****\n search.</P>\n \n <H4><A name=\"4.13\">4.13</A>) How do I perform regular expression\n! searches and case-insensitive regular expression searches?</H4>\n \n <P>The <I>~</I> operator does regular expression matching, and\n <I>~*</I> does case-insensitive regular expression matching. The\n case-insensitive variant of <SMALL>LIKE</SMALL> is called\n <SMALL>ILIKE</SMALL> in PostgreSQL 7.1 and later.</P>\n \n <H4><A name=\"4.14\">4.14</A>) In a query, how do I detect if a field\n is <SMALL>NULL</SMALL>?</H4>\n--- 958,985 ----\n search.</P>\n \n <H4><A name=\"4.13\">4.13</A>) How do I perform regular expression\n! searches and case-insensitive regular expression searches? How do I\n! use an index for case-insensitive searches?</H4>\n \n <P>The <I>~</I> operator does regular expression matching, and\n <I>~*</I> does case-insensitive regular expression matching. The\n case-insensitive variant of <SMALL>LIKE</SMALL> is called\n <SMALL>ILIKE</SMALL> in PostgreSQL 7.1 and later.</P>\n+ \n+ <P>Case-insensitive equality comparisons are normally expressed as:\n+ \n+ <PRE>\n+ SELECT *\n+ FROM tab\n+ WHERE lower(col) = 'abc'\n+ </PRE>\n+ \n+ This will not use an standard index. However, if you create a\n+ functional index, it will be used:\n+ \n+ <PRE>\n+ CREATE INDEX tabindex on tab (lower(col));\n+ </PRE>\n \n <H4><A name=\"4.14\">4.14</A>) In a query, how do I detect if a field\n is <SMALL>NULL</SMALL>?</H4>", "msg_date": "Mon, 7 May 2001 15:54:24 -0400 (EDT)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: case insensitive unique index (part 2)" } ]
[ { "msg_contents": "I see the new PL/PgSQL command:\n\n\tGET DIAGNOSTICS\n\nThis seems like a poorly-worded command to me. It is meant to return\nthe number of rows affected by a previous query, right?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Fri, 9 Feb 2001 12:04:08 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "PL/PgSQL GET DIAGNOSTICS command" }, { "msg_contents": "On Fri, Feb 09, 2001 at 12:04:08PM -0500, Bruce Momjian wrote:\n> I see the new PL/PgSQL command:\n> \n> \tGET DIAGNOSTICS\n> \n> This seems like a poorly-worded command to me. It is meant to return\n> the number of rows affected by a previous query, right?\n\nAmong other things, eventually. You get to blame the SQL standards\ncommittee, again:\n\n\nwallace$ grep 'GET DIAGNOSTICS' sql1992.txt\n GET DIAGNOSTICS <sql diagnostics information>\n\nRoss\n", "msg_date": "Mon, 12 Feb 2001 10:28:35 -0600", "msg_from": "\"Ross J. Reedstrom\" <reedstrm@rice.edu>", "msg_from_op": false, "msg_subject": "Re: PL/PgSQL GET DIAGNOSTICS command" }, { "msg_contents": "Bruce Momjian writes:\n\n> I see the new PL/PgSQL command:\n>\n> \tGET DIAGNOSTICS\n>\n> This seems like a poorly-worded command to me. It is meant to return\n> the number of rows affected by a previous query, right?\n\nThat's how SQL wants it.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Mon, 12 Feb 2001 17:43:26 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: PL/PgSQL GET DIAGNOSTICS command" }, { "msg_contents": "> On Fri, Feb 09, 2001 at 12:04:08PM -0500, Bruce Momjian wrote:\n> > I see the new PL/PgSQL command:\n> > \n> > \tGET DIAGNOSTICS\n> > \n> > This seems like a poorly-worded command to me. It is meant to return\n> > the number of rows affected by a previous query, right?\n> \n> Among other things, eventually. You get to blame the SQL standards\n> committee, again:\n> \n> \n> wallace$ grep 'GET DIAGNOSTICS' sql1992.txt\n> GET DIAGNOSTICS <sql diagnostics information>\n> \n\nThat is unbelievable! (But true.)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Mon, 12 Feb 2001 12:36:30 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: PL/PgSQL GET DIAGNOSTICS command" } ]
[ { "msg_contents": "Attached is a list of open source code and documentation items for 7.1. \nIf people can just confirm completed items, I will remove them right\naway. The current version of this file can be seen at:\n\n\tftp://candle.pha.pa.us/pub/postgresql/open_items\n\n---------------------------------------------------------------------------\n\n P O S T G R E S Q L\n\n 7 . 1 O P E N I T E M S\n\n\nSource Code Changes\n-------------------\nLAZY VACUUM (Vadim)\nODBC not disconnecting properly?\nMerge MySQL/PgSQL translation scripts\nFix ipcclean on Linux\nunixODBC\n\nDocumentation Changes\n---------------------\nFix PL/perl (Alex Kapranoff)\nAdd OUTER JOINs (Tom)\nFunction manager overhaul (Tom)\nJDBC improvements (Peter, Travis Bauer, Christopher Cain, William Webber,\n Gunnar)\nGrand Unified Configuration scheme/GUC. Many options can now be set in \n data/postgresql.conf, postmaster/postgres flags, or SET commands (Peter E)\nOverhaul initdb process (Tom, Peter E)\nOverhaul of inherited tables; inherited tables now accessed by default;\n new ONLY keyword prevents it (Chris Bitmead, Tom)\nODBC cleanups/improvements (Nick Gorham, Stephan Szabo, Zoltan Kovacs, \n Michael Fork)\nOverhaul pg_dump (Philip Warner)\nNew pg_dump tar output option (Philip)\nNew pg_dump of large objects (Philip)\nNew pg_restore command (Philip)\nAllow pg_hba.conf secondary password file to specify only username (Peter E)\nNew SET SESSION CHARACTERISTICS (Thomas)\nAdd WITHOUT TIME ZONE type qualifier (Thomas)\nNew ALTER TABLE ADD CONSTRAINT (Stephan)\nNew VARIANCE and STDDEV() aggregates\nNew ESCAPE option to LIKE (Thomas)\nNew case-insensitive LIKE - ILIKE (Thomas)\nAllow SQL functions to be used in more contexts (Tom)\nNew pg_config utility (Peter E)\nNew PL/pgSQL EXECUTE command which allows dynamic SQL and utility statements\n (Jan)\nNew PL/pgSQL GET DIAGNOSTICS statement for SPI value access (Jan)\nNew quote_identifiers() and quote_literal() functions (Jan)\nNew ALTER TABLE table OWNER TO user command (Mark Hollomon)\nAllow subselects in FROM, i.e. FROM (SELECT ...) [AS] alias (Tom)\nStore tables as files named by OID (Vadim)\nNew SQL function setval(seq,val,bool) for use in pg_dump (Philip)\nNew pg_service.conf file (Mario Weilguni)\nNew pg_dumpall --globals-only option (Peter E)\nNew CHECKPOINT command for WAL which creates new WAL log file (Vadim)\nNew AT TIME ZONE syntax (Thomas)\nAllow location of Unix domain socket to be configurable (David J. MacKenzie)\nAllow postmaster to listen on a specific IP address (David J. MacKenzie)\nAllow socket path name to be specified in hostname by using leading slash\n (David J. MacKenzie)\nAllow CREATE DATABASE to specify template database (Tom)\nNew pg_dump --globals-only option (Peter E)\nNew /contrib/rserv replication toolkit (Vadim)\nNew file format for COPY BINARY (Tom)\nNew /contrib/oid2name to map numeric files to table names (B Palmer)\nAllow BIGINT as synonym for INT8 (Peter E)\nNew BIT and BIT VARYING types (Adriaan Joubert, Tom, Peter E)\nFix CIDR output formatting (Tom)\nNew CIDR abbrev() function (Tom)\nWrite-Ahead Log (WAL) to provide crash recovery with less performance \n overhead (Vadim)\nStore all large objects in a single table (Denis Perchine, Tom)\nNew function manager call conventions (Tom)\nNew configure --enable-syslog option (Peter E)\nconfigure script moved to top level, not /src (Peter E)\nNew configure --with-python option (Peter E)\nNew OpenSSL configuration option (Magnus, Peter E)\nRemove colon and semi-colon operators (Thomas)\nNew pg_class.relkind value for views (Mark Hollomon)\nRename ichar() to chr() (Karel)\nMoved macmanuf to /contrib (Larry Rosenman)\nNew template0 database that contains no user additions (Tom)\nAllow *BSD's libedit instead of readline (Peter)\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Fri, 9 Feb 2001 12:26:19 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Open 7.1 items" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Attached is a list of open source code and documentation items for 7.1. \n\nI've got two major TODO items that are not in your list, but should be:\n\n* visibility of joined columns in JOIN clauses (Thomas thinks code is\n wrong, I'm not sure yet)\n* separate client- and server-side includes, make optional install target to\n install all of src/include\n\nThe question of what to do about spinlock timeouts on buffers seems to be\na critical issue, too.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 09 Feb 2001 12:44:16 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 7.1 items " }, { "msg_contents": "Bruce Momjian writes:\n\n> Source Code Changes\n> -------------------\n\n> Fix ipcclean on Linux\n\nIt's fixed. Or what is the problem?\n\n> unixODBC\n\nThis would be a new feature. I'm having some private conversation with\nthe unixODBC maintainer about how to handle this. We'll work on it for\n7.2.\n\n> Documentation Changes\n> ---------------------\n> Fix PL/perl (Alex Kapranoff)\n\nNot sure how to handle this other than backpatching to 7.0 that it doesn't\nwork. ;-) (i.e.: done)\n\n> Add OUTER JOINs (Tom)\n\nDocumented\n\n> Function manager overhaul (Tom)\n\nLooks documented enough to me.\n\n> Grand Unified Configuration scheme/GUC. Many options can now be set in\n> data/postgresql.conf, postmaster/postgres flags, or SET commands (Peter E)\n> Overhaul initdb process (Tom, Peter E)\n> Overhaul of inherited tables; inherited tables now accessed by default;\n> new ONLY keyword prevents it (Chris Bitmead, Tom)\n\ndone, done, done\n\n(although I don't recall me \"overhauling\" initdb)\n\n> Allow pg_hba.conf secondary password file to specify only username (Peter E)\n> New SET SESSION CHARACTERISTICS (Thomas)\n> Add WITHOUT TIME ZONE type qualifier (Thomas)\n\ndone, done, done\n\n> New VARIANCE and STDDEV() aggregates\n> New ESCAPE option to LIKE (Thomas)\n> New case-insensitive LIKE - ILIKE (Thomas)\n\ndone, done, done\n\n> Allow SQL functions to be used in more contexts (Tom)\n\nThat probably doesn't need documentation.\n\n> New pg_config utility (Peter E)\n> New PL/pgSQL EXECUTE command which allows dynamic SQL and utility statements\n> (Jan)\n\n> New quote_identifiers() and quote_literal() functions (Jan)\n\ndone, done, done\n\n> New ALTER TABLE table OWNER TO user command (Mark Hollomon)\n> Allow subselects in FROM, i.e. FROM (SELECT ...) [AS] alias (Tom)\n\ndone, done\n\n> New pg_service.conf file (Mario Weilguni)\n\nAs per previous agreement, this will not be an official feature in 7.1.\nNeeds further review.\n\n> New pg_dumpall --globals-only option (Peter E)\n> New CHECKPOINT command for WAL which creates new WAL log file (Vadim)\n> New AT TIME ZONE syntax (Thomas)\n> Allow location of Unix domain socket to be configurable (David J. MacKenzie)\n> Allow postmaster to listen on a specific IP address (David J. MacKenzie)\n> Allow socket path name to be specified in hostname by using leading slash\n> (David J. MacKenzie)\n> Allow CREATE DATABASE to specify template database (Tom)\n> New pg_dump --globals-only option (Peter E)\n\nCheck all those.\n\n> Allow BIGINT as synonym for INT8 (Peter E)\n> New BIT and BIT VARYING types (Adriaan Joubert, Tom, Peter E)\n> Fix CIDR output formatting (Tom)\n> New CIDR abbrev() function (Tom)\n> Write-Ahead Log (WAL) to provide crash recovery with less performance\n> overhead (Vadim)\n\nCheck\n\n> New function manager call conventions (Tom)\n\nHmm, I've seen this before...\n\n> New configure --enable-syslog option (Peter E)\n> configure script moved to top level, not /src (Peter E)\n> New configure --with-python option (Peter E)\n> New OpenSSL configuration option (Magnus, Peter E)\n> Remove colon and semi-colon operators (Thomas)\n\nAll good.\n\n> Rename ichar() to chr() (Karel)\n\nchr() is documented.\n\n> Allow *BSD's libedit instead of readline (Peter)\n\n*BSD should be \"NetBSD\". Not documented, yet.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Fri, 9 Feb 2001 18:51:23 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "> Store all large objects in a single table (Denis Perchine, Tom)\n\nHmmm... If you would point me to the document where changes should be done, I \nwill do them.\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: dyp@perchine.com\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n", "msg_date": "Fri, 9 Feb 2001 23:55:49 +0600", "msg_from": "Denis Perchine <dyp@perchine.com>", "msg_from_op": false, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "> Bruce Momjian writes:\n> \n> > Source Code Changes\n> > -------------------\n> \n> > Fix ipcclean on Linux\n> \n> It's fixed. Or what is the problem?\n\nThe issue was that the ipcs code did not work on Linux. In fact,\nreference to variable $ipcs_pid doesn't even work because it is not\ndefined. I believe you stated you would get that working.\n\n\n> \n> > unixODBC\n> \n> This would be a new feature. I'm having some private conversation with\n> the unixODBC maintainer about how to handle this. We'll work on it for\n> 7.2.\n\nItem removed.\n\n> \n> > Documentation Changes\n> > ---------------------\n> > Fix PL/perl (Alex Kapranoff)\n> \n> Not sure how to handle this other than backpatching to 7.0 that it doesn't\n> work. ;-) (i.e.: done)\n\nThat is all I needed to know. Item removed.\n\n> \n> > Add OUTER JOINs (Tom)\n> \n> Documented\n\nRemoved.\n\n> \n> > Function manager overhaul (Tom)\n> \n> Looks documented enough to me.\n\nRemoved.\n\n> \n> > Grand Unified Configuration scheme/GUC. Many options can now be set in\n> > data/postgresql.conf, postmaster/postgres flags, or SET commands (Peter E)\n> > Overhaul initdb process (Tom, Peter E)\n> > Overhaul of inherited tables; inherited tables now accessed by default;\n> > new ONLY keyword prevents it (Chris Bitmead, Tom)\n> \n> done, done, done\n> \n> (although I don't recall me \"overhauling\" initdb)\n\nRemoved. Overhaul as in clean up how it works.\n\n> \n> > Allow pg_hba.conf secondary password file to specify only username (Peter E)\n> > New SET SESSION CHARACTERISTICS (Thomas)\n> > Add WITHOUT TIME ZONE type qualifier (Thomas)\n> \n> done, done, done\n> \n> > New VARIANCE and STDDEV() aggregates\n> > New ESCAPE option to LIKE (Thomas)\n> > New case-insensitive LIKE - ILIKE (Thomas)\n> \n> done, done, done\n\nAll removed.\n\n> \n> > Allow SQL functions to be used in more contexts (Tom)\n> \n> That probably doesn't need documentation.\n\nNot sure if we mention that only non-SQL functions can be used in\ncertain contexts, while they can now be used. What contexts did we add.\nI believe it was functional indexes. Item removed.\n\n> \n> > New pg_config utility (Peter E)\n> > New PL/pgSQL EXECUTE command which allows dynamic SQL and utility statements\n> > (Jan)\n> \n> > New quote_identifiers() and quote_literal() functions (Jan)\n> \n> done, done, done\n> \n> > New ALTER TABLE table OWNER TO user command (Mark Hollomon)\n> > Allow subselects in FROM, i.e. FROM (SELECT ...) [AS] alias (Tom)\n> \n> done, done\n\nAll removed.\n\n> \n> > New pg_service.conf file (Mario Weilguni)\n> \n> As per previous agreement, this will not be an official feature in 7.1.\n> Needs further review.\n\nRemoved from HISTORY & release.sgml.\n\n> \n> > New pg_dumpall --globals-only option (Peter E)\n> > New CHECKPOINT command for WAL which creates new WAL log file (Vadim)\n> > New AT TIME ZONE syntax (Thomas)\n> > Allow location of Unix domain socket to be configurable (David J. MacKenzie)\n> > Allow postmaster to listen on a specific IP address (David J. MacKenzie)\n> > Allow socket path name to be specified in hostname by using leading slash\n> > (David J. MacKenzie)\n> > Allow CREATE DATABASE to specify template database (Tom)\n> > New pg_dump --globals-only option (Peter E)\n> \n> Check all those.\n> \n> > Allow BIGINT as synonym for INT8 (Peter E)\n> > New BIT and BIT VARYING types (Adriaan Joubert, Tom, Peter E)\n> > Fix CIDR output formatting (Tom)\n> > New CIDR abbrev() function (Tom)\n> > Write-Ahead Log (WAL) to provide crash recovery with less performance\n> > overhead (Vadim)\n> \n> Check\n\nAll removed.\n\n> \n> > New function manager call conventions (Tom)\n> \n> Hmm, I've seen this before...\n> \n\nJust asking if we need to addition documentation for the change.\n\n> > New configure --enable-syslog option (Peter E)\n> > configure script moved to top level, not /src (Peter E)\n> > New configure --with-python option (Peter E)\n> > New OpenSSL configuration option (Magnus, Peter E)\n> > Remove colon and semi-colon operators (Thomas)\n> \n> All good.\n> \n> > Rename ichar() to chr() (Karel)\n> \n> chr() is documented.\n\n\nAll removed.\n\n> \n> > Allow *BSD's libedit instead of readline (Peter)\n> \n> *BSD should be \"NetBSD\". Not documented, yet.\n\nUpdated HISTORY & release.sgml.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Fri, 9 Feb 2001 12:56:33 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "I have no idea. If we mention the existance of separate large object\nfiles, they it has to be updated. If we don't mention it, then we can\nremove the item.\n\n\n\n[ Charset ISO-8859-1 unsupported, converting... ]\n> > Store all large objects in a single table (Denis Perchine, Tom)\n> \n> Hmmm... If you would point me to the document where changes should be done, I \n> will do them.\n> \n> -- \n> Sincerely Yours,\n> Denis Perchine\n> \n> ----------------------------------\n> E-Mail: dyp@perchine.com\n> HomePage: http://www.perchine.com/dyp/\n> FidoNet: 2:5000/120.5\n> ----------------------------------\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Fri, 9 Feb 2001 13:15:39 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "On Saturday 10 February 2001 00:15, Bruce Momjian wrote:\n> I have no idea. If we mention the existance of separate large object\n> files, they it has to be updated. If we don't mention it, then we can\n> remove the item.\n\nOK. Here it is. Note, that they are some changes in docs/TODO. I remove\nthing which are not actual anymore. I am not sure that this is all, and that \nmy English is perfect. But I did a grep for docs dir, and this is only place \nwhere I found implementation details.\n\n> > > Store all large objects in a single table (Denis Perchine, Tom)\n> >\n> > Hmmm... If you would point me to the document where changes should be\n> > done, I will do them.\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: dyp@perchine.com\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------", "msg_date": "Sat, 10 Feb 2001 00:41:46 +0600", "msg_from": "Denis Perchine <dyp@perchine.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 7.1 items" }, { "msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> On Saturday 10 February 2001 00:15, Bruce Momjian wrote:\n> > I have no idea. If we mention the existance of separate large object\n> > files, they it has to be updated. If we don't mention it, then we can\n> > remove the item.\n> \n> OK. Here it is. Note, that they are some changes in docs/TODO. I remove\n> thing which are not actual anymore. I am not sure that this is all, and that \n> my English is perfect. But I did a grep for docs dir, and this is only place \n> where I found implementation details.\n\n\nItems marked with '-' are removed when 7.1 is released.\n\nI have applied the first part of your SGML change. I did not do the\nsecond part because the large object single-file method was not added\nfor reliability only, but also for performance because we used to have a\nfile for every large object.\n\n> \n> > > > Store all large objects in a single table (Denis Perchine, Tom)\n> > >\n> > > Hmmm... If you would point me to the document where changes should be\n> > > done, I will do them.\n> \n> -- \n> Sincerely Yours,\n> Denis Perchine\n> \n> ----------------------------------\n> E-Mail: dyp@perchine.com\n> HomePage: http://www.perchine.com/dyp/\n> FidoNet: 2:5000/120.5\n> ----------------------------------\n\n[ Attachment, skipping... ]\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Fri, 9 Feb 2001 14:25:58 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Re: [HACKERS] Open 7.1 items" }, { "msg_contents": "At 12:26 9/02/01 -0500, Bruce Momjian wrote:\n>Overhaul pg_dump (Philip Warner)\n>New pg_dump tar output option (Philip)\n>New pg_dump of large objects (Philip)\n>New pg_restore command (Philip)\n\nThe SGML docs for these have been there for a while - is there something\nelse I need to do?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Sat, 10 Feb 2001 11:15:22 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 7.1 items" }, { "msg_contents": "> At 12:26 9/02/01 -0500, Bruce Momjian wrote:\n> >Overhaul pg_dump (Philip Warner)\n> >New pg_dump tar output option (Philip)\n> >New pg_dump of large objects (Philip)\n> >New pg_restore command (Philip)\n> \n> The SGML docs for these have been there for a while - is there something\n> else I need to do?\n\nNo, I just needed to know it was done. Removed.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Fri, 9 Feb 2001 20:45:48 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Open 7.1 items" }, { "msg_contents": "Bruce Momjian writes:\n\n>> Allow location of Unix domain socket to be configurable (David J. MacKenzie)\n>> Allow postmaster to listen on a specific IP address (David J. MacKenzie)\n>> Allow socket path name to be specified in hostname by using leading slash\n>> (David J. MacKenzie)\n>> Allow CREATE DATABASE to specify template database (Tom)\n\nThe four items listed are all documented to at least some extent (ie,\nI find them each in at least one place in the SGML docs). Whether they\nare documented adequately is another question...\n\n>> Fix CIDR output formatting (Tom)\n>> New CIDR abbrev() function (Tom)\n\nThose are documented.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 09 Feb 2001 23:35:44 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: Open 7.1 items " }, { "msg_contents": "> separate client- and server-side includes, make optional install\n> target to install all of src/include\n\nThis is done now, at least as far as the source tree goes (dunno\nhow Lamar plans to handle it in the RPMs).\n\n> New file format for COPY BINARY (Tom)\n\nAlready documented, see COPY reference page.\n\n> New function manager call conventions (Tom)\n\nThis is probably adequately documented for now: xfunc.sgml gives an\noverview and refers to src/backend/utils/fmgr/README for more details.\nAt some point it'd be nice to transform that README into SGML doco,\nbut I doubt I'll get to it before 7.1 goes out.\n\n> New template0 database that contains no user additions (Tom)\n\nThe CREATE DATABASE reference page discusses template0. Do we need to\ndiscuss it anywhere else?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 10 Feb 2001 01:02:21 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Open 7.1 items " }, { "msg_contents": "\nItems removed. Thanks.\n\n\n> > separate client- and server-side includes, make optional install\n> > target to install all of src/include\n> \n> This is done now, at least as far as the source tree goes (dunno\n> how Lamar plans to handle it in the RPMs).\n> \n> > New file format for COPY BINARY (Tom)\n> \n> Already documented, see COPY reference page.\n> \n> > New function manager call conventions (Tom)\n> \n> This is probably adequately documented for now: xfunc.sgml gives an\n> overview and refers to src/backend/utils/fmgr/README for more details.\n> At some point it'd be nice to transform that README into SGML doco,\n> but I doubt I'll get to it before 7.1 goes out.\n> \n> > New template0 database that contains no user additions (Tom)\n> \n> The CREATE DATABASE reference page discusses template0. Do we need to\n> discuss it anywhere else?\n> \n> \t\t\tregards, tom lane\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 01:08:54 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Re: [HACKERS] Open 7.1 items" }, { "msg_contents": "> Bruce Momjian writes:\n> \n> >> Allow location of Unix domain socket to be configurable (David J. MacKenzie)\n> >> Allow postmaster to listen on a specific IP address (David J. MacKenzie)\n> >> Allow socket path name to be specified in hostname by using leading slash\n> >> (David J. MacKenzie)\n> >> Allow CREATE DATABASE to specify template database (Tom)\n> \n> The four items listed are all documented to at least some extent (ie,\n> I find them each in at least one place in the SGML docs). Whether they\n> are documented adequately is another question...\n\nI believe these are done. I did them when I applied the Uunet patches. \nIf I missed a spot, someone please let me know.\n\nItems removed.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 11:44:31 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] Re: Open 7.1 items" } ]
[ { "msg_contents": "I have applied the following patch to remove the assumption that\nxinv/xinx files are large objects. They are now all stored in\npg_largeobject, so there is no query anymore that dumps out a list of\nthem. Do we need to find another way to handle a large object listing\nfrom jdbc?\n\nAlso, should we remove jbdc/postgresql now that we have org/postgresql\nworking?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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? config.log\n? config.cache\n? config.status\n? GNUmakefile\n? src/Makefile.custom\n? src/GNUmakefile\n? src/Makefile.global\n? src/log\n? src/crtags\n? src/backend/port/Makefile\n? src/include/config.h\n? src/include/stamp-h\nIndex: src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java,v\nretrieving revision 1.11\ndiff -c -r1.11 DatabaseMetaData.java\n*** src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java\t2001/01/24 09:22:01\t1.11\n--- src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java\t2001/02/09 22:20:40\n***************\n*** 1617,1624 ****\n * </ol>\n *\n * <p>The valid values for the types parameter are:\n! * \"TABLE\", \"INDEX\", \"LARGE OBJECT\", \"SEQUENCE\", \"SYSTEM TABLE\" and\n! * \"SYSTEM INDEX\"\n *\n * @param catalog a catalog name; For org.postgresql, this is ignored, and\n * should be set to null\n--- 1617,1623 ----\n * </ol>\n *\n * <p>The valid values for the types parameter are:\n! * \"TABLE\", \"INDEX\", \"SEQUENCE\", \"SYSTEM TABLE\" and \"SYSTEM INDEX\"\n *\n * @param catalog a catalog name; For org.postgresql, this is ignored, and\n * should be set to null\n***************\n*** 1721,1730 ****\n //\n // IMPORTANT: the query must be enclosed in ( )\n private static final String getTableTypes[][] = {\n! {\"TABLE\",\t\t\"(relkind='r' and relhasrules='f' and relname !~ '^pg_' and relname !~ '^xinv')\"},\n! {\"VIEW\", \"(relkind='v' and relname !~ '^pg_' and relname !~ '^xinv')\"},\n! {\"INDEX\",\t\t\"(relkind='i' and relname !~ '^pg_' and relname !~ '^xinx')\"},\n! {\"LARGE OBJECT\",\t\"(relkind='r' and relname ~ '^xinv')\"},\n {\"SEQUENCE\",\t\"(relkind='S' and relname !~ '^pg_')\"},\n {\"SYSTEM TABLE\",\t\"(relkind='r' and relname ~ '^pg_')\"},\n {\"SYSTEM INDEX\",\t\"(relkind='i' and relname ~ '^pg_')\"}\n--- 1720,1728 ----\n //\n // IMPORTANT: the query must be enclosed in ( )\n private static final String getTableTypes[][] = {\n! {\"TABLE\",\t\t\"(relkind='r' and relhasrules='f' and relname !~ '^pg_')\"},\n! {\"VIEW\", \"(relkind='v' and relname !~ '^pg_')\"},\n! {\"INDEX\",\t\t\"(relkind='i' and relname !~ '^pg_')\"},\n {\"SEQUENCE\",\t\"(relkind='S' and relname !~ '^pg_')\"},\n {\"SYSTEM TABLE\",\t\"(relkind='r' and relname ~ '^pg_')\"},\n {\"SYSTEM INDEX\",\t\"(relkind='i' and relname ~ '^pg_')\"}\nIndex: src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java,v\nretrieving revision 1.11\ndiff -c -r1.11 DatabaseMetaData.java\n*** src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java\t2001/01/24 09:22:01\t1.11\n--- src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java\t2001/02/09 22:20:42\n***************\n*** 1617,1624 ****\n * </ol>\n *\n * <p>The valid values for the types parameter are:\n! * \"TABLE\", \"INDEX\", \"LARGE OBJECT\", \"SEQUENCE\", \"SYSTEM TABLE\" and\n! * \"SYSTEM INDEX\"\n *\n * @param catalog a catalog name; For org.postgresql, this is ignored, and\n * should be set to null\n--- 1617,1623 ----\n * </ol>\n *\n * <p>The valid values for the types parameter are:\n! * \"TABLE\", \"INDEX\", \"SEQUENCE\", \"SYSTEM TABLE\" and \"SYSTEM INDEX\"\n *\n * @param catalog a catalog name; For org.postgresql, this is ignored, and\n * should be set to null\n***************\n*** 1721,1730 ****\n //\n // IMPORTANT: the query must be enclosed in ( )\n private static final String getTableTypes[][] = {\n! {\"TABLE\",\t\t\"(relkind='r' and relhasrules='f' and relname !~ '^pg_' and relname !~ '^xinv')\"},\n! {\"VIEW\", \"(relkind='v' and relname !~ '^pg_' and relname !~ '^xinv')\"},\n! {\"INDEX\",\t\t\"(relkind='i' and relname !~ '^pg_' and relname !~ '^xinx')\"},\n! {\"LARGE OBJECT\",\t\"(relkind='r' and relname ~ '^xinv')\"},\n {\"SEQUENCE\",\t\"(relkind='S' and relname !~ '^pg_')\"},\n {\"SYSTEM TABLE\",\t\"(relkind='r' and relname ~ '^pg_')\"},\n {\"SYSTEM INDEX\",\t\"(relkind='i' and relname ~ '^pg_')\"}\n--- 1720,1728 ----\n //\n // IMPORTANT: the query must be enclosed in ( )\n private static final String getTableTypes[][] = {\n! {\"TABLE\",\t\t\"(relkind='r' and relhasrules='f' and relname !~ '^pg_')\"},\n! {\"VIEW\", \"(relkind='v' and relname !~ '^pg_')\"},\n! {\"INDEX\",\t\t\"(relkind='i' and relname !~ '^pg_')\"},\n {\"SEQUENCE\",\t\"(relkind='S' and relname !~ '^pg_')\"},\n {\"SYSTEM TABLE\",\t\"(relkind='r' and relname ~ '^pg_')\"},\n {\"SYSTEM INDEX\",\t\"(relkind='i' and relname ~ '^pg_')\"}\nIndex: src/interfaces/jdbc/postgresql/jdbc1/DatabaseMetaData.java\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/postgresql/jdbc1/DatabaseMetaData.java,v\nretrieving revision 1.4\ndiff -c -r1.4 DatabaseMetaData.java\n*** src/interfaces/jdbc/postgresql/jdbc1/DatabaseMetaData.java\t2000/06/12 22:36:14\t1.4\n--- src/interfaces/jdbc/postgresql/jdbc1/DatabaseMetaData.java\t2001/02/09 22:20:43\n***************\n*** 1617,1624 ****\n * </ol>\n *\n * <p>The valid values for the types parameter are:\n! * \"TABLE\", \"INDEX\", \"LARGE OBJECT\", \"SEQUENCE\", \"SYSTEM TABLE\" and\n! * \"SYSTEM INDEX\"\n *\n * @param catalog a catalog name; For postgresql, this is ignored, and\n * should be set to null\n--- 1617,1623 ----\n * </ol>\n *\n * <p>The valid values for the types parameter are:\n! * \"TABLE\", \"INDEX\", \"SEQUENCE\", \"SYSTEM TABLE\" and \"SYSTEM INDEX\"\n *\n * @param catalog a catalog name; For postgresql, this is ignored, and\n * should be set to null\n***************\n*** 1706,1714 ****\n //\n // IMPORTANT: the query must be enclosed in ( )\n private static final String getTableTypes[][] = {\n! {\"TABLE\",\t\t\"(relkind='r' and relname !~ '^pg_' and relname !~ '^xinv')\"},\n! {\"INDEX\",\t\t\"(relkind='i' and relname !~ '^pg_' and relname !~ '^xinx')\"},\n! {\"LARGE OBJECT\",\t\"(relkind='r' and relname ~ '^xinv')\"},\n {\"SEQUENCE\",\t\"(relkind='S' and relname !~ '^pg_')\"},\n {\"SYSTEM TABLE\",\t\"(relkind='r' and relname ~ '^pg_')\"},\n {\"SYSTEM INDEX\",\t\"(relkind='i' and relname ~ '^pg_')\"}\n--- 1705,1712 ----\n //\n // IMPORTANT: the query must be enclosed in ( )\n private static final String getTableTypes[][] = {\n! {\"TABLE\",\t\t\"(relkind='r' and relname !~ '^pg_')\"},\n! {\"INDEX\",\t\t\"(relkind='i' and relname !~ '^pg_')\"},\n {\"SEQUENCE\",\t\"(relkind='S' and relname !~ '^pg_')\"},\n {\"SYSTEM TABLE\",\t\"(relkind='r' and relname ~ '^pg_')\"},\n {\"SYSTEM INDEX\",\t\"(relkind='i' and relname ~ '^pg_')\"}\nIndex: src/interfaces/jdbc/postgresql/jdbc2/DatabaseMetaData.java\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/postgresql/jdbc2/DatabaseMetaData.java,v\nretrieving revision 1.4\ndiff -c -r1.4 DatabaseMetaData.java\n*** src/interfaces/jdbc/postgresql/jdbc2/DatabaseMetaData.java\t2000/06/12 22:36:16\t1.4\n--- src/interfaces/jdbc/postgresql/jdbc2/DatabaseMetaData.java\t2001/02/09 22:20:44\n***************\n*** 1617,1624 ****\n * </ol>\n *\n * <p>The valid values for the types parameter are:\n! * \"TABLE\", \"INDEX\", \"LARGE OBJECT\", \"SEQUENCE\", \"SYSTEM TABLE\" and\n! * \"SYSTEM INDEX\"\n *\n * @param catalog a catalog name; For postgresql, this is ignored, and\n * should be set to null\n--- 1617,1623 ----\n * </ol>\n *\n * <p>The valid values for the types parameter are:\n! * \"TABLE\", \"INDEX\", \"SEQUENCE\", \"SYSTEM TABLE\" and \"SYSTEM INDEX\"\n *\n * @param catalog a catalog name; For postgresql, this is ignored, and\n * should be set to null\n***************\n*** 1706,1714 ****\n //\n // IMPORTANT: the query must be enclosed in ( )\n private static final String getTableTypes[][] = {\n! {\"TABLE\",\t\t\"(relkind='r' and relname !~ '^pg_' and relname !~ '^xinv')\"},\n! {\"INDEX\",\t\t\"(relkind='i' and relname !~ '^pg_' and relname !~ '^xinx')\"},\n! {\"LARGE OBJECT\",\t\"(relkind='r' and relname ~ '^xinv')\"},\n {\"SEQUENCE\",\t\"(relkind='S' and relname !~ '^pg_')\"},\n {\"SYSTEM TABLE\",\t\"(relkind='r' and relname ~ '^pg_')\"},\n {\"SYSTEM INDEX\",\t\"(relkind='i' and relname ~ '^pg_')\"}\n--- 1705,1712 ----\n //\n // IMPORTANT: the query must be enclosed in ( )\n private static final String getTableTypes[][] = {\n! {\"TABLE\",\t\t\"(relkind='r' and relname !~ '^pg_')\"},\n! {\"INDEX\",\t\t\"(relkind='i' and relname !~ '^pg_')\"},\n {\"SEQUENCE\",\t\"(relkind='S' and relname !~ '^pg_')\"},\n {\"SYSTEM TABLE\",\t\"(relkind='r' and relname ~ '^pg_')\"},\n {\"SYSTEM INDEX\",\t\"(relkind='i' and relname ~ '^pg_')\"}", "msg_date": "Fri, 9 Feb 2001 17:26:35 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Fix for large objects" } ]
[ { "msg_contents": "ODBC still has code to handle 6.2 backends:\n\n\t/* This startup packet is to support pre-Postgres 6.3 protocol */\n\ttypedef struct _StartupPacket6_2\n\t{\n\t unsigned int authtype;\n\t char database[PATH_SIZE];\n\t char user[NAMEDATALEN];\n\t char options[ARGV_SIZE];\n\t char execfile[ARGV_SIZE];\n\t char tty[PATH_SIZE];\n\t} StartupPacket6_2;\n\nDo we still want to carry that code around in ODBC?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Fri, 9 Feb 2001 18:30:07 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "6.2 protocol" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> ODBC still has code to handle 6.2 backends:\n> Do we still want to carry that code around in ODBC?\n\nI'd suggest retiring the 6.2 *and* 6.3 code from ODBC, so that it only\nneeds to support one protocol version, and then we can also retire its\n\"6.2/6.3/6.4\" protocol option switch. AFAICS that option switch serves\nonly to confuse newbies --- I recall a fair number of questions along\nthe line of \"I'm running PG 6.5 (or 7.0), where do I get an ODBC that\nwill talk to it?\" since after all it does not say \">= 6.4\".\n\nBesides, anyone still running 6.3 or before needs to be prodded,\nnone too gently, to upgrade ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 09 Feb 2001 19:20:43 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: 6.2 protocol " }, { "msg_contents": "OK, I have applied the following patch to remove ODBC protocol-version\nhandling. I have kept the protocol-version fields and assignments, in\ncase it is useful in the future. Comments?\n\n\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > ODBC still has code to handle 6.2 backends:\n> > Do we still want to carry that code around in ODBC?\n> \n> I'd suggest retiring the 6.2 *and* 6.3 code from ODBC, so that it only\n> needs to support one protocol version, and then we can also retire its\n> \"6.2/6.3/6.4\" protocol option switch. AFAICS that option switch serves\n> only to confuse newbies --- I recall a fair number of questions along\n> the line of \"I'm running PG 6.5 (or 7.0), where do I get an ODBC that\n> will talk to it?\" since after all it does not say \">= 6.4\".\n> \n> Besides, anyone still running 6.3 or before needs to be prodded,\n> none too gently, to upgrade ...\n> \n> \t\t\tregards, tom lane\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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\nIndex: src/interfaces/odbc/connection.c\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/connection.c,v\nretrieving revision 1.17\ndiff -c -r1.17 connection.c\n*** src/interfaces/odbc/connection.c\t2001/02/10 05:50:27\t1.17\n--- src/interfaces/odbc/connection.c\t2001/02/10 06:25:31\n***************\n*** 461,467 ****\n CC_connect(ConnectionClass *self, char do_password)\n {\n StartupPacket sp;\n- StartupPacket6_2 sp62;\n QResultClass *res;\n SocketClass *sock;\n ConnInfo *ci = &(self->connInfo);\n--- 461,466 ----\n***************\n*** 538,573 ****\n \t\t}\n \t\tmylog(\"connection to the server socket succeeded.\\n\");\n \n! \t\tif ( PROTOCOL_62(ci)) {\n! \t\t\tsock->reverse = TRUE;\t\t/* make put_int and get_int work for 6.2 */\n \n! \t\t\tmemset(&sp62, 0, sizeof(StartupPacket6_2));\n! \t\t\tSOCK_put_int(sock, htonl(4+sizeof(StartupPacket6_2)), 4);\n! \t\t\tsp62.authtype = htonl(NO_AUTHENTICATION);\n! \t\t\tstrncpy(sp62.database, ci->database, PATH_SIZE);\n! \t\t\tstrncpy(sp62.user, ci->username, NAMEDATALEN);\n! \t\t\tSOCK_put_n_char(sock, (char *) &sp62, sizeof(StartupPacket6_2));\n! \t\t\tSOCK_flush_output(sock);\n! \t\t}\n! \t\telse {\n! \t\t\tmemset(&sp, 0, sizeof(StartupPacket));\n \n! \t\t\tmylog(\"sizeof startup packet = %d\\n\", sizeof(StartupPacket));\n \n! \t\t\t/* Send length of Authentication Block */\n! \t\t\tSOCK_put_int(sock, 4+sizeof(StartupPacket), 4); \n \n! \t\t\tif ( PROTOCOL_63(ci))\n! \t\t\t\tsp.protoVersion = (ProtocolVersion) htonl(PG_PROTOCOL_63);\n! \t\t\telse\n! \t\t\t\tsp.protoVersion = (ProtocolVersion) htonl(PG_PROTOCOL_LATEST);\n! \n! \t\t\tstrncpy(sp.database, ci->database, SM_DATABASE);\n! \t\t\tstrncpy(sp.user, ci->username, SM_USER);\n \n! \t\t\tSOCK_put_n_char(sock, (char *) &sp, sizeof(StartupPacket));\n! \t\t\tSOCK_flush_output(sock);\n! \t\t}\n \n \t\tmylog(\"sent the authentication block.\\n\");\n \n--- 537,556 ----\n \t\t}\n \t\tmylog(\"connection to the server socket succeeded.\\n\");\n \n! \t\tmemset(&sp, 0, sizeof(StartupPacket));\n \n! \t\tmylog(\"sizeof startup packet = %d\\n\", sizeof(StartupPacket));\n \n! \t\t/* Send length of Authentication Block */\n! \t\tSOCK_put_int(sock, 4+sizeof(StartupPacket), 4); \n \n! \t\tsp.protoVersion = (ProtocolVersion) htonl(PG_PROTOCOL_LATEST);\n \n! \t\tstrncpy(sp.database, ci->database, SM_DATABASE);\n! \t\tstrncpy(sp.user, ci->username, SM_USER);\n \n! \t\tSOCK_put_n_char(sock, (char *) &sp, sizeof(StartupPacket));\n! \t\tSOCK_flush_output(sock);\n \n \t\tmylog(\"sent the authentication block.\\n\");\n \n***************\n*** 588,594 ****\n \t/*\tNow get the authentication request from backend */\n \t/* *************************************************** */\n \n! \tif ( ! PROTOCOL_62(ci))\tdo {\n \n \t\tif (do_password)\n \t\t\tberesp = 'R';\n--- 571,577 ----\n \t/*\tNow get the authentication request from backend */\n \t/* *************************************************** */\n \n! \tdo {\n \n \t\tif (do_password)\n \t\t\tberesp = 'R';\n***************\n*** 1378,1396 ****\n CC_initialize_pg_version(ConnectionClass *self) \n {\n \tstrcpy(self->pg_version, self->connInfo.protocol); \n! \tif (PROTOCOL_62(&self->connInfo)) {\n! \t\tself->pg_version_number = (float) 6.2;\n! \t\tself->pg_version_major = 6;\n! \t\tself->pg_version_minor = 2;\n! \t} else if (PROTOCOL_63(&self->connInfo)) {\n! \t\tself->pg_version_number = (float) 6.3;\n! \t\tself->pg_version_major = 6;\n! \t\tself->pg_version_minor = 3;\n! \t} else {\n! \t\tself->pg_version_number = (float) 6.4;\n! \t\tself->pg_version_major = 6;\n! \t\tself->pg_version_minor = 4;\n! \t}\n }\n /*\tThis function gets the version of PostgreSQL that we're connected to.\n This is used to return the correct info in SQLGetInfo\n--- 1361,1369 ----\n CC_initialize_pg_version(ConnectionClass *self) \n {\n \tstrcpy(self->pg_version, self->connInfo.protocol); \n! \tself->pg_version_number = (float) 6.4;\n! \tself->pg_version_major = 6;\n! \tself->pg_version_minor = 4;\n }\n /*\tThis function gets the version of PostgreSQL that we're connected to.\n This is used to return the correct info in SQLGetInfo\nIndex: src/interfaces/odbc/connection.h\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/connection.h,v\nretrieving revision 1.13\ndiff -c -r1.13 connection.h\n*** src/interfaces/odbc/connection.h\t2001/02/06 02:21:12\t1.13\n--- src/interfaces/odbc/connection.h\t2001/02/10 06:25:31\n***************\n*** 106,115 ****\n \n #define PG_PROTOCOL(major, minor)\t(((major) << 16) | (minor))\n #define PG_PROTOCOL_LATEST\t\tPG_PROTOCOL(2, 0)\n- #define PG_PROTOCOL_63\t\t\tPG_PROTOCOL(1, 0)\n- #define PG_PROTOCOL_62\t\t\tPG_PROTOCOL(0, 0)\n \n! /*\tThis startup packet is to support latest Postgres protocol (6.4, 6.3) */\n typedef struct _StartupPacket\n {\n \tProtocolVersion\tprotoVersion;\n--- 106,113 ----\n \n #define PG_PROTOCOL(major, minor)\t(((major) << 16) | (minor))\n #define PG_PROTOCOL_LATEST\t\tPG_PROTOCOL(2, 0)\n \n! /*\tThis startup packet is to support latest Postgres protocol */\n typedef struct _StartupPacket\n {\n \tProtocolVersion\tprotoVersion;\n***************\n*** 121,138 ****\n } StartupPacket;\n \n \n- /*\tThis startup packet is to support pre-Postgres 6.3 protocol */\n- typedef struct _StartupPacket6_2\n- {\n- \tunsigned int\tauthtype;\n- \tchar\t\t\tdatabase[PATH_SIZE];\n- \tchar\t\t\tuser[NAMEDATALEN];\n- \tchar\t\t\toptions[ARGV_SIZE];\n- \tchar\t\t\texecfile[ARGV_SIZE];\n- \tchar\t\t\ttty[PATH_SIZE];\n- } StartupPacket6_2;\n- \n- \n /*\tStructure to hold all the connection attributes for a specific\n \tconnection (used for both registry and file, DSN and DRIVER)\n */\n--- 119,124 ----\n***************\n*** 156,167 ****\n \tchar translation_option[SMALL_REGISTRY_LEN];\n \tchar\tfocus_password;\n } ConnInfo;\n- \n- /*\tMacro to determine is the connection using 6.2 protocol? */\n- #define PROTOCOL_62(conninfo_)\t\t(strncmp((conninfo_)->protocol, PG62, strlen(PG62)) == 0)\n- \n- /*\tMacro to determine is the connection using 6.3 protocol? */\n- #define PROTOCOL_63(conninfo_)\t\t(strncmp((conninfo_)->protocol, PG63, strlen(PG63)) == 0)\n \n /*\n *\tMacros to compare the server's version with a specified version\n--- 142,147 ----\nIndex: src/interfaces/odbc/dlg_specific.c\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/dlg_specific.c,v\nretrieving revision 1.18\ndiff -c -r1.18 dlg_specific.c\n*** src/interfaces/odbc/dlg_specific.c\t2001/02/10 05:50:28\t1.18\n--- src/interfaces/odbc/dlg_specific.c\t2001/02/10 06:25:31\n***************\n*** 243,254 ****\n \t\tCheckDlgButton(hdlg, DS_READONLY, atoi(ci->onlyread));\n \n \t\t/*\tProtocol */\n! \t\tif (strncmp(ci->protocol, PG62, strlen(PG62)) == 0)\n! \t\t\tCheckDlgButton(hdlg, DS_PG62, 1);\n! \t\telse if (strncmp(ci->protocol, PG63, strlen(PG63)) == 0)\n! \t\t\tCheckDlgButton(hdlg, DS_PG63, 1);\n! \t\telse /* latest */\n! \t\t\tCheckDlgButton(hdlg, DS_PG64, 1);\n \n \n \n--- 243,249 ----\n \t\tCheckDlgButton(hdlg, DS_READONLY, atoi(ci->onlyread));\n \n \t\t/*\tProtocol */\n! \t\tCheckDlgButton(hdlg, DS_PG64, 1);\n \n \n \n***************\n*** 281,292 ****\n \t\t\tsprintf(ci->onlyread, \"%d\", IsDlgButtonChecked(hdlg, DS_READONLY));\n \n \t\t\t/*\tProtocol */\n! \t\t\tif ( IsDlgButtonChecked(hdlg, DS_PG62))\n! \t\t\t\tstrcpy(ci->protocol, PG62);\n! \t\t\telse if ( IsDlgButtonChecked(hdlg, DS_PG63))\n! \t\t\t\tstrcpy(ci->protocol, PG63);\n! \t\t\telse\t/* latest */\n! \t\t\t\tstrcpy(ci->protocol, PG64);\n \n \t\t\tsprintf(ci->show_system_tables, \"%d\", IsDlgButtonChecked(hdlg, DS_SHOWSYSTEMTABLES));\n \n--- 276,282 ----\n \t\t\tsprintf(ci->onlyread, \"%d\", IsDlgButtonChecked(hdlg, DS_READONLY));\n \n \t\t\t/*\tProtocol */\n! \t\t\tstrcpy(ci->protocol, PG64);\n \n \t\t\tsprintf(ci->show_system_tables, \"%d\", IsDlgButtonChecked(hdlg, DS_SHOWSYSTEMTABLES));\n \nIndex: src/interfaces/odbc/psqlodbc.h\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/psqlodbc.h,v\nretrieving revision 1.30\ndiff -c -r1.30 psqlodbc.h\n*** src/interfaces/odbc/psqlodbc.h\t2001/02/06 02:21:12\t1.30\n--- src/interfaces/odbc/psqlodbc.h\t2001/02/10 06:25:32\n***************\n*** 91,98 ****\n /* Now that's 0, lets use this instead. DJP 24-1-2001 */\n #define STD_STATEMENT_LEN\tMAX_MESSAGE_LEN\n \n- #define PG62\t\"6.2\"\t\t/* \"Protocol\" key setting to force Postgres 6.2 */\n- #define PG63\t\"6.3\"\t\t/* \"Protocol\" key setting to force postgres 6.3 */\n #define PG64\t\"6.4\"\n \n typedef struct ConnectionClass_ ConnectionClass;\n--- 91,96 ----\n***************\n*** 132,139 ****\n \tchar\t\t\t\tcancel_as_freestmt;\n \tchar\t\t\t\textra_systable_prefixes[MEDIUM_REGISTRY_LEN];\n \tchar\t\t\t\tconn_settings[LARGE_REGISTRY_LEN];\n \tchar\t\t\t\tprotocol[SMALL_REGISTRY_LEN];\n- \n \tFILE*\t\t\t\tmylogFP;\n \tFILE*\t\t\t\tqlogFP;\t\n } GLOBAL_VALUES;\n--- 130,139 ----\n \tchar\t\t\t\tcancel_as_freestmt;\n \tchar\t\t\t\textra_systable_prefixes[MEDIUM_REGISTRY_LEN];\n \tchar\t\t\t\tconn_settings[LARGE_REGISTRY_LEN];\n+ \t\t\t\t\t\t/* Protocol is not used anymore, but kept in case\n+ \t\t\t\t\t\t * it is useful in the future. bjm 2001-02-10\n+ \t\t\t\t\t\t */\n \tchar\t\t\t\tprotocol[SMALL_REGISTRY_LEN];\n \tFILE*\t\t\t\tmylogFP;\n \tFILE*\t\t\t\tqlogFP;\t\n } GLOBAL_VALUES;\nIndex: src/interfaces/odbc/resource.h\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/resource.h,v\nretrieving revision 1.11\ndiff -c -r1.11 resource.h\n*** src/interfaces/odbc/resource.h\t2001/01/26 22:41:59\t1.11\n--- src/interfaces/odbc/resource.h\t2001/02/10 06:25:32\n***************\n*** 19,25 ****\n #define DS_SHOWOIDCOLUMN 1012\n #define DS_FAKEOIDINDEX 1013\n #define DRV_COMMLOG 1014\n- #define DS_PG62 1016\n #define IDC_DATASOURCE 1018\n #define DRV_OPTIMIZER 1019\n #define DS_CONNSETTINGS 1020\n--- 19,24 ----\n***************\n*** 48,54 ****\n #define IDC_OPTIONS 1054\n #define DRV_KSQO 1055\n #define DS_PG64 1057\n- #define DS_PG63 1058\n \n /* Next default values for new objects */\n \n--- 47,52 ----", "msg_date": "Sat, 10 Feb 2001 01:32:10 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] 6.2 protocol" }, { "msg_contents": "> -----Original Message-----\n> From: Bruce Momjian\n> \n> OK, I have applied the following patch to remove ODBC protocol-version\n> handling. I have kept the protocol-version fields and assignments, in\n> case it is useful in the future. Comments?\n> \n\nHmm, could only you 2 decide it so quickly ?\nFor whom pgsql ODBC driver is ?\n\nRegards,\nHiroshi Inoue\n", "msg_date": "Sat, 10 Feb 2001 23:21:37 +0900", "msg_from": "\"Hiroshi Inoue\" <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "RE: [PATCHES] Re: [HACKERS] 6.2 protocol" }, { "msg_contents": "> > -----Original Message-----\n> > From: Bruce Momjian\n> > \n> > OK, I have applied the following patch to remove ODBC protocol-version\n> > handling. I have kept the protocol-version fields and assignments, in\n> > case it is useful in the future. Comments?\n> > \n> \n> Hmm, could only you 2 decide it so quickly ?\n> For whom pgsql ODBC driver is ?\n\nI can put it back. You want it back?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 10:15:54 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: RE: [PATCHES] Re: [HACKERS] 6.2 protocol" }, { "msg_contents": "> -----Original Message-----\n> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]\n>\n> > > -----Original Message-----\n> > > From: Bruce Momjian\n> > >\n> > > OK, I have applied the following patch to remove ODBC protocol-version\n> > > handling. I have kept the protocol-version fields and assignments, in\n> > > case it is useful in the future. Comments?\n> > >\n> >\n> > Hmm, could only you 2 decide it so quickly ?\n> > For whom pgsql ODBC driver is ?\n>\n> I can put it back. You want it back?\n>\n\nYes.\nISTM discussion is needed before the change.\n\nRegards,\nHiroshi Inoue\n\n", "msg_date": "Sun, 11 Feb 2001 06:36:40 +0900", "msg_from": "\"Hiroshi Inoue\" <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "RE: RE: [PATCHES] Re: [HACKERS] 6.2 protocol" }, { "msg_contents": "> > > Hmm, could only you 2 decide it so quickly ?\n> > > For whom pgsql ODBC driver is ?\n> >\n> > I can put it back. You want it back?\n> >\n> \n> Yes.\n> ISTM discussion is needed before the change.\n\nOK, let's discuss. Why should ODBC still support 6.3 and 6.2 databases?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 16:38:03 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: RE: [PATCHES] Re: [HACKERS] 6.2 protocol" } ]
[ { "msg_contents": "I am having problems linking ODBC on bsdi. They look like crt1.o\nsymbols. Any ideas? Libpq links with a similar line, and works fine.\n\n\n---------------------------------------------------------------------------\n\n#$ gmake\n/usr/bin/ld -shared -soname libpsqlodbc.so.0 -Bsymbolic info.o bind.o\ncolumninfo.o connection.o convert.o drvconn.o environ.o execute.o lobj.o\nmisc.o options.o pgtypes.o psqlodbc.o qresult.o results.o socket.o\nparse.o statement.o gpps.o tuple.o tuplelist.o dlg_specific.o \n-L/usr/local/lib -L/usr/contrib/lib -lm -lc -o libpsqlodbc.so.0.26\n/usr/bin/../lib/libc.a(syslog.o): In function `vsyslog':\nsyslog.o(.text+0x33e): undefined reference to `__progname'\n/usr/bin/../lib/libc.a(malloc.o)(.text+0xe): undefined reference to\n`__progname'\n/usr/bin/../lib/libc.a(malloc.o)(.text+0xc9): undefined reference to\n`__progname'\n/usr/bin/../lib/libc.a(getenv.o): In function `__findenv':\ngetenv.o(.text+0x5a): undefined reference to `environ'\ngetenv.o(.text+0x68): undefined reference to `environ'\ngetenv.o(.text+0x95): undefined reference to `environ'\ngmake: *** [libpsqlodbc.so.0.26] Error 1\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Fri, 9 Feb 2001 21:55:12 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Link problems" } ]
[ { "msg_contents": "I have applied the following patch to properly exit ODBC. I also\npatched the ODBC makefile so it links under BSD/OS. The -Bsymbolic\nunder BSD/OS is very harsh under BSD/OS, requiring all symbols even in\nlibc and crt1.o to be resolved before creating the shared library.\n\nMy 'ld' manual says:\n\n -Bsymbolic\n When creating a shared library, bind references to\n global symbols to the definition within the shared\n library, if any. Normally, it is possible for a\n program linked against a shared library to override\n the definition within the shared library. This op-\n tion is only meaningful on ELF platforms which sup-\n port shared libraries.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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\nIndex: src/interfaces/odbc/GNUmakefile\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v\nretrieving revision 1.8\ndiff -c -r1.8 GNUmakefile\n*** src/interfaces/odbc/GNUmakefile\t2000/12/16 18:14:25\t1.8\n--- src/interfaces/odbc/GNUmakefile\t2001/02/10 04:25:23\n***************\n*** 24,30 ****\n gpps.o tuple.o tuplelist.o dlg_specific.o $(OBJX)\n \n SHLIB_LINK = $(filter -lm, $(LIBS))\n- \n all: all-lib\n \n # Shared library stuff\n--- 24,29 ----\n***************\n*** 33,39 ****\n--- 32,46 ----\n # Symbols must be resolved to the version in the shared library because\n # the driver manager (e.g., iodbc) provides some symbols with the same\n # names and we don't want those. (This issue is probably ELF specific.)\n+ #\n+ # BSD/OS fails with libc and crt1.o undefined symbols without this.\n+ # bjm 2001-02-09\n+ #\n+ ifneq ($(PORTNAME), bsdi)\n LINK.shared += $(shlib_symbolic)\n+ endif\n \n odbc_headers = isql.h isqlext.h iodbc.h\n odbc_includedir = $(includedir)/iodbc\nIndex: src/interfaces/odbc/socket.c\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/socket.c,v\nretrieving revision 1.7\ndiff -c -r1.7 socket.c\n*** src/interfaces/odbc/socket.c\t2000/05/27 03:35:14\t1.7\n--- src/interfaces/odbc/socket.c\t2001/02/10 04:25:29\n***************\n*** 1,4 ****\n- \n /* Module: socket.c\n *\n * Description: This module contains functions for low level socket\n--- 1,3 ----\n***************\n*** 78,84 ****\n--- 77,87 ----\n {\n \tif (self->socket != -1) {\n \t\tif ( ! shutdown(self->socket, 2)) /* no sends or receives */\n+ \t\t{\n+ \t\t\tSOCK_put_char(self, 'X');\n+ \t\t\tSOCK_flush_output(self);\n \t\t\tclosesocket(self->socket);\n+ \t\t}\n \t}\n \n \tif (self->buffer_in)", "msg_date": "Sat, 10 Feb 2001 00:46:26 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Fix for ODBC close" }, { "msg_contents": "Bruce Momjian writes:\n\n> I have applied the following patch to properly exit ODBC. I also\n> patched the ODBC makefile so it links under BSD/OS. The -Bsymbolic\n> under BSD/OS is very harsh under BSD/OS, requiring all symbols even in\n> libc and crt1.o to be resolved before creating the shared library.\n\nThe -Bsymbolic switch is the same on all platforms that have it. You can\nlink without it, but then you won't actually be able to use the ODBC\ndriver. It seems like you need to link in a few other libraries to\nresolve all symbols.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Sat, 10 Feb 2001 10:38:39 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: [PATCHES] Fix for ODBC close" }, { "msg_contents": "> Bruce Momjian writes:\n> \n> > I have applied the following patch to properly exit ODBC. I also\n> > patched the ODBC makefile so it links under BSD/OS. The -Bsymbolic\n> > under BSD/OS is very harsh under BSD/OS, requiring all symbols even in\n> > libc and crt1.o to be resolved before creating the shared library.\n> \n> The -Bsymbolic switch is the same on all platforms that have it. You can\n> link without it, but then you won't actually be able to use the ODBC\n> driver. It seems like you need to link in a few other libraries to\n> resolve all symbols.\n\nOK, if this is true on all platforms, why isn't -lc needed?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 05:54:58 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: [PATCHES] Fix for ODBC close" }, { "msg_contents": "> > Bruce Momjian writes:\n> > \n> > > I have applied the following patch to properly exit ODBC. I also\n> > > patched the ODBC makefile so it links under BSD/OS. The -Bsymbolic\n> > > under BSD/OS is very harsh under BSD/OS, requiring all symbols even in\n> > > libc and crt1.o to be resolved before creating the shared library.\n> > \n> > The -Bsymbolic switch is the same on all platforms that have it. You can\n> > link without it, but then you won't actually be able to use the ODBC\n> > driver. It seems like you need to link in a few other libraries to\n> > resolve all symbols.\n> \n> OK, if this is true on all platforms, why isn't -lc needed?\n> \n\nAnd if -lc is somehow done by default with ld -Bsymbolic, how do I deal\nwith a link that accesses crt1.o startup symbols, like environ and\n__progname?\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 05:57:56 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: [ODBC] Re: [PATCHES] Fix for ODBC closeu" }, { "msg_contents": "> > > Bruce Momjian writes:\n> > > \n> > > > I have applied the following patch to properly exit ODBC. I also\n> > > > patched the ODBC makefile so it links under BSD/OS. The -Bsymbolic\n> > > > under BSD/OS is very harsh under BSD/OS, requiring all symbols even in\n> > > > libc and crt1.o to be resolved before creating the shared library.\n> > > \n> > > The -Bsymbolic switch is the same on all platforms that have it. You can\n> > > link without it, but then you won't actually be able to use the ODBC\n> > > driver. It seems like you need to link in a few other libraries to\n> > > resolve all symbols.\n> > \n> > OK, if this is true on all platforms, why isn't -lc needed?\n> > \n> \n> And if -lc is somehow done by default with ld -Bsymbolic, how do I deal\n> with a link that accesses crt1.o startup symbols, like environ and\n> __progname?\n> \n\nOK, the following fixes the link on BSDI, while allowing -Bsymbolic. I\nhave to explicitly include -R crt1.o to be used to resolve symbols, but\nnot to be linked in. Without -R, I get undefined 'main' which makes\nsense.\n\nI am still confused why other OS's work, unless -lc is assumed by ld,\nand their libc's have no crt1.o references.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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\nIndex: src/interfaces/odbc/GNUmakefile\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v\nretrieving revision 1.9\ndiff -c -r1.9 GNUmakefile\n*** src/interfaces/odbc/GNUmakefile\t2001/02/10 05:50:27\t1.9\n--- src/interfaces/odbc/GNUmakefile\t2001/02/10 11:26:13\n***************\n*** 36,43 ****\n # BSD/OS fails with libc and crt1.o undefined symbols without this.\n # bjm 2001-02-09\n #\n- ifneq ($(PORTNAME), bsdi)\n LINK.shared += $(shlib_symbolic)\n endif\n \n odbc_headers = isql.h isqlext.h iodbc.h\n--- 36,44 ----\n # BSD/OS fails with libc and crt1.o undefined symbols without this.\n # bjm 2001-02-09\n #\n LINK.shared += $(shlib_symbolic)\n+ ifeq ($(PORTNAME), bsdi)\n+ SHLIB_LINK += -lc -R /usr/lib/crt1.o\n endif\n \n odbc_headers = isql.h isqlext.h iodbc.h", "msg_date": "Sat, 10 Feb 2001 06:31:12 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Re: [ODBC] Re: [PATCHES] Fix for ODBC closeu" }, { "msg_contents": "Bruce Momjian writes:\n\n> > The -Bsymbolic switch is the same on all platforms that have it. You can\n> > link without it, but then you won't actually be able to use the ODBC\n> > driver. It seems like you need to link in a few other libraries to\n> > resolve all symbols.\n>\n> OK, if this is true on all platforms, why isn't -lc needed?\n\nTheory 1: Many other platforms use the compiler driver ([g]cc) to link\nshared libraries. That makes all the right things happen. Most likely\nthis should happen on a lot more platforms that currently use ld directly.\n\nTheory 2: Not many people have tried to build the ODBC driver on\nnon-mainstream platforms.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Sat, 10 Feb 2001 12:53:44 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: [PATCHES] Fix for ODBC close" }, { "msg_contents": "> Bruce Momjian writes:\n> \n> > > The -Bsymbolic switch is the same on all platforms that have it. You can\n> > > link without it, but then you won't actually be able to use the ODBC\n> > > driver. It seems like you need to link in a few other libraries to\n> > > resolve all symbols.\n> >\n> > OK, if this is true on all platforms, why isn't -lc needed?\n> \n> Theory 1: Many other platforms use the compiler driver ([g]cc) to link\n> shared libraries. That makes all the right things happen. Most likely\n> this should happen on a lot more platforms that currently use ld directly.\n> \n> Theory 2: Not many people have tried to build the ODBC driver on\n> non-mainstream platforms.\n\nI just tried gcc and got:\n\n#$ gcc -shared -soname libpsqlodbc.so.0 -Bsymbolic info.o bind.o\ncolumninfo.o connection.o convert.o drvconn.o environ.o execute.o lobj.o\nmisc.o options.o pgtypes.o psqlodbc.o qresult.o results.o socket.o\nparse.o statement.o gpps.o tuple.o tuplelist.o dlg_specific.o \n-L/usr/local/lib -L/usr/contrib/lib -lm -o libpsqlodbc.so.0.26\ngcc: unrecognized option `-soname'\ngcc: file path prefix `symbolic' never used\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 06:55:58 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Re: [PATCHES] Fix for ODBC close" }, { "msg_contents": "Bruce Momjian writes:\n\n> I just tried gcc and got:\n>\n> #$ gcc -shared -soname libpsqlodbc.so.0 -Bsymbolic info.o bind.o\n> columninfo.o connection.o convert.o drvconn.o environ.o execute.o lobj.o\n> misc.o options.o pgtypes.o psqlodbc.o qresult.o results.o socket.o\n> parse.o statement.o gpps.o tuple.o tuplelist.o dlg_specific.o\n> -L/usr/local/lib -L/usr/contrib/lib -lm -o libpsqlodbc.so.0.26\n> gcc: unrecognized option `-soname'\n> gcc: file path prefix `symbolic' never used\n\nTry gcc -shared -Wl,-soname,libpsqlodbc.so.0 -Wl,-Bsymbolic ...\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Sat, 10 Feb 2001 13:25:10 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Re: [PATCHES] Fix for ODBC close" }, { "msg_contents": "> Bruce Momjian writes:\n> \n> > I just tried gcc and got:\n> >\n> > #$ gcc -shared -soname libpsqlodbc.so.0 -Bsymbolic info.o bind.o\n> > columninfo.o connection.o convert.o drvconn.o environ.o execute.o lobj.o\n> > misc.o options.o pgtypes.o psqlodbc.o qresult.o results.o socket.o\n> > parse.o statement.o gpps.o tuple.o tuplelist.o dlg_specific.o\n> > -L/usr/local/lib -L/usr/contrib/lib -lm -o libpsqlodbc.so.0.26\n> > gcc: unrecognized option `-soname'\n> > gcc: file path prefix `symbolic' never used\n> \n> Try gcc -shared -Wl,-soname,libpsqlodbc.so.0 -Wl,-Bsymbolic ...\n\nOK, this works:\n\n\tgcc -shared -Wl,-Bsymbolic,-soname,libpsqlodbc.so.0 info.o bind.o\n\tcolumninfo.o connection.o convert.o drvconn.o environ.o execute.o lobj.o\n\tmisc.o options.o pgtypes.o psqlodbc.o qresult.o results.o socket.o\n\tparse.o statement.o gpps.o tuple.o tuplelist.o dlg_specific.o \n\t-L/usr/local/lib -L/usr/contrib/lib -lm -lc -o libpsqlodbc.so.0.26\n\nI replaced the 'ld' with 'gcc -Wl', and that prevents the need for the\ncrt1.o.\n\nIt still requires -lc:\n\n\tifneq ($(PORTNAME), bsdi)\n\tLINK.shared += $(shlib_symbolic)\n\telse\n\tLINK.shared = gcc -shared -Wl,-Bsymbolic,-soname,$(soname)\n\tSHLIB_LINK += -lc\n\tendif\n\nIt seems the -Bsymbolic needs the gcc, while other links are OK with ld.\nWe may find this is true on many platforms.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 10:58:19 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Re: [PATCHES] Fix for ODBC close" }, { "msg_contents": "> You can't hardcode \"gcc\" like that. I've committed some fixes that should\n> work for you. Please try them out. Also try to build libpq++.\n> \n> > It seems the -Bsymbolic needs the gcc, while other links are OK with ld.\n> > We may find this is true on many platforms.\n> \n> -Bsymbolic requires all symbols in the library to be resolvable at link\n> time. If you use 'ld' then you will need to provide all the appropriate\n> files yourself. The compiler driver normally does that automatically.\n> \n\nGreat. I see you modified Makefile.bsdi to properly know it is being\nused with gcc, and modified Makefile.shlib. Perfect.\n\nShould other platforms have this fix too? We didn't need it before\n-Bsymbolic, but it seems it would be safe to do for FreeBSD and a few\nothers.\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 12:01:23 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Re: [PATCHES] Fix for ODBC close" }, { "msg_contents": "Bruce Momjian writes:\n\n> I replaced the 'ld' with 'gcc -Wl', and that prevents the need for the\n> crt1.o.\n>\n> It still requires -lc:\n>\n> \tifneq ($(PORTNAME), bsdi)\n> \tLINK.shared += $(shlib_symbolic)\n> \telse\n> \tLINK.shared = gcc -shared -Wl,-Bsymbolic,-soname,$(soname)\n> \tSHLIB_LINK += -lc\n> \tendif\n\nYou can't hardcode \"gcc\" like that. I've committed some fixes that should\nwork for you. Please try them out. Also try to build libpq++.\n\n> It seems the -Bsymbolic needs the gcc, while other links are OK with ld.\n> We may find this is true on many platforms.\n\n-Bsymbolic requires all symbols in the library to be resolvable at link\ntime. If you use 'ld' then you will need to provide all the appropriate\nfiles yourself. The compiler driver normally does that automatically.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Sat, 10 Feb 2001 18:03:34 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Re: [PATCHES] Fix for ODBC close" }, { "msg_contents": "> > -Bsymbolic requires all symbols in the library to be resolvable at link\n> > time. If you use 'ld' then you will need to provide all the appropriate\n> > files yourself. The compiler driver normally does that automatically.\n> > \n> \n> Great. I see you modified Makefile.bsdi to properly know it is being\n> used with gcc, and modified Makefile.shlib. Perfect.\n> \n> Should other platforms have this fix too? We didn't need it before\n> -Bsymbolic, but it seems it would be safe to do for FreeBSD and a few\n> others.\n\nI have applied the following patch for OpenBSD and FreeBSD. They have\nthe same -Bsymbolic handling and same use of LD for linking. I made the\nduplicate changes Peter made for BSDI.\n\nCan anyone commend on the use of 'ld -x' to delete all local symbols?\nFreeBSD and OpenBSD have it, while BSD/OS does not. I added it to BSDi,\nand it seems to work fine.\n\nActually, it seems NetBSD already had all these fixes.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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\nIndex: src/Makefile.shlib\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/Makefile.shlib,v\nretrieving revision 1.41\ndiff -c -r1.41 Makefile.shlib\n*** src/Makefile.shlib\t2001/02/10 16:51:39\t1.41\n--- src/Makefile.shlib\t2001/02/10 17:16:06\n***************\n*** 112,118 ****\n ifeq ($(PORTNAME), openbsd)\n shlib\t\t\t:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)\n ifdef ELF_SYSTEM\n! LINK.shared\t\t= $(LD) -x -Bshareable -soname $(soname)\n else\n LINK.shared\t\t= $(LD) -x -Bshareable -Bforcearchive\n endif\n--- 112,119 ----\n ifeq ($(PORTNAME), openbsd)\n shlib\t\t\t:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)\n ifdef ELF_SYSTEM\n! LINK.shared\t\t= $(COMPILER) -shared -Wl,-x,-soname,$(soname)\n! SHLIB_LINK\t\t+= -lc\n else\n LINK.shared\t\t= $(LD) -x -Bshareable -Bforcearchive\n endif\n***************\n*** 121,127 ****\n ifeq ($(PORTNAME), bsdi)\n shlib\t\t\t:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)\n ifeq ($(DLSUFFIX), .so)\n! LINK.shared\t\t= $(COMPILER) -shared -Wl,-soname,$(soname)\n SHLIB_LINK\t\t+= -lc\n endif\n ifeq ($(DLSUFFIX), .o)\n--- 122,128 ----\n ifeq ($(PORTNAME), bsdi)\n shlib\t\t\t:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)\n ifeq ($(DLSUFFIX), .so)\n! LINK.shared\t\t= $(COMPILER) -shared -Wl,-x,-soname,$(soname)\n SHLIB_LINK\t\t+= -lc\n endif\n ifeq ($(DLSUFFIX), .o)\n***************\n*** 132,138 ****\n ifeq ($(PORTNAME), freebsd)\n ifdef ELF_SYSTEM\n shlib\t\t:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)\n! LINK.shared\t\t= $(LD) -x -shared -soname $(soname)\n else\n shlib\t\t:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)\n LINK.shared\t\t= $(LD) -x -Bshareable -Bforcearchive\n--- 133,140 ----\n ifeq ($(PORTNAME), freebsd)\n ifdef ELF_SYSTEM\n shlib\t\t:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)\n! LINK.shared\t\t= $(COMPILER) -shared -Wl,-x,-soname,$(soname)\n! SHLIB_LINK\t\t+= -lc\n else\n shlib\t\t:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)\n LINK.shared\t\t= $(LD) -x -Bshareable -Bforcearchive\n***************\n*** 142,148 ****\n ifeq ($(PORTNAME), netbsd)\n shlib\t\t\t:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)\n ifdef ELF_SYSTEM\n! LINK.shared\t\t= $(COMPILER) -shared -Wl,-soname,$(soname)\n else\n LINK.shared\t\t= $(LD) -x -Bshareable -Bforcearchive\n endif\n--- 144,150 ----\n ifeq ($(PORTNAME), netbsd)\n shlib\t\t\t:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)\n ifdef ELF_SYSTEM\n! LINK.shared\t\t= $(COMPILER) -shared -Wl,-x,-soname,$(soname)\n else\n LINK.shared\t\t= $(LD) -x -Bshareable -Bforcearchive\n endif\nIndex: src/makefiles/Makefile.freebsd\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/makefiles/Makefile.freebsd,v\nretrieving revision 1.13\ndiff -c -r1.13 Makefile.freebsd\n*** src/makefiles/Makefile.freebsd\t2000/12/16 18:14:25\t1.13\n--- src/makefiles/Makefile.freebsd\t2001/02/10 17:16:07\n***************\n*** 3,9 ****\n ifdef ELF_SYSTEM\n export_dynamic = -export-dynamic\n rpath = -R$(libdir)\n! shlib_symbolic = -Bsymbolic\n endif\n \n DLSUFFIX = .so\n--- 3,9 ----\n ifdef ELF_SYSTEM\n export_dynamic = -export-dynamic\n rpath = -R$(libdir)\n! shlib_symbolic = -Wl,-Bsymbolic\n endif\n \n DLSUFFIX = .so\nIndex: src/makefiles/Makefile.openbsd\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/makefiles/Makefile.openbsd,v\nretrieving revision 1.6\ndiff -c -r1.6 Makefile.openbsd\n*** src/makefiles/Makefile.openbsd\t2000/12/16 18:14:25\t1.6\n--- src/makefiles/Makefile.openbsd\t2001/02/10 17:16:07\n***************\n*** 3,9 ****\n ifdef ELF_SYSTEM\n export_dynamic = -Wl,-E\n rpath = -R$(libdir)\n! shlib_symbolic = -Bsymbolic\n endif\n \n DLSUFFIX = .so\n--- 3,9 ----\n ifdef ELF_SYSTEM\n export_dynamic = -Wl,-E\n rpath = -R$(libdir)\n! shlib_symbolic = -Wl,-Bsymbolic\n endif\n \n DLSUFFIX = .so", "msg_date": "Sat, 10 Feb 2001 12:17:13 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Re: [PATCHES] Fix for ODBC close" }, { "msg_contents": "Bruce Momjian writes:\n\n> I have applied the following patch for OpenBSD and FreeBSD. They have\n> the same -Bsymbolic handling and same use of LD for linking. I made the\n> duplicate changes Peter made for BSDI.\n\nHmm, at least on OpenBSD the recommended way to build shared libraries is\nusing 'ld' directly. But using gcc should work as well.\n\n> Can anyone commend on the use of 'ld -x' to delete all local symbols?\n> FreeBSD and OpenBSD have it, while BSD/OS does not. I added it to BSDi,\n> and it seems to work fine.\n\nI don't think it should be used.\n\n> Actually, it seems NetBSD already had all these fixes.\n\nOn NetBSD, there are about 4 different ways of build shared libraries,\ndepending on version and platform. Nothing I wanna mess with.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Sat, 10 Feb 2001 19:09:23 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Re: [PATCHES] Fix for ODBC close" }, { "msg_contents": "pgman@candle.pha.pa.us wrote:\n\n> I have applied the following patch to properly exit ODBC. I also\n> patched the ODBC makefile so it links under BSD/OS. The -Bsymbolic\n> under BSD/OS is very harsh under BSD/OS, requiring all symbols even in\n> libc and crt1.o to be resolved before creating the shared library.\n>\n> My 'ld' manual says:\n>\n> -Bsymbolic\n> When creating a shared library, bind references to\n> global symbols to the definition within the shared\n> library, if any. Normally, it is possible for a\n> program linked against a shared library to override\n> the definition within the shared library. This op-\n> tion is only meaningful on ELF platforms which sup-\n> port shared libraries.\n\nHmm,\n\nremoving that may break it when running under a driver manager though...\n\nI will check of FreeBSD, it certainly will on Linux ELF.\n\n--\nNick Gorham\nWhen I die, I want to go like my grandfather did, gently while sleeping,\nand not like his passangers, screaming in a panic, looking for the\ninflatable raft. -- Seen on ./\n\n\n\n", "msg_date": "Sat, 10 Feb 2001 18:25:27 +0000", "msg_from": "Nick Gorham <nick@lurcher.org>", "msg_from_op": false, "msg_subject": "Re: [PATCHES] Fix for ODBC close" }, { "msg_contents": "> Bruce Momjian writes:\n> \n> > I have applied the following patch for OpenBSD and FreeBSD. They have\n> > the same -Bsymbolic handling and same use of LD for linking. I made the\n> > duplicate changes Peter made for BSDI.\n> \n> Hmm, at least on OpenBSD the recommended way to build shared libraries is\n> using 'ld' directly. But using gcc should work as well.\n\n> > Can anyone commend on the use of 'ld -x' to delete all local symbols?\n> > FreeBSD and OpenBSD have it, while BSD/OS does not. I added it to BSDi,\n> > and it seems to work fine.\n> \n> I don't think it should be used.\n\nCan someone comment on why people would have added that?\n\n> \n> > Actually, it seems NetBSD already had all these fixes.\n> \n> On NetBSD, there are about 4 different ways of build shared libraries,\n> depending on version and platform. Nothing I wanna mess with.\n\nYes, BSDI has even more, but I think we are now doing the same thing on\nall the bsd's. Interesting that NetBSD was the only \"right\" one.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 13:42:31 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Re: [PATCHES] Fix for ODBC close" } ]
[ { "msg_contents": "I have removed the following open item by adding the other mysql\nconversion utility to the CVS tree in /contrib/mysql:\n\n\tMerge MySQL/PgSQL translation scripts\n\nIf someone wants to merge them and make one script out of them, go\nahead. Both are BSD licensed now.\n\nThe only remaining source code items are pretty exotic and will have to\nbe discussed. Thanks for shrinking this list so fast.\n\n---------------------------------------------------------------------------\n\n\n P O S T G R E S Q L\n\n 7 . 1 O P E N I T E M S\n\n\nCurrent at ftp://candle.pha.pa.us/pub/postgresql/open_items.\n\n\nSource Code Changes\n-------------------\nLAZY VACUUM (Vadim)\nvisibility of joined columns in JOIN clauses\nStuck btree spinlocks\n\n\nDocumentation Changes\n---------------------\nJDBC improvements (Peter, Travis Bauer, Christopher Cain, William Webber,\n Gunnar)\nODBC cleanups/improvements (Nick Gorham, Stephan Szabo, Zoltan Kovacs, \n Michael Fork)\nNew ALTER TABLE ADD CONSTRAINT (Stephan)\nNew PL/pgSQL GET DIAGNOSTICS statement for SPI value access (Jan)\nStore tables as files named by OID (Vadim)\nNew SQL function setval(seq,val,bool) for use in pg_dump (Philip)\nNew /contrib/rserv replication toolkit (Vadim)\nNew /contrib/oid2name to map numeric files to table names (B Palmer)\nNew pg_class.relkind value for views (Mark Hollomon)\nMoved macmanuf to /contrib (Larry Rosenman)\nAllow NetBSD's libedit instead of readline (Peter)\nImprove PL/PgSQL documenation (?)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 06:53:36 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Open 7.1 items" } ]
[ { "msg_contents": "I am inclinded to remove this open item:\n\n\tNew SQL function setval(seq,val,bool) for use in pg_dump (Philip)\n\nThe use of the 3rd parameter, 'iscalled', while used by pg_dump, is not\nof general use, so we probably don't need to document it. Is this valid?\n\nInfo on the new param is:\n\n---------------------------------------------------------------------------\n\nIRC the point of the nextval() is to ensure that the internal state of\nthe sequence is correct. There's a bool \"is_called\" in the sequence\nthat means something like \"I've been nextval()'d at least once\", and the\nonly clean way to make that become set is to issue a nextval. You can\nwatch the behavior by doing \"select * from sequenceobject\" between\nsequence commands --- it looks like the first nextval() simply sets\nis_called without changing last_value, and then subsequent nextval()s\nincrement last_value. (This peculiar arrangement makes it possible\nto have a starting value equal to MININT, should you want to do so.)\nSo pg_dump needs to make sure it restores the correct setting of both\nfields.\n\nThis is pretty grotty because it looks like there's no way to clear\nis_called again, short of dropping and recreating the sequence.\nSo unless you want to do that always, a data-only restore couldn't\nguarantee to restore the state of a virgin sequence.\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 12:23:52 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "New setval() call" }, { "msg_contents": "At 12:23 10/02/01 -0500, Bruce Momjian wrote:\n>I am inclinded to remove this open item:\n>\n>\tNew SQL function setval(seq,val,bool) for use in pg_dump (Philip)\n>\n>The use of the 3rd parameter, 'iscalled', while used by pg_dump, is not\n>of general use, so we probably don't need to document it. Is this valid?\n>\n>Info on the new param is:\n\nFine with me; I think your recollection is correct - but it would be worth\nputting a description *somewhere*. Do we have an internals doc of any kind?\nSomething that describes interfaces etc that are not guaranteed to remain\nstatic or supported?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Sun, 11 Feb 2001 10:32:00 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: New setval() call" }, { "msg_contents": "> At 12:23 10/02/01 -0500, Bruce Momjian wrote:\n> >I am inclinded to remove this open item:\n> >\n> >\tNew SQL function setval(seq,val,bool) for use in pg_dump (Philip)\n> >\n> >The use of the 3rd parameter, 'iscalled', while used by pg_dump, is not\n> >of general use, so we probably don't need to document it. Is this valid?\n> >\n> >Info on the new param is:\n> \n> Fine with me; I think your recollection is correct - but it would be worth\n> putting a description *somewhere*. Do we have an internals doc of any kind?\n> Something that describes interfaces etc that are not guaranteed to remain\n> static or supported?\n\nCan you give me a few lines to put in sequence.c? There isn't even\nanything in there!\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 18:34:20 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: New setval() call" }, { "msg_contents": "At 18:34 10/02/01 -0500, Bruce Momjian wrote:\n>\n>Can you give me a few lines to put in sequence.c? There isn't even\n>anything in there!\n>\n\nI've now put comments on setval, setval_is_called and do_setval. 3 for the\nprice of one.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Tue, 13 Feb 2001 12:58:32 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: New setval() call" } ]
[ { "msg_contents": "Here is info about distributed lock manager by IBM:\n\n http://oss.software.ibm.com/developerworks/opensource/linux/projects/dlm/\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 16:11:53 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Distributed lock manager" } ]
[ { "msg_contents": "\n\n> -----Original Message-----\n> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]\n> Sent: 10 February 2001 05:46\n> To: PostgreSQL odbc list; PostgreSQL-patches\n> Cc: PostgreSQL-development\n> Subject: [PATCHES] Fix for ODBC close\n> \n> \n> I have applied the following patch to properly exit ODBC. \n\n<Snip>\n\nI just compiled from the current cvs under win32 and I still get\n'pq_recvbuf: unexpected EOF on client connection' when exiting apps using\nthe ODBC driver. I have tested with pgAdmin which uses ADO (ActiveX Data\nObjects) and certainly closes the ADO connection object on exit, as well as\na simple test app using DAO (Data Access Objects). I did have a go at fixing\nthis myself when Bruce first mentioned it, and had exactly the same results\nwith similar code :-(\n\nRegards, \n\nDave.\n", "msg_date": "Sat, 10 Feb 2001 23:15:18 -0000", "msg_from": "Dave Page <dpage@vale-housing.co.uk>", "msg_from_op": true, "msg_subject": "RE: [PATCHES] Fix for ODBC close" }, { "msg_contents": "OK, I have ifdef'ed out the sending of the 'X' parameter. I will see if\nplacing it somewhere else will help. Could it have to do with the fact\nwe are in a transaction in ODBC? My guess is that the X is returning\ndata that is triggering the error.\n\n[ Charset ISO-8859-1 unsupported, converting... ]\n> \n> \n> > -----Original Message-----\n> > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]\n> > Sent: 10 February 2001 05:46\n> > To: PostgreSQL odbc list; PostgreSQL-patches\n> > Cc: PostgreSQL-development\n> > Subject: [PATCHES] Fix for ODBC close\n> > \n> > \n> > I have applied the following patch to properly exit ODBC. \n> \n> <Snip>\n> \n> I just compiled from the current cvs under win32 and I still get\n> 'pq_recvbuf: unexpected EOF on client connection' when exiting apps using\n> the ODBC driver. I have tested with pgAdmin which uses ADO (ActiveX Data\n> Objects) and certainly closes the ADO connection object on exit, as well as\n> a simple test app using DAO (Data Access Objects). I did have a go at fixing\n> this myself when Bruce first mentioned it, and had exactly the same results\n> with similar code :-(\n> \n> Regards, \n> \n> Dave.\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 18:35:50 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [ODBC] RE: [PATCHES] Fix for ODBC close" }, { "msg_contents": "OK, I have a pretty good guess about the cause of the ODBC shutdown\nfailure message in the server logs. Sending 'X' is still causing the\nerror message.\n\nThe error you are seeing is from the backend libpq code, the area that\ncommunicates with clients.\n\nSo, let's assume the problem is not the platform, but the client code. \nLibpq properly shuts connections without triggering that message. ODBC\ndoes trigger the message.\n\nlibpq closes connections with:\n\n\t\t(void) pqPuts(\"X\", conn);\n\t\t(void) pqFlush(conn);\n\nwhile ODBC closes with:\n\n\t\tSOCK_put_char(self, 'X');\n\t\tSOCK_flush_output(self);\n\nThey then close() the socket.\n\nIt seems the difference is in the flushing. libpq has elaborate flush\ncode:\n\n\twhile (len > 0)\n\t{\n\t\t\tsent = send(conn->sock, ptr, len, 0);\n\t\t\tlen -= sent;\n\n\t\t\tif (pqWait(FALSE, TRUE, conn))\n\t}\n\nand pqWait does:\n\n\t\tif (select(conn->sock + 1, &input_mask, &output_mask, (fd_set *) NULL,\n\n\nFor flush, ODBC does a simple:\n\n\twritten = send(self->socket, (char *) self->buffer_out, self->buffer_filled_out, 0);\n\n\nIt seems we may need to add flush code similar to libpq in ODBC.\n\nAt a minimum, we have to put the send() in a loop and keep going until\nthere are no more bytes to send. Not sure the select() is required.\n\nComments?\n\nAfter I receive comments, I will prepare a patch people can test.\n\n\n---------------------------------------------------------------------------\n\n\n\n. > OK, I have ifdef'ed out the sending of the 'X' parameter. I will see if\n> placing it somewhere else will help. Could it have to do with the fact\n> we are in a transaction in ODBC? My guess is that the X is returning\n> data that is triggering the error.\n> \n> [ Charset ISO-8859-1 unsupported, converting... ]\n> > \n> > \n> > > -----Original Message-----\n> > > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]\n> > > Sent: 10 February 2001 05:46\n> > > To: PostgreSQL odbc list; PostgreSQL-patches\n> > > Cc: PostgreSQL-development\n> > > Subject: [PATCHES] Fix for ODBC close\n> > > \n> > > \n> > > I have applied the following patch to properly exit ODBC. \n> > \n> > <Snip>\n> > \n> > I just compiled from the current cvs under win32 and I still get\n> > 'pq_recvbuf: unexpected EOF on client connection' when exiting apps using\n> > the ODBC driver. I have tested with pgAdmin which uses ADO (ActiveX Data\n> > Objects) and certainly closes the ADO connection object on exit, as well as\n> > a simple test app using DAO (Data Access Objects). I did have a go at fixing\n> > this myself when Bruce first mentioned it, and had exactly the same results\n> > with similar code :-(\n> > \n> > Regards, \n> > \n> > Dave.\n> > \n> \n> \n> -- \n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 11 Feb 2001 01:30:57 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [ODBC] RE: [PATCHES] Fix for ODBC close" }, { "msg_contents": "> -----Original Message-----\n> From: Bruce Momjian\n> \n> OK, I have a pretty good guess about the cause of the ODBC shutdown\n> failure message in the server logs. Sending 'X' is still causing the\n> error message.\n> \n> The error you are seeing is from the backend libpq code, the area that\n> communicates with clients.\n> \n> while ODBC closes with:\n> \n> \t\tSOCK_put_char(self, 'X');\n> \t\tSOCK_flush_output(self);\n>\n\nProbably you have to put above code before calling\nshutdown() not after. shutdown(sock, 2) disables\nboth sends and receives on the socket.\n\nRegards,\nHiroshi Inoue \n\n", "msg_date": "Sun, 11 Feb 2001 22:10:56 +0900", "msg_from": "\"Hiroshi Inoue\" <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "RE: [ODBC] RE: [PATCHES] Fix for ODBC close" }, { "msg_contents": "> > -----Original Message-----\n> > From: Bruce Momjian\n> > \n> > OK, I have a pretty good guess about the cause of the ODBC shutdown\n> > failure message in the server logs. Sending 'X' is still causing the\n> > error message.\n> > \n> > The error you are seeing is from the backend libpq code, the area that\n> > communicates with clients.\n> > \n> > while ODBC closes with:\n> > \n> > \t\tSOCK_put_char(self, 'X');\n> > \t\tSOCK_flush_output(self);\n> >\n> \n> Probably you have to put above code before calling\n> shutdown() not after. shutdown(sock, 2) disables\n> both sends and receives on the socket.\n\nThanks. I was so focused on close() I never noticed the shutdown(). \nCan someone please test now?\n\nHiroshi, should I be concerned that a send() that does not send the full\npacket just returns an error and does not retry? Is libpq() so complex\nbecause of async connections?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 11 Feb 2001 08:17:13 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [ODBC] RE: [PATCHES] Fix for ODBC close" }, { "msg_contents": "+ SOCK_put_char(self, 'X');\n+ SOCK_flush_output(self);\n+ if (!shutdown(self->socket, 2)) /* no sends or receives */\n closesocket(self->socket);\n\nI think you should issue the close() whether the shutdown() succeeds or\nnot. Otherwise you have a file descriptor leak. In fact, given that\nyou're going to close the socket, the separate shutdown call is a\ncomplete waste of cycles. Take it out.\n\n> Hiroshi, should I be concerned that a send() that does not send the full\n> packet just returns an error and does not retry? Is libpq() so complex\n> because of async connections?\n\nRight, libpq only needs to loop because it runs the socket in nonblock\nmode. SOCK_flush_output looks OK to me. (SOCK_get_next_byte, on the\nother hand, goes wacko on error or close... probably should make it\nreturn a null character instead of random data.)\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 11 Feb 2001 13:19:17 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Re: [ODBC] RE: [PATCHES] Fix for ODBC close " }, { "msg_contents": "Bruce Momjian wrote:\n> \n> > > -----Original Message-----\n> > > From: Bruce Momjian\n> > >\n> > > OK, I have a pretty good guess about the cause of the ODBC shutdown\n> > > failure message in the server logs. Sending 'X' is still causing the\n> > > error message.\n> > >\n> > > The error you are seeing is from the backend libpq code, the area that\n> > > communicates with clients.\n> > >\n> > > while ODBC closes with:\n> > >\n> > > SOCK_put_char(self, 'X');\n> > > SOCK_flush_output(self);\n> > >\n> >\n> > Probably you have to put above code before calling\n> > shutdown() not after. shutdown(sock, 2) disables\n> > both sends and receives on the socket.\n> \n> Thanks. I was so focused on close() I never noticed the shutdown().\n> Can someone please test now?\n> \n\nI had already tested it in win32 environment before\nI posted my previous mail.\n\nRegards,\nHiroshi Inoue\n", "msg_date": "Mon, 12 Feb 2001 09:59:16 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: [ODBC] RE: [PATCHES] Fix for ODBC close" } ]
[ { "msg_contents": "I installed the ODBC driver for Postgre, and linked in a table which has a\nSerial field for the primary key. In MS Access, the type is shown as just\n\"Number (long integer)\".\n\nWhen I try to add new records to my database in Access, I don't put anything\ninto the key field because the server is supposed to generate it\nautomatically. But when my record is sent back to the server, it rejects it\nand Access displays \"#Deleted\" in all of the fields. Is this because Postgre\ncan't fill in the key field and so rejects it as an integrity constraint\nviolation? I don't get any errors from Access.\n\nShould my database create its own key values and store them itself?\n\n=======================================================================\nPatrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/\n\n In this way, love is made complete among us so that we will have\nconfidence on the day of judgment, because in this world we are\nlike him.\n -- 1 John 4:17\nhttp://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010210\n=======================================================================\nCreated by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/\n\n", "msg_date": "Sun, 11 Feb 2001 14:59:23 +1300", "msg_from": "\"Patrick Dunford\" <dunfordsoft@clear.net.nz>", "msg_from_op": true, "msg_subject": "ODBC driver issue in MS Access" } ]
[ { "msg_contents": "I checked the logs, and we released the new 6.4 backend protocol on\n1998-10-30. That was 2.5 years ago.\n\nWe normally allow older clients to communicate with newer servers, but\noften we don't support newer clients talking to older servers, sometimes\neven servers one release in the past. The reason is that the backend\ncommunication code gets confusing. For example, I know there were some\nlibpq releases that could not talk to servers from the previous release.\nWe did allow newer servers to talk to older clients because it is harder\nto upgrade many clients than a single server.\n\nSeems the <=6.3 compatibility code in our current ODBC is just adding\nconfusion for coders and users and should be removed. Tom Lane agreed.\n\nIf someone thinks it should be kept, please speak up.\n\nThanks.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 10 Feb 2001 21:00:39 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "ODBC backward versions" }, { "msg_contents": "> -----Original Message-----\n> From: Bruce Momjian\n> Sent: Sunday, February 11, 2001 11:01 AM\n> To: PostgreSQL-development\n> Subject: [HACKERS] ODBC backward versions\n> \n> \n> I checked the logs, and we released the new 6.4 backend protocol on\n> 1998-10-30. That was 2.5 years ago.\n> \n> We normally allow older clients to communicate with newer servers, but\n> often we don't support newer clients talking to older servers, sometimes\n> even servers one release in the past. The reason is that the backend\n> communication code gets confusing. For example, I know there were some\n> libpq releases that could not talk to servers from the previous release.\n\nLibpq 2.x couldn't talk to pre-6.4 servers. Fortunately ODBC has never\nused libpq and could talk to wide range of versions. Should ODBC\nthrow away the luck ?\n\n> We did allow newer servers to talk to older clients because it is harder\n> to upgrade many clients than a single server.\n> \n> Seems the <=6.3 compatibility code in our current ODBC is just adding\n> confusion for coders and users and should be removed. Tom Lane agreed.\n> \n\nWhere's real coders for psqlodbc driver in the first place ?\nByron has been unavailable for a long time and I've seen \nfew improvements for a year or so. Does removing pre-6.4\ncode improve the status ? The problem is that there has\nbeen no maintainer of odbc driver.\n\nRegards,\nHiroshi Inoue\n", "msg_date": "Sun, 11 Feb 2001 22:11:46 +0900", "msg_from": "\"Hiroshi Inoue\" <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "RE: ODBC backward versions" }, { "msg_contents": "> > -----Original Message-----\n> > From: Bruce Momjian\n> > Sent: Sunday, February 11, 2001 11:01 AM\n> > To: PostgreSQL-development\n> > Subject: [HACKERS] ODBC backward versions\n> > \n> > \n> > I checked the logs, and we released the new 6.4 backend protocol on\n> > 1998-10-30. That was 2.5 years ago.\n> > \n> > We normally allow older clients to communicate with newer servers, but\n> > often we don't support newer clients talking to older servers, sometimes\n> > even servers one release in the past. The reason is that the backend\n> > communication code gets confusing. For example, I know there were some\n> > libpq releases that could not talk to servers from the previous release.\n> \n> Libpq 2.x couldn't talk to pre-6.4 servers. Fortunately ODBC has never\n> used libpq and could talk to wide range of versions. Should ODBC\n> throw away the luck ?\n\nWell, the ability to give users choices of old servers is confusing\nthem. 6.4 is so old, they assume they need a newer one to talk to 7.1,\nand hopefully clearer code will help coders in the future.\n\n> \n> > We did allow newer servers to talk to older clients because it is harder\n> > to upgrade many clients than a single server.\n> > \n> > Seems the <=6.3 compatibility code in our current ODBC is just adding\n> > confusion for coders and users and should be removed. Tom Lane agreed.\n> > \n> \n> Where's real coders for psqlodbc driver in the first place ?\n> Byron has been unavailable for a long time and I've seen \n> few improvements for a year or so. Does removing pre-6.4\n> code improve the status ? The problem is that there has\n> been no maintainer of odbc driver.\n\nWe have some new people interested, like Julie Case and I think a few\nothers. I just reformatted the entire odbc directory, which will\nhopefully make it clearer and attract patches. I know it is clearer for\nme now.\n\nSo, no, removing 6.4 does not improve ODBC, but it makes it simpler, and\nI doubt anyone wants to talk to a 6.3 server using 7.1 ODBC.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 11 Feb 2001 08:24:38 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: ODBC backward versions" }, { "msg_contents": "\"Hiroshi Inoue\" <Inoue@tpf.co.jp> writes:\n> Does removing pre-6.4 code improve the status ?\n\nYes, it does (IMHO anyway) because it removes a configuration option\nthat is confusing new users. The odds that someone will want to use 7.1\nODBC with a pre-6.4 server seem very small to me, while we do frequently\nsee questions about the 6.2/6.3/6.4 protocol switch.\n\n> The problem is that there has been no maintainer of odbc driver.\n\nThat's certainly true. I hope that someone will start taking\nresponsibility for this code again.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 11 Feb 2001 13:25:46 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: ODBC backward versions " }, { "msg_contents": "Tom Lane wrote:\n> \n> \"Hiroshi Inoue\" <Inoue@tpf.co.jp> writes:\n> > Does removing pre-6.4 code improve the status ?\n> \n> Yes, it does (IMHO anyway) because it removes a configuration option\n> that is confusing new users.\n\nRight. There's even an idea(not mine) to remove\nthe option by automatically detecting the server's\nversion. However the option isn't entirely wrong\nbecause users could recognize by the option that\nODBC driver supports multiple server versions.\nUnfotunately people are easy to forget that ODBC\ndriver supports multiple versions even though the\noption exists.\n\n> The odds that someone will want to use 7.1\n> ODBC with a pre-6.4 server seem very small to me, while we do frequently\n> see questions about the 6.2/6.3/6.4 protocol switch.\n> \n> > The problem is that there has been no maintainer of odbc driver.\n> \n> That's certainly true. I hope that someone will start taking\n> responsibility for this code again.\n> \n\nI myself have been using ODBC driver in production\nsystem. The absense of a maintainer has been a \nproblem for me. Unfortunately I'm not familiar\nwith ODBC that well and couldn't be a maintainer. \nI know a person who could maintain our ODBC driver\nother than Byron. I always recommended him to be a\nmaintainer but he hasn't agreed. Recently I've \nfixed some light bugs unwillingly but it's hard\nfor me to fix complicated bugs. For exmaple it's\nvery hard for me to check if Ludek Finstrlein's\npatch([ODBC] pgsqODBC binding parameters II) is\nright. I'm expecting for the person to answer the\nquestion.\n\nRegards,\nHiroshi Inoue\n", "msg_date": "Mon, 12 Feb 2001 11:07:20 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: ODBC backward versions" } ]
[ { "msg_contents": "But then a funny thing happened. When I refreshed the view, the records\nchanged from \"#Deleted\" to all the data I put in, and the serial field was\nfilled in with the correct value. How do I stop that from happening?\n\n> -----Original Message-----\n> From: Patrick Dunford [mailto:dunfordsoft@clear.net.nz]\n> Sent: Sunday, 11 February 2001 14:59\n> To: PostgreSQL List\n> Subject: ODBC driver issue in MS Access\n>\n>\n> I installed the ODBC driver for Postgre, and linked in a table\n> which has a Serial field for the primary key. In MS Access, the\n> type is shown as just \"Number (long integer)\".\n>\n> When I try to add new records to my database in Access, I don't\n> put anything into the key field because the server is supposed to\n> generate it automatically. But when my record is sent back to the\n> server, it rejects it and Access displays \"#Deleted\" in all of\n> the fields. Is this because Postgre can't fill in the key field\n> and so rejects it as an integrity constraint violation? I don't\n> get any errors from Access.\n>\n> Should my database create its own key values and store them itself?\n>\n> =======================================================================\n> Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/\n>\n> In this way, love is made complete among us so that we will have\n> confidence on the day of judgment, because in this world we are\n> like him.\n> -- 1 John 4:17\n> http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010210\n> =======================================================================\n> Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/\n>\n\n", "msg_date": "Sun, 11 Feb 2001 15:44:26 +1300", "msg_from": "\"Patrick Dunford\" <dunfordsoft@clear.net.nz>", "msg_from_op": true, "msg_subject": "RE: ODBC driver issue in MS Access" } ]
[ { "msg_contents": "\n\n> -----Original Message-----\n> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]\n> Sent: 11 February 2001 06:31\n> To: PostgreSQL-development\n> Cc: Dave Page; PostgreSQL odbc list; PostgreSQL-patches\n> Subject: Re: [ODBC] RE: [PATCHES] Fix for ODBC close\n> \n> \n> OK, I have a pretty good guess about the cause of the ODBC shutdown\n> failure message in the server logs. Sending 'X' is still causing the\n> error message.\n> \n> The error you are seeing is from the backend libpq code, the area that\n> communicates with clients.\n> \n> So, let's assume the problem is not the platform, but the \n> client code. \n> Libpq properly shuts connections without triggering that \n> message. ODBC\n> does trigger the message.\n> \n> libpq closes connections with:\n> \n> \t\t(void) pqPuts(\"X\", conn);\n> \t\t(void) pqFlush(conn);\n> \n> while ODBC closes with:\n> \n> \t\tSOCK_put_char(self, 'X');\n> \t\tSOCK_flush_output(self);\n> \n> They then close() the socket.\n> \n> It seems the difference is in the flushing. libpq has elaborate flush\n> code:\n> \n> \twhile (len > 0)\n> \t{\n> \t\t\tsent = send(conn->sock, ptr, len, 0);\n> \t\t\tlen -= sent;\n> \n> \t\t\tif (pqWait(FALSE, TRUE, conn))\n> \t}\n> \n> and pqWait does:\n> \n> \t\tif (select(conn->sock + 1, &input_mask, \n> &output_mask, (fd_set *) NULL,\n> \n> \n> For flush, ODBC does a simple:\n> \n> \twritten = send(self->socket, (char *) self->buffer_out, \n> self->buffer_filled_out, 0);\n> \n> \n> It seems we may need to add flush code similar to libpq in ODBC.\n> \n> At a minimum, we have to put the send() in a loop and keep going until\n> there are no more bytes to send. Not sure the select() is required.\n> \n> Comments?\n> \n> After I receive comments, I will prepare a patch people can test.\n\nSounds reasonable though I must admit this isn't exactly my area of\nexpertise! I'll certainly test any patches though and make a .dll available\nfor others to try.\n\nRegards,\n\nDave.\n", "msg_date": "Sun, 11 Feb 2001 19:17:45 -0000", "msg_from": "Dave Page <dpage@vale-housing.co.uk>", "msg_from_op": true, "msg_subject": "RE: [ODBC] RE: [PATCHES] Fix for ODBC close" } ]
[ { "msg_contents": "\n\tGuess this what I get for attempting to use a beta version of\npgsql in a production system. :( My database server crashed (kernel\npaging fault it looks like) and after reboot, postmaster refuses to start\nup. There error it gives is:\n\nDEBUG: starting up\nDEBUG: database system was interrupted at 2001-02-11 04:08:12\nDEBUG: Checkpoint record at (0, 805076492)\npostmaster: reaping dead processes...\nStartup failed - abort\n\nAnd that is it, from running 'postmaster -D /usr/local/pgsql/data/'. I get\nthe same thing each time I run it. I assume that WAL is for some reason\nfailing to restore/recover the database. \n\tThe system is a stock Debian 2.2 system, Dual PPro200, w/pgsql\n7.1beta4. The system crash occured during the nightly update of the\ndatabases (from another, internal, non-pgsql, database system). Is there\nanyway to recover the database, or do I need to do a 'rm -rf\ndata; initdb'? A quick response would be greatly appreciated. Thanks.\n\n---------------------------------------------------------------------------\n| \"For to me to live is Christ, and to die is gain.\" |\n| --- Philippians 1:21 (KJV) |\n---------------------------------------------------------------------------\n| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |\n---------------------------------------------------------------------------\n\n", "msg_date": "Sun, 11 Feb 2001 15:03:33 -0700 (MST)", "msg_from": "Ryan Kirkpatrick <pgsql@rkirkpat.net>", "msg_from_op": true, "msg_subject": "Recovery of PGSQL after system crash failing!!!" }, { "msg_contents": "Ryan Kirkpatrick <pgsql@rkirkpat.net> writes:\n> DEBUG: Checkpoint record at (0, 805076492)\n> postmaster: reaping dead processes...\n> Startup failed - abort\n\nHm. All we can tell from this is that the startup subprocess exited\nwith nonzero status. Did it leave a corefile? If so, what's the\nstack trace?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 11 Feb 2001 18:13:57 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Recovery of PGSQL after system crash failing!!! " }, { "msg_contents": "> DEBUG: starting up\n> DEBUG: database system was interrupted at 2001-02-11 04:08:12\n> DEBUG: Checkpoint record at (0, 805076492)\n> postmaster: reaping dead processes...\n> Startup failed - abort\n> \n> And that is it, from running 'postmaster -D /usr/local/pgsql/data/'. I get\n> the same thing each time I run it. I assume that WAL is for some reason\n> failing to restore/recover the database. \n> The system is a stock Debian 2.2 system, Dual PPro200, w/pgsql\n> 7.1beta4. The system crash occured during the nightly update of the\n> databases (from another, internal, non-pgsql, database system). Is there\n> anyway to recover the database, or do I need to do a 'rm -rf\n\nPlease try to restart with option wal_debug = 1 so postmaster log\nwill be more informative and send this log me.\n\n> data; initdb'? A quick response would be greatly appreciated. Thanks.\n\nPlease archieve PG' data dir - it probably will be useful to find bug.\n\nVadim\n\n\n", "msg_date": "Sun, 11 Feb 2001 19:56:27 -0800", "msg_from": "\"Vadim Mikheev\" <vmikheev@sectorbase.com>", "msg_from_op": false, "msg_subject": "Re: Recovery of PGSQL after system crash failing!!!" }, { "msg_contents": "On Sun, 11 Feb 2001, Vadim Mikheev wrote:\n\n> Please try to restart with option wal_debug = 1 so postmaster log\n> will be more informative and send this log me.\n\n\tI enabled 'wal_debug=1' via both the -c command line option and\n(seperately) via ./data/postgresql.conf, as well as setting wal_debug=16\nin ./data/postgresql.conf and I got no addition postmaster log information\nthan in my last email. :(\n\tAlso set my coredump limit to unlimited (ulimit -c unlimited) and\nstarted postmaster up. I got a core file, and here is what gdb has to say\nabout it:\n\nGNU gdb 19990928\nCopyright 1998 Free Software Foundation, Inc.\nGDB is free software, covered by the GNU General Public License, and you are\nwelcome to change it and/or distribute copies of it under certain conditions.\nType \"show copying\" to see the conditions.\nThere is absolutely no warranty for GDB. Type \"show warranty\" for details.\nThis GDB was configured as \"i686-pc-linux-gnu\"...\n(no debugging symbols found)...\nCore was generated by `postmaster -d 5 -D /usr/local/pgsql/data/'.\nProgram terminated with signal 6, Aborted.\nReading symbols from /lib/libcrypt.so.1...(no debugging symbols found)...done.\nReading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.\nReading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.\nReading symbols from /lib/libm.so.6...(no debugging symbols found)...done.\nReading symbols from /lib/libreadline.so.4...(no debugging symbols found)...done.\nReading symbols from /lib/libncurses.so.5...(no debugging symbols found)...done.\nReading symbols from /lib/libc.so.6...(no debugging symbols found)...done.\nReading symbols from /lib/ld-linux.so.2...(no debugging symbols\nfound)...done.\n#0 0x20c931 in kill () from /lib/libc.so.6\n(gdb) bt \n#0 0x20c931 in kill () from /lib/libc.so.6\n#1 0x20c618 in raise () from /lib/libc.so.6\n#2 0x20dc71 in abort () from /lib/libc.so.6\n#3 0x8080495 in XLogFileOpen ()\n#4 0x8080b52 in ReadRecord ()\n#5 0x8081f66 in StartupXLOG ()\n#6 0x80853ea in BootstrapMain ()\n#7 0x80ee1e7 in SSDataBase ()\n#8 0x80ec766 in PostmasterMain ()\n#9 0x80cd194 in main ()\n#10 0x206a42 in __libc_start_main () from /lib/libc.so.6\n\nAlso, since it appears it died in XLogFileOpen(), here is what the\ndirectory structure looks like for xlog related files:\n\ndrwx--S--- 5 postgres postgres 4096 Feb 12 20:51 data\ndrwx--S--- 2 postgres postgres 4096 Feb 11 04:12 data/pg_xlog\n-rw------- 1 postgres postgres 16777216 Feb 11 04:12 data/pg_xlog/0000000000000030\n\nThe file listed in data/pg_xlog is the only file in this directory. Does\nnot look like a lot of help to me, but here it is also. \n\tOne other wrench to thrown into the works... The kernel on this\nmachine is 2.2.18 with the patches listed at www.linuxraid.org applied. I\nhave a feeling that the linux-security patches mentioned on that page may\nbe giving pgsql heartburn on recovery. I am going to recompile the kernel\nw/o them enabled and see if anything different results, and will post my\nresults.\n\n> > data; initdb'? A quick response would be greatly appreciated. Thanks.\n> \n> Please archieve PG' data dir - it probably will be useful to find bug.\n\n\tArchived. It is a bit over 11MB, and I can put it on my web server\nif some one wants to look at it (10 minute download with a 192kbit or\nfaster link). Though I would like to limit its distribution as it does\nhave relatively sensitive company data buried in it (custom lists and the\nlike).\n\tThough there is nothing I need to retrieve from it... This\ndatabase is from the web site that is updated every night from the\ninternal databases. For the time being I have fallen back to 7.0.3 for\nproduction use.\n\tThank you for all of your help. TTYL.\n\n---------------------------------------------------------------------------\n| \"For to me to live is Christ, and to die is gain.\" |\n| --- Philippians 1:21 (KJV) |\n---------------------------------------------------------------------------\n| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |\n---------------------------------------------------------------------------\n\n", "msg_date": "Mon, 12 Feb 2001 21:04:49 -0700 (MST)", "msg_from": "Ryan Kirkpatrick <pgsql@rkirkpat.net>", "msg_from_op": true, "msg_subject": "Re: Recovery of PGSQL after system crash failing!!!" }, { "msg_contents": "On Mon, 12 Feb 2001, Ryan Kirkpatrick wrote:\n\n> \tOne other wrench to thrown into the works... The kernel on this\n> machine is 2.2.18 with the patches listed at www.linuxraid.org applied. I\n> have a feeling that the linux-security patches mentioned on that page may\n> be giving pgsql heartburn on recovery. I am going to recompile the kernel\n> w/o them enabled and see if anything different results, and will post my\n> results.\n\n\tDid as above, disabling all security options in the kernel,\nrecompiling, and rebooting. Postgres behaves exactly the same as\nbefore. :(\n\n---------------------------------------------------------------------------\n| \"For to me to live is Christ, and to die is gain.\" |\n| --- Philippians 1:21 (KJV) |\n---------------------------------------------------------------------------\n| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |\n---------------------------------------------------------------------------\n\n", "msg_date": "Mon, 12 Feb 2001 21:39:31 -0700 (MST)", "msg_from": "Ryan Kirkpatrick <pgsql@rkirkpat.net>", "msg_from_op": true, "msg_subject": "Re: Recovery of PGSQL after system crash failing!!!" }, { "msg_contents": "Ryan Kirkpatrick <pgsql@rkirkpat.net> writes:\n> #2 0x20dc71 in abort () from /lib/libc.so.6\n> #3 0x8080495 in XLogFileOpen ()\n\nHm. Evidently it's failing to open the xlog file, but the code is set\nup in such a way that it dies before telling you why :-( Take a look\nat XLogFileOpen in src/backend/access/transam/xlog.c and tweak the code\nto tell you the path and errno it's failing on before it abort()s.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 13 Feb 2001 00:05:24 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Recovery of PGSQL after system crash failing!!! " }, { "msg_contents": "> > #2 0x20dc71 in abort () from /lib/libc.so.6\n> > #3 0x8080495 in XLogFileOpen ()\n> \n> Hm. Evidently it's failing to open the xlog file, but the code is set\n> up in such a way that it dies before telling you why :-( Take a look\n> at XLogFileOpen in src/backend/access/transam/xlog.c and tweak the code\n> to tell you the path and errno it's failing on before it abort()s.\n\nI don't remember why there is abort() in XLogFileOpen just before\nappropriate elog(STOP) there - I'll remove it in few moments, - but\nit's already obvious why open failed: there is no file with checkpoint\nrecord pointed by pg_control - data/pg_xlog/000000000000002F.\nSo, the question is who removed this file - PG or Linux?\nRyan, do you have postmaster' log before crash (where MoveOfflineLogs\nreports WAL files to be deleted) and/or some logs from Linux' startup?\nAnd meanwhile I'll take a look arround MoveOfflineLogs...\n\nVadim\n\n\n", "msg_date": "Tue, 13 Feb 2001 00:18:59 -0800", "msg_from": "\"Vadim Mikheev\" <vmikheev@sectorbase.com>", "msg_from_op": false, "msg_subject": "Re: Recovery of PGSQL after system crash failing!!! " }, { "msg_contents": "On Tue, 13 Feb 2001, Vadim Mikheev wrote:\n\n> I don't remember why there is abort() in XLogFileOpen just before\n> appropriate elog(STOP) there - I'll remove it in few moments, - but\n> it's already obvious why open failed: there is no file with checkpoint\n> record pointed by pg_control - data/pg_xlog/000000000000002F.\n> So, the question is who removed this file - PG or Linux?\n\n\tWhen the system crashed, it was updating the database rather\nheavily (i.e. drop everything, reload from external source). Therefore\nthere was a lot of activity going on to be logged. Still haven't\ndetermined what caused the system to crash, the error message from the\nkernel was along the lines 'can not handle kernel paging request'. Of\ncourse, the machine crashed again ~12 hours later w/o any kernel error\nmessages. :( There may be a hardware problem with the machine that is\ncausing these problems....\n\n> Ryan, do you have postmaster' log before crash (where MoveOfflineLogs\n> reports WAL files to be deleted) and/or some logs from Linux' startup?\n\n\tSorry, I don't have the log file (got overwritten during reboot).\nAs for logs from Linux startup, I have them, but there is nothing of any\ninterest to postgres in them... The fsck on the disks after the system\ncame back up was clean, and there are no files in lost+found for the\npartition the database is on.\n\n> And meanwhile I'll take a look arround MoveOfflineLogs...\n\n\tGood hunting... :)\n\n---------------------------------------------------------------------------\n| \"For to me to live is Christ, and to die is gain.\" |\n| --- Philippians 1:21 (KJV) |\n---------------------------------------------------------------------------\n| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |\n---------------------------------------------------------------------------\n\n", "msg_date": "Tue, 13 Feb 2001 06:40:39 -0700 (MST)", "msg_from": "Ryan Kirkpatrick <pgsql@rkirkpat.net>", "msg_from_op": true, "msg_subject": "Re: Recovery of PGSQL after system crash failing!!! " } ]
[ { "msg_contents": "I just got this error message in 7.0.3:\n\nERROR: to_char/to_number(): not unique decimal poit.\n\nMight want to ensure it's correctly spelled in 7.1\n\nChris\n\n-- \nChristopher Kings-Lynne\nFamily Health Network (ACN 089 639 243) \n", "msg_date": "Mon, 12 Feb 2001 15:40:29 +0800", "msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>", "msg_from_op": true, "msg_subject": "7.0.3 spelling error" }, { "msg_contents": "\nOn Mon, 12 Feb 2001, Christopher Kings-Lynne wrote:\n\n> I just got this error message in 7.0.3:\n> \n> ERROR: to_char/to_number(): not unique decimal poit.\n> \n> Might want to ensure it's correctly spelled in 7.1\n\n Hmm, you are right. But I don't want prepare a patch with one \nchar. \n\n Hackers, can anyone who will changing something in sources add\n'n' to utils/adt/formatting.c, line 980 and correct 'poit' to\n'point'. Please :-))) I haven't time now.\n\n\t\t\t\tKarel \n\n", "msg_date": "Mon, 12 Feb 2001 09:13:01 +0100 (CET)", "msg_from": "Karel Zak <zakkr@zf.jcu.cz>", "msg_from_op": false, "msg_subject": "Re: 7.0.3 spelling error" }, { "msg_contents": "Done.\n\n> \n> On Mon, 12 Feb 2001, Christopher Kings-Lynne wrote:\n> \n> > I just got this error message in 7.0.3:\n> > \n> > ERROR: to_char/to_number(): not unique decimal poit.\n> > \n> > Might want to ensure it's correctly spelled in 7.1\n> \n> Hmm, you are right. But I don't want prepare a patch with one \n> char. \n> \n> Hackers, can anyone who will changing something in sources add\n> 'n' to utils/adt/formatting.c, line 980 and correct 'poit' to\n> 'point'. Please :-))) I haven't time now.\n> \n> \t\t\t\tKarel \n> \n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Mon, 12 Feb 2001 07:51:48 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: 7.0.3 spelling error" }, { "msg_contents": "\nOn Mon, 12 Feb 2001, Bruce Momjian wrote:\n\n> Done.\n\nThanks!\n\n> \n> > \n> > On Mon, 12 Feb 2001, Christopher Kings-Lynne wrote:\n> > \n> > > I just got this error message in 7.0.3:\n> > > \n> > > ERROR: to_char/to_number(): not unique decimal poit.\n> > > \n> > > Might want to ensure it's correctly spelled in 7.1\n> > \n> > Hmm, you are right. But I don't want prepare a patch with one \n> > char. \n> > \n> > Hackers, can anyone who will changing something in sources add\n> > 'n' to utils/adt/formatting.c, line 980 and correct 'poit' to\n> > 'point'. Please :-))) I haven't time now.\n> > \n> > \t\t\t\tKarel \n\n", "msg_date": "Mon, 12 Feb 2001 13:53:50 +0100 (CET)", "msg_from": "Karel Zak <zakkr@zf.jcu.cz>", "msg_from_op": false, "msg_subject": "Re: 7.0.3 spelling error" } ]
[ { "msg_contents": "Hello,\n\nI just saw (or better to say waspointed to) the following bug in Bug tracking \ntool submitted yesterday: pgsql 7.0.2 cursor bug.\n\nI have exactly the same trouble... Until I free cursor daemon grows...\nI have this in plain 7.0.3. Any comments?\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: dyp@perchine.com\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n", "msg_date": "Mon, 12 Feb 2001 17:36:33 +0600", "msg_from": "Denis Perchine <dyp@perchine.com>", "msg_from_op": true, "msg_subject": "Bug: pgsql 7.0.2 cursor bug" } ]
[ { "msg_contents": "> Then if I reindex my DB I have :\n> \n> NOTICE: --Relation astro--\n> NOTICE: Pages 204: Changed 0, reaped 0, Empty 0, New 0; Tup \n> 4878: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 324, MaxLen 324;\n> Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. CPU\n0.04s/0.18u sec.\n> NOTICE: Index astro_pkey: Pages 25; Tuples 4878. CPU 0.01s/0.01u sec.\n> \n> If I do :\n> select * from astro;\n> \n> I have :\n> \n...\n> (0 rows)\n\nWell, it may be caused by corrupted next_xid in pg_variable.\nCould you\n\nCREATE TABLE foo (bar int);\nselect xmin from pg_class where relname = 'foo';\n\nand say what is exact size of pg_log file?\n\nVadim\n", "msg_date": "Mon, 12 Feb 2001 09:28:03 -0800", "msg_from": "\"Mikheev, Vadim\" <vmikheev@SECTORBASE.COM>", "msg_from_op": true, "msg_subject": "RE: [ADMIN] SOS !!: Porstgress forgot all ! Help !" } ]
[ { "msg_contents": "Due to the urgency, I resend my mail about pg_dump output:\n\nIn 7.0.2 I got\n\nINSERT INTO foo (field) VALUES ('Hello,\\012world!');\n\nIn 7.1beta4 I get\n\nINSERT INTO foo (field) VALUES ('Hello,\nworld!');\n\nI am using these switches: -a, -c, -n, -d or -D.\n\nIs it possible to add a switch to pg_dump to make it possible getting the\nold output. Where can I balance it in the source if I'd like to change the\nbehaviour?\n\nTIA, Zoltan\n\n-- \n Kov\\'acs, Zolt\\'an\n kovacsz@pc10.radnoti-szeged.sulinet.hu\n http://www.math.u-szeged.hu/~kovzol\n ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz\n\n", "msg_date": "Mon, 12 Feb 2001 18:49:00 +0100 (CET)", "msg_from": "Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>", "msg_from_op": true, "msg_subject": "pg_dump output" }, { "msg_contents": "Kovacs Zoltan writes:\n\n> In 7.0.2 I got\n> INSERT INTO foo (field) VALUES ('Hello,\\012world!');\n\n> In 7.1beta4 I get\n> INSERT INTO foo (field) VALUES ('Hello,\n> world!');\n\n> Is it possible to add a switch to pg_dump to make it possible getting the\n> old output. Where can I balance it in the source if I'd like to change the\n> behaviour?\n\nI kind of agree that the old output should be preferred. Otherwise we\nmight be entering a whole new world of CR/LF sort of problems.\n\nBtw., if I select the default COPY output, pg_dump seems to drop\nnon-printable characters like '\\001'.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Mon, 12 Feb 2001 19:24:33 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: pg_dump output" }, { "msg_contents": "On Mon, 12 Feb 2001, Peter Eisentraut wrote:\n\n> Kovacs Zoltan writes:\n> \n> > In 7.0.2 I got\n> > INSERT INTO foo (field) VALUES ('Hello,\\012world!');\n> \n> > In 7.1beta4 I get\n> > INSERT INTO foo (field) VALUES ('Hello,\n> > world!');\n> \n> > Is it possible to add a switch to pg_dump to make it possible getting the\n> > old output. Where can I balance it in the source if I'd like to change the\n> > behaviour?\n> \n> I kind of agree that the old output should be preferred. Otherwise we\n> might be entering a whole new world of CR/LF sort of problems.\n> \n> Btw., if I select the default COPY output, pg_dump seems to drop\n> non-printable characters like '\\001'.\nOK, I found it. In pg_dump.c, function formatStringLiteral(), the line\ncontaining '\\n' and '\\t' should be deleted (or check whether a switch is\non or not).\n\nZoltan\n-- \n Kov\\'acs, Zolt\\'an\n kovacsz@pc10.radnoti-szeged.sulinet.hu\n http://www.math.u-szeged.hu/~kovzol\n ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz\n\n", "msg_date": "Mon, 12 Feb 2001 20:10:09 +0100 (CET)", "msg_from": "Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>", "msg_from_op": true, "msg_subject": "Re: pg_dump output" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Btw., if I select the default COPY output, pg_dump seems to drop\n> non-printable characters like '\\001'.\n\nYou sure? They're there in my output. COPY doesn't turn them into\nescape sequences, if that's what you were expecting.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 12 Feb 2001 15:13:37 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pg_dump output " }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Tom Lane writes:\n>> Peter Eisentraut <peter_e@gmx.net> writes:\n> Btw., if I select the default COPY output, pg_dump seems to drop\n> non-printable characters like '\\001'.\n>> \n>> You sure? They're there in my output. COPY doesn't turn them into\n>> escape sequences, if that's what you were expecting.\n\n> If I do\n\n> INSERT INTO test VALUES ('foo\\001bar');\n\n> then pg_dump writes\n\n> COPY \"test\" FROM stdin;\n> foobar\n> \\.\n\nWhat I get is 'foo^Abar'. What are you using to inspect the file?\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 12 Feb 2001 15:53:37 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pg_dump output " }, { "msg_contents": "Tom Lane writes:\n\n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > Btw., if I select the default COPY output, pg_dump seems to drop\n> > non-printable characters like '\\001'.\n>\n> You sure? They're there in my output. COPY doesn't turn them into\n> escape sequences, if that's what you were expecting.\n\nIf I do\n\nINSERT INTO test VALUES ('foo\\001bar');\n\nthen pg_dump writes\n\nCOPY \"test\" FROM stdin;\nfoobar\n\\.\n\nThis is incorrect.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Mon, 12 Feb 2001 22:00:35 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: pg_dump output " }, { "msg_contents": "By the way, I get each sequence twice in pg_dump output... In psql:\n\nCREATE TABLE x (y SERIAL);\n\nThen running pg_dump with switches -xacnOD, I get:\n\n--\n-- Selected TOC Entries:\n--\nDROP SEQUENCE x_y_seq;\nDROP SEQUENCE x_y_seq;\n--\n-- TOC Entry ID 1 (OID 2625010)\n--\n-- Name: x_y_seq Type: SEQUENCE Owner: postgres\n--\n\nCREATE SEQUENCE x_y_seq start 1 increment 1 maxvalue 2147483647 minvalue 1\ncache 1 ;\n\n--\n-- TOC Entry ID 3 (OID 2625010)\n--\n-- Name: x_y_seq Type: SEQUENCE Owner: postgres\n--\n\nCREATE SEQUENCE x_y_seq start 1 increment 1 maxvalue 2147483647 minvalue 1\ncache 1 ;\n\n--\n-- Data for TOC Entry ID 5 (OID 2625029) TABLE DATA x\n--\n\n\\connect - postgres\n-- Disable triggers\nUPDATE \"pg_class\" SET \"reltriggers\" = 0 WHERE \"relname\" ~* 'x';\n-- Enable triggers\n\nCREATE TEMP TABLE \"tr\" (\"tmp_relname\" name, \"tmp_reltriggers\" smallint);\nINSERT INTO \"tr\" SELECT C.\"relname\", count(T.\"oid\") FROM \"pg_class\" C,\n\"pg_trigger\" T WHERE C.\"oid\" = T.\"tgrelid\" AND C.\"relname\" ~* 'x' GROUP\nBY 1;\nUPDATE \"pg_class\" SET \"reltriggers\" = TMP.\"tmp_reltriggers\" FROM \"tr\" TMP\nWHERE\n\"pg_class\".\"relname\" = TMP.\"tmp_relname\";\nDROP TABLE \"tr\";\nCOMMIT TRANSACTION;\n\n--\n-- TOC Entry ID 2 (OID 2625010)\n--\n-- Name: x_y_seq Type: SEQUENCE SET Owner:\n--\n\nSELECT setval ('x_y_seq', 1, 'f');\n\n--\n-- TOC Entry ID 4 (OID 2625010)\n--\n-- Name: x_y_seq Type: SEQUENCE SET Owner:\n--\n\nSELECT setval ('x_y_seq', 1, 'f');\n\n-------------------------------------------------------------------------\n\nIs this correct?\n\nZoltan\n\n--\n Kov\\'acs, Zolt\\'an\n kovacsz@pc10.radnoti-szeged.sulinet.hu\n http://www.math.u-szeged.hu/~kovzol\n ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz\n\n", "msg_date": "Mon, 12 Feb 2001 22:25:44 +0100 (CET)", "msg_from": "Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>", "msg_from_op": true, "msg_subject": "Re: pg_dump output " }, { "msg_contents": "Tom Lane writes:\n\n> What are you using to inspect the file?\n\nUgh... :-/\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Mon, 12 Feb 2001 22:26:44 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: pg_dump output " }, { "msg_contents": "At 22:25 12/02/01 +0100, Kovacs Zoltan wrote:\n>By the way, I get each sequence twice in pg_dump output... In psql:\n>\n>CREATE TABLE x (y SERIAL);\n>\n>Then running pg_dump with switches -xacnOD, I get:\n>\n>--\n>-- Selected TOC Entries:\n>--\n>DROP SEQUENCE x_y_seq;\n>DROP SEQUENCE x_y_seq;\n\nDoesn't happen here - does anybody else see this?\n\nCan you confirm it happens on a freshly created database? If so, can you try:\n\n pg_dump blah -Fc -v > z.bck\n\nand send both the output and z.bck direct to me?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Tue, 13 Feb 2001 09:56:41 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: pg_dump output " } ]
[ { "msg_contents": "> before this manipulmation, pg_log = 1.073.741.824\n\nOhhhh, your system reached max transaction ID -:(\n\n> and xmin = 4982339\n\nAnd now all tuples with xmin > ~5000000 are invisible.\n\nOne way to restore data could be hack vacuum to update\nxmin of all valid tuples to 512, vacuum all tables,\ndump data, initdb new fresh database etc -:((\n\nVadim\n", "msg_date": "Mon, 12 Feb 2001 09:51:27 -0800", "msg_from": "\"Mikheev, Vadim\" <vmikheev@SECTORBASE.COM>", "msg_from_op": true, "msg_subject": "RE: [ADMIN] SOS !!: Porstgress forgot all ! Help !" }, { "msg_contents": "\"Mikheev, Vadim\" <vmikheev@SECTORBASE.COM> writes:\n>> before this manipulmation, pg_log = 1.073.741.824\n\n> Ohhhh, your system reached max transaction ID -:(\n\nThat's two reports now of people who have managed to wrap around the XID\ncounter. It doesn't seem that hard to do in a heavily used database.\n\nDoes anyone want to take more seriously the stopgap solution I proposed\nfor this problem (pghackers archives around 3-Nov-00)? I believe you\nshot it down that time, but I don't think that ignoring the problem\nfor another release cycle is a better answer.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 12 Feb 2001 13:16:01 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RE: [ADMIN] SOS !!: Porstgress forgot all ! Help ! " }, { "msg_contents": "> > Ohhhh, your system reached max transaction ID -:(\n> \n> That's two reports now of people who have managed to wrap around the XID\n> counter. It doesn't seem that hard to do in a heavily used database.\n> \n> Does anyone want to take more seriously the stopgap solution I proposed\n> for this problem (pghackers archives around 3-Nov-00)? I believe you\n> shot it down that time, but I don't think that ignoring the problem\n> for another release cycle is a better answer.\n\nActually, I believed that you've done this temp solution till I've found\nthat it's not true couple weeks ago. If you'll do this please don't forget\nabout reusing ID of *committed* transactions and crashes - this should\nbe handled somehow on recovery.\n\nVadim\n\n\n", "msg_date": "Wed, 14 Feb 2001 19:16:40 -0800", "msg_from": "\"Vadim Mikheev\" <vmikheev@sectorbase.com>", "msg_from_op": false, "msg_subject": "Re: RE: [ADMIN] SOS !!: Porstgress forgot all ! Help ! " } ]
[ { "msg_contents": "When I try this commands, some error messages aren't right:\n\n[postgres@math pgsql]$ createdb test\nCREATE DATABASE\n[postgres@math pgsql]$ psql test\nWelcome to psql, the PostgreSQL interactive terminal.\n \nType: \\copyright for distribution terms\n \\h for help with SQL commands\n \\? for help on internal slash commands\n \\g or terminate with semicolon to execute query\n \\q to quit\n \n test=# CREATE TABLE dedicacion (\ntest(# id_dedi SERIAL UNIQUE,\ntest(# nombre_dedi CHAR(10) UNIQUE\ntest(# );\nNOTICE: CREATE TABLE will create implicit sequence 'dedicacion_id_dedi_seq' \nfor SERIAL column 'dedicacion.id_dedi'\nNOTICE: CREATE TABLE/UNIQUE will create implicit index \n'dedicacion_id_dedi_key' for table 'dedicacion'\nNOTICE: CREATE TABLE/UNIQUE will create implicit index \n'dedicacion_id_dedi_key' for table 'dedicacion'\nNOTICE: CREATE TABLE/UNIQUE will create implicit index \n'dedicacion_nombre_dedi_key' for table 'dedicacion'\nERROR: Cannot create index: 'dedicacion_id_dedi_key' already exists\ntest=# \\dt\n List of relations\n Name | Type | Owner\n-------------+-------+----------\n pga_forms | table | postgres\n pga_queries | table | postgres\n pga_reports | table | postgres\n pga_schema | table | postgres\n pga_scripts | table | postgres\n(5 rows)\n \ntest=# \n\n\nNow, as you can see, the error says it couldn't create the index. It says \nnothing about the table not been created, but it doesn't apeare anywhere.\nThis happens when I put the redundant UNIQUE to the serial data type.\n\nIf someone is asking why I do this, it's because I program also for informix, \nand the serial data type in informix doesn't have unique values.\n\nHope someone can change these error messages, because it took me some time to \nfind out what was wrong.\n\nSaludos... :-)\n\n-- \nSystem Administration: It's a dirty job, \nbut someone told I had to do it.\n-----------------------------------------------------------------\nMart�n Marqu�s\t\t\temail: \tmartin@math.unl.edu.ar\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n", "msg_date": "Mon, 12 Feb 2001 19:13:38 -0300", "msg_from": "\"Martin A. Marques\" <martin@math.unl.edu.ar>", "msg_from_op": true, "msg_subject": "bad error message" }, { "msg_contents": "\"Martin A. Marques\" <martin@math.unl.edu.ar> writes:\n> test=# CREATE TABLE dedicacion (\n> test(# id_dedi SERIAL UNIQUE,\n> test(# nombre_dedi CHAR(10) UNIQUE\n> test(# );\n> NOTICE: CREATE TABLE will create implicit sequence 'dedicacion_id_dedi_seq' \n> for SERIAL column 'dedicacion.id_dedi'\n> NOTICE: CREATE TABLE/UNIQUE will create implicit index \n> 'dedicacion_id_dedi_key' for table 'dedicacion'\n> NOTICE: CREATE TABLE/UNIQUE will create implicit index \n> 'dedicacion_id_dedi_key' for table 'dedicacion'\n> NOTICE: CREATE TABLE/UNIQUE will create implicit index \n> 'dedicacion_nombre_dedi_key' for table 'dedicacion'\n> ERROR: Cannot create index: 'dedicacion_id_dedi_key' already exists\n\nHm. There is code in the parser to discard duplicate UNIQUE\nspecifications when a PRIMARY KEY is present. Shouldn't it just\ndo so in all cases, PRIMARY KEY or no?\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 12 Feb 2001 19:19:20 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Redundant UNIQUE specs (was Re: [GENERAL] bad error message)" } ]
[ { "msg_contents": "At 18:49 12/02/01 +0100, Kovacs Zoltan wrote:\n>In 7.0.2 I got\n>\n>INSERT INTO foo (field) VALUES ('Hello,\\012world!');\n>\n>In 7.1beta4 I get\n>\n>INSERT INTO foo (field) VALUES ('Hello,\n>world!');\n>\n\nI have modified formatLiteralString to accept an arg that tells it how to\nhandle LF & TAB. Now, it will encode *everything* except in comments and\nprocedure bodies.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Tue, 13 Feb 2001 12:33:36 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": true, "msg_subject": "Re: pg_dump output" }, { "msg_contents": "> I have modified formatLiteralString to accept an arg that tells it how to\n> handle LF & TAB. Now, it will encode *everything* except in comments and\n> procedure bodies.\nThanks, I checked it. So if I want my own output, I must set CONV_ALL=1,\nright?\n\nZoltan\n--\n Kov\\'acs, Zolt\\'an\n kovacsz@pc10.radnoti-szeged.sulinet.hu\n http://www.math.u-szeged.hu/~kovzol\n ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz\n\n", "msg_date": "Tue, 13 Feb 2001 13:35:02 +0100 (CET)", "msg_from": "Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>", "msg_from_op": false, "msg_subject": "Re: pg_dump output" }, { "msg_contents": "At 13:35 13/02/01 +0100, Kovacs Zoltan wrote:\n>> I have modified formatLiteralString to accept an arg that tells it how to\n>> handle LF & TAB. Now, it will encode *everything* except in comments and\n>> procedure bodies.\n>Thanks, I checked it. So if I want my own output, I must set CONV_ALL=1,\n>right?\n\nNo. pg_dump now does what you want by default. If not, let me know...\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Tue, 13 Feb 2001 23:47:34 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": true, "msg_subject": "Re: pg_dump output" }, { "msg_contents": "> >Thanks, I checked it. So if I want my own output, I must set CONV_ALL=1,\n> >right?\n> \n> No. pg_dump now does what you want by default. If not, let me know...\nOK, thanks, this behaviour is excellent for me... :-)\n\n-- \n Kov\\'acs, Zolt\\'an\n kovacsz@pc10.radnoti-szeged.sulinet.hu\n http://www.math.u-szeged.hu/~kovzol\n ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz\n\n", "msg_date": "Tue, 13 Feb 2001 13:53:53 +0100 (CET)", "msg_from": "Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>", "msg_from_op": false, "msg_subject": "Re: pg_dump output" } ]
[ { "msg_contents": "There is a serious problem with the PostgreSQL locale support on\ncertain platforms and certain locale combo. That is: simply ordering,\nindexes etc. are broken because strcoll() does not work. Example\ncombo includes: RedHat 6.2J(Japanese localized version) + ja_JP.eucJP\nlocale. Here is a test program that expose the problem.\n\n#include <string.h>\n#include <locale.h>\nmain()\n{\n static char *s1 = \"a Japanese string\";\n static char *s2 = \"another Japanese string\";\n\n setlocale(LC_ALL,\"\");\n\n printf(\"%d\\n\",strcoll(s1,s2));\n printf(\"%d\\n\",strcoll(s2,s1));\n}\n\nThis program prints 0s, that means strcoll() regards that those differnt\nJapanese strings are same!\n\nI know this is not PostgreSQL's fault but the broken locale data on\ncertain platforms. The problem makes it impossible to use PostgreSQL\nRPMs in Japan.\n\nI'm looking for solutions/workarounds for this problem. Maybe we\nshould disable locale support at runntime if strcoll() does not work?\nComments?\n--\nTatsuo Ishii\n", "msg_date": "Tue, 13 Feb 2001 11:53:11 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": true, "msg_subject": "locale support" }, { "msg_contents": "Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> I know this is not PostgreSQL's fault but the broken locale data on\n> certain platforms. The problem makes it impossible to use PostgreSQL\n> RPMs in Japan.\n\n> I'm looking for solutions/workarounds for this problem.\n\nBuild a set of RPMs without locale support?\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 12 Feb 2001 21:59:37 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: locale support " }, { "msg_contents": "On Mon, Feb 12, 2001 at 09:59:37PM -0500, Tom Lane wrote:\n> Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> > I know this is not PostgreSQL's fault but the broken locale data on\n> > certain platforms. The problem makes it impossible to use PostgreSQL\n> > RPMs in Japan.\n> \n> > I'm looking for solutions/workarounds for this problem.\n> \n> Build a set of RPMs without locale support?\n\nRun it with LC_ALL=\"C\".\n\nNathan Myers\nncm@zembu.com\n", "msg_date": "Mon, 12 Feb 2001 19:02:32 -0800", "msg_from": "ncm@zembu.com (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: locale support" }, { "msg_contents": "> > I know this is not PostgreSQL's fault but the broken locale data on\n> > certain platforms. The problem makes it impossible to use PostgreSQL\n> > RPMs in Japan.\n> \n> > I'm looking for solutions/workarounds for this problem.\n> \n> Build a set of RPMs without locale support?\n\n>Run it with LC_ALL=\"C\".\n\nBoth of them seem not ideal solutions for RPM. It would be nice if we\ncould distribute single binary and start up file in RPM.\n--\nTatsuo Ishii\n", "msg_date": "Tue, 13 Feb 2001 15:41:44 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": true, "msg_subject": "Re: locale support " }, { "msg_contents": "Nathan Myers wrote:\n> \n> On Mon, Feb 12, 2001 at 09:59:37PM -0500, Tom Lane wrote:\n> > Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> > > I know this is not PostgreSQL's fault but the broken locale data on\n> > > certain platforms. The problem makes it impossible to use PostgreSQL\n> > > RPMs in Japan.\n> >\n> > > I'm looking for solutions/workarounds for this problem.\n> >\n> > Build a set of RPMs without locale support?\n> \n> Run it with LC_ALL=\"C\".\n\nIt would help if there was a sample working LC_ALL=xxx line\n/etc/rc.d/init.d/postgresql\n\nAs it stands now it is a real pita to get LC_xx settings down to the\nreal postmaster \nthrough all the layers (and quessing if it did take effect after each\nrestart ;)\n\n---------\nHannu\n", "msg_date": "Tue, 13 Feb 2001 14:05:35 +0200", "msg_from": "Hannu Krosing <hannu@tm.ee>", "msg_from_op": false, "msg_subject": "Re: locale support" }, { "msg_contents": "Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> I know this is not PostgreSQL's fault but the broken locale data on\n> certain platforms. The problem makes it impossible to use PostgreSQL\n> RPMs in Japan.\n>> \n> I'm looking for solutions/workarounds for this problem.\n>> \n>> Build a set of RPMs without locale support?\n\n>> Run it with LC_ALL=\"C\".\n\n> Both of them seem not ideal solutions for RPM. It would be nice if we\n> could distribute single binary and start up file in RPM.\n\nIf you can find a non-intrusive way to do that, sure ... but I don't\nthink that we should expend any great amount of effort, nor uglify the\ncode, in order to cater to a demonstrably broken library on one\nparticular platform.\n\nThe LC_ALL answer seems the best to me.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 13 Feb 2001 09:47:41 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: locale support " }, { "msg_contents": "Tom Lane wrote:\n> Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> > I know this is not PostgreSQL's fault but the broken locale data on\n> > certain platforms. The problem makes it impossible to use PostgreSQL\n> > RPMs in Japan.\n> > I'm looking for solutions/workarounds for this problem.\n\n> >> Build a set of RPMs without locale support?\n \n> >> Run it with LC_ALL=\"C\".\n \n> > Both of them seem not ideal solutions for RPM. It would be nice if we\n> > could distribute single binary and start up file in RPM.\n \n> If you can find a non-intrusive way to do that, sure ... but I don't\n> think that we should expend any great amount of effort, nor uglify the\n> code, in order to cater to a demonstrably broken library on one\n> particular platform.\n\nTatsuo, what is LC_ALL (or the other locale envvars) set to when you run\nthe program? The man page for setlocale() on my machine documents that\nthe main() starts in C or POSIX locale mode by default. The call to\nsetlocale(LC_ALL, \"\") reads the envvars and sets the locale\naccordingly. Maybe RedHat's 6.2J isn't setting up the locale properly\nto begin with? See what /etc/sysconfig/i18n contains -- if it is empty\nor doesn't exist, then locale is simply not set up. But you specfically\nmention the particular locale....\n\nOk, what combinations _do_ work? We _know_ C or POSIX works -- but\nwhich ones don't work, on RH >6.1? While I want to make sure that a\nbroken locale data set isn't used, I also want to make sure that a good\nlocale set isn't thrown out, either. Forcing to LC_COLLATE=C is\noverkill, IMHO. And building without locale support doesn't work,\neither, because, at least on RH 6.1, strncmp() is buggered to use the\nlocale's collation.\n\nThe real solution is for the vendors to fix their broken locales.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Tue, 13 Feb 2001 12:11:27 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: locale support" }, { "msg_contents": "Lamar Owen writes:\n\n> And building without locale support doesn't work, either, because, at\n> least on RH 6.1, strncmp() is buggered to use the locale's collation.\n\nI don't think so. On RH 6.1, strncmp() is the same it's ever been:\n\nint\nstrncmp (s1, s2, n)\n const char *s1;\n const char *s2;\n size_t n;\n{\n unsigned reg_char c1 = '\\0';\n unsigned reg_char c2 = '\\0';\n\n if (n >= 4)\n {\n size_t n4 = n >> 2;\n do\n {\n c1 = (unsigned char) *s1++;\n c2 = (unsigned char) *s2++;\n if (c1 == '\\0' || c1 != c2)\n return c1 - c2;\n c1 = (unsigned char) *s1++;\n c2 = (unsigned char) *s2++;\n if (c1 == '\\0' || c1 != c2)\n return c1 - c2;\n c1 = (unsigned char) *s1++;\n c2 = (unsigned char) *s2++;\n if (c1 == '\\0' || c1 != c2)\n return c1 - c2;\n c1 = (unsigned char) *s1++;\n c2 = (unsigned char) *s2++;\n if (c1 == '\\0' || c1 != c2)\n return c1 - c2;\n } while (--n4 > 0);\n n &= 3;\n }\n\n while (n > 0)\n {\n c1 = (unsigned char) *s1++;\n c2 = (unsigned char) *s2++;\n if (c1 == '\\0' || c1 != c2)\n return c1 - c2;\n n--;\n }\n\n return c1 - c2;\n}\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Tue, 13 Feb 2001 19:23:14 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: locale support" }, { "msg_contents": "Peter Eisentraut wrote:\n> Lamar Owen writes:\n> > And building without locale support doesn't work, either, because, at\n> > least on RH 6.1, strncmp() is buggered to use the locale's collation.\n\n> I don't think so. On RH 6.1, strncmp() is the same it's ever been:\n[snip]\n\nIs that the code after any glibc RPM patches are applied? 'Pristine\nsource, perhaps -- but patch like crazy!' Reference the classic\n'Reflections on Trusting Trust' by Ken Thompson (which you have probably\nread already, but, for those on-list who may not have read this classic\nwork on security, you can find the paper at\nhttp://www.acm.org/classics/sep95/). Although reading the glibc spec\nfile indicates that patching isn't done in the 'conventional' manner\nhere. (Lovely).\n\nI base my assertion on running test queries on a RedHat 6.1 box over a\nyear ago, using the non-locale 6.5.3 RPMset I distributed at that point\n(I distributed non-locale RPMs because of it's speed being greater in\nindexing, etc). The user who was having difficulties also tried the\nnon-locale RPMset -- and no change, until removing /etc/sysconfig/i18n. \nI've referenced the thread before in the archives; see the message\nhttp://www.postgresql.org/mhonarc/pgsql-hackers/1999-12/msg00678.html\nfor the middle of the thread.\n\nBut, of course, that was 6.5.3. If 7.x behaves differently, I wouldn't\nknow, as I've not built a 'non-locale' RPMset of 7.x. But, I can if\nneeded. Or try the test queries on your own RH 7 box, with a non-locale\nbuild.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Tue, 13 Feb 2001 14:09:44 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: locale support" }, { "msg_contents": "Lamar Owen writes:\n\n> > I don't think so. On RH 6.1, strncmp() is the same it's ever been:\n> [snip]\n>\n> Is that the code after any glibc RPM patches are applied?\n\nYes.\n\n> I base my assertion on running test queries on a RedHat 6.1 box over a\n> year ago, using the non-locale 6.5.3 RPMset I distributed at that point\n> (I distributed non-locale RPMs because of it's speed being greater in\n> indexing, etc). The user who was having difficulties also tried the\n> non-locale RPMset -- and no change, until removing /etc/sysconfig/i18n.\n\nI recall that thread, but the conclusion that was reached (that strncmp()\nis at fault in some way) was never proved sufficiently.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Tue, 13 Feb 2001 20:39:11 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: locale support" }, { "msg_contents": "> Tatsuo, what is LC_ALL (or the other locale envvars) set to when you run\n> the program? The man page for setlocale() on my machine documents that\n> the main() starts in C or POSIX locale mode by default. The call to\n> setlocale(LC_ALL, \"\") reads the envvars and sets the locale\n> accordingly. Maybe RedHat's 6.2J isn't setting up the locale properly\n> to begin with? See what /etc/sysconfig/i18n contains -- if it is empty\n> or doesn't exist, then locale is simply not set up. But you specfically\n> mention the particular locale....\n\nIt's \"ja_JP.eucJP\". Definitely that locale exists, so I guess the\ncontents is broken...\n\n> Ok, what combinations _do_ work? We _know_ C or POSIX works -- but\n> which ones don't work, on RH >6.1? While I want to make sure that a\n> broken locale data set isn't used, I also want to make sure that a good\n> locale set isn't thrown out, either. Forcing to LC_COLLATE=C is\n> overkill, IMHO. And building without locale support doesn't work,\n\nI guess most single byte locales work. However I seriously doubt that\nlocales for multibyte language would work.\n\n> either, because, at least on RH 6.1, strncmp() is buggered to use the\n> locale's collation.\n\nReally? I see PostgreSQL installations without the locale support work\njust fine on RH 6.1J.\n\n> The real solution is for the vendors to fix their broken locales.\n\nOf course.\n--\nTatsuo Ishii\n", "msg_date": "Wed, 14 Feb 2001 18:52:16 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": true, "msg_subject": "Re: locale support" } ]
[ { "msg_contents": "\n> > > #2 0x20dc71 in abort () from /lib/libc.so.6\n> > > #3 0x8080495 in XLogFileOpen ()\n> > \n> > Hm. Evidently it's failing to open the xlog file, but the code is set\n> > up in such a way that it dies before telling you why :-( Take a look\n> > at XLogFileOpen in src/backend/access/transam/xlog.c and tweak the code\n> > to tell you the path and errno it's failing on before it abort()s.\n> \n> I don't remember why there is abort() in XLogFileOpen just before\n> appropriate elog(STOP) there - I'll remove it in few moments, - but\n> it's already obvious why open failed: there is no file with checkpoint\n> record pointed by pg_control - data/pg_xlog/000000000000002F.\n> So, the question is who removed this file - PG or Linux?\n\nMight it be, that pg_control is older than it should be ?\nI mean, that the write to pg_control did not make it to disk,\nbut the checkpoint already completed (removed the logs) ?\n\nAndreas\n", "msg_date": "Tue, 13 Feb 2001 10:26:38 +0100", "msg_from": "Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>", "msg_from_op": true, "msg_subject": "AW: Recovery of PGSQL after system crash failing!!! " } ]
[ { "msg_contents": "Create function, attempt to create trigger fails, yet function\nobviously exists. I can't seem to typecast the trigger parameters.\n\\df even misses the function.\n\n\n\ntemp=# CREATE FUNCTION dbuser_account(varchar(40), varchar(40),\nvarchar(40))\n\ntemp-# RETURNS OPAQUE\n\ntemp-# AS\n'/usr/home/rbt/temp/postgresql-7.1beta4/contrib/user_account/user_acco\nunt.so'\n\ntemp-# language 'C';\n\nCREATE\n\ntemp=#\n\ntemp=# \\df dbuser_account\n\nList of functions\n\nResult | Function | Arguments\n\n--------+----------+-----------\n\n(0 rows)\n\ntemp=#\n\ntemp=# select dbuser_account('test', 'test', 'test');\n\nERROR: dbuser_account: not fired by trigger manager\n\ntemp=#\n\ntemp=#\n\ntemp=# CREATE TRIGGER dbuser_account_trg\n\ntemp-# AFTER INSERT\n\ntemp-# OR DELETE\n\ntemp-# OR UPDATE\n\ntemp-# ON users\n\ntemp-# FOR EACH row\n\ntemp-# EXECUTE PROCEDURE dbuser_account('val1', 'val2', 'val3');\n\nERROR: CreateTrigger: function dbuser_account() does not exist\n\ntemp=#\n\ntemp=# DROP FUNCTION dbuser_account(varchar(40), varchar(40),\nvarchar(40));\n\nDROP\n\n--\nRod Taylor\n\nThere are always four sides to every story: your side, their side, the\ntruth, and what really happened.", "msg_date": "Tue, 13 Feb 2001 10:35:25 -0500", "msg_from": "\"Rod Taylor\" <rod.taylor@inquent.com>", "msg_from_op": true, "msg_subject": "C Trigger issue" }, { "msg_contents": "Sorry, Postgres 7.1 beta4\n--\nRod Taylor\n\nThere are always four sides to every story: your side, their side, the\ntruth, and what really happened.\n----- Original Message -----\nFrom: \"Rod Taylor\" <rod.taylor@inquent.com>\nTo: \"Hackers List\" <pgsql-hackers@postgresql.org>\nSent: Tuesday, February 13, 2001 10:35 AM\nSubject: [HACKERS] C Trigger issue\n\n\n> Create function, attempt to create trigger fails, yet function\n> obviously exists. I can't seem to typecast the trigger parameters.\n> \\df even misses the function.\n>\n>\n>\n> temp=# CREATE FUNCTION dbuser_account(varchar(40), varchar(40),\n> varchar(40))\n>\n> temp-# RETURNS OPAQUE\n>\n> temp-# AS\n>\n'/usr/home/rbt/temp/postgresql-7.1beta4/contrib/user_account/user_acco\n> unt.so'\n>\n> temp-# language 'C';\n>\n> CREATE\n>\n> temp=#\n>\n> temp=# \\df dbuser_account\n>\n> List of functions\n>\n> Result | Function | Arguments\n>\n> --------+----------+-----------\n>\n> (0 rows)\n>\n> temp=#\n>\n> temp=# select dbuser_account('test', 'test', 'test');\n>\n> ERROR: dbuser_account: not fired by trigger manager\n>\n> temp=#\n>\n> temp=#\n>\n> temp=# CREATE TRIGGER dbuser_account_trg\n>\n> temp-# AFTER INSERT\n>\n> temp-# OR DELETE\n>\n> temp-# OR UPDATE\n>\n> temp-# ON users\n>\n> temp-# FOR EACH row\n>\n> temp-# EXECUTE PROCEDURE dbuser_account('val1', 'val2', 'val3');\n>\n> ERROR: CreateTrigger: function dbuser_account() does not exist\n>\n> temp=#\n>\n> temp=# DROP FUNCTION dbuser_account(varchar(40), varchar(40),\n> varchar(40));\n>\n> DROP\n>\n> --\n> Rod Taylor\n>\n> There are always four sides to every story: your side, their side,\nthe\n> truth, and what really happened.\n>\n\n", "msg_date": "Tue, 13 Feb 2001 11:37:42 -0500", "msg_from": "\"Rod Taylor\" <rod.taylor@inquent.com>", "msg_from_op": true, "msg_subject": "Re: C Trigger issue" }, { "msg_contents": "\nIIRC, trigger functions don't take parameters, they're \nfunc() returns opaque. The arguments given in create trigger\nare passed in a different way. That's why the error message \nis saying dbuser_account() is missing.\n\nOn Tue, 13 Feb 2001, Rod Taylor wrote:\n\n> Sorry, Postgres 7.1 beta4\n> --\n> Rod Taylor\n> \n> There are always four sides to every story: your side, their side, the\n> truth, and what really happened.\n> ----- Original Message -----\n> From: \"Rod Taylor\" <rod.taylor@inquent.com>\n> To: \"Hackers List\" <pgsql-hackers@postgresql.org>\n> Sent: Tuesday, February 13, 2001 10:35 AM\n> Subject: [HACKERS] C Trigger issue\n> \n> \n> > Create function, attempt to create trigger fails, yet function\n> > obviously exists. I can't seem to typecast the trigger parameters.\n> > \\df even misses the function.\n> >\n> >\n> >\n> > temp=# CREATE FUNCTION dbuser_account(varchar(40), varchar(40),\n> > varchar(40))\n> >\n> > temp-# RETURNS OPAQUE\n> >\n> > temp-# AS\n> >\n> '/usr/home/rbt/temp/postgresql-7.1beta4/contrib/user_account/user_acco\n> > unt.so'\n> >\n> > temp-# language 'C';\n> >\n> > CREATE\n> >\n> > temp=#\n> >\n> > temp=# \\df dbuser_account\n> >\n> > List of functions\n> >\n> > Result | Function | Arguments\n> >\n> > --------+----------+-----------\n> >\n> > (0 rows)\n> >\n> > temp=#\n> >\n> > temp=# select dbuser_account('test', 'test', 'test');\n> >\n> > ERROR: dbuser_account: not fired by trigger manager\n> >\n> > temp=#\n> >\n> > temp=#\n> >\n> > temp=# CREATE TRIGGER dbuser_account_trg\n> >\n> > temp-# AFTER INSERT\n> >\n> > temp-# OR DELETE\n> >\n> > temp-# OR UPDATE\n> >\n> > temp-# ON users\n> >\n> > temp-# FOR EACH row\n> >\n> > temp-# EXECUTE PROCEDURE dbuser_account('val1', 'val2', 'val3');\n> >\n> > ERROR: CreateTrigger: function dbuser_account() does not exist\n> >\n> > temp=#\n> >\n> > temp=# DROP FUNCTION dbuser_account(varchar(40), varchar(40),\n> > varchar(40));\n> >\n> > DROP\n> >\n> > --\n> > Rod Taylor\n> >\n> > There are always four sides to every story: your side, their side,\n> the\n> > truth, and what really happened.\n> >\n> \n\n", "msg_date": "Tue, 13 Feb 2001 11:07:05 -0800 (PST)", "msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>", "msg_from_op": false, "msg_subject": "Re: C Trigger issue" } ]
[ { "msg_contents": "I have updated the developers globe web page and have added a new\nsection entitled \"Other Contributors\".\n\nI generated the \"Other Developers\" section by pulling names from\nall versions of the TODO list. Of course, this doesn't list _all_\ncontributors, but just the larger ones. I am glad to add more people as\nappropriate.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 13 Feb 2001 12:13:41 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Update of developer globe page" } ]
[ { "msg_contents": "The 7.1 PostgreSQL ODBC client interface will no longer be able to talk\nto PostgreSQL servers earlier than 6.4. The backward compatibility code\nhas been removed. \n\nDoes anyone want such compatibility?\n\n(FYI, libpq and all interfaces based on it can't talk to such servers\neither.)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 13 Feb 2001 12:31:33 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "ODBC talking to <=6.3 servers" } ]
[ { "msg_contents": "> Might it be, that pg_control is older than it should be ?\n> I mean, that the write to pg_control did not make it to disk,\n> but the checkpoint already completed (removed the logs) ?\n\nWell, WAL does *pg_fsync()* of pg_control before removing old\nlogs, so it's only possible if Ryan run PG with -F (fsync = off).\nRyan?\n\nVadim\n", "msg_date": "Tue, 13 Feb 2001 10:11:31 -0800", "msg_from": "\"Mikheev, Vadim\" <vmikheev@SECTORBASE.COM>", "msg_from_op": true, "msg_subject": "RE: Recovery of PGSQL after system crash failing!!! " }, { "msg_contents": "> Guilty as charged I am afraind... :( Here, I though with WAL and\n> all (bad pun :), I would not need fsync anymore and decided to be\n> reckless. Guess I ought to reconsider that decision.... Though wasn't WAL\n> supposed to remove the need for fsync, or was it just to improve recovery\n> ablity?\n\nIt removes the need to disable fsync to get best performance! The\nconverse is not true; it does not eliminate the need to fsync to help\nguard data integrity, and the WAL file management may be a bit less\nrobust than that for other tables. I can see how this might have been\nomitted from much of the discussion, so it is important that we remind\nourselves about this. Thanks for the reminder :/\n\nSince there is a fundamental recovery problem if the WAL file\ndisappears, then perhaps we should have a workaround which can ignore\nthe requirement for that file on startup? Or maybe we do already?\nVadim??\n\nAlso, could the \"-F\" option be disabled now that WAL is enabled? Or is\nthere still some reason to encourage/allow folks to use it?\n\n - Thomas\n", "msg_date": "Wed, 14 Feb 2001 01:09:15 +0000", "msg_from": "Thomas Lockhart <lockhart@alumni.caltech.edu>", "msg_from_op": false, "msg_subject": "Re: Recovery of PGSQL after system crash failing!!!" }, { "msg_contents": "On Tue, 13 Feb 2001, Mikheev, Vadim wrote:\n\n> > Might it be, that pg_control is older than it should be ?\n> > I mean, that the write to pg_control did not make it to disk,\n> > but the checkpoint already completed (removed the logs) ?\n> \n> Well, WAL does *pg_fsync()* of pg_control before removing old\n> logs, so it's only possible if Ryan run PG with -F (fsync = off).\n> Ryan?\n\n\tGuilty as charged I am afraind... :( Here, I though with WAL and\nall (bad pun :), I would not need fsync anymore and decided to be\nreckless. Guess I ought to reconsider that decision.... Though wasn't WAL\nsupposed to remove the need for fsync, or was it just to improve recovery\nablity? \n\tAnyway, if that is root of the problem, very bad timing on a\nsystem crash, then I will consider this problem solved. Thanks for\neveryone's help.\n\n---------------------------------------------------------------------------\n| \"For to me to live is Christ, and to die is gain.\" |\n| --- Philippians 1:21 (KJV) |\n---------------------------------------------------------------------------\n| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |\n---------------------------------------------------------------------------\n\n", "msg_date": "Tue, 13 Feb 2001 18:31:04 -0700 (MST)", "msg_from": "Ryan Kirkpatrick <pgsql@rkirkpat.net>", "msg_from_op": false, "msg_subject": "RE: Recovery of PGSQL after system crash failing!!! " }, { "msg_contents": "> Since there is a fundamental recovery problem if the WAL file\n> disappears, then perhaps we should have a workaround which can ignore\n> the requirement for that file on startup? Or maybe we do already?\n> Vadim??\n> \n> Also, could the \"-F\" option be disabled now that WAL is enabled? Or is\n> there still some reason to encourage/allow folks to use it?\n\nThe system still fsyncs, so -F is still useful, I think.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 13 Feb 2001 21:40:07 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Re: Recovery of PGSQL after system crash failing!!!" }, { "msg_contents": "Thomas Lockhart <lockhart@alumni.caltech.edu> writes:\n> Also, could the \"-F\" option be disabled now that WAL is enabled? Or is\n> there still some reason to encourage/allow folks to use it?\n\nI was the one who put it back in after Vadim turned it off ;-) ... and\nI'll object to any attempt to remove the option.\n\nI think that there's no longer any good reason for people to consider -F\nin production use. On the other hand, for development or debugging work\nwhere you don't really *care* about powerfail survivability, I see no\nreason to incur extra wear on your disk drives by forcing fsyncs. My\ndrives only have so many seeks left in 'em, and I'd rather see those\nseeks expended on writing source-code files than on fsyncs of test\ndatabases.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 13 Feb 2001 23:47:15 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Re: Recovery of PGSQL after system crash failing!!! " }, { "msg_contents": "Tom Lane writes:\n\n> Thomas Lockhart <lockhart@alumni.caltech.edu> writes:\n> > Also, could the \"-F\" option be disabled now that WAL is enabled? Or is\n> > there still some reason to encourage/allow folks to use it?\n>\n> I was the one who put it back in after Vadim turned it off ;-) ... and\n> I'll object to any attempt to remove the option.\n\nThe description should be updated though:\nhttp://www.postgresql.org/devel-corner/docs/postgres/runtime-config.htm#RUNTIME-CONFIG-GENERAL\n\nI guess a lot of people have heard the rumour \"PG 7.1 offers no-fsync\nperformance with fsync turned on\" and extrapolated \"Imagine what it can do\nif I turn off fsync anyway.\"\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Wed, 14 Feb 2001 18:37:57 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Re: Recovery of PGSQL after system crash failing!!! " }, { "msg_contents": "> Tom Lane writes:\n> \n> > Thomas Lockhart <lockhart@alumni.caltech.edu> writes:\n> > > Also, could the \"-F\" option be disabled now that WAL is enabled? Or is\n> > > there still some reason to encourage/allow folks to use it?\n> >\n> > I was the one who put it back in after Vadim turned it off ;-) ... and\n> > I'll object to any attempt to remove the option.\n> \n> The description should be updated though:\n> http://www.postgresql.org/devel-corner/docs/postgres/runtime-config.htm#RUNTIME-CONFIG-GENERAL\n> \n> I guess a lot of people have heard the rumour \"PG 7.1 offers no-fsync\n> performance with fsync turned on\" and extrapolated \"Imagine what it can do\n> if I turn off fsync anyway.\"\n\nThat is a very subtle point, and one I can imagine many people\nincorrectly assuming.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Wed, 14 Feb 2001 12:47:46 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Re: Recovery of PGSQL after system crash failing!!!" }, { "msg_contents": "On Wed, 14 Feb 2001, Peter Eisentraut wrote:\n\n> Tom Lane writes:\n> \n> > Thomas Lockhart <lockhart@alumni.caltech.edu> writes:\n> > > Also, could the \"-F\" option be disabled now that WAL is enabled? Or is\n> > > there still some reason to encourage/allow folks to use it?\n> >\n> > I was the one who put it back in after Vadim turned it off ;-) ... and\n> > I'll object to any attempt to remove the option.\n> \n> The description should be updated though:\n> http://www.postgresql.org/devel-corner/docs/postgres/runtime-config.htm#RUNTIME-CONFIG-GENERAL\n> \n> I guess a lot of people have heard the rumour \"PG 7.1 offers no-fsync\n> performance with fsync turned on\" and extrapolated \"Imagine what it can do\n> if I turn off fsync anyway.\"\n\n\tThat is exactly what I did... Figured that will WAL removing the\nneed for fsync, it wasn't needed and could be disabled for a nice\nperfomance increase. Now I am quite a bit wiser, and will be leaving\nfsyncing enabled on all 7.1 production servers. :) \n\tThank you for bring that subtle point out and yes, the documention\ncould do with a bit of help on this point. TTYL.\n\n---------------------------------------------------------------------------\n| \"For to me to live is Christ, and to die is gain.\" |\n| --- Philippians 1:21 (KJV) |\n---------------------------------------------------------------------------\n| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |\n---------------------------------------------------------------------------\n\n\n", "msg_date": "Thu, 15 Feb 2001 21:53:52 -0700 (MST)", "msg_from": "Ryan Kirkpatrick <pgsql@rkirkpat.net>", "msg_from_op": false, "msg_subject": "Re: Re: Recovery of PGSQL after system crash failing!!! " } ]
[ { "msg_contents": "Are we not allowed to use NEW and OLD in an EXECUTEd statement?\n\nPostgresql 7.1 beta 4\n\nReceived:\nERROR: NEW used in non-rule query\n\nfrom within a plpgsql function (using an EXECUTE statement of course).\n\nThat aside, is there anyway to do:\n\nv_var := NEW.v_variable;\n\nAs it would be an acceptable alternative.\n\n--\nRod Taylor\n\nThere are always four sides to every story: your side, their side, the\ntruth, and what really happened.", "msg_date": "Tue, 13 Feb 2001 13:13:53 -0500", "msg_from": "\"Rod Taylor\" <rod.taylor@inquent.com>", "msg_from_op": true, "msg_subject": "NEW and OLD in EXECUTE" }, { "msg_contents": "\"Rod Taylor\" <rod.taylor@inquent.com> writes:\n> Are we not allowed to use NEW and OLD in an EXECUTEd statement?\n\nNot for 7.1, I'm afraid. EXECUTE doesn't provide *any* connection\nto the plpgsql function's local namespace; it just hands off the\nconstructed string to the main SQL parser.\n\nIn most cases you can work around this by interpolating the variable's\nvalue into the constructed string, eg,\n\n\texecute ''update foo set bar = '' || new.bar;\n\nUse quote_literal() when interpolating a nonnumeric value this way.\n\nI do have some ideas about improving the situation in 7.2 or later ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 13 Feb 2001 19:10:46 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: NEW and OLD in EXECUTE " } ]
[ { "msg_contents": "I have backed out the changes to ODBC that removed compatibility with\n<6.4 servers, so the 7.1 ODBC code still supports the older servers.\nI have changed the dialog box from \"6.4+\" to \"7.X,6.4+\" to make it less\nconfusing for users.\n\nIs that ODBC protocol dialog box needed? Can the client auto-detect the\nserver version?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Wed, 14 Feb 2001 01:19:33 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "ODBC <6.4 protocol" } ]
[ { "msg_contents": "\n\n> -----Original Message-----\n> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]\n> Sent: 14 February 2001 06:20\n> To: PostgreSQL-development\n> Cc: PostgreSQL odbc list\n> Subject: [ODBC] ODBC <6.4 protocol\n> \n> \n> I have backed out the changes to ODBC that removed compatibility with\n> <6.4 servers, so the 7.1 ODBC code still supports the older servers.\n> I have changed the dialog box from \"6.4+\" to \"7.X,6.4+\" to \n> make it less\n> confusing for users.\n> \n> Is that ODBC protocol dialog box needed? Can the client \n> auto-detect the\n> server version?\n> \n\nI would assume not because the driver needs to make the connection and\nexecute SELECT version() to figure out the server version (which is what\nhappens with the current driver during the ODBC connection initialisation),\nunless there is a way to figure it out from the server's response when the\ntcp/ip connection is initiated. I'm not familiar with the protocol used\nthough so I can't comment on that...\n\nRegards,\n\nDave.\n", "msg_date": "Wed, 14 Feb 2001 08:13:21 -0000", "msg_from": "Dave Page <dpage@vale-housing.co.uk>", "msg_from_op": true, "msg_subject": "RE: [ODBC] ODBC <6.4 protocol" }, { "msg_contents": "Dave Page wrote:\n> \n> > -----Original Message-----\n> > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]\n> >\n> >\n> > I have backed out the changes to ODBC that removed compatibility with\n> > <6.4 servers, so the 7.1 ODBC code still supports the older servers.\n> > I have changed the dialog box from \"6.4+\" to \"7.X,6.4+\" to\n> > make it less\n> > confusing for users.\n> >\n> > Is that ODBC protocol dialog box needed? Can the client\n> > auto-detect the\n> > server version?\n> >\n> \n> I would assume not because the driver needs to make the connection and\n> execute SELECT version() to figure out the server version (which is what\n> happens with the current driver during the ODBC connection initialisation),\n\nversion() first appeared in 6.4.\n\nRegards,\nHiroshi Inoue\n", "msg_date": "Wed, 14 Feb 2001 17:45:45 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: [ODBC] ODBC <6.4 protocol" } ]
[ { "msg_contents": "\n> It removes the need to disable fsync to get best performance! \n\n-F performance is still better, only the difference is not so big as before.\n\n> Since there is a fundamental recovery problem if the WAL file\n> disappears, then perhaps we should have a workaround which can ignore\n> the requirement for that file on startup? Or maybe we do already?\n> Vadim??\n\nThis was discussed, but iirc not yet implemented.\n\n> Also, could the \"-F\" option be disabled now that WAL is enabled? Or is\n> there still some reason to encourage/allow folks to use it?\n\nI use it, since I restore after a system crash (which never happens).\nI think all that is probably missing in -F mode is probably 2-3 fsyncs\nduring checkpoint. One for the xlog, and one for pg_control (maybe also pg_log).\nAll other fsyncs are only to not buffer transactions.\n\nAndreas \n", "msg_date": "Wed, 14 Feb 2001 09:47:22 +0100", "msg_from": "Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>", "msg_from_op": true, "msg_subject": "AW: Recovery of PGSQL after system crash failing!!!" }, { "msg_contents": "> > It removes the need to disable fsync to get best performance! \n> \n> -F performance is still better, only the difference is not so big as before.\n\nWell, when \"checkpoint seek in logs\" will be implemented difference\nwill be the same - lost consistency.\n\n> > Since there is a fundamental recovery problem if the WAL file\n> > disappears, then perhaps we should have a workaround which can ignore\n> > the requirement for that file on startup? Or maybe we do already?\n> > Vadim??\n> \n> This was discussed, but iirc not yet implemented.\n\nYes & yes.\n\n> > Also, could the \"-F\" option be disabled now that WAL is enabled? Or is\n> > there still some reason to encourage/allow folks to use it?\n\nI've used it when testing btree runtime recovery to increase concurrence.\n\n> I use it, since I restore after a system crash (which never happens).\n> I think all that is probably missing in -F mode is probably 2-3 fsyncs\n> during checkpoint. One for the xlog, and one for pg_control (maybe also pg_log).\n> All other fsyncs are only to not buffer transactions.\n\nProbably we could just force fsync during checkpoint, for the moment.\n\nThanks to all for help!\n\nVadim\n\n\n", "msg_date": "Wed, 14 Feb 2001 01:40:52 -0800", "msg_from": "\"Vadim Mikheev\" <vmikheev@sectorbase.com>", "msg_from_op": false, "msg_subject": "Re: Recovery of PGSQL after system crash failing!!!" } ]
[ { "msg_contents": "As you can see from the current open items list, there isn't much left\nto do for the 7.1 release. I am going to suggest we remove the LAZY\nVACUUM option at this point. I know Tom Lane posted an item about the\njoin visibility issue, so hopefully this can be resolved soon. Not sure\nwhat to do about the \"Stuck spinlocks\" but we may have to leave that for\n7.2 or see what problem reports we get from the current code.\n\nThe documentation list is pretty much done. It would be nice to have\nsome more items completed, but I haven't see any comments about them.\n\nSo, where are we in the release cycle? Are we ready to start looking at\ndates to issue release candidates for testing?\n\nThomas Lockhart needs the docs frozen for a while so he can package\nthem.\n\n---------------------------------------------------------------------------\n\n P O S T G R E S Q L\n\n 7 . 1 O P E N I T E M S\n\n\nCurrent at ftp://candle.pha.pa.us/pub/postgresql/open_items.\n\n\nSource Code Changes\n-------------------\nLAZY VACUUM (Vadim)\nvisibility of joined columns in JOIN clauses\nStuck btree spinlocks\n\n\nDocumentation Changes\n---------------------\nJDBC improvements (Peter, Travis Bauer, Christopher Cain, William Webber,\n Gunnar)\nODBC cleanups/improvements (Nick Gorham, Stephan Szabo, Zoltan Kovacs, \n Michael Fork)\nNew PL/pgSQL GET DIAGNOSTICS statement for SPI value access (Jan)\nImprove PL/PgSQL documentation (?)\nStore tables as files named by OID (Vadim)\nNew /contrib/rserv replication toolkit (Vadim)\nNew /contrib/oid2name to map numeric files to table names\nNew pg_class.relkind value for views (Mark Hollomon)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Wed, 14 Feb 2001 11:24:51 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Open 7.1 items" }, { "msg_contents": "Bruce Momjian writes:\n\n> New PL/pgSQL GET DIAGNOSTICS statement for SPI value access (Jan)\n\nIf someone can show me an example of how it operates I can write up\nsomething.\n\n> Improve PL/PgSQL documentation (?)\n\nI agree with the \"(?)\"... Certainly a bit late to start an \"improvement\"\nproject.\n\n> Store tables as files named by OID (Vadim)\n\nThis has never been documented to the contrary AFAIK. There's an empty\n\"Storage\" chapter, which would be a good place to put this --- eventually.\n\n> New /contrib/rserv replication toolkit (Vadim)\n> New /contrib/oid2name to map numeric files to table names\n\nThese both have their appropriate READMEs.\n\n> New pg_class.relkind value for views (Mark Hollomon)\n\nDocumented.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Wed, 14 Feb 2001 18:27:23 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "> Bruce Momjian writes:\n> \n> > New PL/pgSQL GET DIAGNOSTICS statement for SPI value access (Jan)\n> \n> If someone can show me an example of how it operates I can write up\n> something.\n\nI found:\n\n > Quoting a recent message by Jan Wieck <janwieck@Yahoo.com>:\n > :Do a\n > :\n > : GET DIAGNOSTICS SELECT PROCESSED INTO <int4_variable>; \n > :\n > :directly after an INSERT, UPDATE or DELETE statement and you'll know\n > :how many rows have been hit.\n > :\n > :Also you can get the OID of an inserted row with\n > :\n > : GET DIAGNOSTICS SELECT RESULT INTO <int4_variable>;\n > \n\nLooking at plpgsql/src/gram.y, it only supports PROCESSED (rows\nreturned/affected) and RESULT (OID). The grammar indicates that only\nSELECT is allowed in GET DIAGNOSTICS SELECT. Jan says it works for\nINSERT/UPDATE/DELETE too, but I guess you still use GET DIAGNOSTICS\nSELECT.\n\n\n> \n> > Improve PL/PgSQL documentation (?)\n> \n> I agree with the \"(?)\"... Certainly a bit late to start an \"improvement\"\n> project.\n\nI heard someone was working on that and was not sure how far they were. \nAs I remember, docs can pretty much be done anytime before doc freeze.\nProbably will not happen in 7.1. Item removed.\n\n> > Store tables as files named by OID (Vadim)\n> \n> This has never been documented to the contrary AFAIK. There's an empty\n> \"Storage\" chapter, which would be a good place to put this --- eventually.\n\nOK, Removed.\n\n> \n> > New /contrib/rserv replication toolkit (Vadim)\n> > New /contrib/oid2name to map numeric files to table names\n> \n> These both have their appropriate READMEs.\n\nYes, I kept rserv in there in case we wanted to more prominently mention\nit in the HISTORY file and give an overview. Guess not. Seems like a\npretty cool thing to keep hidden in /contrib. The /rserv README doesn't\nadequately describe its usefulness. All removed.\n\n\n> > New pg_class.relkind value for views (Mark Hollomon)\n> \n> Documented.\n\nRemoved.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Wed, 14 Feb 2001 12:46:46 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "> ...join visibility issue...\n\nI'm not sure if the \"table shape for natural joins issue\" has been\nformalized, but afaik it isn't covered in the scoping patch. Tom?\n\n - Thomas\n", "msg_date": "Wed, 14 Feb 2001 19:03:13 +0000", "msg_from": "Thomas Lockhart <lockhart@alumni.caltech.edu>", "msg_from_op": false, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "Bruce Momjian writes:\n\n> > Bruce Momjian writes:\n> >\n> > > New PL/pgSQL GET DIAGNOSTICS statement for SPI value access (Jan)\n> >\n> > If someone can show me an example of how it operates I can write up\n> > something.\n>\n> I found:\n>\n> > Quoting a recent message by Jan Wieck <janwieck@Yahoo.com>:\n> > :Do a\n> > :\n> > : GET DIAGNOSTICS SELECT PROCESSED INTO <int4_variable>;\n> > :\n> > :directly after an INSERT, UPDATE or DELETE statement and you'll know\n> > :how many rows have been hit.\n> > :\n> > :Also you can get the OID of an inserted row with\n> > :\n> > : GET DIAGNOSTICS SELECT RESULT INTO <int4_variable>;\n> >\n>\n> Looking at plpgsql/src/gram.y, it only supports PROCESSED (rows\n> returned/affected) and RESULT (OID). The grammar indicates that only\n> SELECT is allowed in GET DIAGNOSTICS SELECT. Jan says it works for\n> INSERT/UPDATE/DELETE too, but I guess you still use GET DIAGNOSTICS\n> SELECT.\n\nMay I suggest that this is the wrong syntax? It should be\n\nGET DIAGNOSTICS <variable> = ROW_COUNT;\n\nSee SQL99 part 2, clause 19.1.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Wed, 14 Feb 2001 21:28:07 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "Thomas Lockhart <lockhart@alumni.caltech.edu> writes:\n>> ...join visibility issue...\n> I'm not sure if the \"table shape for natural joins issue\" has been\n> formalized, but afaik it isn't covered in the scoping patch. Tom?\n\nFar as I know, we were OK on that before.\n\ntest=# create table a(f1 int, f2 int);\nCREATE\ntest=# create table b(f1 int, f3 int);\nCREATE\ntest=# select * from a natural join b;\n f1 | f2 | f3\n----+----+----\n(0 rows)\n\ntest=# select * from a join b using(f1);\n f1 | f2 | f3\n----+----+----\n(0 rows)\n\ntest=# select * from a join b on (a.f1=b.f1);\n f1 | f2 | f1 | f3\n----+----+----+----\n(0 rows)\n\nThis is per spec, no?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 14 Feb 2001 16:16:19 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Open 7.1 items " }, { "msg_contents": "Bruce Momjian wrote:\n\n\n> P O S T G R E S Q L\n> \n> 7 . 1 O P E N I T E M S\n> \n> Current at ftp://candle.pha.pa.us/pub/postgresql/open_items.\n\nAny possibility of putting my getlocale into contrib ?\n\nI agree that it should in fact be in the pg_locale.c but that would be a\nfeature and we don't add new features this late.\n\nOTOH it is helpful if users (specially those that use rpm's or other\npackaged binaries) have an easy way to find out\nwhat locale they happen to run in (as it often it just happens ;)\n\n--------------\nHannu\n", "msg_date": "Thu, 15 Feb 2001 00:27:08 +0200", "msg_from": "Hannu Krosing <hannu@tm.ee>", "msg_from_op": false, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "> Far as I know, we were OK on that before.\n\nWe weren't last time I tested (there was a thread on this a while ago),\nbut...\n\n> This is per spec, no?\n\n... it sure is. Looks great!\n\n - Thomas\n", "msg_date": "Wed, 14 Feb 2001 22:49:04 +0000", "msg_from": "Thomas Lockhart <lockhart@alumni.caltech.edu>", "msg_from_op": false, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "> Bruce Momjian wrote:\n> \n> \n> > P O S T G R E S Q L\n> > \n> > 7 . 1 O P E N I T E M S\n> > \n> > Current at ftp://candle.pha.pa.us/pub/postgresql/open_items.\n> \n> Any possibility of putting my getlocale into contrib ?\n> \n> I agree that it should in fact be in the pg_locale.c but that would be a\n> feature and we don't add new features this late.\n> \n> OTOH it is helpful if users (specially those that use rpm's or other\n> packaged binaries) have an easy way to find out\n> what locale they happen to run in (as it often it just happens ;)\n\nActually, I have something from Oliver Elphick called pg_controldata:\n\n\t$ pg_controldata\n\tLog file id: 0\n\tLog file segment: 5\n\tLast modified: Wed Feb 7 19:35:47 2001\n\tDatabase block size: 8192\n\tBlocks per segment of large relation: 131072\n\tCatalog version number: 200101061\n\tLC_COLLATE: en_GB\n\tLC_CTYPE: en_GB\n\tLog archive directory: \n\nThis looks quite valuable. Do people want this in /contrib? How does\nthis compare to your utility?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Wed, 14 Feb 2001 17:55:00 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> > Bruce Momjian wrote:\n> >\n> >\n> > > P O S T G R E S Q L\n> > >\n> > > 7 . 1 O P E N I T E M S\n> > >\n> > > Current at ftp://candle.pha.pa.us/pub/postgresql/open_items.\n> >\n> > Any possibility of putting my getlocale into contrib ?\n> >\n> > I agree that it should in fact be in the pg_locale.c but that would be a\n> > feature and we don't add new features this late.\n> >\n> > OTOH it is helpful if users (specially those that use rpm's or other\n> > packaged binaries) have an easy way to find out\n> > what locale they happen to run in (as it often it just happens ;)\n> \n> Actually, I have something from Oliver Elphick called pg_controldata:\n\nCould you send it to me so that I can find out how he gets the\nLC_COLLATE \nand LC_CTYPE from backend (assuming it tells backend locale not cients)\n?\n \n> $ pg_controldata\n> Log file id: 0\n> Log file segment: 5\n> Last modified: Wed Feb 7 19:35:47 2001\n> Database block size: 8192\n> Blocks per segment of large relation: 131072\n> Catalog version number: 200101061\n> LC_COLLATE: en_GB\n> LC_CTYPE: en_GB\n> Log archive directory:\n> \n> This looks quite valuable. Do people want this in /contrib? How does\n> this compare to your utility?\n\nMine is an external C funtion, so it can easily be used from any client.\nAnd I intend to propose it into pg_locale.c ealy in 7.2 development.\n\n-----------\nHannu\n", "msg_date": "Thu, 15 Feb 2001 00:59:28 +0200", "msg_from": "Hannu Krosing <hannu@tm.ee>", "msg_from_op": false, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "> > Actually, I have something from Oliver Elphick called pg_controldata:\n> \n> Could you send it to me so that I can find out how he gets the\n> LC_COLLATE \n> and LC_CTYPE from backend (assuming it tells backend locale not cients)\n> ?\n> \n> > $ pg_controldata\n> > Log file id: 0\n> > Log file segment: 5\n> > Last modified: Wed Feb 7 19:35:47 2001\n> > Database block size: 8192\n> > Blocks per segment of large relation: 131072\n> > Catalog version number: 200101061\n> > LC_COLLATE: en_GB\n> > LC_CTYPE: en_GB\n> > Log archive directory:\n> > \n> > This looks quite valuable. Do people want this in /contrib? How does\n> > this compare to your utility?\n> \n> Mine is an external C funtion, so it can easily be used from any client.\n> And I intend to propose it into pg_locale.c ealy in 7.2 development.\n\nHis is an external C program also. The C source is attached.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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/* pg_controldata\n *\n * reads the data from $PGDATA/global/pg_control\n *\n * copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;\n * licence: BSD\n *\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <time.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n\n\ntypedef unsigned int uint32;\n\n#include \"config.h\"\n#include \"access/xlogdefs.h\"\n\n/*\n * #include \"access/xlog.h\"\n * #include \"c.h\"\n */\n\n/* The following definitions are extracted from access/xlog.h and its\n * recursive includes. There is too much initialisation needed if\n * they are included direct. Perhaps someone more knowledgeable can\n * fix that.\n */\ntypedef struct crc64\n{\n\tuint32 crc1;\n\tuint32 crc2;\n} crc64;\n\n#define LOCALE_NAME_BUFLEN 128\n\ntypedef enum DBState\n{\n\tDB_STARTUP = 0,\n\tDB_SHUTDOWNED,\n\tDB_SHUTDOWNING,\n\tDB_IN_RECOVERY,\n\tDB_IN_PRODUCTION\n} DBState;\n\n\ntypedef struct ControlFileData\n{\n crc64 crc;\n uint32 logId; /* current log file id */\n uint32 logSeg; /* current log file segment (1-based) */\n struct \n\tXLogRecPtr\tcheckPoint; /* last check point record ptr */\n time_t time; /* time stamp of last modification */\n DBState state; /* see enum above */\n\n /*\n * this data is used to make sure that configuration of this DB is\n * compatible with the backend executable\n */\n uint32 blcksz; /* block size for this DB */\n uint32 relseg_size; /* blocks per segment of large relation */\n uint32 catalog_version_no; /* internal version number */\n /* active locales --- \"C\" if compiled without USE_LOCALE: */\n char lc_collate[LOCALE_NAME_BUFLEN];\n char lc_ctype[LOCALE_NAME_BUFLEN];\n\n /*\n * important directory locations\n */\n char archdir[MAXPGPATH]; /* where to move offline log files */\n} ControlFileData;\n\nint main() {\n\tControlFileData ControlFile;\n\tint fd;\n\tchar ControlFilePath[MAXPGPATH];\n\tchar *DataDir;\n\tchar tmdt[32];\n\n\tDataDir = getenv(\"PGDATA\");\n\tif ( DataDir == NULL ) {\n\t\tfprintf(stderr,\"PGDATA is not defined\\n\");\n\t\texit(1);\n\t}\n\n\tsnprintf(ControlFilePath, MAXPGPATH, \"%s/global/pg_control\", DataDir);\n\n\tif ((fd = open(ControlFilePath, O_RDONLY)) == -1) {\n\t\tperror(\"Failed to open $PGDATA/global/pg_control for reading\");\n\t\texit(2);\n\t}\n\n\tread(fd, &ControlFile, sizeof(ControlFileData));\n\tstrftime(tmdt, 32, \"%c\", localtime(&(ControlFile.time)));\n\n\tprintf(\"Log file id: %u\\n\"\n\t \"Log file segment: %u\\n\"\n\t\t\t \"Last modified: %s\\n\"\n\t\t\t \"Database block size: %u\\n\"\n\t\t\t \"Blocks per segment of large relation: %u\\n\"\n\t\t\t \"Catalog version number: %u\\n\"\n\t\t\t \"LC_COLLATE: %s\\n\"\n\t\t\t \"LC_CTYPE: %s\\n\"\n\t\t\t \"Log archive directory: %s\\n\",\n\t\t\t ControlFile.logId,\n\t\t\t ControlFile.logSeg,\n\t\t\t tmdt,\n\t\t\t ControlFile.blcksz,\n\t\t\t ControlFile.relseg_size,\n\t\t\t ControlFile.catalog_version_no,\n\t\t\t ControlFile.lc_collate,\n\t\t\t ControlFile.lc_ctype,\n\t\t\t ControlFile.archdir);\n\t\n\treturn (0);\n}", "msg_date": "Wed, 14 Feb 2001 18:05:14 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "> As you can see from the current open items list, there isn't much left\n> to do for the 7.1 release. I am going to suggest we remove the LAZY\n> VACUUM option at this point. I know Tom Lane posted an item about the\n\nWell, leaving for vacation tomorrow I have to agree -:(\nLAZY patch will be available in a few days after 7.1 release.\n\nVadim\n\n\n", "msg_date": "Wed, 14 Feb 2001 19:04:54 -0800", "msg_from": "\"Vadim Mikheev\" <vmikheev@sectorbase.com>", "msg_from_op": false, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> > As you can see from the current open items list, there isn't much left\n> > to do for the 7.1 release. I am going to suggest we remove the LAZY\n> > VACUUM option at this point. I know Tom Lane posted an item about the\n> \n> Well, leaving for vacation tomorrow I have to agree -:(\n> LAZY patch will be available in a few days after 7.1 release.\n\nSeems we should keep it as an option outside the tree for a while. \nRemember, pgindent will be done before final. Is that OK?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Wed, 14 Feb 2001 22:30:08 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "Hi there...\n\n I would like to inquire of possible support for running PostgreSQL on a\nLinux Cluster. How would i implement and configure PostgreSQL as a\ndistributed database i.e. replicated on several servers?\n\n I am anxious to hear from you guys.\n\n-- \n Manny C. Cabido\n ====================================\n e-mail:manny@tinago.msuiit.edu.ph\n manny@sun.msuiit.edu.ph\n =====================================\n\n", "msg_date": "Thu, 15 Feb 2001 12:29:39 +0800 (PHT)", "msg_from": "Manuel Cabido <manny@msuiit.edu.ph>", "msg_from_op": false, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "\nCan someone comment on this? Seems GET DIAGNOSTICS is wrong from\nPeter's reading of SQL92, and mine too.\n\n\n> Bruce Momjian writes:\n> \n> > > Bruce Momjian writes:\n> > >\n> > > > New PL/pgSQL GET DIAGNOSTICS statement for SPI value access (Jan)\n> > >\n> > > If someone can show me an example of how it operates I can write up\n> > > something.\n> >\n> > I found:\n> >\n> > > Quoting a recent message by Jan Wieck <janwieck@Yahoo.com>:\n> > > :Do a\n> > > :\n> > > : GET DIAGNOSTICS SELECT PROCESSED INTO <int4_variable>;\n> > > :\n> > > :directly after an INSERT, UPDATE or DELETE statement and you'll know\n> > > :how many rows have been hit.\n> > > :\n> > > :Also you can get the OID of an inserted row with\n> > > :\n> > > : GET DIAGNOSTICS SELECT RESULT INTO <int4_variable>;\n> > >\n> >\n> > Looking at plpgsql/src/gram.y, it only supports PROCESSED (rows\n> > returned/affected) and RESULT (OID). The grammar indicates that only\n> > SELECT is allowed in GET DIAGNOSTICS SELECT. Jan says it works for\n> > INSERT/UPDATE/DELETE too, but I guess you still use GET DIAGNOSTICS\n> > SELECT.\n> \n> May I suggest that this is the wrong syntax? It should be\n> \n> GET DIAGNOSTICS <variable> = ROW_COUNT;\n> \n> See SQL99 part 2, clause 19.1.\n> \n> -- \n> Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n> \n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Fri, 16 Feb 2001 12:15:35 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "At 12:15 16/02/01 -0500, Bruce Momjian wrote:\n>\n>Can someone comment on this? Seems GET DIAGNOSTICS is wrong from\n>Peter's reading of SQL92, and mine too.\n>\n\nHe's quite correct.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Sat, 17 Feb 2001 10:45:14 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: Open 7.1 items" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Quoting a recent message by Jan Wieck <janwieck@Yahoo.com>:\n> :Do a\n> :\n> : GET DIAGNOSTICS SELECT PROCESSED INTO <int4_variable>;\n> :\n> :directly after an INSERT, UPDATE or DELETE statement and you'll know\n> :how many rows have been hit.\n> :\n> :Also you can get the OID of an inserted row with\n> :\n> : GET DIAGNOSTICS SELECT RESULT INTO <int4_variable>;\n\n> May I suggest that this is the wrong syntax? It should be\n>\n> GET DIAGNOSTICS <variable> = ROW_COUNT;\n>\n> See SQL99 part 2, clause 19.1.\n\nHmm, that's definitely what SQL99 uses for the syntax. I wonder where\nJan got the SELECT INTO syntax --- did he borrow it from Oracle?\nAnyone have an Oracle manual to check?\n\nI'd be more inclined to follow the spec than Oracle, anyway. But\nif we're going to change it, we'd better do so before 7.1 release,\nelse we'll have a backwards-compatibility problem.\n\nWe'd need to come up with a name for the inserted-OID result,\nsince that's not one of the spec-listed items. I'd suggest just\n\tGET DIAGNOSTICS <variable> = OID;\nwhich seems unlikely to conflict with any future spec extension.\nBut maybe someone has a better idea.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 18 Feb 2001 18:49:22 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "GET DIAGNOSTICS (was Re: Open 7.1 items)" }, { "msg_contents": "At 18:49 18/02/01 -0500, Tom Lane wrote:\n>Peter Eisentraut <peter_e@gmx.net> writes:\n>> :\n>> : GET DIAGNOSTICS SELECT RESULT INTO <int4_variable>;\n>\n>> May I suggest that this is the wrong syntax? It should be\n>\n>Hmm, that's definitely what SQL99 uses for the syntax. I wonder where\n>Jan got the SELECT INTO syntax --- did he borrow it from Oracle?\n>Anyone have an Oracle manual to check?\n\nSadly, we made it up. I needed to get the SPI variables and we came up with\nthis. I sent the patches for PROCESSED and RESULT in 1999 (I think) - pre\nV6.5, anyway. I had no idea that they had been applied until people started\nasking questions about them.\n\n\n>I'd be more inclined to follow the spec than Oracle, anyway.\n\nI agree.\n\nHowever, there is a case for keeping the 'select' version as well; you have\nalready raised the need to handle the 'OID' case, and I can imagine there\nmight be a few other PG-specific things we might want in the future -\nkeeping the two separate may be a good option:\n\nWe *do* need to support ROW_COUNT, but allowing\n\n GET DIAGNOSTICS Select ROW_COUNT, SQLCODE, OID Into :a,:b:,:c;\n\nis a lot friendlier than the standard:\n\n GET DIAGNOSTICS :a = ROW_COUNT;\n GET DIAGNOSTICS EXCEPTION 1 :b = SQLCODE;\n GET DIAGNOSTICS :c = OID;\n\n(not that we even support SQLCODE at this stage).\n\n\n>if we're going to change it, we'd better do so before 7.1 release,\n>else we'll have a backwards-compatibility problem.\n\n*If* you accept the desirability of 'select', then this is not true.\n\n\nP.S. Is Jan around? He's been very quiet recently...\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Mon, 19 Feb 2001 12:33:26 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: GET DIAGNOSTICS (was Re: Open 7.1 items)" }, { "msg_contents": "Philip Warner <pjw@rhyme.com.au> writes:\n>> Hmm, that's definitely what SQL99 uses for the syntax. I wonder where\n>> Jan got the SELECT INTO syntax --- did he borrow it from Oracle?\n\n> Sadly, we made it up.\n\nAh so. Well, friendliness aside, I'd go with the spec's syntax.\n\n> We *do* need to support ROW_COUNT, but allowing\n\n> GET DIAGNOSTICS Select ROW_COUNT, SQLCODE, OID Into :a,:b:,:c;\n\n> is a lot friendlier than the standard:\n\n> GET DIAGNOSTICS :a = ROW_COUNT;\n> GET DIAGNOSTICS EXCEPTION 1 :b = SQLCODE;\n> GET DIAGNOSTICS :c = OID;\n\nIt looks to me like SQL99 allows\n\n\tGET DIAGNOSTICS :a = ROW_COUNT, :b = OID, ...;\n\nwhich is at least as good as the SELECT syntax, if not better since each\ntarget variable and info spec are kept together.\n\n> P.S. Is Jan around? He's been very quiet recently...\n\nHe's still engaged in moving from Germany to Norfolk, VA. I think his\nnet-access is somewhat erratic :-(\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 18 Feb 2001 20:40:10 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: GET DIAGNOSTICS (was Re: Open 7.1 items) " }, { "msg_contents": "Tom Lane wrote:\n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > Quoting a recent message by Jan Wieck <janwieck@Yahoo.com>:\n> > :Do a\n> > :\n> > : GET DIAGNOSTICS SELECT PROCESSED INTO <int4_variable>;\n> > :\n> > :directly after an INSERT, UPDATE or DELETE statement and you'll know\n> > :how many rows have been hit.\n> > :\n> > :Also you can get the OID of an inserted row with\n> > :\n> > : GET DIAGNOSTICS SELECT RESULT INTO <int4_variable>;\n>\n> > May I suggest that this is the wrong syntax? It should be\n> >\n> > GET DIAGNOSTICS <variable> = ROW_COUNT;\n> >\n> > See SQL99 part 2, clause 19.1.\n>\n> Hmm, that's definitely what SQL99 uses for the syntax. I wonder where\n> Jan got the SELECT INTO syntax --- did he borrow it from Oracle?\n> Anyone have an Oracle manual to check?\n\n Got it as a patch from - um - forgotten. Didn't new that\n there is something in the SQL99.\n\n> I'd be more inclined to follow the spec than Oracle, anyway. But\n> if we're going to change it, we'd better do so before 7.1 release,\n> else we'll have a backwards-compatibility problem.\n\n Agreed.\n\n> We'd need to come up with a name for the inserted-OID result,\n> since that's not one of the spec-listed items. I'd suggest just\n> GET DIAGNOSTICS <variable> = OID;\n> which seems unlikely to conflict with any future spec extension.\n> But maybe someone has a better idea.\n\n The problem here is that the PL/pgSQL parser doesn't have the\n mechanisms for enabling keywords as identifiers, the main\n parser has. So using an existing type name might cause some\n trouble. What about INSERTED_OID?\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Mon, 19 Feb 2001 14:54:30 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@Yahoo.com>", "msg_from_op": false, "msg_subject": "Re: GET DIAGNOSTICS (was Re: Open 7.1 items)" }, { "msg_contents": "Philip Warner wrote:\n>\n> P.S. Is Jan around? He's been very quiet recently...\n\nHe is,\n\n just a little quiet. I can live with it either way. The main\n problem, as said, is that we need to allow some keywords as\n identifiers in PL/pgSQL like in the main parser. Actually we\n added RESULT as a reserved word, what's a likely variable\n name inside of functions. So I think we have something to do\n anyway.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Mon, 19 Feb 2001 15:06:21 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@Yahoo.com>", "msg_from_op": false, "msg_subject": "Re: GET DIAGNOSTICS (was Re: Open 7.1 items)" }, { "msg_contents": "Tom Lane wrote:\n> Philip Warner <pjw@rhyme.com.au> writes:\n> >> Hmm, that's definitely what SQL99 uses for the syntax. I wonder where\n> >> Jan got the SELECT INTO syntax --- did he borrow it from Oracle?\n>\n> > Sadly, we made it up.\n>\n> Ah so. Well, friendliness aside, I'd go with the spec's syntax.\n>\n> > We *do* need to support ROW_COUNT, but allowing\n>\n> > GET DIAGNOSTICS Select ROW_COUNT, SQLCODE, OID Into :a,:b:,:c;\n>\n> > is a lot friendlier than the standard:\n>\n> > GET DIAGNOSTICS :a = ROW_COUNT;\n> > GET DIAGNOSTICS EXCEPTION 1 :b = SQLCODE;\n> > GET DIAGNOSTICS :c = OID;\n>\n> It looks to me like SQL99 allows\n>\n> GET DIAGNOSTICS :a = ROW_COUNT, :b = OID, ...;\n\n I like this one - except for the OID which should IMHO read\n INSERTED_OID.\n\n> > P.S. Is Jan around? He's been very quiet recently...\n>\n> He's still engaged in moving from Germany to Norfolk, VA. I think his\n> net-access is somewhat erratic :-(\n\n Actually it's more the \"custody for my children\" thing than\n the movement itself. For the net-access: my mother's\n appartment has a phone line, so I can use my 33K6 modem for\n dialup - that's all.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Mon, 19 Feb 2001 15:11:46 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@Yahoo.com>", "msg_from_op": false, "msg_subject": "Re: GET DIAGNOSTICS (was Re: Open 7.1 items)" }, { "msg_contents": "Jan Wieck <janwieck@yahoo.com> writes:\n> I like this one - except for the OID which should IMHO read\n> INSERTED_OID.\n\nI just committed changes that make it RESULT_OID, but if you like\nINSERTED_OID better, we could change it...\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 19 Feb 2001 15:21:48 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: GET DIAGNOSTICS (was Re: Open 7.1 items) " }, { "msg_contents": "Tom Lane wrote:\n> Jan Wieck <janwieck@yahoo.com> writes:\n> > I like this one - except for the OID which should IMHO read\n> > INSERTED_OID.\n>\n> I just committed changes that make it RESULT_OID, but if you like\n> INSERTED_OID better, we could change it...\n\nOh boy,\n\n at your current speed, my limited internet access seems\n really to become kinda problem. Before I participate in the\n discussion you already committed. That aint fair :-)\n\n RESULT_OID is OK, or make it ONE_OF_THE_NEW_CREATED_OIDS,\n because in the case of an INSERT ... SELECT it isn't the\n entire story either way.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Mon, 19 Feb 2001 15:41:59 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@Yahoo.com>", "msg_from_op": false, "msg_subject": "Re: GET DIAGNOSTICS (was Re: Open 7.1 items)" }, { "msg_contents": "> Jan Wieck <janwieck@yahoo.com> writes:\n> > I like this one - except for the OID which should IMHO read\n> > INSERTED_OID.\n> \n> I just committed changes that make it RESULT_OID, but if you like\n> INSERTED_OID better, we could change it...\n\nI think I like RESULT_OID because the standard uses RESULT.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Mon, 19 Feb 2001 15:47:47 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: GET DIAGNOSTICS (was Re: Open 7.1 items)" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Bruce Momjian writes:\n> I just committed changes that make it RESULT_OID, but if you like\n> INSERTED_OID better, we could change it...\n>> \n>> I think I like RESULT_OID because the standard uses RESULT.\n\n> RESULT* is used for SELECT statements, but RESULT_OID is for INSERT\n> commands. It sounds a bit like that results get oids assigned. Maybe.\n\nI don't have a strong feeling either way, but it occurred to me that\nRESULT_OID might be better since it could be used for more purposes,\neg, returning a last-affected-row OID for UPDATE or DELETE. Not that\nwe do that now, but we wouldn't have to chew up additional keywords\nif we wanted to start doing it.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 20 Feb 2001 10:34:12 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: GET DIAGNOSTICS (was Re: Open 7.1 items) " }, { "msg_contents": "Bruce Momjian writes:\n\n> > I just committed changes that make it RESULT_OID, but if you like\n> > INSERTED_OID better, we could change it...\n>\n> I think I like RESULT_OID because the standard uses RESULT.\n\nRESULT* is used for SELECT statements, but RESULT_OID is for INSERT\ncommands. It sounds a bit like that results get oids assigned. Maybe.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Tue, 20 Feb 2001 16:38:20 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: GET DIAGNOSTICS (was Re: Open 7.1 items)" } ]
[ { "msg_contents": "Jason Tishler and I are planning to create a patch to allow PostgreSQL\nto run directly as an NT service. I've submitted a similar patch\nwhich may well be incorporated into the next release of Cygipc, and\nwe've got a plan for doing the same for PostgreSQL: see\nhttp://ontosys.com/phiki/PostgresqlNtServiceDesign\nI've vetted that plan past this group and have incorporated feedback.\n\nGetting to my question: Is it possible to create a CVS branch of the\nHEAD (tip) of the PostgreSQL CVS for us to use in this work?\n\nHaving such a branch would allow Jason and I to coordinate our work\neasily, and it also gives the pgsql-hackers community an easy way to\nview (and review) our work. Once/if the work is stable and approved,\nwe/someone could then use CVS tools to merge that branch back onto the\nmain line and cease any further work on that branch.\n\n-- \nFred Yankowski fred@OntoSys.com tel: +1.630.879.1312\nPrincipal Consultant www.OntoSys.com fax: +1.630.879.1370\nOntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA\n", "msg_date": "Wed, 14 Feb 2001 11:44:00 -0600", "msg_from": "Fred Yankowski <fred@ontosys.com>", "msg_from_op": true, "msg_subject": "possible to create CVS branch for proposed patch?" }, { "msg_contents": "Fred Yankowski <fred@ontosys.com> writes:\n> Getting to my question: Is it possible to create a CVS branch of the\n> HEAD (tip) of the PostgreSQL CVS for us to use in this work?\n\nIt seems unlikely that this work is large enough to justify a branch.\nWhy don't you just work together and submit a patch when you are done?\n\nWe have talked about using branches for projects of the scale of the\nplanned querytree redesign, which would (a) hit most of the backend,\nand (b) break everything until it's done, so other developers couldn't\nget anything done meanwhile if it's done on the tip. An NT-service\nwrapper should not have either of those properties, seems to me.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 14 Feb 2001 13:33:13 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: possible to create CVS branch for proposed patch? " }, { "msg_contents": "Fred Yankowski writes:\n\n> Jason Tishler and I are planning to create a patch to allow PostgreSQL\n> to run directly as an NT service. I've submitted a similar patch\n> which may well be incorporated into the next release of Cygipc, and\n> we've got a plan for doing the same for PostgreSQL: see\n> http://ontosys.com/phiki/PostgresqlNtServiceDesign\n> I've vetted that plan past this group and have incorporated feedback.\n\nSeems like something that should be done in a separate wrapper program.\nLittering the backend with vast sections of platform-specific code that\nprovides optional functional is probably not going to fly, if I can assess\nthis group correctly.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Wed, 14 Feb 2001 19:43:25 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: possible to create CVS branch for proposed patch?" }, { "msg_contents": "On Wed, Feb 14, 2001 at 07:43:25PM +0100, Peter Eisentraut wrote:\n> Seems like something that should be done in a separate wrapper program.\n> Littering the backend with vast sections of platform-specific code that\n> provides optional functional is probably not going to fly, if I can assess\n> this group correctly.\n\nOur plan puts most of the work in a new NT/Cygwin-only version of\nbackend/main.c. If we can use the existing signal() scheme to shut\ndown PG, then we might not have to touch _anything_ else.\n\nWhat do you see in our plan that implies \"vast sections of\nplatform-specific code\" \"littering the backend\"? If such changes are\nnecessary, I want to know before we embark on this work.\n\nAs far as this being \"optional functional[ity]\", I contend that\nPostgreSQL has no place as a ready-for-business tool on NT without\nthis (or similar) work so that PG runs cleanly as a service, starting\nup and shutting down properly.\n\n-- \nFred Yankowski fred@OntoSys.com tel: +1.630.879.1312\nPrincipal Consultant www.OntoSys.com fax: +1.630.879.1370\nOntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA\n", "msg_date": "Wed, 14 Feb 2001 12:53:49 -0600", "msg_from": "Fred Yankowski <fred@ontosys.com>", "msg_from_op": true, "msg_subject": "Re: possible to create CVS branch for proposed patch?" }, { "msg_contents": "> On Wed, Feb 14, 2001 at 07:43:25PM +0100, Peter Eisentraut wrote:\n> > Seems like something that should be done in a separate wrapper program.\n> > Littering the backend with vast sections of platform-specific code that\n> > provides optional functional is probably not going to fly, if I can assess\n> > this group correctly.\n> \n> Our plan puts most of the work in a new NT/Cygwin-only version of\n> backend/main.c. If we can use the existing signal() scheme to shut\n> down PG, then we might not have to touch _anything_ else.\n> \n> What do you see in our plan that implies \"vast sections of\n> platform-specific code\" \"littering the backend\"? If such changes are\n> necessary, I want to know before we embark on this work.\n> \n> As far as this being \"optional functional[ity]\", I contend that\n> PostgreSQL has no place as a ready-for-business tool on NT without\n> this (or similar) work so that PG runs cleanly as a service, starting\n> up and shutting down properly.\n\nAgreed. We just want to minimize the affect on other areas of the code.\nWe have been pretty good at keeping platform-specific stuff isolated.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Wed, 14 Feb 2001 14:03:01 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: possible to create CVS branch for proposed patch?" }, { "msg_contents": "Fred Yankowski writes:\n\n> What do you see in our plan that implies \"vast sections of\n> platform-specific code\" \"littering the backend\"? If such changes are\n> necessary, I want to know before we embark on this work.\n>\n> As far as this being \"optional functional[ity]\", I contend that\n> PostgreSQL has no place as a ready-for-business tool on NT without\n> this (or similar) work so that PG runs cleanly as a service, starting\n> up and shutting down properly.\n\nHaving one program do different things on different platforms is something\nthat should be avoided at all costs, IMHO. Every platform has its,\nvaryingly complex, requirements for starting daemons at boot time, but\nstill the backend is isolated from these considerations. For that we have\npg_ctl, contrib/start-scripts, or other solutions. Before I see specific\ncode I can't comment on your issue, but it's hard to imagine that a\nwrapper program couldn't cover it.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Thu, 15 Feb 2001 22:25:39 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: possible to create CVS branch for proposed patch?" } ]
[ { "msg_contents": "Hello,\n\nI'm writing a name server switch (nss) module for Irix/PostgreSQL, but i\nhave some trouble to get it to work.\n\nWhen i use the blocking functions of PostgreSQL, then there isn't any\nresponse until the nss daemons times out. But right after that i get the\nresults (which is too late in this situation).\n\nWhen i use the non blocking functions of PostgreSQL the program executes\nuntil it reaches PQsendQuery() and then returns an error indicating\n\"There is no connection to the backend.\"\n\nWhen i use the result of PQsocket() in a select statemen, it results in\na \"error in select: Bad file number\" error message (and PostgreSQL\nitself shows \"PacketSendFragment: write() failed: Broken pipe\").\n\nDoes anybody have any idea what makes PostgreSQL block?\n\nRegards,\n\nErik Hofman\n", "msg_date": "Wed, 14 Feb 2001 19:32:13 +0100", "msg_from": "Erik Hofman <erik@ehofman.com>", "msg_from_op": true, "msg_subject": "Blocking behaviour and other problems" } ]
[ { "msg_contents": "Hello world,\n\n\nI saw that PostgreSQL doesn't works with\na MOSIX cluster because shared memory.\n\nWell, some day MOSIX will be there, I'll\nbe waiting for a shared memory support! \n\nThe question is: does anybody know another\ncluster software that supports shared\nmemory? \n\n\nThanx,\n-- \n -------------------------------------------------\n| F�bio B. de Paula | fabio@olinux.com.br |\n| Linux Solutions Consultoria | www.olinux.com.br |\n| www.linuxsolutions.com.br | ICQ: 6399331 |\n -------------------------------------------------\n", "msg_date": "Wed, 14 Feb 2001 17:18:58 -0200", "msg_from": "Fabio Berbert de Paula <fabio@olinux.com.br>", "msg_from_op": true, "msg_subject": "<1/2 OFF> PostgreSQL in cluster" } ]
[ { "msg_contents": "We now have defenses against running a non-LOCALE-enabled backend in a\ndatabase that was created in non-C locale. Shouldn't we likewise\nprevent a non-MULTIBYTE-enabled backend from running in a database with\na multibyte encoding that's not SQL_ASCII? Or am I missing a reason why\nthat is safe?\n\nI propose the following addition to ReverifyMyDatabase in postinit.c:\n\n #ifdef MULTIBYTE\n \tSetDatabaseEncoding(dbform->encoding);\n+ #else\n+\tif (dbform->encoding != SQL_ASCII)\n+\t\telog(FATAL, \"some suitable error message\");\n #endif\n\nComments?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 14 Feb 2001 17:49:45 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Shouldn't non-MULTIBYTE backend refuse to start in MB database?" }, { "msg_contents": "Tom Lane writes:\n\n> We now have defenses against running a non-LOCALE-enabled backend in a\n> database that was created in non-C locale. Shouldn't we likewise\n> prevent a non-MULTIBYTE-enabled backend from running in a database with\n> a multibyte encoding that's not SQL_ASCII? Or am I missing a reason why\n> that is safe?\n\nNot all multibyte encodings are actually \"multi\"-byte, e.g., LATIN2. In\nthat case the main benefit is the on-the-fly recoding between the client\nand the server. If a non-MB server encounters that database it should\nstill work.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Thu, 15 Feb 2001 00:11:44 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in MB\n database?" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Tom Lane writes:\n>> We now have defenses against running a non-LOCALE-enabled backend in a\n>> database that was created in non-C locale. Shouldn't we likewise\n>> prevent a non-MULTIBYTE-enabled backend from running in a database with\n>> a multibyte encoding that's not SQL_ASCII? Or am I missing a reason why\n>> that is safe?\n\n> Not all multibyte encodings are actually \"multi\"-byte, e.g., LATIN2. In\n> that case the main benefit is the on-the-fly recoding between the client\n> and the server. If a non-MB server encounters that database it should\n> still work.\n\nAre these encodings all guaranteed to have the same collation order as\nSQL_ASCII? If not, we have the same index corruption issues as for LOCALE.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 14 Feb 2001 18:15:04 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? " }, { "msg_contents": "> Peter Eisentraut <peter_e@gmx.net> writes:\n> > Tom Lane writes:\n> >> We now have defenses against running a non-LOCALE-enabled backend in a\n> >> database that was created in non-C locale. Shouldn't we likewise\n> >> prevent a non-MULTIBYTE-enabled backend from running in a database with\n> >> a multibyte encoding that's not SQL_ASCII? Or am I missing a reason why\n> >> that is safe?\n> \n> > Not all multibyte encodings are actually \"multi\"-byte, e.g., LATIN2. In\n> > that case the main benefit is the on-the-fly recoding between the client\n> > and the server. If a non-MB server encounters that database it should\n> > still work.\n> \n> Are these encodings all guaranteed to have the same collation order as\n> SQL_ASCII?\n\nYes & no. \n\n>If not, we have the same index corruption issues as for LOCALE.\n\nIf the backend is configued with LOCALE enabled and the database is\nnot configured with LOCALE, we will have a problem. But this will\nhappen with/without MUTIBYTE anyway. Mutibyte support does nothing\nwith LOCALE support.\n--\nTatsuo Ishii\n", "msg_date": "Thu, 15 Feb 2001 10:41:44 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": false, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? " }, { "msg_contents": "> We now have defenses against running a non-LOCALE-enabled backend in a\n> database that was created in non-C locale. Shouldn't we likewise\n> prevent a non-MULTIBYTE-enabled backend from running in a database with\n> a multibyte encoding that's not SQL_ASCII? Or am I missing a reason why\n> that is safe?\n> \n> I propose the following addition to ReverifyMyDatabase in postinit.c:\n> \n> #ifdef MULTIBYTE\n> \tSetDatabaseEncoding(dbform->encoding);\n> + #else\n> +\tif (dbform->encoding != SQL_ASCII)\n> +\t\telog(FATAL, \"some suitable error message\");\n> #endif\n> \n> Comments?\n\nRunning a non-MULTIBYTE-enabled backend on a database with a multibyte\nencoding other than SQL_ASCII should be safe as long as:\n\n1) read only access\n2) the encodings are actually single byte encodings\n\nIf mutibyte encoding database is updated by a non-MULTIBYTE-enabled\nbackend, there might be a chance that data could corrupted since the\nbackend does not handle mutibyte strings correctly.\n\nSo I think you suggestion is a improvement.\n--\nTatsuo Ishii\n", "msg_date": "Thu, 15 Feb 2001 10:42:44 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": false, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in\n MB database?" }, { "msg_contents": "Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n>> Are these encodings all guaranteed to have the same collation order as\n>> SQL_ASCII?\n\n> Yes & no. \n\nUm, I'm confused ...\n\n>> If not, we have the same index corruption issues as for LOCALE.\n\n> If the backend is configued with LOCALE enabled and the database is\n> not configured with LOCALE, we will have a problem. But this will\n> happen with/without MUTIBYTE anyway. Mutibyte support does nothing\n> with LOCALE support.\n\nCan a backend configured with MULTIBYTE and running in non-SQL_ASCII\nencoding ever sort strings in non-character-code ordering, even if it\nis in C locale? I should think that such behavior is highly likely\nfor multibyte character sets.\n\nIf it can, then we mustn't allow a non-MULTIBYTE backend to run in\nsuch a database, I think.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 14 Feb 2001 20:52:57 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? " }, { "msg_contents": "> >> Are these encodings all guaranteed to have the same collation order as\n> >> SQL_ASCII?\n> \n> > Yes & no. \n> \n> Um, I'm confused ...\n> \n> >> If not, we have the same index corruption issues as for LOCALE.\n> \n> > If the backend is configued with LOCALE enabled and the database is\n> > not configured with LOCALE, we will have a problem. But this will\n> > happen with/without MUTIBYTE anyway. Mutibyte support does nothing\n> > with LOCALE support.\n> \n> Can a backend configured with MULTIBYTE and running in non-SQL_ASCII\n> encoding ever sort strings in non-character-code ordering, even if it\n> is in C locale? I should think that such behavior is highly likely\n> for multibyte character sets.\n\nHum, I don't think I understand your point because of my English\nabilities. I'm going to explain what I want to say in hex\nrepresentation, rather than English:-)\n\nSuppose we have four EUC_JP multibyte strings, each consists of two\nbytes (actually they are my name in KANJI characters). They would look\nlike:\n\n0xc0d0\n0xb0e6\n0xc3a3\n0xd7c9\n\nIf we sort these strings using strcmp(), we would get:\n\n0xb0e6\n0xc0d0\n0xc3a3\n0xd7c9\n\nThis result might not be perfect, but resonable for most cases since\nthe code value of each character in EUC_JP is defined in the hope that\nit can be sorted by its phisical value.\n\nIf we are not satisfied with this result for some reasons, we could\nadd an auxiliary \"yomigana\" field to get the correct order (Yomigana\nis a pronounciation of KANJI).\n\n> If it can, then we mustn't allow a non-MULTIBYTE backend to run in\n> such a database, I think.\n> \n> \t\t\tregards, tom lane\n\nCan you explain more about this?\n--\nTatsuo Ishii\n", "msg_date": "Thu, 15 Feb 2001 17:25:08 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": false, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? " }, { "msg_contents": "Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> If we sort these strings using strcmp(), we would get:\n> ...\n> This result might not be perfect, but resonable for most cases since\n> the code value of each character in EUC_JP is defined in the hope that\n> it can be sorted by its phisical value.\n\n> If we are not satisfied with this result for some reasons, we could\n> add an auxiliary \"yomigana\" field to get the correct order (Yomigana\n> is a pronounciation of KANJI).\n\nOkay, so if a database has been built by a backend that knows MULTIBYTE\nand has some \"yomigana\" info available, then indexes in text columns\nwill not be in the same order that strcmp() would put them in, right?\n\nIf we then run a non-MULTIBYTE backend in that database, it will see\nthe indexes as being out of correct order; this will cause indexscans\nto miss values they should find, or perhaps fail outright if the code\nhappens to detect the inconsistency. If the backend inserts a value\nin an index in strcmp() order, the value may be out of place according\nto the \"yomigana\" info, in which case the index is now corrupt from\nthe point of view of a MULTIBYTE-aware backend as well.\n\nThis is essentially the same problem as between LOCALE-aware and\nnon-LOCALE-aware backends in a database with a non-C locale.\n\nIn short, unless you want to enforce a restriction that MULTIBYTE\nordering is always strcmp() order and never anything else, we'd better\ndisallow non-MULTIBYTE backends in MULTIBYTE databases.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 15 Feb 2001 09:36:27 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? " }, { "msg_contents": "> Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> > If we sort these strings using strcmp(), we would get:\n> > ...\n> > This result might not be perfect, but resonable for most cases since\n> > the code value of each character in EUC_JP is defined in the hope that\n> > it can be sorted by its phisical value.\n> \n> > If we are not satisfied with this result for some reasons, we could\n> > add an auxiliary \"yomigana\" field to get the correct order (Yomigana\n> > is a pronounciation of KANJI).\n> \n> Okay, so if a database has been built by a backend that knows MULTIBYTE\n> and has some \"yomigana\" info available, then indexes in text columns\n> will not be in the same order that strcmp() would put them in, right?\n\nNo. The \"yomigana\" exists in the application world, not in the\ndatabase engine itself. What I was talking about was an idea to add\nan extra column to a table.\n\ncreate table t1 (\n kanji text,\t-- KANJI field\n yomigana\ttext\t-- YOMIGANA field\n);\n\nThe query would be something like:\n\nselect kanji from t1 order by yomigana;\n--\nTatsuo Ishii\n", "msg_date": "Thu, 15 Feb 2001 23:58:00 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": false, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? " }, { "msg_contents": "Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n>> Okay, so if a database has been built by a backend that knows MULTIBYTE\n>> and has some \"yomigana\" info available, then indexes in text columns\n>> will not be in the same order that strcmp() would put them in, right?\n\n> No. The \"yomigana\" exists in the application world, not in the\n> database engine itself. What I was talking about was an idea to add\n> an extra column to a table.\n\nOh, I see. So the question still remains: can a MULTIBYTE-aware backend\never use a sort order different from strcmp() order? (That is, not as\na result of LOCALE, but just because of the non-SQL-ASCII encoding.)\n\nActually there are more complicated cases that would depend on more\nfeatures of the encoding than just sort order. Consider\n\n\tCREATE INDEX fooi ON foo (upper(field1));\n\nOperations involving this index will misbehave if the behavior of\nupper() ever differs between MULTIBYTE-aware and non-MULTIBYTE-aware\ncode. That seems pretty likely for encodings like LATIN2...\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 15 Feb 2001 10:04:44 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? " }, { "msg_contents": "Tom Lane writes:\n\n> Oh, I see. So the question still remains: can a MULTIBYTE-aware backend\n> ever use a sort order different from strcmp() order? (That is, not as\n> a result of LOCALE, but just because of the non-SQL-ASCII encoding.)\n\nAccording to the code, no, because varstr_cmp() doesn't pay attention to\nthe multibyte status. Presumably strcmp() and strcoll() don't either.\n\n> Actually there are more complicated cases that would depend on more\n> features of the encoding than just sort order. Consider\n>\n> \tCREATE INDEX fooi ON foo (upper(field1));\n>\n> Operations involving this index will misbehave if the behavior of\n> upper() ever differs between MULTIBYTE-aware and non-MULTIBYTE-aware\n> code. That seems pretty likely for encodings like LATIN2...\n\nOf course in the most general case this is a problem, because a function\ncan be implemented totally differently depending on any old #ifdef or\nother external factors.\n\nIf the multibyte users think this check is okay, then I don't mind, since\nit's usually what the users would want anyway. I'm just pointing out the\ntechnical issues.\n\n-- \nPeter Eisentraut peter_e@gmx.net http://yi.org/peter-e/\n\n", "msg_date": "Thu, 15 Feb 2001 18:41:43 +0100 (CET)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? " }, { "msg_contents": "> Tom Lane writes:\n> \n> > Oh, I see. So the question still remains: can a MULTIBYTE-aware backend\n> > ever use a sort order different from strcmp() order? (That is, not as\n> > a result of LOCALE, but just because of the non-SQL-ASCII encoding.)\n> \n> According to the code, no, because varstr_cmp() doesn't pay attention to\n> the multibyte status. Presumably strcmp() and strcoll() don't either.\n\nRight.\n\n> > Actually there are more complicated cases that would depend on more\n> > features of the encoding than just sort order. Consider\n> >\n> > \tCREATE INDEX fooi ON foo (upper(field1));\n> >\n> > Operations involving this index will misbehave if the behavior of\n> > upper() ever differs between MULTIBYTE-aware and non-MULTIBYTE-aware\n> > code. That seems pretty likely for encodings like LATIN2...\n> \n> Of course in the most general case this is a problem, because a function\n> can be implemented totally differently depending on any old #ifdef or\n> other external factors.\n> \n> If the multibyte users think this check is okay, then I don't mind, since\n> it's usually what the users would want anyway. I'm just pointing out the\n> technical issues.\n\nRight. However, Tom's point is a little bit different, I guess.\n\nAs far as I know, most builtin functions taking string data types as\ntheir aruguments would behave same with/without MULTIBYTE. As far as\nI know exceptions include:\n\nchar_length\nquote_ident\nquote_literal\nascii\nto_ascii\n\nSo, for example, \n\nCREATE INDEX fooi ON foo (char_length(field1));\n\nwould behave differently with/without MULTIBYTE if the encoding for\nthe database is not \"single byte type\".\n--\nTatsuo Ishii\n", "msg_date": "Fri, 16 Feb 2001 11:14:39 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": false, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? " }, { "msg_contents": "Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> Oh, I see. So the question still remains: can a MULTIBYTE-aware backend\n> ever use a sort order different from strcmp() order? (That is, not as\n> a result of LOCALE, but just because of the non-SQL-ASCII encoding.)\n>> \n>> According to the code, no, because varstr_cmp() doesn't pay attention to\n>> the multibyte status. Presumably strcmp() and strcoll() don't either.\n\n> Right.\n\nOK, so I guess this comes down to a judgment call: should we insert the\ncheck in the non-MULTIBYTE case, or not? I still think it's safest to\ndo so, but I'm not sure what you want to do.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 15 Feb 2001 22:55:47 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? " }, { "msg_contents": "> Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> > Oh, I see. So the question still remains: can a MULTIBYTE-aware backend\n> > ever use a sort order different from strcmp() order? (That is, not as\n> > a result of LOCALE, but just because of the non-SQL-ASCII encoding.)\n> >> \n> >> According to the code, no, because varstr_cmp() doesn't pay attention to\n> >> the multibyte status. Presumably strcmp() and strcoll() don't either.\n> \n> > Right.\n> \n> OK, so I guess this comes down to a judgment call: should we insert the\n> check in the non-MULTIBYTE case, or not? I still think it's safest to\n> do so, but I'm not sure what you want to do.\n> \n> \t\t\tregards, tom lane\n\nI have discussed with Japanese hackers including Hiroshi of this\nissue. We have reached the conclusion that your proposal is\nappropreate and will make PostgreSQL more statble.\n--\nTatsuo Ishii\n", "msg_date": "Fri, 16 Feb 2001 22:02:37 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": false, "msg_subject": "Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? " } ]
[ { "msg_contents": "I'm trying to figure out the SPI and need a bit of help, because the\ndocs do not mention (that I can find) some parts of the interface.\n\n- SPI_exec(char * sql, int count): this function seems to execute the\n query. Is the `count' parameter the maximum number of tuples to\n return? Does count=0 imply return everything? Return value are the\n SPI_* flags defined in spi.h?\n\n- SPI_processed: number of tuples processed during execution of\n SPI_exec? Does this equate to N in the INSERT/DELETE/UPDATE N\n messages that are emitted by psql?\n\n- Are there any restrictions on what types of queries may be executed\n by a trigger using SPI_exec?\n\nThanks for the help.\n\nCheers,\nBrook\n\n", "msg_date": "Wed, 14 Feb 2001 16:18:57 -0700 (MST)", "msg_from": "Brook Milligan <brook@biology.nmsu.edu>", "msg_from_op": true, "msg_subject": "undocumented parts of SPI" } ]
[ { "msg_contents": "Hi, I heard something like \"untrusted PL/tcl\". Does anybody know what\nthe status of that is?\n--\nTatsuo Ishii\n", "msg_date": "Thu, 15 Feb 2001 10:53:04 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": true, "msg_subject": "untrusted Pl/tcl?" }, { "msg_contents": "Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> Hi, I heard something like \"untrusted PL/tcl\". Does anybody know what\n> the status of that is?\n\nAFAIK it's up and working in 7.1, though I haven't tried it myself. See\nhttp://www.postgresql.org/devel-corner/docs/postgres/pltcl.htm\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 14 Feb 2001 23:01:33 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: untrusted Pl/tcl? " } ]
[ { "msg_contents": "from Feb 15 till Mar 6...\nI'll not be able to read mail lists, so\nin the event of needs please use\nvadim4o@email.com address.\n\nRegards!\n\nVadim\n\n\n", "msg_date": "Wed, 14 Feb 2001 19:20:34 -0800", "msg_from": "\"Vadim Mikheev\" <vmikheev@sectorbase.com>", "msg_from_op": true, "msg_subject": "Leaving for vacation" } ]