dbTalk Databases Forums  

7.4.1 template1

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss 7.4.1 template1 in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Aarni Ruuhimäki
 
Posts: n/a

Default 7.4.1 template1 - 01-23-2004 , 07:47 AM






Hi all,


Just noticed that 7.4.1 template1 has 40 views / tables in it and copies all
of them to new databases. Tried to DROP them in template1 and in a dummy db
but got an error e.g. 'table "sql_features" does not exist'

How to make template1 blank ? Or what is this about ?

BR,


Aarni



bash-2.05a$ /usr/local/pgsql/bin/createdb dummy
CREATE DATABASE
bash-2.05a$ psql dummy
Welcome to psql, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

dummy=# \d
List of relations
Name | Type | Owner
---------------------------------+-------+----------
applicable_roles | view | postgres
check_constraints | view | postgres
column_domain_usage | view | postgres
column_privileges | view | postgres
column_udt_usage | view | postgres
columns | view | postgres
constraint_column_usage | view | postgres
constraint_table_usage | view | postgres
data_type_privileges | view | postgres
domain_constraints | view | postgres
domain_udt_usage | view | postgres
domains | view | postgres
element_types | view | postgres
enabled_roles | view | postgres
information_schema_catalog_name | view | postgres
key_column_usage | view | postgres
parameters | view | postgres
referential_constraints | view | postgres
role_column_grants | view | postgres
role_routine_grants | view | postgres
role_table_grants | view | postgres
role_usage_grants | view | postgres
routine_privileges | view | postgres
routines | view | postgres
schemata | view | postgres
sql_features | table | postgres
sql_implementation_info | table | postgres
sql_languages | table | postgres
sql_packages | table | postgres
sql_sizing | table | postgres
sql_sizing_profiles | table | postgres
table_constraints | view | postgres
table_privileges | view | postgres
tables | view | postgres
triggered_update_columns | view | postgres
triggers | view | postgres
usage_privileges | view | postgres
view_column_usage | view | postgres
view_table_usage | view | postgres
views | view | postgres
(40 rows)

dummy=# DROP TABLE sql_features;
ERROR: table "sql_features" does not exist
ERROR: table "sql_features" does not exist

--
-------------------------------------------------
Aarni Ruuhimäki | Megative Tmi | KYMI.com


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: 7.4.1 template1 - 01-23-2004 , 10:15 AM






Aarni =?iso-8859-1?q?Ruuhim=E4ki?= <aarni.ruuhimaki (AT) kymi (DOT) com> writes:
Quote:
Just noticed that 7.4.1 template1 has 40 views / tables in it and copies all
of them to new databases.
It's supposed to.

Quote:
Tried to DROP them in template1 and in a dummy db
but got an error e.g. 'table "sql_features" does not exist'
information_schema isn't in your search path by default.

I think most of your confusion stems from using an ancient psql ---
since it's not showing a version number in the welcome banner,
it must be older than 7.3, which means it does not know about schemas.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Reply With Quote
  #3  
Old   
Aarni Ruuhimäki
 
Posts: n/a

Default Re: 7.4.1 template1 - 01-23-2004 , 12:12 PM



Hi,

Quote:
I think most of your confusion stems from using an ancient psql ---
Oh, instead of

bash-2.05a$ psql xxx


bash-2.05a$ /usr/local/pgsql/bin/psql xxx
Welcome to psql 7.4.1, the PostgreSQL interactive terminal.

Aha, and thanks again, I see something, hmm ...

BR,

Aarni

On Friday 23 January 2004 18:15, you wrote:
Quote:
Aarni =?iso-8859-1?q?Ruuhim=E4ki?= <aarni.ruuhimaki (AT) kymi (DOT) com> writes:
Just noticed that 7.4.1 template1 has 40 views / tables in it and copies
all of them to new databases.

It's supposed to.

Tried to DROP them in template1 and in a dummy db
but got an error e.g. 'table "sql_features" does not exist'

information_schema isn't in your search path by default.

I think most of your confusion stems from using an ancient psql ---
since it's not showing a version number in the welcome banner,
it must be older than 7.3, which means it does not know about schemas.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
--
-------------------------------------------------
Aarni Ruuhimäki | Megative Tmi | KYMI.com



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.