PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <ctype.h>
#include "access/genam.h"
#include "access/htup_details.h"
#include "access/table.h"
#include "access/xact.h"
#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_namespace.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_ts_config.h"
#include "catalog/pg_ts_config_map.h"
#include "catalog/pg_ts_dict.h"
#include "catalog/pg_ts_parser.h"
#include "catalog/pg_ts_template.h"
#include "catalog/pg_type.h"
#include "commands/defrem.h"
#include "commands/event_trigger.h"
#include "common/string.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "parser/parse_func.h"
#include "tsearch/ts_cache.h"
#include "tsearch/ts_public.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
struct | TSTokenTypeItem |
ObjectAddress AlterTSConfiguration | ( | AlterTSConfigurationStmt * | stmt | ) |
Definition at line 1156 of file tsearchcmds.c.
References aclcheck_error(), ACLCHECK_NOT_OWNER, DropConfigurationMapping(), ereport, errcode(), errmsg(), ERROR, GETSTRUCT, GetTSConfigTuple(), GetUserId(), HeapTupleIsValid, InvokeObjectPostAlterHook, makeConfigurationDependencies(), MakeConfigurationMapping(), NameListToString(), object_ownercheck(), OBJECT_TSCONFIGURATION, ObjectAddressSet, ReleaseSysCache(), RowExclusiveLock, stmt, table_close(), and table_open().
Referenced by ProcessUtilitySlow().
ObjectAddress AlterTSDictionary | ( | AlterTSDictionaryStmt * | stmt | ) |
Definition at line 493 of file tsearchcmds.c.
References aclcheck_error(), ACLCHECK_NOT_OWNER, DefElem::arg, CatalogTupleUpdate(), DefElem::defname, deserialize_deflist(), elog, ERROR, foreach_delete_current, get_ts_dict_oid(), GETSTRUCT, GetUserId(), heap_freetuple(), heap_modify_tuple(), HeapTupleIsValid, InvokeObjectPostAlterHook, lappend(), lfirst, NameListToString(), NIL, object_ownercheck(), OBJECT_TSDICTIONARY, ObjectAddressSet, ObjectIdGetDatum(), PointerGetDatum(), RelationGetDescr, ReleaseSysCache(), RowExclusiveLock, SearchSysCache1(), serialize_deflist(), stmt, SysCacheGetAttr(), HeapTupleData::t_self, table_close(), table_open(), and verify_dictoptions().
Referenced by ProcessUtilitySlow().
|
static |
Definition at line 1834 of file tsearchcmds.c.
References makeBoolean(), makeDefElem(), makeFloat(), makeInteger(), makeString(), name, pstrdup(), strtoint(), and val.
Referenced by deserialize_deflist().
ObjectAddress DefineTSConfiguration | ( | List * | names, |
List * | parameters, | ||
ObjectAddress * | copied | ||
) |
Definition at line 899 of file tsearchcmds.c.
References ACL_CREATE, aclcheck_error(), ACLCHECK_OK, BTEqualStrategyNumber, CatalogCloseIndexes(), CatalogOpenIndexes(), CatalogTupleInsert(), CatalogTuplesMultiInsertWithInfo(), defGetQualifiedName(), DefElem::defname, elog, ereport, errcode(), errmsg(), ERROR, ExecClearTuple(), ExecDropSingleTupleTableSlot(), ExecStoreVirtualTuple(), FormData_pg_ts_config_map, get_namespace_name(), get_ts_config_oid(), get_ts_parser_oid(), GetNewOidWithIndex(), GETSTRUCT, GetUserId(), heap_form_tuple(), heap_freetuple(), HeapTupleIsValid, i, InvalidOid, InvokeObjectPostCreateHook, lfirst, makeConfigurationDependencies(), MakeSingleTupleTableSlot(), MAX_CATALOG_MULTI_INSERT_BYTES, NameGetDatum(), namestrcpy(), object_aclcheck(), OBJECT_SCHEMA, ObjectAddressSet, ObjectIdGetDatum(), OidIsValid, palloc(), QualifiedNameGetCreationNamespace(), RelationData::rd_att, RelationGetDescr, ReleaseSysCache(), RowExclusiveLock, ScanKeyInit(), SearchSysCache1(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), table_open(), TupleTableSlot::tts_values, TTSOpsHeapTuple, and values.
Referenced by ProcessUtilitySlow().
ObjectAddress DefineTSDictionary | ( | List * | names, |
List * | parameters | ||
) |
Definition at line 397 of file tsearchcmds.c.
References ACL_CREATE, aclcheck_error(), ACLCHECK_OK, CatalogTupleInsert(), defGetQualifiedName(), DefElem::defname, ereport, errcode(), errmsg(), ERROR, get_namespace_name(), get_ts_template_oid(), GetNewOidWithIndex(), GetUserId(), heap_form_tuple(), heap_freetuple(), InvalidOid, InvokeObjectPostCreateHook, lappend(), lfirst, makeDictionaryDependencies(), NameGetDatum(), namestrcpy(), NIL, object_aclcheck(), OBJECT_SCHEMA, ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), QualifiedNameGetCreationNamespace(), RelationData::rd_att, RowExclusiveLock, serialize_deflist(), table_close(), table_open(), values, and verify_dictoptions().
Referenced by ProcessUtilitySlow().
ObjectAddress DefineTSParser | ( | List * | names, |
List * | parameters | ||
) |
Definition at line 184 of file tsearchcmds.c.
References CatalogTupleInsert(), DatumGetObjectId(), DefElem::defname, ereport, errcode(), errmsg(), ERROR, get_ts_parser_func(), GetNewOidWithIndex(), heap_form_tuple(), heap_freetuple(), InvokeObjectPostCreateHook, lfirst, makeParserDependencies(), NameGetDatum(), namestrcpy(), ObjectIdGetDatum(), OidIsValid, QualifiedNameGetCreationNamespace(), RelationData::rd_att, RowExclusiveLock, superuser(), table_close(), table_open(), and values.
Referenced by ProcessUtilitySlow().
ObjectAddress DefineTSTemplate | ( | List * | names, |
List * | parameters | ||
) |
Definition at line 690 of file tsearchcmds.c.
References CatalogTupleInsert(), DatumGetObjectId(), DefElem::defname, ereport, errcode(), errmsg(), ERROR, get_ts_template_func(), GetNewOidWithIndex(), heap_form_tuple(), heap_freetuple(), i, InvalidOid, InvokeObjectPostCreateHook, lfirst, makeTSTemplateDependencies(), NameGetDatum(), namestrcpy(), ObjectIdGetDatum(), OidIsValid, QualifiedNameGetCreationNamespace(), RelationData::rd_att, RowExclusiveLock, superuser(), table_close(), table_open(), and values.
Referenced by ProcessUtilitySlow().
Definition at line 1621 of file tsearchcmds.c.
References buildDefItem(), DatumGetTextPP, elog, ereport, errcode(), errmsg(), ERROR, lappend(), len, NIL, palloc(), pfree(), text_to_cstring(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by AlterTSDictionary(), lookup_ts_dictionary_cache(), ts_headline_byid_opt(), ts_headline_json_byid_opt(), and ts_headline_jsonb_byid_opt().
|
static |
Definition at line 1491 of file tsearchcmds.c.
References BTEqualStrategyNumber, CatalogTupleDelete(), ereport, errcode(), errmsg(), ERROR, EventTriggerCollectAlterTSConfig(), GETSTRUCT, getTokenTypes(), HeapTupleIsValid, Int32GetDatum(), lfirst, TSTokenTypeItem::name, NIL, NOTICE, TSTokenTypeItem::num, ObjectIdGetDatum(), ScanKeyInit(), stmt, systable_beginscan(), systable_endscan(), systable_getnext(), and HeapTupleData::t_self.
Referenced by AlterTSConfiguration().
Definition at line 74 of file tsearchcmds.c.
References attnum, defGetQualifiedName(), elog, ereport, errcode(), errmsg(), ERROR, format_type_be(), func_signature_string(), get_func_rettype(), LookupFuncName(), NIL, and ObjectIdGetDatum().
Referenced by DefineTSParser().
Definition at line 609 of file tsearchcmds.c.
References attnum, defGetQualifiedName(), elog, ereport, errcode(), errmsg(), ERROR, format_type_be(), func_signature_string(), get_func_rettype(), LookupFuncName(), NIL, and ObjectIdGetDatum().
Referenced by DefineTSTemplate().
Definition at line 1229 of file tsearchcmds.c.
References DatumGetPointer(), elog, ereport, errcode(), errmsg(), ERROR, j, lappend(), TSParserCacheEntry::lextypeOid, lfirst_node, sort-test::list, list_length(), lookup_ts_parser_cache(), TSTokenTypeItem::name, NIL, TSTokenTypeItem::num, OidFunctionCall1, OidIsValid, palloc0(), pstrdup(), strVal, tstoken_list_member(), and val.
Referenced by DropConfigurationMapping(), and MakeConfigurationMapping().
Definition at line 787 of file tsearchcmds.c.
References elog, ERROR, get_ts_config_oid(), HeapTupleIsValid, ObjectIdGetDatum(), OidIsValid, and SearchSysCache1().
Referenced by AlterTSConfiguration().
|
static |
Definition at line 812 of file tsearchcmds.c.
References add_exact_object_address(), BTEqualStrategyNumber, ObjectAddress::classId, CommandCounterIncrement(), deleteDependencyRecordsFor(), deleteSharedDependencyRecordsFor(), DEPENDENCY_NORMAL, free_object_addresses(), GETSTRUCT, HeapTupleIsValid, new_object_addresses(), ObjectAddress::objectId, ObjectIdGetDatum(), ObjectAddress::objectSubId, record_object_address_dependencies(), recordDependencyOnCurrentExtension(), recordDependencyOnOwner(), ScanKeyInit(), systable_beginscan(), systable_endscan(), and systable_getnext().
Referenced by AlterTSConfiguration(), and DefineTSConfiguration().
|
static |
Definition at line 1288 of file tsearchcmds.c.
References BTEqualStrategyNumber, CatalogCloseIndexes(), CatalogOpenIndexes(), CatalogTupleDelete(), CatalogTuplesMultiInsertWithInfo(), CatalogTupleUpdateWithInfo(), EventTriggerCollectAlterTSConfig(), ExecClearTuple(), ExecDropSingleTupleTableSlot(), ExecStoreVirtualTuple(), FormData_pg_ts_config_map, get_ts_dict_oid(), GETSTRUCT, getTokenTypes(), heap_modify_tuple(), HeapTupleIsValid, i, Int32GetDatum(), j, lfirst, list_length(), MakeSingleTupleTableSlot(), MAX_CATALOG_MULTI_INSERT_BYTES, Min, NIL, TSTokenTypeItem::num, ObjectIdGetDatum(), palloc(), RelationGetDescr, ScanKeyInit(), stmt, systable_beginscan(), systable_endscan(), systable_getnext(), HeapTupleData::t_self, TupleTableSlot::tts_values, and TTSOpsHeapTuple.
Referenced by AlterTSConfiguration().
|
static |
Definition at line 307 of file tsearchcmds.c.
References add_exact_object_address(), ObjectAddress::classId, DEPENDENCY_NORMAL, free_object_addresses(), GETSTRUCT, new_object_addresses(), ObjectAddressSet, ObjectAddress::objectId, record_object_address_dependencies(), recordDependencyOnCurrentExtension(), and recordDependencyOnOwner().
Referenced by DefineTSDictionary().
|
static |
Definition at line 137 of file tsearchcmds.c.
References add_exact_object_address(), DEPENDENCY_NORMAL, free_object_addresses(), GETSTRUCT, new_object_addresses(), ObjectAddressSet, ObjectAddress::objectId, OidIsValid, record_object_address_dependencies(), and recordDependencyOnCurrentExtension().
Referenced by DefineTSParser().
|
static |
Definition at line 652 of file tsearchcmds.c.
References add_exact_object_address(), DEPENDENCY_NORMAL, free_object_addresses(), GETSTRUCT, new_object_addresses(), ObjectAddressSet, ObjectAddress::objectId, OidIsValid, record_object_address_dependencies(), and recordDependencyOnCurrentExtension().
Referenced by DefineTSTemplate().
void RemoveTSConfigurationById | ( | Oid | cfgId | ) |
Definition at line 1108 of file tsearchcmds.c.
References BTEqualStrategyNumber, CatalogTupleDelete(), elog, ERROR, HeapTupleIsValid, ObjectIdGetDatum(), ReleaseSysCache(), RowExclusiveLock, ScanKeyInit(), SearchSysCache1(), systable_beginscan(), systable_endscan(), systable_getnext(), HeapTupleData::t_self, table_close(), and table_open().
Referenced by doDeletion().
Definition at line 1565 of file tsearchcmds.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), DefElem::arg, buf, cstring_to_text_with_len(), defGetString(), DefElem::defname, ESCAPE_STRING_SYNTAX, initStringInfo(), IsA, lfirst, lnext(), pfree(), quote_identifier(), SQL_STR_DOUBLE, and val.
Referenced by AlterTSDictionary(), and DefineTSDictionary().
|
static |
Definition at line 1204 of file tsearchcmds.c.
References lfirst, and TSTokenTypeItem::name.
Referenced by getTokenTypes().
Definition at line 342 of file tsearchcmds.c.
References copyObject, elog, ereport, errcode(), errmsg(), ERROR, GETSTRUCT, HeapTupleIsValid, IsUnderPostmaster, NameStr, ObjectIdGetDatum(), OidFunctionCall1, OidIsValid, PointerGetDatum(), ReleaseSysCache(), and SearchSysCache1().
Referenced by AlterTSDictionary(), and DefineTSDictionary().