Re: [BUGS] BUG #5068: LIKE
On Sun, 2009-09-20 at 01:00 +, Paulo wrote: > like to select a field containing Numeric 4 and compared with a > char(30) > field. > In oracle and postgresql to version 8.2 worked perfectly, now the new > version no longer works, as we have many queries in this format. Hard to say without having the complete schema and query, but I suspect that you are running afoul of the restricted implicit casts. You might need to insert explicit casts. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #5069: Segfault
The following bug has been logged online: Bug reference: 5069 Logged by: Kenaniah Cerny Email address: kenan...@gmail.com PostgreSQL version: 8.4.1 Operating system: Centos5.2 Description:Segfault Details: Segfault party output of uname -a: Linux 2.6.18-92.1.10.el5 #1 SMP Tue Aug 5 07:41:53 EDT 2008 i686 athlon i386 GNU/Linux Fortunately due to an incremental update, I've narrowed the cause of the bug down to the following function run as a trigger: CREATE OR REPLACE FUNCTION "public"."trigger_update_words" () RETURNS trigger AS $body$ BEGIN INSERT INTO words SELECT word FROM ts_stat('SELECT to_tsvector(''simple'', name) FROM '||TG_TABLE_NAME||' WHERE title_type_id IN (1, 2, 4, 6) AND id = '||NEW.id) EXCEPT SELECT word FROM words; RETURN NEW; END; $body$ LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER COST 100; CREATE TRIGGER "anime_titles_tr_update_words" AFTER INSERT OR UPDATE ON "public"."anime_titles" FOR EACH ROW EXECUTE PROCEDURE "public"."trigger_update_words"(); My anime titles relation is defined below: CREATE TABLE "public"."anime_titles" ( "id" SERIAL, "name" TEXT NOT NULL, "anime_id" INTEGER NOT NULL, "title_type_id" INTEGER NOT NULL, "is_main" BOOLEAN DEFAULT false NOT NULL, "metaphone" TEXT, "metaphone_alt" TEXT, CONSTRAINT "anime_titles_pkey" PRIMARY KEY("id"), CONSTRAINT "anime_titles_fk_anime_id" FOREIGN KEY ("anime_id") REFERENCES "public"."anime"("id") ON DELETE CASCADE ON UPDATE NO ACTION NOT DEFERRABLE, CONSTRAINT "anime_titles_fk_title_type_id" FOREIGN KEY ("title_type_id") REFERENCES "public"."anime_title_types"("id") ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE ) WITH OIDS; CREATE INDEX "anime_titles_idx_lower_name" ON "public"."anime_titles" USING btree ((lower(name))) TABLESPACE "second_disk"; CREATE INDEX "anime_titles_idx_metaphone" ON "public"."anime_titles" USING btree ("metaphone", "metaphone_alt"); CREATE INDEX "anime_titles_idx_name_simple_text" ON "public"."anime_titles" USING gin ((to_tsvector('simple'::regconfig, name))); CREATE INDEX "anime_titles_idx_title_type_id" ON "public"."anime_titles" USING btree ("title_type_id"); CREATE TRIGGER "anime_titles_tr_audit" AFTER INSERT OR UPDATE ON "public"."anime_titles" FOR EACH ROW EXECUTE PROCEDURE "public"."anime_titles_audit"(); CREATE TRIGGER "anime_titles_tr_update_metaphone" AFTER INSERT OR UPDATE ON "public"."anime_titles" FOR EACH ROW EXECUTE PROCEDURE "public"."update_metaphone_fields"(); CREATE TRIGGER "anime_titles_tr_update_words" AFTER INSERT OR UPDATE ON "public"."anime_titles" FOR EACH ROW EXECUTE PROCEDURE "public"."trigger_update_words"(); And last but not least, the words table: CREATE TABLE "public"."words" ( "word" TEXT NOT NULL, CONSTRAINT "words_pkey" PRIMARY KEY("word") ) WITH OIDS; My database locale/collation/encoding is all en_US.UTF-8 I have concluded that the other two triggers that run on my anime_titles table aren't related to the issue at hand as the issue still occurs with those triggers disabled. The segfault occurred when attempting to insert into anime_title a name of '.hack//SIGN' There are currently 5569 entries in the words table and 6928 entries in the anime_titles table. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5069: Segfault
"Kenaniah Cerny" writes: > Segfault party I couldn't reproduce a crash given this information. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5069: Segfault
Tom Lane wrote: > "Kenaniah Cerny" writes: >> Segfault party > > I couldn't reproduce a crash given this information. Which probably means 'it's time to hook up `gdb' and get a backtrace of the crash'. -- Craig Ringer -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5066: plperl issues with perl_destruct() and END blocks
On Sat, Sep 19, 2009 at 11:43:26PM -0400, Tom Lane wrote: > Robert Haas writes: > > On Sat, Sep 19, 2009 at 3:53 PM, Tom Lane wrote: > >> "Tim Bunce" writes: > >>> The plperl implementation doesn't call perl_destruct() during server > >>> shutdown. > >> > >> Who cares? �The process is going away anyway. > > > END {} blocks can execute arbitrary code. Perl users will expect them > > to be executed. > > [ shrug... ] As a database geek I find the lack of guarantees about > that to be entirely unsatisfying. What exactly are you going to put > in that block? If it's actually important, are you going to trust > a mechanism that doesn't have any crash safeness? Can you expand on what you mean by 'guarantees' and 'crash safeness'? I my particular case I'm trying to enable Devel::NYTProf, the perl source code performance profiler, to profile PL/Perl code. See http://www.slideshare.net/Tim.Bunce/develnytprof-200907 (starting NYTProf uses an END block to finish up the profile and write final details to the data file. One of the first problems I ran into was that Postgres was executing the END block before the first plperl sub was even executed. Very counter intuitive. Since NYTProf is implemented in C (XS) I've worked around that problem by adding an option to enable PL_exit_flags |= PERL_EXIT_DESTRUCT_END. But because postgres doesn't call perl_destruct() the problem has just moved from END blocks being called too early to END blocks not being called at all. The effect is that the profile data file is unterminated and so corrupt and unusable. To finish the profiling users currently have to execute a SQL statement to trigger a plperl sub that calls an NYTProf sub that finializes the profile. Ideally I'd like users to be able to finish the profiling cleanly with a shutdown (to then restart with profiling disabled). Calling perl_destruct() during shutdown would fix that. Tim. p.s. As a random data point, google code search finds about 7000 perl modules containing an END block: http://www.google.com/codesearch?as_q=%5EEND%5C+%7B&btnG=Search+Code&hl=en&as_lang=perlas_filename=%5C.pm%24&as_case=y -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] postgresql doesn't work
hi i install postgresql 8.3 and when i run it there's a message error: could not create inherited socket: error code 10022 I tried to install without firewall antivirus but i got the same error i tried run lspfix : no problems found my config : windows xp sp3 (french) what can i do to run postgresql? thank -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] erreur postgresql
hi i install postgresql 8.3 and when i run it there's a message error: could not create inherited socket: error code 10022 I tried to install without firewall antivirus i tried run lspfix : no problems found my config : windows xp sp3 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5066: plperl issues with perl_destruct() and END blocks
There's a definitional problem here however. When should we call the destructor? My impression is that it should happen when the calling query terminates, not when the backend shuts down. I'm sure this will cause other issues -- for example %_SHARED will be destroyed way too early. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] Databse installation problem
I have tried to install postgres version 8.3.7 as follows rm -rf /var/lib/pgsql mkdir /var/lib/pgsql ./configure --prefix /var/lib/pgsql gmake su gmake install adduser postgres mkdir /var/lib/pgsql/data chown postgres /var/lib/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /var/lib/pgsql/data /usr/local/pgsql/bin/postgres -D /var/lib/pgsql/data >pgstartup.log 2>&1 & /usr/local/pgsql/bin/createdb test /usr/local/pgsql/bin/psql test then i log on database to see the version test=> select version(); version --- PostgreSQL 8.3.1 on i386-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.3.0 20080314 (Red Hat 4.3.0-3) (1 row) but its showing me 8.3.1 that was my previous version. Could anyone tell me what is the problem. -- With Regards, Bhushan