Re: [DOCS] Ambiguous index entry for Privileges
Kevin Grittner wrote: > Thom Brown wrote: > > On 12 August 2010 00:05, Thom Brown wrote: > >> I noticed that there are 2 linked entries for "Privileges": > >> http://www.postgresql.org/docs/9.0/static/bookindex.html#AEN128982 > >> > >> While they both go to different pages (with admittedly very > >> similar content), those pages are both entitled "Privileges" so > >> it's unclear from the index which page you'll end up at. Can we > >> rename one of those pages to clarify as it looks weird in the > >> index. > > > > Does anyone have an opinion on this? > > Sure -- I think the page at > http://www.postgresql.org/docs/9.0/static/privileges.html (in > "Chapter 20. Database Roles and Privileges" should be more > conceptual rather than a subset of the other page. Rather than > explaining how to use GRANT and REVOKE to change privileges, it > should give an overview of privileges and discuss what is allowed by > each particular privilege. It could link to the other page, so > there would be one place to keep up-to-date on how to grant and > revoke privileges. > > I think the page at > http://www.postgresql.org/docs/9.0/static/ddl-priv.html (in "Chapter > 5. Data Definition") should be renamed to something more like > "Modifying Privileges" or "Granting and Revoking Privileges" (or > something to that effect). It might make sense to have its entry in > the index be a secondary entry under privilege, with some similar > qualification. I went even farther. I think there is no need to discuss object permissions in the database roles chapter. We already link to the DDL section, so I just changed that to link specifically to the DDL privileges section, and made that DDL privileges section be a super-set of the two old sections. Patch attached. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index a65b4bc..519afd6 100644 *** a/doc/src/sgml/ddl.sgml --- b/doc/src/sgml/ddl.sgml *** ALTER TABLE products RENAME TO items; *** 1400,1412 privilege !When you create a database object, you become its owner. By !default, only the owner of an object can do anything with the !object. In order to allow other users to use it, !privileges must be granted. (However, !users that have the superuser attribute can always !access any object.) --- 1400,1432 privilege + +owner + + + +GRANT + + + +REVOKE + + !When an object is created, it is assigned an owner. The !owner is normally the role that executed the creation statement. !For most kinds of objects, the initial state is that only the owner !(or a superuser) can do anything with the object. To allow !other roles to use it, privileges must be !granted. !There are several different kinds of privilege: SELECT, !INSERT, UPDATE, DELETE, !TRUNCATE, REFERENCES, TRIGGER, !CREATE, CONNECT, TEMPORARY, !EXECUTE, and USAGE. !For more information on the different types of privileges supported by !PostgreSQL, see the ! reference page. *** ALTER TABLE products RENAME TO items; *** 1429,1442 the owner only. ! ! ! To change the owner of a table, index, sequence, or view, use the ! ! command. There are corresponding ALTER commands for ! other object types. ! ! To assign privileges, the GRANT command is --- 1449,1462 the owner only. ! !An object can be assigned to a new owner with an ALTER !command of the appropriate kind for the object, e.g. . Superusers can always do !this; ordinary roles can only do it if they are both the current owner !of the object (or a member of the owning role) and a member of the new !owning role. ! To assign privileges, the GRANT command is diff --git a/doc/src/sgml/user-manag.sgml b/doc/src/sgml/user-manag.sgml index 2830aec..6a52827 100644 *** a/doc/src/sgml/user-manag.sgml --- b/doc/src/sgml/user-manag.sgml *** *** 1,7 ! Database Roles and Privileges PostgreSQL manages database access permissions --- 1,7 ! Database Roles PostgreSQL manages database access permissions *** *** 22,31 ! This chapter describes how to create and manage roles and introduces ! the privilege system. More information about the various types of ! database objects and the effects of privileges can be found in ! . --- 22,30 ! This chapter describes how to create and manage roles. ! More information about the effects of privileges on various database ! objects can be found in . *** ALTER ROLE myname SET enable_indexscan T *** 282,362
Re: [DOCS] prefix search in tsearch
I applied a modified documentation patch (attached) that includes Oleg's
suggestions.
---
Oleg Bartunov wrote:
> Erik,
>
> I think it'd be more clear if you say not 'stemmed', but processed in
> according to configuration. Here is an example:
>
> $SHAREDIR/tsearch_data/my_synonyms.syn contains one line:
> one 1
>
>
> CREATE TEXT SEARCH DICTIONARY my_synonym (
> TEMPLATE = synonym,
> SYNONYMS = my_synonyms
> );
>
> ALTER TEXT SEARCH CONFIGURATION english
> ALTER MAPPING FOR asciiword
> WITH my_synonym, english_stem;
>
>
> test=# select 'one'::tsvector @@ to_tsquery('english','one:*');
> ?column?
> --
> f
> (1 row)
>
> because 'one' was processed by my_synonym dictionary.
>
> test=# select ts_debug('english','one');
> ts_debug
> --
> (asciiword,"Word, all ASCII",one,"{my_synonym,english_stem}",my_synonym,{1})
> (1 row)
>
>
>
> On Tue, 31 Aug 2010, Erik Rijkers wrote:
>
> > [docs from cvs HEAD]
> >
> > I found the text-search documentation a little unclear about 'prefix
> > search'; specifically, the
> > examples do not show that the so-called 'prefix' is first stemmed, before
> > it is used as prefix.
> >
> > For instance, the following can be a little surprising:
> >
> > SELECT to_tsvector( 'postgraduate' ) @@ to_tsquery( 'postgres:*' );
> > ?column?
> > --
> > t
> > (1 row)
> >
> > Because prefix search is such an important functionality I think this
> > should be better explained,
> > which I hope the attached doc-patch does.
> >
> > (In textsearch.sgml is another mention + example of prefix search, perhaps
> > it should be extended a
> > little there too - which I'm happy to do as well, but I first wanted to see
> > if you agree that it
> > is a little too obscure as it stands)
> >
> >
> > Erik Rijkers
> >
>
> Regards,
> Oleg
> _
> Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
> Sternberg Astronomical Institute, Moscow University, Russia
> Internet: [email protected], http://www.sai.msu.su/~megera/
> phone: +007(495)939-16-83, +007(495)939-23-83
>
> --
> Sent via pgsql-docs mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-docs
--
Bruce Momjian http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index 2bf411d..10f0e59 100644
*** a/doc/src/sgml/datatype.sgml
--- b/doc/src/sgml/datatype.sgml
*** SELECT 'super:*'::tsquery;
*** 3847,3853
'super':*
This query will match any word in a tsvector that begins
! with super.
--- 3847,3874
'super':*
This query will match any word in a tsvector that begins
! with super.
!
!
!
! Note that text search configuration processing happens before
! comparisons, which means this comparison returns true:
!
! SELECT to_tsvector( 'postgraduate' ) @@ to_tsquery( 'postgres:*' );
! ?column?
! --
! t
! (1 row)
!
! because postgres gets stemmed to postgr:
!
! SELECT to_tsquery('postgres:*');
! to_tsquery
!
! 'postgr':*
! (1 row)
!
! which then matches postgraduate.
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Re: [DOCS] prefix search in tsearch
I came up with some better wording, which I have applied:
This query will match any word in a tsvector that begins
with super. Note that prefixes are first processed by
text search configurations, which means this comparison returns
true:
---
bruce wrote:
>
> I applied a modified documentation patch (attached) that includes Oleg's
> suggestions.
>
> ---
>
> Oleg Bartunov wrote:
> > Erik,
> >
> > I think it'd be more clear if you say not 'stemmed', but processed in
> > according to configuration. Here is an example:
> >
> > $SHAREDIR/tsearch_data/my_synonyms.syn contains one line:
> > one 1
> >
> >
> > CREATE TEXT SEARCH DICTIONARY my_synonym (
> > TEMPLATE = synonym,
> > SYNONYMS = my_synonyms
> > );
> >
> > ALTER TEXT SEARCH CONFIGURATION english
> > ALTER MAPPING FOR asciiword
> > WITH my_synonym, english_stem;
> >
> >
> > test=# select 'one'::tsvector @@ to_tsquery('english','one:*');
> > ?column?
> > --
> > f
> > (1 row)
> >
> > because 'one' was processed by my_synonym dictionary.
> >
> > test=# select ts_debug('english','one');
> > ts_debug
> > --
> > (asciiword,"Word, all
> > ASCII",one,"{my_synonym,english_stem}",my_synonym,{1})
> > (1 row)
> >
> >
> >
> > On Tue, 31 Aug 2010, Erik Rijkers wrote:
> >
> > > [docs from cvs HEAD]
> > >
> > > I found the text-search documentation a little unclear about 'prefix
> > > search'; specifically, the
> > > examples do not show that the so-called 'prefix' is first stemmed, before
> > > it is used as prefix.
> > >
> > > For instance, the following can be a little surprising:
> > >
> > > SELECT to_tsvector( 'postgraduate' ) @@ to_tsquery( 'postgres:*' );
> > > ?column?
> > > --
> > > t
> > > (1 row)
> > >
> > > Because prefix search is such an important functionality I think this
> > > should be better explained,
> > > which I hope the attached doc-patch does.
> > >
> > > (In textsearch.sgml is another mention + example of prefix search,
> > > perhaps it should be extended a
> > > little there too - which I'm happy to do as well, but I first wanted to
> > > see if you agree that it
> > > is a little too obscure as it stands)
> > >
> > >
> > > Erik Rijkers
> > >
> >
> > Regards,
> > Oleg
> > _
> > Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
> > Sternberg Astronomical Institute, Moscow University, Russia
> > Internet: [email protected], http://www.sai.msu.su/~megera/
> > phone: +007(495)939-16-83, +007(495)939-23-83
> >
> > --
> > Sent via pgsql-docs mailing list ([email protected])
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-docs
>
> --
> Bruce Momjian http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + It's impossible for everything to be true. +
--
Bruce Momjian http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
