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/alter.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_utils.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.
ObjectAddress AlterTSConfiguration | ( | AlterTSConfigurationStmt * | stmt | ) |
Definition at line 1150 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 487 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(), TSDICTOID, and verify_dictoptions().
Referenced by ProcessUtilitySlow().
Definition at line 1797 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 893 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(), TSCONFIGOID, TupleTableSlot::tts_values, TTSOpsHeapTuple, and values.
Referenced by ProcessUtilitySlow().
ObjectAddress DefineTSDictionary | ( | List * | names, |
List * | parameters | ||
) |
Definition at line 391 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 178 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 684 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 1584 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 1450 of file tsearchcmds.c.
References BTEqualStrategyNumber, CatalogTupleDelete(), ereport, errcode(), errmsg(), ERROR, EventTriggerCollectAlterTSConfig(), GETSTRUCT, getTokenTypes(), HeapTupleIsValid, i, Int32GetDatum(), lfirst_node, NOTICE, ObjectIdGetDatum(), ScanKeyInit(), stmt, strVal, systable_beginscan(), systable_endscan(), systable_getnext(), HeapTupleData::t_self, and val.
Referenced by AlterTSConfiguration().
Definition at line 68 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 603 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 1198 of file tsearchcmds.c.
References DatumGetPointer(), elog(), ereport, errcode(), errmsg(), ERROR, i, j, TSParserCacheEntry::lextypeOid, lfirst_node, sort-test::list, list_length(), lookup_ts_parser_cache(), OidFunctionCall1, OidIsValid, palloc(), res, strVal, and val.
Referenced by DropConfigurationMapping(), and MakeConfigurationMapping().
Definition at line 781 of file tsearchcmds.c.
References elog(), ERROR, get_ts_config_oid(), HeapTupleIsValid, ObjectIdGetDatum(), OidIsValid, SearchSysCache1(), and TSCONFIGOID.
Referenced by AlterTSConfiguration().
|
static |
Definition at line 806 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 1253 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, 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 301 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 131 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 646 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 1102 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(), table_open(), and TSCONFIGOID.
Referenced by doDeletion().
Definition at line 1528 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().
Definition at line 336 of file tsearchcmds.c.
References copyObject, elog(), ereport, errcode(), errmsg(), ERROR, GETSTRUCT, HeapTupleIsValid, IsUnderPostmaster, NameStr, ObjectIdGetDatum(), OidFunctionCall1, OidIsValid, PointerGetDatum(), ReleaseSysCache(), SearchSysCache1(), and TSTEMPLATEOID.
Referenced by AlterTSDictionary(), and DefineTSDictionary().