From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: hazlup Newsgroups: gmane.emacs.help Subject: sql-postgres input from create function generates 'sql help' listing Date: Fri, 2 Oct 2009 06:55:34 -0700 (PDT) Message-ID: <25716253.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1254620878 32599 80.91.229.12 (4 Oct 2009 01:47:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Oct 2009 01:47:58 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 04 03:47:51 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MuGCV-0007Pk-0H for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Oct 2009 03:47:51 +0200 Original-Received: from localhost ([127.0.0.1]:36183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuGCU-00023w-J4 for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Oct 2009 21:47:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mtibo-0001nS-9j for help-gnu-emacs@gnu.org; Fri, 02 Oct 2009 09:55:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mtibi-0001kU-EB for Help-gnu-emacs@gnu.org; Fri, 02 Oct 2009 09:55:43 -0400 Original-Received: from [199.232.76.173] (port=43412 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mtibi-0001kM-3t for Help-gnu-emacs@gnu.org; Fri, 02 Oct 2009 09:55:38 -0400 Original-Received: from kuber.nabble.com ([216.139.236.158]:53689) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mtibh-0001cQ-Ht for Help-gnu-emacs@gnu.org; Fri, 02 Oct 2009 09:55:37 -0400 Original-Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Mtibe-0004Xx-T4 for Help-gnu-emacs@gnu.org; Fri, 02 Oct 2009 06:55:34 -0700 X-Nabble-From: robjsargent@gmail.com X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Sat, 03 Oct 2009 21:44:39 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:68656 Archived-At: This is a bit bizarre but sql-send-paragraph of my function def is generating a summary of sql commands. Though the function 'compiles' correctly, each line of the "values" list apparently generates a call for help! >From sending this: CREATE OR REPLACE FUNCTION update_element_history() RETURNS "trigger" AS $BODY$ DECLARE inserthist bool := 'false'; sts text := OLD.status; BEGIN /* Apparently staff diddles with locked_by manually and doesn't want to be held accountable, so we look at both to determine a check-in event*/ IF NEW.version != OLD.version AND OLD.locked_by IS NOT NULL AND NEW.locked_by IS NULL THEN inserthist := 'true'; /*check the convertables table for an instance of this element*/ if conversion_in_progress(new.element_id) then new.locked_by := 'conversionprocess'; raise warning 'would be converting'; end if; END IF; IF inserthist THEN IF sts IS NULL THEN sts := 'unapproved'; END IF; INSERT INTO elements_history( element_id, version, last_modified, username, comments, parent_collection, name, owner, status, xml_text ) VALUES ( quote_literal(OLD.element_id), quote_literal(OLD.version), quote_literal(OLD.last_modified), quote_literal(COALESCE((OLD.last_username), '')), quote_literal(COALESCE(OLD.comments, '')), quote_literal(COALESCE(OLD.parent_collection,'')), quote_literal(COALESCE(OLD.name, '')), quote_literal(COALESCE(OLD.owner, '')), quote_literal(sts), quote_literal(OLD.xml_text) ); END IF; RETURN NULL; END; $BODY$ LANGUAGE 'plpgsql' VOLATILE; I get 10 copies of acrestest$# ABORT CHECKPOINT COMMIT DECLARE END GRANT LOCK REASSIGN REVOKE SET TRUNCATE VALUES ALTER CLOSE COPY DELETE FROM EXECUTE INSERT MOVE REINDEX ROLLBACK SHOW UNLISTEN WITH ANALYZE CLUSTER CREATE DISCARD EXPLAIN LISTEN NOTIFY RELEASE SAVEPOINT START UPDATE BEGIN COMMENT DEALLOCATE DROP FETCH LOAD PREPARE RESET SELECT TABLE VACUUM -- View this message in context: http://www.nabble.com/sql-postgres-input-from-create-function-generates-%27sql-help%27-listing-tp25716253p25716253.html Sent from the Emacs - Help mailing list archive at Nabble.com.