Re: [GENERAL] ERROR: tables can have at most 1600 columns
Tom Lane wrote: Alvaro Herrera <[EMAIL PROTECTED]> writes: On Sun, Jun 27, 2004 at 11:11:32AM -0700, Ron St-Pierre wrote: STATEMENT: ALTER TABLE victoria.eodData DROP COLUMN tickDate; ERROR: tables can have at most 1600 columns STATEMENT: ALTER TABLE victoria.eodData ADD COLUMN tickerID INTEGER; ERROR: tables can have at most 1600 columns Have you done the DROP COLUMN/ADD COLUMN cycle to this table more than, say, 1500 times? Because a dropped column is actually only hidden from the user, but it's still present to the system and it will still affect the 1600 limit. That is a good theory, but it doesn't quite explain why Ron's getting the error from DROP COLUMN --- AFAICS, the places that would issue such an error won't get called in that path. I tried to reproduce this and could not: after 1600 cycles of adding and dropping a column, I did indeed start to get "tables can have at most 1600 columns" from ADD, but DROP continued to behave normally. Ron, are you sure these errors were coming from the DROPs and not only the ADDs? Can you exhibit a test case? regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org I re-checked the logs and saw that the error only ocurred on trying to add the column, sorry for the cut-and-paste mistake. But before that I tried a test script and had the same result that Tom did. I think that I'll take Scott's advice and probably use INSERT INTO to re-create the table each time and avoid the 1600 column error. I am currently using TRUNCATE to clear the table before each use but it obviously doesn't re-set the column count. Thanks again for your help. Ron ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[GENERAL] server closed the connection unexpectedly
Hi: I'm getting this error when accessing a table with certain WHERE condition: "server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed." I've read through the posts but found no answer to the problem. When I "Vaccum analize" the table I get the same error. I have droped and re-created the indexes. Version is "PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)" Any help on how to recover the table would be greatly appreciated. Thanks, Ruben. ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
[GENERAL] SUBSTRING for a regular expression
I can't seem to get right the regular expression for parsing data like these four sample rows (names and addresses changed to ficticious values) from a text-type column: Yolanda Harris, 38, of 40 South Main St., Newtown City, was charged Sunday with breach of peace and interfering with a police officer. Allen K. George, 30, of 88 Beverly Court was charged Saturday with possession of marijuana, third-degree criminal mischief, breach of peace, evading responsibility, interfering with a police officer, driving with a suspended license, driving under the influence of drugs or alcohol, failure to drive right and failure to have proper insurance. Brain T. Grafton, 18, of 97 Bristol Ave. was charged Sunday with possession of marijuana, possession of alcohol by a minor and failure to wear a seat belt. Brian D. Sptizer Jr., 18, of 20 Walling Ave., Northford, was charged Sunday with driving under the influence of drugs or alcohol, evading responsibility and following too closely. Into separate columns for: name, age, address, charge. For example the first record would have name='Yolanda Harris' age=38 address='40 South Main St., Newtown City' charge='was charged Sunday with breach of peace and interfering with a police officer.' To get the name, for instance, I tried SELECT SUBSTRING(description FROM '^([:alnum:]*), \d{2}, .*$') FROM police_log; or the age value SELECT SUBSTRING(description FROM '^[:alnum:]*, (\d{2}), .*$') FROM police_log; But return values are all NULL. Can anyone give me some RE help, please? --Berend Tober ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[GENERAL] could not access file "$libdir/plpython" when restoring
Hi all, I'm restoring a database from 7.3.4 FC1 to 7.4.2 FC2: [EMAIL PROTECTED] bak]$ pg_restore -d KakaoStats KakaoStats.dump pg_restore: [compressão de arquivo (banco de dados)] could not execute query: ERROR: could not access file "$libdir/plpython": No such file or directory The dump was generated with the command: [EMAIL PROTECTED] bak]$ pg_dump -Fc KakaoStats > KakaoStats.dump What value should $libdir contain? How to make it permantent? Tried createlang: [EMAIL PROTECTED] bak]$ createlang --echo plpythonu KakaoStats SELECT oid FROM pg_language WHERE lanname = 'plpythonu'; SELECT oid FROM pg_proc WHERE proname = 'plpython_call_handler' AND prorettype = (SELECT oid FROM pg_type WHERE typname = 'language_handler') AND pronargs = 0; CREATE FUNCTION "plpython_call_handler" () RETURNS language_handler AS '$libdir/plpython' LANGUAGE C; CREATE LANGUAGE "plpythonu" HANDLER "plpython_call_handler"; createlang: instalação da linguagem falhou: ERROR: could not access file "$libdir/plpython": No such file or directory Regards, Clodoaldo Pinto ___ Yahoo! Mail agora com 100MB, anti-spam e antivírus grátis! http://br.info.mail.yahoo.com/ ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] server closed the connection unexpectedly
Can you use pg_dump to backup the database and possibly then upgrade the db? 7.2 is rather old. I recall reading similar postings in the mailing this that recommend you upgrade to 7.2.4 or .6(?) if you must stay on 7.2. On Mon, 2004-07-05 at 17:48, ruben wrote: > Hi: > > I'm getting this error when accessing a table with certain WHERE condition: > > "server closed the connection unexpectedly > This probably means the server terminated abnormally > before or while processing the request. > The connection to the server was lost. Attempting reset: Failed." > > I've read through the posts but found no answer to the problem. > > When I "Vaccum analize" the table I get the same error. > > I have droped and re-created the indexes. > > Version is > "PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2 > 20020903 (Red Hat Linux 8.0 3.2-7)" > > Any help on how to recover the table would be greatly appreciated. > Thanks, Ruben. > > > > ---(end of broadcast)--- > TIP 6: Have you searched our list archives? > >http://archives.postgresql.org ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [GENERAL] Multi-Language upper(),lower()
Tom Lane wrote: > Ara Anjargolian <[EMAIL PROTECTED]> writes: > > Am I mistaken, or was multi-language support for > > upper(), lower() and friends recently added to 7.5? > > I fixed upper/lower so that they would work on multi-byte character set > encodings, given that the platform supports the functions > towupper, towlower, etc. This means they can work on Unicode (UTF-8) > data. However, this doesn't do anything to improve the fundamental > issue that we are dependent on the C library's API for locale-specific > behavior, and that that API does *not* easily support dealing with > multiple locales at once. See the nearby "unicode and sorting" thread. OK, I marked the item as done. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [GENERAL] SUBSTRING for a regular expression
What language are you using for this plperl? That command listed in the documentation certainly works in psql or plpgsql but I don't know about plperl. Are you assigning the result to a variable and then printing the result of that variable before the function ends or printing based on what the function returns? I think you will probably need to show us the rest of the code in your function. On Mon, 2004-07-05 at 19:40, [EMAIL PROTECTED] wrote: > I can't seem to get right the regular expression for parsing data like > these four sample rows (names and addresses changed to ficticious values) > from a text-type column: > > Yolanda Harris, 38, of 40 South Main St., Newtown City, was charged > Sunday with breach of peace and interfering with a police officer. > > Allen K. George, 30, of 88 Beverly Court was charged Saturday with > possession of marijuana, third-degree criminal mischief, breach of peace, > evading responsibility, interfering with a police officer, driving with a > suspended license, driving under the influence of drugs or alcohol, > failure to drive right and failure to have proper insurance. > > Brain T. Grafton, 18, of 97 Bristol Ave. was charged Sunday with > possession of marijuana, possession of alcohol by a minor and failure to > wear a seat belt. > > Brian D. Sptizer Jr., 18, of 20 Walling Ave., Northford, was charged > Sunday with driving under the influence of drugs or alcohol, evading > responsibility and following too closely. > > Into separate columns for: name, age, address, charge. For example the > first record would have > > name='Yolanda Harris' > age=38 > address='40 South Main St., Newtown City' > charge='was charged Sunday with breach of peace and interfering with a > police officer.' > > To get the name, for instance, I tried > > SELECT SUBSTRING(description FROM '^([:alnum:]*), \d{2}, .*$') FROM > police_log; > > or the age value > > SELECT SUBSTRING(description FROM '^[:alnum:]*, (\d{2}), .*$') FROM > police_log; > > But return values are all NULL. Can anyone give me some RE help, please? > > --Berend Tober > > > > > ---(end of broadcast)--- > TIP 9: the planner will ignore your desire to choose an index scan if your > joining column's datatypes do not match ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] could not access file "$libdir/plpython" when
Seems your FC2 box did not have the python language support compiled into the version of postgresql that was installed on that box or possibly not installed in the template1 database so it would be available to any other database created in your FC2. I do believe python is included in the rpm versions of postgresql that are put on the mirrors. Did you compile it from source? If so recompile and add the python option. On Mon, 2004-07-05 at 20:33, Clodoaldo Pinto Neto wrote: > Hi all, > > I'm restoring a database from 7.3.4 FC1 to 7.4.2 FC2: > > [EMAIL PROTECTED] bak]$ pg_restore -d KakaoStats KakaoStats.dump > pg_restore: [compressão de arquivo (banco de dados)] > could not execute query: ERROR: could not access file > "$libdir/plpython": No such file or directory > > The dump was generated with the command: > > [EMAIL PROTECTED] bak]$ pg_dump -Fc KakaoStats > > KakaoStats.dump > > What value should $libdir contain? How to make it > permantent? > > Tried createlang: > > [EMAIL PROTECTED] bak]$ createlang --echo plpythonu KakaoStats > SELECT oid FROM pg_language WHERE lanname = > 'plpythonu'; > SELECT oid FROM pg_proc WHERE proname = > 'plpython_call_handler' AND prorettype = (SELECT oid > FROM pg_type WHERE typname = 'language_handler') AND > pronargs = 0; > CREATE FUNCTION "plpython_call_handler" () RETURNS > language_handler AS '$libdir/plpython' LANGUAGE C; > CREATE LANGUAGE "plpythonu" HANDLER > "plpython_call_handler"; > createlang: instalação da linguagem falhou: ERROR: > could not access file "$libdir/plpython": No such file > or directory > > Regards, > Clodoaldo Pinto > > > > > > ___ > Yahoo! Mail agora com 100MB, anti-spam e antivírus grátis! > http://br.info.mail.yahoo.com/ > > ---(end of broadcast)--- > TIP 6: Have you searched our list archives? > >http://archives.postgresql.org ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [GENERAL] enable thready safety on Mac OS X 10.3.4
[EMAIL PROTECTED] wrote: > On 6/26/04 3:01 PM, "Keary Suska" <[EMAIL PROTECTED]> wrote: > > >> I attempted to compile 7.4.3 with enable-thread-safety but it fails and > >> says it's not supported. My configure command was: > >> > >> ./configure --enable-thread-safety > > > > This is what I did for 10.3.4/7.4.2: > > > > 1. Enabled thread support in the platform template: src/template/darwin (see > > src/tools/thread/README for info) > > > > 2. Configured/compiled > > > > 3. Ran the thread_test program that was created by compile (in > > src/tools/thread) > > > > 4. Followed any recommendations output by the program > > > > 5. Re-configured/compiled > > > > Everything was fine. > > You shouldn't have to mess with template/darwin. Back post 7.4.2 I went > through a number of iterations with the developers on this and it was > working out of the box. They were in the process of rewriting the threads > detection and configuration to be more clean and reliable. > > I just tried it from the CVS source and it worked fine, even after a 'make > clean'. However, when I download 7.4.3 and try it, I get the same error as > you. The darwin template is identical between the two. I would have > thought all those code changes would have been incorporated in 7.4.3. > > I think this requires some more investigation. Mac OS X 10.3.x should be > working off the bat. The thread testing in 7.5 is dramatically different from 7.4 and can't be backpatched. What should I add to template/darwin for 7.4.4? -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 8: explain analyze is your friend