Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 2669FB5DC2D for ; Mon, 31 Oct 2011 12:59:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 24104-10 for ; Mon, 31 Oct 2011 15:59:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id C5457B5DC0F for ; Mon, 31 Oct 2011 12:59:20 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RKuGZ-0004XJ-SK for pgsql-admin@postgresql.org; Mon, 31 Oct 2011 16:59:15 +0100 Received: from 212.126.222.122 ([212.126.222.122]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Oct 2011 16:59:15 +0100 Received: from hari.fuchs by 212.126.222.122 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Oct 2011 16:59:15 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: Harald Fuchs Subject: Re: SET search path Date: Mon, 31 Oct 2011 16:59:02 +0100 Lines: 24 Message-ID: <868vo1kv95.fsf@protecting.net> References: <04DA5C9AF2453F44ACD4541A08EFE9832FFC005000@MUSCA.onmobile.com> <201110311014.45633.achill@matrix.gatewaynet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 212.126.222.122 X-Archive: encrypt User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:t/BoXXiJwWZfEhwHfykVFhhSgf0= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.936 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_NUMERIC_HELO=1.164, RP_MATCHES_RCVD=-1.201 X-Spam-Level: X-Archive-Number: 201110/140 X-Sequence-Number: 38592 In article <201110311014.45633.achill@matrix.gatewaynet.com>, Achilleas Mantzios writes: > Στις Sunday 30 October 2011 12:34:38 ο/η Akash Kodibail έγραψε: >> Hi, >> >> I am using postgresql 8.4.0 >> >> Select version() gives: >> >> PostgreSQL 8.4.0 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10), 64-bit >> >> I have trying to set search path, so that I do not have to append the schema_name while doing a select on the tables, however, when I do so, the search_path is set only for that session, it is not a permanent change that is done. Can you please guide me as to how to make it permanent. >> >> After I do a set search_path, pg_user view does not show any entry in the column "useconfig" for the same being set. >> > As superuser > ALTER user username set search_path TO "$user",someschema,public ; > works in 8.3 and 9.* This sets the search path even if this user connects to another database without someschema. Therefore I prefer ALTER DATABASE dbname SET search_path TO public,someschema;