Re: error messages - Mailing list pgsql-novice
From | P. Jourdan |
---|---|
Subject | Re: error messages |
Date | |
Msg-id | 5.1.0.14.2.20020502124206.00ab3c30@pop.videotron.ca Whole thread Raw |
In response to | error messages (PJourdan <info@lespetitsplaisirs.com>) |
List | pgsql-novice |
At 09:31 AM 5/2/2002 -0700, Josh Berkus wrote: >Phillip, > > > I have found some errors in my pgsql error file: > > FATAL 1: Database :"template0" is not currently accepting connections > >This means that some part of your PHP script attempted to log in to >Template0 (which is kept closed, for emergency restores) or use it as a >database template instead of Template1. I found that this seems to be caused by pgAdmin2 when I access my FreeBSD machine from my W2kPro. The pgAdmin2 window shows the template0 as a database X'ed out in red. When I run it and immediately check the log - bingo! > > ERROR: Relation 'visits'does not have attribute 'path' > >Somewhere in your script is a reference to the "path" field of the >table "visits", which does not exist. Alternately, it's possible that >"path" does exist, but it is a reserved word and needs to be quoted. I found the code that refers to this and it seems to be missing columns in the table. I added the columns with datatype TEXT (for path and referer - I hope it's correct). I will now see what happens. :-) > > ERROR: Bad boolean external representation '<font > > color=red><b>YES></b></font>' > >You tried to assign the value ''<font color=red><b>YES></b></font>' to >a BOOLEAN variable. That's bad HTML/PHP. Well, I didn't - someone else did something and poor little me (real NOVICE) is trying to fix it: The code that is generating the message is all within the php delimiters (entire file) and appears several times as follows: if($r1==0 || $r2==0) { if($archived=='Y') { $archived="<font color=red><b>YES</b></font>"; } ;;; select wares.ware_id,wares.name,category.name,unit_size, qty_per_shipping_unit,supplier.name,sku, case when wares.archived='t' then '<font color=red><b>YES</b></font>' else wares.archived end as archived, trademark.name from wares,category,wares_category,supplier_wares,supplier,trademark where wares.ware_id=wares_category.ware_id and category.category_id=wares_category.category_id and wares.ware_id=supplier_wares.ware_id and supplier_wares.supplier_id=supplier.supplier_id and wares.trademark_id=trademark.trademark_id"; I do not understand what is wrong? (This apparently worked fine in the original online web site.) > > ERROR: Relation "mustdie" does not exist > >There is no table "mustdie", yet you persist in asking for it. What >kind of user are you, anyway? ;-) Please, don't shoot me, yet... :-( I did find that the table does not exist - I just have to find out what it should contain... and then re-create it. > > NOTICE: Adding missing FROM-caluse entry for table "customer" > >You referenced a field from "customer" in your query, but did not >include customer in your FROM clause. This frequently has unexpected >results. Fix the query. I'll do my best. :-) > > ERROR: No such atribute or function 'pcustomer_id' > >Same as several above. > > > I would like to understand what these statements mean so I can trace > > and correct problems in the database. > >One bit o' help. Stop Postgresql. Go to the postgressql.conf file, >and turn "quote queries" on in the logging options. This will allow >you to see the queries that generate the error in the log. You will >want to turn this option back off before going live, though, or your >logs will get huge ... OK, & thanks Philip
pgsql-novice by date: