File tree Expand file tree Collapse file tree 4 files changed +55
-4
lines changed Expand file tree Collapse file tree 4 files changed +55
-4
lines changed Original file line number Diff line number Diff line change 11<!--
2- $PostgreSQL: pgsql/doc/src/sgml/ref/create_database.sgml,v 1.39 2004/06/18 06:13:05 tgl Exp $
2+ $PostgreSQL: pgsql/doc/src/sgml/ref/create_database.sgml,v 1.40 2004/07/12 01:22:53 momjian Exp $
33PostgreSQL documentation
44-->
55
@@ -169,6 +169,26 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable>
169169
170170<programlisting>
171171CREATE DATABASE lusiadas;
172+ </programlisting>
173+ </para>
174+
175+ <para>
176+
177+ <para>
178+ To create a database <literal>sales</> owned by user <literal>salesapp</>>
179+ with a default tablespace of <literal>salesspace</>:
180+
181+ <programlisting>
182+ CREATE DATABASE sales OWNER salesapp TABLESPACE salesspace;
183+ </programlisting>
184+ </para>
185+
186+ <para>
187+ To create a database <literal>music</> which supports the ISO-8859-1
188+ character set:
189+
190+ <programlisting>
191+ CREATE DATABASE music ENCODING 'LATIN1';
172192</programlisting>
173193 </para>
174194 </refsect1>
Original file line number Diff line number Diff line change 11<!--
2- $PostgreSQL: pgsql/doc/src/sgml/ref/create_index.sgml,v 1.48 2004/06/18 06:13:05 tgl Exp $
2+ $PostgreSQL: pgsql/doc/src/sgml/ref/create_index.sgml,v 1.49 2004/07/12 01:22:53 momjian Exp $
33PostgreSQL documentation
44-->
55
@@ -251,6 +251,15 @@ CREATE [ UNIQUE ] INDEX <replaceable class="parameter">name</replaceable> ON <re
251251 the table <literal>films</literal>:
252252<programlisting>
253253CREATE UNIQUE INDEX title_idx ON films (title);
254+ </programlisting>
255+ </para>
256+
257+ <para>
258+ To create an index on the column <literal>code</> in the table
259+ <literal>films</> and have the index reside in the tablespace
260+ <literal>indexspace</>:
261+ <programlisting>
262+ CREATE INDEX code_idx ON films(code) TABLESPACE indexspace;
254263</programlisting>
255264 </para>
256265
Original file line number Diff line number Diff line change 11<!--
2- $PostgreSQL: pgsql/doc/src/sgml/ref/create_schema.sgml,v 1.13 2004/06/25 21:55:50 tgl Exp $
2+ $PostgreSQL: pgsql/doc/src/sgml/ref/create_schema.sgml,v 1.14 2004/07/12 01:22:53 momjian Exp $
33PostgreSQL documentation
44-->
55
@@ -160,6 +160,16 @@ CREATE VIEW hollywood.winners AS
160160 SELECT title, release FROM hollywood.films WHERE awards IS NOT NULL;
161161</programlisting>
162162 </para>
163+
164+ <para>
165+ Create a schema <literal>sales</> whose tables, indexes and sequences
166+ will be stored in the tablespace <literal>mirrorspace</> by default:
167+
168+ <programlisting>
169+ CREATE SCHEMA sales TABLESPACE mirrorspace;
170+ </programlisting>
171+ </para>
172+
163173 </refsect1>
164174
165175 <refsect1>
Original file line number Diff line number Diff line change 11<!--
2- $PostgreSQL: pgsql/doc/src/sgml/ref/create_table.sgml,v 1.82 2004/06/18 06:13:05 tgl Exp $
2+ $PostgreSQL: pgsql/doc/src/sgml/ref/create_table.sgml,v 1.83 2004/07/12 01:22:53 momjian Exp $
33PostgreSQL documentation
44-->
55
@@ -821,6 +821,18 @@ CREATE TABLE distributors (
821821 name varchar(40),
822822 UNIQUE(name)
823823);
824+ </programlisting>
825+ </para>
826+
827+ <para>
828+ Create table <structname>cinemas</> in tablespace <structname>diskvol1</>:
829+
830+ <programlisting>
831+ CREATE TABLE cinemas (
832+ id serial,
833+ name text,
834+ location text
835+ ) TABLESPACE diskvol1;
824836</programlisting>
825837 </para>
826838
You can’t perform that action at this time.
0 commit comments