X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B8856475EEE for ; Wed, 2 Apr 2003 05:53:53 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 628C0475ED4 for ; Wed, 2 Apr 2003 05:53:52 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 4FD7C43A89E; Wed, 2 Apr 2003 05:53:52 -0500 (EST) From: "AndreT" X-Newsgroups: comp.databases.postgresql.sql Subject: string variable with spaces in psql Date: Wed, 02 Apr 2003 12:53:52 +0200 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 26 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Complaints-To: usenet@news.hub.org User-Agent: Pan/0.13.0 (The whole remains beautiful) To: pgsql-sql@postgresql.org X-Spam-Status: No, hits=-2.2 required=5.0 tests=BAYES_30,SIGNATURE_SHORT_SPARSE,USER_AGENT version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/37 X-Sequence-Number: 12738 Hi, I need to define a variable in psql, but the variable needs to contain a space: This is what I want to do; \set theName '\''John Nobody '\'' SELECT add_agent( :theName, 'Test Company', 'Test Department' ); ... etc Unfortunately psql removes the space, so that theName = 'JohnNobody' What do i need to do to preserve the space? Thanks -- Andre Truter <-------------------------------------------------> < The box said: Requires Windows 95 or better... > < So I installed Linux > <------------------------------------------------->