Search Postgresql Archives

Re: some questions : psql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux