[SQL] How to disable rules??
hi all, I'm looking for a way to temporary disable a rule on a table. I've find (looking at the dump) the way to disable triggers : UPDATE "pg_class" SET "reltriggers" = 0 WHERE "relname" = ''table_name''; ***QUERY***; UPDATE pg_class SET reltriggers = (SELECT count(*) FROM pg_trigger where pg_class.oid = tgrelid) WHERE relname = ''table_name''; obviously this doesn't work for rules, anyone know how can I do?? thanks, by danilo __ Scarica il nuovo Yahoo! Messenger: con webcam, nuove faccine e tante altre novità. http://it.yahoo.com/mail_it/foot/?http://it.messenger.yahoo.com/ ---(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
[SQL] determine if a table exists
how do i determine if a table exists using select statement i want to find out if it exists if not ill create it if yes then ill do some editing with it TIA ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [SQL] determine if a table exists
> > how do i determine if a table exists using select statement > i want to find out if it exists if not ill create it if yes then ill do > some editing with it > TIA > do SELECT relname FROM pg_class WHERE relkind='r' AND relname !~ '^pg_' AND relname !~ '^pga_' AND relname !~ '^pgadmin_'; You should also refer to Chapter 3. System Catalogs in the Documentation. Regards, Christoph ---(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: [SQL] Function problems, cache lookup failed
Archibald Zimonyi <[EMAIL PROTECTED]> writes: > ERROR: fmgr_info: function 18308: cache lookup failed > I have no idea what this is, can anyone help me? The aggregate links to the function by OID. You deleted the function and recreated it, which means it's a new function with a new OID and so the aggregate is broken. You'll need to drop and recreate the aggregate too. Next time use CREATE OR REPLACE FUNCTION so you don't need to do that. (With CREATE OR REPLACE, you are just modifying the existing function, so its OID doesn't change.) 7.3 will prevent this sort of mistake... regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [SQL] Please Help me
Title: Re: [SQL] Please Help me At 2:49 PM +0800 8/1/02, Christopher Kings-Lynne wrote: I have no experience with ColdFusion, but if you ask a question like whether MySQL or Postgres is better on a Postgres mailing list - we're going to say Postgres. Yeah, except I do have experience with ColdFusion, and ColdFusion runs into some very problematic issues with Postgres, sadly. Although I use Postgres almost exclusively, I had to switch to MySQL for use with ColdFusion. -- .Michelle -- Michelle Murrain, Technology Consulting [EMAIL PROTECTED] http://www.murrain.net 413-253-2874 ph 413-222-6350 cell 413-825-0288 fax AIM:pearlbear0 Y!:pearlbear9 ICQ:129250575
Re: [SQL] Please Help me
I am running RedHat, with Apache and Cold Fusion. I chose PostgreSQL for all of the aforementioned reasons. It works very well with Cold Fusion. I have done some optimizing and am able to run rather complex queries much faster than I ever was able to on any Windows platform database. I had to bail on MySQL because it wouldnt run the sub-queries that i needed. Thanks Chad - Original Message - From: Waheed Rahuman To: [EMAIL PROTECTED] Sent: Thursday, August 01, 2002 11:10 AM Subject: [SQL] Please Help me Dear all Please suggest me which database i can choose for my server setup like 1. Manrake Linux 2. ColdFusion 3. Apache Webserver Now i dont know which database to choose Whether MySQL or PostgreSQL Please suggest me a. Thank you Expecting your reply Regards Waheed Rahuman
[SQL] Fw: !
<>
[SQL] Fw: Server Performance and Scalability Killers
Server Description: MIDI audio
Re: [SQL] Please Help me
Title: Re: [SQL] Please Help me At 8:32 AM -0600 8/1/02, Chad Thompson wrote: I am running RedHat, with Apache and Cold Fusion. I chose PostgreSQL for all of the aforementioned reasons. It works very well with Cold Fusion. I have done some optimizing and am able to run rather complex queries much faster than I ever was able to on any Windows platform database. I had to bail on MySQL because it wouldnt run the sub-queries that i needed. How did you solve the problem of large text fields? We ran into this problem, and was unable to solve it. We'd get an error if we wanted to add more than, I think 200 or so characters. It had to do with the connection between postgres and Cold Fusion. -- .Michelle -- Michelle Murrain, Technology Consulting [EMAIL PROTECTED] http://www.murrain.net 413-253-2874 ph 413-222-6350 cell 413-825-0288 fax AIM:pearlbear0 Y!:pearlbear9 ICQ:129250575
Re: [SQL] License
On Thu, Aug 01, 2002 at 02:46:47PM +0800, Christopher Kings-Lynne wrote: > Postgres is totally, absolutely free. It comes under the terms of the BSD > license which means you have the right to use and modify the source code in > any way you wish, so long as you acknowledge that the code originated in > Postgres. It is even more free than MySQL. It should be mentioned that PostgreSQL has great community support. If you require commercial support, that is provided by several companies, including Pgsql Inc., Red Hat, Aglio, etc. -Roberto -- +| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |--+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer Itsdifficulttobeverycreativewithonlyfiftysevencharacters! ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [SQL] Please Help me
Title: Re: [SQL] Please Help me Unfortunatly i know of no such problem. I have large text fields being submited to my database, but i restrict the submit page to 255 chars. I will have to test larger numbers and see what errors i get. Thanks Chad - Original Message - From: Michelle Murrain To: Chad Thompson ; Waheed Rahuman ; [EMAIL PROTECTED] Sent: Thursday, August 01, 2002 8:48 AM Subject: Re: [SQL] Please Help me At 8:32 AM -0600 8/1/02, Chad Thompson wrote: I am running RedHat, with Apache and Cold Fusion. I chose PostgreSQL for all of the aforementioned reasons. It works very well with Cold Fusion. I have done some optimizing and am able to run rather complex queries much faster than I ever was able to on any Windows platform database. I had to bail on MySQL because it wouldnt run the sub-queries that i needed. How did you solve the problem of large text fields? We ran into this problem, and was unable to solve it. We'd get an error if we wanted to add more than, I think 200 or so characters. It had to do with the connection between postgres and Cold Fusion.-- .Michelle--Michelle Murrain, Technology Consulting[EMAIL PROTECTED] http://www.murrain.net413-253-2874 ph413-222-6350 cell413-825-0288 faxAIM:pearlbear0 Y!:pearlbear9 ICQ:129250575
Re: [SQL] negative queries puzzle
Another option is to try an outer join from the new to the old table and then select those rows that carry NULL in the columns from the old table. regards -Gunther Ludwig Lim wrote: > --- Jinn Koriech <[EMAIL PROTECTED]> wrote: > >>hi all, >> > >>but then to get the entirely new items out i use a >>sub query which takes >>for ever >> >>SELECT DISTINCT * FROM v_postcode_new WHERE postcode >>NOT IN ( SELECT >>postcode FROM v_postcode_old ) ORDER BY postcode >>ASC; >> >>does anyone know of a quicker way to accomplish >>this? >> > > Try using the "NOT EXIST" clause instead of the "NOT > IN". The "EXIST" clause utilizes the index while the > "IN" does not utilizes index (i.e. uses sequential > scan therefore it is much slower). > >SELECT DISTINCT * >FROM v_postcode_new >WHERE NOT EXIST( SELECT postcode > FROM v_postcode_old > WHERE v_postcode_new.postcode = > v_postcode_old.postcode) >ORDER BY postcode ASC; > > > > > ludwig. > > __ > Do You Yahoo!? > Yahoo! Health - Feel better, live better > http://health.yahoo.com > > ---(end of broadcast)--- > TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] > -- Gunther Schadow, M.D., Ph.D.[EMAIL PROTECTED] Medical Information Scientist Regenstrief Institute for Health Care Adjunct Assistant ProfessorIndiana University School of Medicine tel:1(317)630-7960 http://aurora.regenstrief.org ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
Re: [SQL] Please Help me
Title: Re: [SQL] Please Help me Michelle, Have you tried it with Postgres 7.1 yet, which removed such limitations? Chris -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Michelle MurrainSent: Thursday, 1 August 2002 10:48 PMTo: Chad Thompson; Waheed Rahuman; [EMAIL PROTECTED]Subject: Re: [SQL] Please Help me At 8:32 AM -0600 8/1/02, Chad Thompson wrote: I am running RedHat, with Apache and Cold Fusion. I chose PostgreSQL for all of the aforementioned reasons. It works very well with Cold Fusion. I have done some optimizing and am able to run rather complex queries much faster than I ever was able to on any Windows platform database. I had to bail on MySQL because it wouldnt run the sub-queries that i needed. How did you solve the problem of large text fields? We ran into this problem, and was unable to solve it. We'd get an error if we wanted to add more than, I think 200 or so characters. It had to do with the connection between postgres and Cold Fusion.-- .Michelle--Michelle Murrain, Technology Consulting[EMAIL PROTECTED] http://www.murrain.net413-253-2874 ph413-222-6350 cell413-825-0288 faxAIM:pearlbear0 Y!:pearlbear9 ICQ:129250575