Re: create table explicitly mention that unique|primary key constraint will create an

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, jian he <jian(dot)universality(at)gmail(dot)com>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: create table explicitly mention that unique|primary key constraint will create an
Date: 2024-01-26 15:37:35
Message-ID: CAKFQuwaYrWNpw6Yd4MjtT10wpJg53dBwHjPhhdHMwfFp7NpS7Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Fri, Jan 19, 2024 at 3:46 AM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
wrote:

> In the attached patch, I have copied the enumeration of relations from
> the CREATE INDEX page. I think this small redundance is alright, but I
> wouldn't mind if this gets removed from CREATE INDEX.
>
>
Tweaking the main paragraph a little.

We use examples elsewhere, it seems one for this makes the point very clear
with less description.

I removed it altogether but namespace is a word unto itself, not "name
space".

diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index e103eddd40..25db985a56 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -3025,10 +3025,11 @@ SELECT * FROM information WHERE group_id = 2 FOR
UPDATE;
A database contains one or more named <firstterm>schemas</firstterm>,
which
in turn contain tables. Schemas also contain other kinds of named
objects, including data types, functions, and operators. Within one
schema,
- two objects of the same type cannot have the same name. All relations
- (tables, sequences, indexes, views, materialized views, and foreign
tables)
- share one name space, so they need to have different names if they are
in
- a single schema. The same
+ two objects of the same type cannot have the same name. The object type
+ of <literal>relations</literal> encompasses all of the following:
+ tables, sequences, indexes, views, materialized views, and foreign
tables.
+ Thus, for example, an index and a table must have different names if
they
+ are in the same schema. The same
object name can be used in different schemas without conflict; for
example, both <literal>schema1</literal> and
<literal>myschema</literal> can
contain tables named <literal>mytable</literal>. Unlike databases,

David J.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Laurenz Albe 2024-01-26 15:52:23 Re: create table explicitly mention that unique|primary key constraint will create an
Previous Message vignesh C 2024-01-26 13:31:32 Re: create table explicitly mention that unique|primary key constraint will create an