Skip site navigation (1) Skip section navigation (2)

Re: some questions : psql

From: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
To: "FERREIRA, William (COFRAMI)" <william(dot)ferreira(at)airbus(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: some questions : psql
Date: 2005-05-03 12:29:32
Message-ID: Pine.LNX.4.44.0505031421130.7037-100000@kix.fsv.cvut.cz (view raw or flat)
Thread:
Lists: pgsql-general
Hello

> 1- is it possible to set a default schema ?
>     i tried : set DEFAULT SCHEMA base1; but it didn't worked

SET search_path to base1;"

>  
> 2- is it possible to have one file with global values and to use them when creating functions.
> one example is : i have a temporary directory, and several functions need to access this folder, so is it possible to pass the path as with Oracle
>     DEFINE TempDirectory = /home/....
>     @createMDNS.sql &TempDirectory

Yes. You can use commands and variables psql.

\set TempDirectory /home/... -- in file global.sql
\i global.sql

SELECT somefce(:TempDirectory)

>  
>  

more on http://developer.postgresql.org/docs/postgres/app-psql.html



> 3- my psql script create 2 tablespaces, an user, the database, 1 schema and the tables and functions
> but when i launch pgadmin, i see my new user, the tablespace and the database, but I don't see the schema and in consequence the tables and functions.
> but all have been created because i can ask tables, but they don't appear and i don't know why...;
>  

I don't know. I don't use pgadmin


Regards
Pavel Stehule


In response to

pgsql-general by date

Next:From: Radu-Adrian PopescuDate: 2005-05-03 12:39:02
Subject: Re: REMOVE
Previous:From: VladDate: 2005-05-03 12:25:08
Subject: Re: [Dbdpg-general] Re: 'prepare' is not quite schema-safe

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group