Documentation ¶
Index ¶
- Constants
- Variables
- func AddProtocolDependenciesForGPDB4(depMap DependencyMap, tables []Table, protocols []ExternalProtocol)
- func AddTableDataEntriesToTOC(tables []Table, rowsCopiedMaps []map[uint32]int64)
- func AnyValues(any pq.StringArray, typ string) string
- func AppendExtPartSuffix(name string) string
- func BackupSingleTableData(table Table, rowsCopiedMap map[uint32]int64, counters *BackupProgressCounters, ...) error
- func ConstructImplicitIndexOidList(connectionPool *dbconn.DBConn) string
- func ConstructTableAttributesList(columnDefs []ColumnDefinition) string
- func CopyTableOut(connectionPool *dbconn.DBConn, table Table, destinationToWrite string, ...) (int64, error)
- func CreateInitialSegmentPipes(oidList []string, c *cluster.Cluster, connectionPool *dbconn.DBConn, ...) int
- func DetermineExternalTableCharacteristics(extTableDef ExternalTableDefinition) (int, int)
- func DoBackup()
- func DoCleanup(backupFailed bool)
- func DoFlagValidation(cmd *cobra.Command)
- func DoInit(cmd *cobra.Command)
- func DoSetup()
- func DoTeardown()
- func ExtensionFilterClause(namespace string) string
- func ExtractLanguageFunctions(funcDefs []Function, procLangs []ProceduralLanguage) ([]Function, []Function)
- func FlagChanged(flagName string) bool
- func GenerateAttributeStatisticsQueries(table Table, attStat AttributeStatistic) []string
- func GenerateFormatStatement(extTableDef ExternalTableDefinition) string
- func GenerateTableBatches(tables []Relation, batchSize int) []string
- func GenerateTupleStatisticsQuery(table Table, tupleStat TupleStatistic) string
- func GetAOIncrementalMetadata(connectionPool *dbconn.DBConn) map[string]toc.AOEntry
- func GetAttachPartitionInfo(connectionPool *dbconn.DBConn) map[uint32]AttachPartitionInfo
- func GetAttributeStatistics(connectionPool *dbconn.DBConn, tables []Table) map[uint32][]AttributeStatistic
- func GetColumnDefinitions(connectionPool *dbconn.DBConn) map[uint32][]ColumnDefinition
- func GetDBSize(connectionPool *dbconn.DBConn) string
- func GetDatabaseGUCs(connectionPool *dbconn.DBConn) []string
- func GetDistributionPolicies(connectionPool *dbconn.DBConn) map[uint32]string
- func GetExternalTableDefinitions(connectionPool *dbconn.DBConn) map[uint32]ExternalTableDefinition
- func GetForceRowSecurity(connectionPool *dbconn.DBConn) map[uint32]bool
- func GetForeignTableDefinitions(connectionPool *dbconn.DBConn) map[uint32]ForeignTableDefinition
- func GetFunctionArgsAndIdentArgs(connectionPool *dbconn.DBConn) (map[uint32]string, map[uint32]string)
- func GetFunctionOidToInfoMap(connectionPool *dbconn.DBConn) map[uint32]FunctionInfo
- func GetFunctionReturnTypes(connectionPool *dbconn.DBConn) map[uint32]Function
- func GetLatestMatchingBackupConfig(history *history.History, currentBackupConfig *history.BackupConfig) *history.BackupConfig
- func GetLatestMatchingBackupTimestamp() string
- func GetOperatorClassFunctions(connectionPool *dbconn.DBConn) map[uint32][]OperatorClassFunction
- func GetOperatorClassOperators(connectionPool *dbconn.DBConn) map[uint32][]OperatorClassOperator
- func GetPartitionAlteredSchema(connectionPool *dbconn.DBConn) map[uint32][]AlteredPartitionRelation
- func GetPartitionDetails(connectionPool *dbconn.DBConn) (map[uint32]string, map[uint32]string)
- func GetPartitionKeyDefs(connectionPool *dbconn.DBConn) map[uint32]string
- func GetPartitionTableMap(connectionPool *dbconn.DBConn) map[uint32]PartitionLevelInfo
- func GetRenameExchangedPartitionQuery(connection *dbconn.DBConn) string
- func GetReport() *report.Report
- func GetRoleGUCs(connectionPool *dbconn.DBConn) map[string][]RoleGUC
- func GetSegmentTablespaces(connectionPool *dbconn.DBConn, Oid uint32) []string
- func GetSynchronizedSnapshot(connectionPool *dbconn.DBConn) (string, error)
- func GetTableAccessMethod(connectionPool *dbconn.DBConn) map[uint32]string
- func GetTableInheritance(connectionPool *dbconn.DBConn, tables []Relation) map[uint32][]string
- func GetTableReplicaIdentity(connectionPool *dbconn.DBConn) map[uint32]string
- func GetTableStorage(connectionPool *dbconn.DBConn) (map[uint32]string, map[uint32]string)
- func GetTableType(connectionPool *dbconn.DBConn) map[uint32]string
- func GetTargetBackupTimestamp() string
- func GetTupleStatistics(connectionPool *dbconn.DBConn, tables []Table) map[uint32]TupleStatistic
- func GetTypeMetadataEntry(schema string, name string) (string, toc.MetadataEntry)
- func GetUnloggedTables(connectionPool *dbconn.DBConn) map[uint32]bool
- func GetVersion() string
- func InitializeMetadataParams(connectionPool *dbconn.DBConn)
- func LockTableNoWait(dataTable Table, connNum int) error
- func LockTables(connectionPool *dbconn.DBConn, tables []Relation)
- func MustGetFlagBool(flagName string) bool
- func MustGetFlagInt(flagName string) int
- func MustGetFlagString(flagName string) string
- func MustGetFlagStringArray(flagName string) []string
- func MustGetFlagStringSlice(flagName string) []string
- func NewBackupConfig(dbName string, dbVersion string, backupVersion string, plugin string, ...) *history.BackupConfig
- func PopulateRestorePlan(changedTables []Table, restorePlan []history.RestorePlanEntry, ...) []history.RestorePlanEntry
- func PostProcessFunctionConfigs(allFunctions []Function) error
- func PrintAccessMethodStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintAlterSequenceStatements(metadataFile *utils.FileWithByteCount, tocfile *toc.TOC, sequences []Sequence)
- func PrintConstraintStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, constraint Constraint, ...)
- func PrintCreateAggregateStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, aggDef Aggregate, ...)
- func PrintCreateBaseTypeStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, base BaseType, ...)
- func PrintCreateCastStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, castDef Cast, ...)
- func PrintCreateCollationStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, collations []Collation, ...)
- func PrintCreateCompositeTypeStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, composite CompositeType, ...)
- func PrintCreateConversionStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, conversions []Conversion, ...)
- func PrintCreateDatabaseStatement(metadataFile *utils.FileWithByteCount, tocfile *toc.TOC, defaultDB Database, ...)
- func PrintCreateDomainStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, domain Domain, ...)
- func PrintCreateEnumTypeStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, enums []EnumType, ...)
- func PrintCreateEventTriggerStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintCreateExtendedStatistics(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintCreateExtensionStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, extensionDefs []Extension, ...)
- func PrintCreateExternalProtocolStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, protocol ExternalProtocol, ...)
- func PrintCreateForeignDataWrapperStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, fdw ForeignDataWrapper, ...)
- func PrintCreateFunctionStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, funcDef Function, ...)
- func PrintCreateIndexStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, indexes []IndexDefinition, ...)
- func PrintCreateLanguageStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintCreateOperatorClassStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintCreateOperatorFamilyStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintCreateOperatorStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, operator Operator, ...)
- func PrintCreatePolicyStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, policies []RLSPolicy, ...)
- func PrintCreateRangeTypeStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, rangeType RangeType, ...)
- func PrintCreateResourceGroupStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, resGroups []ResourceGroup, ...)
- func PrintCreateResourceQueueStatements(metadataFile *utils.FileWithByteCount, tocfile *toc.TOC, ...)
- func PrintCreateRoleStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, roles []Role, ...)
- func PrintCreateRuleStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, rules []RuleDefinition, ...)
- func PrintCreateSchemaStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, schemas []Schema, ...)
- func PrintCreateSequenceStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, sequences []Sequence, ...)
- func PrintCreateServerStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, server ForeignServer, ...)
- func PrintCreateShellTypeStatements(metadataFile *utils.FileWithByteCount, tocfile *toc.TOC, ...)
- func PrintCreateTableStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, table Table, ...)
- func PrintCreateTablespaceStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, tablespaces []Tablespace, ...)
- func PrintCreateTextSearchConfigurationStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintCreateTextSearchDictionaryStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintCreateTextSearchParserStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, parser TextSearchParser, ...)
- func PrintCreateTextSearchTemplateStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintCreateTransformStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, transform Transform, ...)
- func PrintCreateTriggerStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintCreateUserMappingStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, mapping UserMapping)
- func PrintCreateViewStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, view View, ...)
- func PrintDatabaseGUCs(metadataFile *utils.FileWithByteCount, tocfile *toc.TOC, gucs []string, ...)
- func PrintDefaultPrivilegesStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintDependentObjectStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, objects []Sortable, ...)
- func PrintExchangeExternalPartitionStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintExternalTableCreateStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, table Table)
- func PrintExternalTableStatements(metadataFile *utils.FileWithByteCount, tableName string, ...)
- func PrintFunctionBodyOrPath(metadataFile *utils.FileWithByteCount, funcDef Function)
- func PrintFunctionModifiers(metadataFile *utils.FileWithByteCount, funcDef Function)
- func PrintIdentityColumns(metadataFile *utils.FileWithByteCount, toc *toc.TOC, sequences []Sequence)
- func PrintObjectMetadata(metadataFile *utils.FileWithByteCount, toc *toc.TOC, metadata ObjectMetadata, ...)
- func PrintPostCreateTableStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, table Table, ...)
- func PrintRegularTableCreateStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, table Table)
- func PrintResetResourceGroupStatements(metadataFile *utils.FileWithByteCount, tocfile *toc.TOC)
- func PrintRoleGUCStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, ...)
- func PrintRoleMembershipStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, roleMembers []RoleMember)
- func PrintSessionGUCs(metadataFile *utils.FileWithByteCount, toc *toc.TOC, gucs SessionGUCs)
- func PrintStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, obj toc.TOCObject, ...)
- func PrintStatisticsStatements(statisticsFile *utils.FileWithByteCount, tocfile *toc.TOC, tables []Table, ...)
- func QuoteGUCValue(name, value string) string
- func RenameExchangedPartitionConstraints(connectionPool *dbconn.DBConn, constraints *[]Constraint)
- func RenameExchangedPartitionIndexes(connectionPool *dbconn.DBConn, indexes *[]IndexDefinition)
- func RetrieveAndProcessTables() ([]Table, []Table)
- func SchemaFilterClause(namespace string) string
- func SchemaFilterClauseWithAlteredPartitionSchemas(namespace string, partitionAlteredSchemas map[string]bool) string
- func SetCluster(cluster *cluster.Cluster)
- func SetCmdFlags(flagSet *pflag.FlagSet)
- func SetConnection(conn *dbconn.DBConn)
- func SetFPInfo(fpInfo filepath.FilePathInfo)
- func SetFilterRelationClause(filterClause string)
- func SetLoggerVerbosity()
- func SetPluginConfig(config *utils.PluginConfig)
- func SetQuotedRoleNames(quotedRoles map[string]string)
- func SetReport(report *report.Report)
- func SetSessionGUCs(connNum int)
- func SetSynchronizedSnapshot(connectionPool *dbconn.DBConn, connNum int, snapshotId string) error
- func SetTOC(toc *toc.TOC)
- func SetVersion(v string)
- func SliceToPostgresArray(slice []string) string
- func SplitTablesByPartitionType(tables []Table, includeList []string) ([]Table, []Table)
- func UnescapeDoubleQuote(value string) string
- func ValidateSchemasExist(connectionPool *dbconn.DBConn, schemaList []string, excludeSet bool)
- func ValidateTablesExist(conn *dbconn.DBConn, tableList []string, excludeSet bool)
- type ACL
- type AccessMethod
- type Aggregate
- type AlteredPartitionRelation
- type AttachPartitionInfo
- type Attribute
- type AttributeStatistic
- type BackupProgressCounters
- type BaseType
- type Cast
- type Collation
- type ColumnDefinition
- type CompositeType
- type Constraint
- type Conversion
- type Database
- type DefaultPrivileges
- type DefaultPrivilegesQueryStruct
- type Dependency
- type DependencyMap
- type Domain
- type EnumType
- type EventTrigger
- type ExchangedPartitionName
- type Extension
- type ExternalProtocol
- type ExternalTableDefinition
- type ForeignDataWrapper
- type ForeignServer
- type ForeignTableDefinition
- type Function
- type FunctionInfo
- type IndexDefinition
- type MetadataMap
- type MetadataQueryParams
- type MetadataQueryStruct
- type ObjectMetadata
- func (obj ObjectMetadata) GetCommentStatement(objectName string, objectType string, owningTable string) string
- func (obj ObjectMetadata) GetOwnerStatement(objectName string, objectType string) string
- func (obj ObjectMetadata) GetPrivilegesStatements(objectName string, objectType string, columnName ...string) string
- func (obj ObjectMetadata) GetSecurityLabelStatement(objectName string, objectType string) string
- type Operator
- type OperatorClass
- type OperatorClassFunction
- type OperatorClassOperator
- type OperatorFamily
- type ParserTokenType
- type ParserTokenTypes
- type PartitionInfo
- type PartitionLevelInfo
- type ProceduralLanguage
- type RLSPolicy
- type RangeType
- type Relation
- type ResourceGroup
- type ResourceQueue
- type Role
- type RoleGUC
- type RoleMember
- type RuleDefinition
- type Schema
- type Sequence
- type SequenceDefinition
- type SessionGUCs
- type ShellType
- type Sortable
- type SortableDependency
- type StatisticExt
- type Table
- type TableDefinition
- type TableLocks
- type Tablespace
- type TextSearchConfiguration
- type TextSearchDictionary
- type TextSearchParser
- type TextSearchTemplate
- type TimeConstraint
- type Transform
- type TriggerDefinition
- type TupleStatistic
- type TypeMapping
- type UniqueID
- type UserMapping
- type View
Constants ¶
const ( Unknown int = iota Deferred Complete PG_LOCK_NOT_AVAILABLE = "55P03" )
Table backup state constants
const ( // Type of external table READABLE = iota READABLE_WEB WRITABLE WRITABLE_WEB // Protocol external table is using FILE GPFDIST GPHDFS HTTP S3 )
const (
SNAPSHOT_GPDB_MIN_VERSION = "1.1.0"
)
Variables ¶
var ( PG_AGGREGATE_OID uint32 = 1255 PG_AUTHID_OID uint32 = 1260 PG_CAST_OID uint32 = 2605 PG_CLASS_OID uint32 = 1259 PG_COLLATION_OID uint32 = 3456 PG_CONSTRAINT_OID uint32 = 2606 PG_CONVERSION_OID uint32 = 2607 PG_DATABASE_OID uint32 = 1262 PG_EVENT_TRIGGER uint32 = 3466 PG_EXTENSION_OID uint32 = 3079 PG_EXTPROTOCOL_OID uint32 = 7175 PG_FOREIGN_DATA_WRAPPER_OID uint32 = 2328 PG_FOREIGN_SERVER_OID uint32 = 1417 PG_INDEX_OID uint32 = 2610 PG_LANGUAGE_OID uint32 = 2612 PG_TRANSFORM_OID uint32 = 3576 PG_NAMESPACE_OID uint32 = 2615 PG_OPCLASS_OID uint32 = 2616 PG_OPERATOR_OID uint32 = 2617 PG_OPFAMILY_OID uint32 = 2753 PG_PROC_OID uint32 = 1255 PG_RESGROUP_OID uint32 = 6436 PG_RESQUEUE_OID uint32 = 6026 PG_REWRITE_OID uint32 = 2618 PG_STATISTIC_EXT_OID uint32 = 3381 PG_TABLESPACE_OID uint32 = 1213 PG_TRIGGER_OID uint32 = 2620 PG_TS_CONFIG_OID uint32 = 3602 PG_TS_DICT_OID uint32 = 3600 PG_TS_PARSER_OID uint32 = 3601 PG_TS_TEMPLATE_OID uint32 = 3764 PG_TYPE_OID uint32 = 1247 PG_USER_MAPPING_OID uint32 = 1418 FIRST_NORMAL_OBJECT_ID uint32 = 16384 )
var ACLRegex = regexp.MustCompile(`^(.*)=([a-zA-Z\*]*)/(.*)$`)
var ( /* * Used for synchronizing DoCleanup. In DoInit() we increment the group * and then wait for at least one DoCleanup to finish, either in DoTeardown * or the signal handler. */ CleanupGroup *sync.WaitGroup )
* Non-flag variables
Functions ¶
func AddProtocolDependenciesForGPDB4 ¶
func AddProtocolDependenciesForGPDB4(depMap DependencyMap, tables []Table, protocols []ExternalProtocol)
This file contains functions to sort objects that have dependencies among themselves. * For example, functions and types can be dependent on one another, we cannot simply * dump all functions and then all types. * The following objects are included the dependency sorting logic: * - Functions * - Types * - Tables * - Protocols
func AnyValues ¶
func AnyValues(any pq.StringArray, typ string) string
* A given type is not guaranteed to have a corresponding array type, so we need * to use array_in() instead of casting to an array.
func AppendExtPartSuffix ¶
func BackupSingleTableData ¶
func ConstructImplicitIndexOidList ¶
* This function constructs the names of implicit indexes created by * unique constraints on tables, so they can be filtered out of the * index list. * * Primary key indexes can only be created implicitly by a primary * key constraint, so they can be filtered out directly in the query * to get indexes, but multiple unique indexes can be created on the * same column so we only want to filter out the implicit ones.
func ConstructTableAttributesList ¶
func ConstructTableAttributesList(columnDefs []ColumnDefinition) string
func CopyTableOut ¶
func DetermineExternalTableCharacteristics ¶
func DetermineExternalTableCharacteristics(extTableDef ExternalTableDefinition) (int, int)
func DoFlagValidation ¶
func DoTeardown ¶
func DoTeardown()
func ExtensionFilterClause ¶
func ExtractLanguageFunctions ¶
func ExtractLanguageFunctions(funcDefs []Function, procLangs []ProceduralLanguage) ([]Function, []Function)
* This function separates out functions related to procedural languages from * any other functions, so that language-related functions can be backed up before * the languages themselves and we can avoid sorting languages and functions * together to resolve dependencies.
func FlagChanged ¶
func GenerateAttributeStatisticsQueries ¶
func GenerateAttributeStatisticsQueries(table Table, attStat AttributeStatistic) []string
func GenerateFormatStatement ¶
func GenerateFormatStatement(extTableDef ExternalTableDefinition) string
func GenerateTableBatches ¶
GenerateTableBatches batches tables to reduce network congestion and resource contention. Returns an array of batches where a batch of tables is a single string with comma separated tables
func GenerateTupleStatisticsQuery ¶
func GenerateTupleStatisticsQuery(table Table, tupleStat TupleStatistic) string
func GetAttachPartitionInfo ¶
func GetAttachPartitionInfo(connectionPool *dbconn.DBConn) map[uint32]AttachPartitionInfo
func GetAttributeStatistics ¶
func GetAttributeStatistics(connectionPool *dbconn.DBConn, tables []Table) map[uint32][]AttributeStatistic
func GetColumnDefinitions ¶
func GetColumnDefinitions(connectionPool *dbconn.DBConn) map[uint32][]ColumnDefinition
func GetDatabaseGUCs ¶
func GetDistributionPolicies ¶
func GetExternalTableDefinitions ¶
func GetExternalTableDefinitions(connectionPool *dbconn.DBConn) map[uint32]ExternalTableDefinition
func GetForeignTableDefinitions ¶
func GetForeignTableDefinitions(connectionPool *dbconn.DBConn) map[uint32]ForeignTableDefinition
func GetFunctionArgsAndIdentArgs ¶
func GetFunctionArgsAndIdentArgs(connectionPool *dbconn.DBConn) (map[uint32]string, map[uint32]string)
* Functions do not have default argument values in GPDB 4.3, so there is no * difference between a function's "arguments" and "identity arguments" and * we can use the same map for both fields.
func GetFunctionOidToInfoMap ¶
func GetFunctionOidToInfoMap(connectionPool *dbconn.DBConn) map[uint32]FunctionInfo
func GetFunctionReturnTypes ¶
func GetLatestMatchingBackupConfig ¶
func GetLatestMatchingBackupConfig(history *history.History, currentBackupConfig *history.BackupConfig) *history.BackupConfig
func GetLatestMatchingBackupTimestamp ¶
func GetLatestMatchingBackupTimestamp() string
func GetOperatorClassFunctions ¶
func GetOperatorClassFunctions(connectionPool *dbconn.DBConn) map[uint32][]OperatorClassFunction
func GetOperatorClassOperators ¶
func GetOperatorClassOperators(connectionPool *dbconn.DBConn) map[uint32][]OperatorClassOperator
func GetPartitionAlteredSchema ¶
func GetPartitionAlteredSchema(connectionPool *dbconn.DBConn) map[uint32][]AlteredPartitionRelation
* Partition tables could have child partitions in schemas different * than the root partition. We need to keep track of these child * partitions and later create ALTER TABLE SET SCHEMA statements for * them.
func GetPartitionDetails ¶
func GetPartitionKeyDefs ¶
Used to contruct root tables for GPDB 7+, because the root partition must be constructed by itself first.
func GetPartitionTableMap ¶
func GetPartitionTableMap(connectionPool *dbconn.DBConn) map[uint32]PartitionLevelInfo
func GetSegmentTablespaces ¶
func GetSynchronizedSnapshot ¶
Export synchronized snapshot using connection 0 and return snapshotId value as string
func GetTableAccessMethod ¶
func GetTableInheritance ¶
func GetTableReplicaIdentity ¶
func GetTableStorage ¶
func GetTargetBackupTimestamp ¶
func GetTargetBackupTimestamp() string
func GetTupleStatistics ¶
func GetTupleStatistics(connectionPool *dbconn.DBConn, tables []Table) map[uint32]TupleStatistic
func GetTypeMetadataEntry ¶
func GetTypeMetadataEntry(schema string, name string) (string, toc.MetadataEntry)
func GetVersion ¶
func GetVersion() string
func LockTableNoWait ¶
Acquire AccessShareLock on a table with NOWAIT option. If we are unable to acquire the lock, the call will fail instead of block. Return the failure for handling.
func LockTables ¶
This function is responsible for getting the necessary access share locks for the target relations. This is mainly to protect the metadata dumping part but it also makes the main worker thread (worker 0) the most resilient for the later data dumping logic. Locks will still be taken for --data-only calls.
func MustGetFlagBool ¶
func MustGetFlagInt ¶
func MustGetFlagString ¶
func MustGetFlagStringArray ¶
func MustGetFlagStringSlice ¶
func NewBackupConfig ¶
func PopulateRestorePlan ¶
func PopulateRestorePlan(changedTables []Table, restorePlan []history.RestorePlanEntry, allTables []Table) []history.RestorePlanEntry
func PrintAccessMethodStatements ¶
func PrintAccessMethodStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, accessMethods []AccessMethod, accessMethodMetadata MetadataMap)
func PrintAlterSequenceStatements ¶
func PrintAlterSequenceStatements(metadataFile *utils.FileWithByteCount, tocfile *toc.TOC, sequences []Sequence)
func PrintConstraintStatement ¶
func PrintConstraintStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, constraint Constraint, conMetadata ObjectMetadata)
* There's no built-in function to generate constraint definitions like there is for other types of * metadata, so this function constructs them.
func PrintCreateAggregateStatement ¶
func PrintCreateAggregateStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, aggDef Aggregate, funcInfoMap map[uint32]FunctionInfo, aggMetadata ObjectMetadata)
func PrintCreateBaseTypeStatement ¶
func PrintCreateBaseTypeStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, base BaseType, typeMetadata ObjectMetadata)
func PrintCreateCastStatement ¶
func PrintCreateCastStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, castDef Cast, castMetadata ObjectMetadata)
func PrintCreateCollationStatements ¶
func PrintCreateCollationStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, collations []Collation, collationMetadata MetadataMap)
func PrintCreateCompositeTypeStatement ¶
func PrintCreateCompositeTypeStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, composite CompositeType, typeMetadata ObjectMetadata)
func PrintCreateConversionStatements ¶
func PrintCreateConversionStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, conversions []Conversion, conversionMetadata MetadataMap)
func PrintCreateDatabaseStatement ¶
func PrintCreateDatabaseStatement(metadataFile *utils.FileWithByteCount, tocfile *toc.TOC, defaultDB Database, db Database, dbMetadata MetadataMap)
func PrintCreateDomainStatement ¶
func PrintCreateDomainStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, domain Domain, typeMetadata ObjectMetadata, constraints []Constraint)
func PrintCreateEnumTypeStatements ¶
func PrintCreateEnumTypeStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, enums []EnumType, typeMetadata MetadataMap)
func PrintCreateEventTriggerStatements ¶
func PrintCreateEventTriggerStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, eventTriggers []EventTrigger, eventTriggerMetadata MetadataMap)
func PrintCreateExtendedStatistics ¶
func PrintCreateExtendedStatistics(metadataFile *utils.FileWithByteCount, toc *toc.TOC, statExtObjects []StatisticExt, statMetadata MetadataMap)
func PrintCreateExtensionStatements ¶
func PrintCreateExtensionStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, extensionDefs []Extension, extensionMetadata MetadataMap)
func PrintCreateExternalProtocolStatement ¶
func PrintCreateExternalProtocolStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, protocol ExternalProtocol, funcInfoMap map[uint32]FunctionInfo, protoMetadata ObjectMetadata)
func PrintCreateForeignDataWrapperStatement ¶
func PrintCreateForeignDataWrapperStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, fdw ForeignDataWrapper, funcInfoMap map[uint32]FunctionInfo, fdwMetadata ObjectMetadata)
func PrintCreateFunctionStatement ¶
func PrintCreateFunctionStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, funcDef Function, funcMetadata ObjectMetadata)
func PrintCreateIndexStatements ¶
func PrintCreateIndexStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, indexes []IndexDefinition, indexMetadata MetadataMap)
func PrintCreateLanguageStatements ¶
func PrintCreateLanguageStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, procLangs []ProceduralLanguage, funcInfoMap map[uint32]FunctionInfo, procLangMetadata MetadataMap)
func PrintCreateOperatorClassStatement ¶
func PrintCreateOperatorClassStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, operatorClass OperatorClass, operatorClassMetadata ObjectMetadata)
func PrintCreateOperatorFamilyStatements ¶
func PrintCreateOperatorFamilyStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, operatorFamilies []OperatorFamily, operatorFamilyMetadata MetadataMap)
* Operator families are not supported in GPDB 4.3, so this function * is not used in a 4.3 backup.
func PrintCreateOperatorStatement ¶
func PrintCreateOperatorStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, operator Operator, operatorMetadata ObjectMetadata)
func PrintCreatePolicyStatements ¶
func PrintCreatePolicyStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, policies []RLSPolicy, policyMetadata MetadataMap)
func PrintCreateRangeTypeStatement ¶
func PrintCreateRangeTypeStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, rangeType RangeType, typeMetadata ObjectMetadata)
func PrintCreateResourceGroupStatements ¶
func PrintCreateResourceGroupStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, resGroups []ResourceGroup, resGroupMetadata MetadataMap)
func PrintCreateResourceQueueStatements ¶
func PrintCreateResourceQueueStatements(metadataFile *utils.FileWithByteCount, tocfile *toc.TOC, resQueues []ResourceQueue, resQueueMetadata MetadataMap)
func PrintCreateRoleStatements ¶
func PrintCreateRoleStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, roles []Role, roleMetadata MetadataMap)
func PrintCreateRuleStatements ¶
func PrintCreateRuleStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, rules []RuleDefinition, ruleMetadata MetadataMap)
func PrintCreateSchemaStatements ¶
func PrintCreateSchemaStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, schemas []Schema, schemaMetadata MetadataMap)
func PrintCreateSequenceStatements ¶
func PrintCreateSequenceStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, sequences []Sequence, sequenceMetadata MetadataMap)
* This function is largely derived from the dumpSequence() function in pg_dump.c. The values of * minVal and maxVal come from SEQ_MINVALUE and SEQ_MAXVALUE, defined in include/commands/sequence.h.
func PrintCreateServerStatement ¶
func PrintCreateServerStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, server ForeignServer, serverMetadata ObjectMetadata)
func PrintCreateTableStatement ¶
func PrintCreateTableStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, table Table, tableMetadata ObjectMetadata)
* This function prints CREATE TABLE statements in a format very similar to pg_dump. Unlike pg_dump, * however, table names are printed fully qualified with their schemas instead of relying on setting * the search_path; this will aid in later filtering to include or exclude certain tables during the * backup process, and allows customers to copy just the CREATE TABLE block in order to use it directly.
func PrintCreateTablespaceStatements ¶
func PrintCreateTablespaceStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, tablespaces []Tablespace, tablespaceMetadata MetadataMap)
func PrintCreateTextSearchConfigurationStatement ¶
func PrintCreateTextSearchConfigurationStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, configuration TextSearchConfiguration, configurationMetadata ObjectMetadata)
func PrintCreateTextSearchDictionaryStatement ¶
func PrintCreateTextSearchDictionaryStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, dictionary TextSearchDictionary, dictionaryMetadata ObjectMetadata)
func PrintCreateTextSearchParserStatement ¶
func PrintCreateTextSearchParserStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, parser TextSearchParser, parserMetadata ObjectMetadata)
func PrintCreateTextSearchTemplateStatement ¶
func PrintCreateTextSearchTemplateStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, template TextSearchTemplate, templateMetadata ObjectMetadata)
func PrintCreateTransformStatement ¶
func PrintCreateTransformStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, transform Transform, funcInfoMap map[uint32]FunctionInfo, transformMetadata ObjectMetadata)
func PrintCreateTriggerStatements ¶
func PrintCreateTriggerStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, triggers []TriggerDefinition, triggerMetadata MetadataMap)
func PrintCreateUserMappingStatement ¶
func PrintCreateUserMappingStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, mapping UserMapping)
func PrintCreateViewStatement ¶
func PrintCreateViewStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, view View, viewMetadata ObjectMetadata)
A view's column names are automatically factored into it's definition.
func PrintDatabaseGUCs ¶
func PrintDefaultPrivilegesStatements ¶
func PrintDefaultPrivilegesStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, privileges []DefaultPrivileges)
func PrintDependentObjectStatements ¶
func PrintDependentObjectStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, objects []Sortable, metadataMap MetadataMap, domainConstraints []Constraint, funcInfoMap map[uint32]FunctionInfo)
func PrintExchangeExternalPartitionStatements ¶
func PrintExchangeExternalPartitionStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, extPartitions []PartitionInfo, partInfoMap map[uint32]PartitionInfo, tables []Table)
func PrintExternalTableCreateStatement ¶
func PrintExternalTableCreateStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, table Table)
func PrintExternalTableStatements ¶
func PrintExternalTableStatements(metadataFile *utils.FileWithByteCount, tableName string, extTableDef ExternalTableDefinition)
func PrintFunctionBodyOrPath ¶
func PrintFunctionBodyOrPath(metadataFile *utils.FileWithByteCount, funcDef Function)
* This function either prints a path to an executable function (for C and * internal functions) or a function definition (for functions in other languages).
func PrintFunctionModifiers ¶
func PrintFunctionModifiers(metadataFile *utils.FileWithByteCount, funcDef Function)
func PrintIdentityColumns ¶
func PrintIdentityColumns(metadataFile *utils.FileWithByteCount, toc *toc.TOC, sequences []Sequence)
func PrintObjectMetadata ¶
func PrintObjectMetadata(metadataFile *utils.FileWithByteCount, toc *toc.TOC, metadata ObjectMetadata, obj toc.TOCObjectWithMetadata, owningTable string)
func PrintPostCreateTableStatements ¶
func PrintPostCreateTableStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, table Table, tableMetadata ObjectMetadata)
* This function prints additional statements that come after the CREATE TABLE * statement for both regular and external tables.
func PrintRegularTableCreateStatement ¶
func PrintRegularTableCreateStatement(metadataFile *utils.FileWithByteCount, toc *toc.TOC, table Table)
func PrintResetResourceGroupStatements ¶
func PrintResetResourceGroupStatements(metadataFile *utils.FileWithByteCount, tocfile *toc.TOC)
func PrintRoleGUCStatements ¶
func PrintRoleMembershipStatements ¶
func PrintRoleMembershipStatements(metadataFile *utils.FileWithByteCount, toc *toc.TOC, roleMembers []RoleMember)
func PrintSessionGUCs ¶
func PrintSessionGUCs(metadataFile *utils.FileWithByteCount, toc *toc.TOC, gucs SessionGUCs)
func PrintStatements ¶
func PrintStatisticsStatements ¶
func PrintStatisticsStatements(statisticsFile *utils.FileWithByteCount, tocfile *toc.TOC, tables []Table, attStats map[uint32][]AttributeStatistic, tupleStats map[uint32]TupleStatistic)
func QuoteGUCValue ¶
func RenameExchangedPartitionConstraints ¶
func RenameExchangedPartitionConstraints(connectionPool *dbconn.DBConn, constraints *[]Constraint)
func RenameExchangedPartitionIndexes ¶
func RenameExchangedPartitionIndexes(connectionPool *dbconn.DBConn, indexes *[]IndexDefinition)
func SchemaFilterClause ¶
A list of schemas we don't want to back up, formatted for use in a WHERE clause
func SchemaFilterClauseWithAlteredPartitionSchemas ¶
func SchemaFilterClauseWithAlteredPartitionSchemas(namespace string, partitionAlteredSchemas map[string]bool) string
* A list of schemas we don't want to back up, formatted for use in a * WHERE clause. This function takes into consideration child * partitions that are in different schemas than their root partition.
func SetCluster ¶
func SetCmdFlags ¶
func SetConnection ¶
func SetFPInfo ¶
func SetFPInfo(fpInfo filepath.FilePathInfo)
func SetFilterRelationClause ¶
func SetFilterRelationClause(filterClause string)
func SetLoggerVerbosity ¶
func SetLoggerVerbosity()
func SetPluginConfig ¶
func SetPluginConfig(config *utils.PluginConfig)
func SetQuotedRoleNames ¶
func SetSessionGUCs ¶
func SetSessionGUCs(connNum int)
func SetSynchronizedSnapshot ¶
Set synchronized snapshot for connNum to snapshotId
func SetVersion ¶
func SetVersion(v string)
func SliceToPostgresArray ¶
It is assumed that the elements in the input slice are already escaped
func SplitTablesByPartitionType ¶
* When leafPartitionData is set, for partition tables we want to print metadata * for the parent tables and data for the leaf tables, so we split them into * separate lists. Intermediate tables are skipped, and non-partition tables are * backed up normally (both metadata and data). * * When the flag is not set, we want to back up both metadata and data for all * tables, so both returned arrays contain all tables.
func UnescapeDoubleQuote ¶
func ValidateSchemasExist ¶
Types ¶
type ACL ¶
type ACL struct { Grantee string Select bool SelectWithGrant bool Insert bool InsertWithGrant bool Update bool UpdateWithGrant bool Delete bool DeleteWithGrant bool Truncate bool TruncateWithGrant bool References bool ReferencesWithGrant bool Trigger bool TriggerWithGrant bool Usage bool UsageWithGrant bool Execute bool ExecuteWithGrant bool Create bool CreateWithGrant bool Temporary bool TemporaryWithGrant bool Connect bool ConnectWithGrant bool }
type AccessMethod ¶
func GetAccessMethods ¶
func GetAccessMethods(connectionPool *dbconn.DBConn) []AccessMethod
func (AccessMethod) FQN ¶
func (a AccessMethod) FQN() string
func (AccessMethod) GetMetadataEntry ¶
func (a AccessMethod) GetMetadataEntry() (string, toc.MetadataEntry)
func (AccessMethod) GetUniqueID ¶
func (a AccessMethod) GetUniqueID() UniqueID
type Aggregate ¶
type Aggregate struct { Oid uint32 Schema string Name string Arguments sql.NullString IdentArgs sql.NullString TransitionFunction uint32 `db:"aggtransfn"` PreliminaryFunction uint32 `db:"aggprelimfn"` CombineFunction uint32 `db:"aggcombinefn"` SerialFunction uint32 `db:"aggserialfn"` DeserialFunction uint32 `db:"aggdeserialfn"` FinalFunction uint32 `db:"aggfinalfn"` FinalFuncExtra bool SortOperator string SortOperatorSchema string Hypothetical bool // GPDB < 7 Kind string // GPDB7+ TransitionDataType string TransitionDataSize int `db:"aggtransspace"` InitialValue string InitValIsNull bool IsOrdered bool `db:"aggordered"` MTransitionFunction uint32 `db:"aggmtransfn"` MInverseTransitionFunction uint32 `db:"aggminvtransfn"` MTransitionDataType string MTransitionDataSize int `db:"aggmtransspace"` MFinalFunction uint32 `db:"aggmfinalfn"` MFinalFuncExtra bool MInitialValue string MInitValIsNull bool Finalmodify string // GPDB7+ Mfinalmodify string // GPDB7+ Parallel string // GPDB7+ }
func GetAggregates ¶
func (Aggregate) GetMetadataEntry ¶
func (a Aggregate) GetMetadataEntry() (string, toc.MetadataEntry)
func (Aggregate) GetUniqueID ¶
type AttachPartitionInfo ¶
type AttributeStatistic ¶
type AttributeStatistic struct { Oid uint32 Schema string Table string AttName string Type string Relid uint32 `db:"starelid"` AttNumber int `db:"staattnum"` Inherit bool `db:"stainherit"` NullFraction float64 `db:"stanullfrac"` Width int `db:"stawidth"` Distinct float64 `db:"stadistinct"` Kind1 int `db:"stakind1"` Kind2 int `db:"stakind2"` Kind3 int `db:"stakind3"` Kind4 int `db:"stakind4"` Kind5 int `db:"stakind5"` Operator1 uint32 `db:"staop1"` Operator2 uint32 `db:"staop2"` Operator3 uint32 `db:"staop3"` Operator4 uint32 `db:"staop4"` Operator5 uint32 `db:"staop5"` Collation1 uint32 `db:"stacoll1"` Collation2 uint32 `db:"stacoll2"` Collation3 uint32 `db:"stacoll3"` Collation4 uint32 `db:"stacoll4"` Collation5 uint32 `db:"stacoll5"` Numbers1 pq.StringArray `db:"stanumbers1"` Numbers2 pq.StringArray `db:"stanumbers2"` Numbers3 pq.StringArray `db:"stanumbers3"` Numbers4 pq.StringArray `db:"stanumbers4"` Numbers5 pq.StringArray `db:"stanumbers5"` Values1 pq.StringArray `db:"stavalues1"` Values2 pq.StringArray `db:"stavalues2"` Values3 pq.StringArray `db:"stavalues3"` Values4 pq.StringArray `db:"stavalues4"` Values5 pq.StringArray `db:"stavalues5"` }
type BackupProgressCounters ¶
type BackupProgressCounters struct { NumRegTables int64 TotalRegTables int64 ProgressBar utils.ProgressBar }
type BaseType ¶
type BaseType struct { Oid uint32 Schema string Name string Input string Output string Receive string Send string ModIn string ModOut string InternalLength int IsPassedByValue bool Alignment string Storage string DefaultVal string Element string Category string Preferred bool Delimiter string StorageOptions string Collatable bool Collation string }
func GetBaseTypes ¶
func (BaseType) GetMetadataEntry ¶
func (t BaseType) GetMetadataEntry() (string, toc.MetadataEntry)
func (BaseType) GetUniqueID ¶
type Cast ¶
type Cast struct { Oid uint32 SourceTypeFQN string TargetTypeFQN string FunctionOid uint32 // Used with GPDB 4.3 to map function arguments FunctionSchema string FunctionName string FunctionArgs string CastContext string CastMethod string }
func (Cast) GetMetadataEntry ¶
func (c Cast) GetMetadataEntry() (string, toc.MetadataEntry)
func (Cast) GetUniqueID ¶
type Collation ¶
type Collation struct { Oid uint32 Schema string Name string Collate string Ctype string Provider string IsDeterministic string }
func GetCollations ¶
func (Collation) GetMetadataEntry ¶
func (c Collation) GetMetadataEntry() (string, toc.MetadataEntry)
func (Collation) GetUniqueID ¶
type ColumnDefinition ¶
type ColumnDefinition struct { Oid uint32 `db:"attrelid"` Num int `db:"attnum"` Name string NotNull bool `db:"attnotnull"` HasDefault bool `db:"atthasdef"` Type string Encoding string StatTarget int `db:"attstattarget"` StorageType string DefaultVal string Comment string Privileges sql.NullString Kind string Options string FdwOptions string Collation string SecurityLabelProvider string SecurityLabel string AttGenerated string }
type CompositeType ¶
func GetCompositeTypes ¶
func GetCompositeTypes(connectionPool *dbconn.DBConn) []CompositeType
func (CompositeType) FQN ¶
func (t CompositeType) FQN() string
func (CompositeType) GetMetadataEntry ¶
func (t CompositeType) GetMetadataEntry() (string, toc.MetadataEntry)
func (CompositeType) GetUniqueID ¶
func (t CompositeType) GetUniqueID() UniqueID
type Constraint ¶
type Constraint struct { Oid uint32 Schema string Name string ConType string Def sql.NullString ConIsLocal bool OwningObject string IsDomainConstraint bool IsPartitionParent bool }
func GetConstraints ¶
func GetConstraints(connectionPool *dbconn.DBConn, includeTables ...Relation) []Constraint
func (Constraint) FQN ¶
func (c Constraint) FQN() string
func (Constraint) GetMetadataEntry ¶
func (c Constraint) GetMetadataEntry() (string, toc.MetadataEntry)
func (Constraint) GetUniqueID ¶
func (c Constraint) GetUniqueID() UniqueID
type Conversion ¶
type Conversion struct { Oid uint32 Schema string Name string ForEncoding string ToEncoding string ConversionFunction string IsDefault bool `db:"condefault"` }
func GetConversions ¶
func GetConversions(connectionPool *dbconn.DBConn) []Conversion
func (Conversion) FQN ¶
func (c Conversion) FQN() string
func (Conversion) GetMetadataEntry ¶
func (c Conversion) GetMetadataEntry() (string, toc.MetadataEntry)
func (Conversion) GetUniqueID ¶
func (c Conversion) GetUniqueID() UniqueID
type Database ¶
type Database struct { Oid uint32 Name string Tablespace string Collate string CType string Encoding string }
func GetDatabaseInfo ¶
func (Database) GetMetadataEntry ¶
func (db Database) GetMetadataEntry() (string, toc.MetadataEntry)
func (Database) GetUniqueID ¶
type DefaultPrivileges ¶
func ConstructDefaultPrivileges ¶
func ConstructDefaultPrivileges(results []DefaultPrivilegesQueryStruct) []DefaultPrivileges
func GetDefaultPrivileges ¶
func GetDefaultPrivileges(connectionPool *dbconn.DBConn) []DefaultPrivileges
func (DefaultPrivileges) GetMetadataEntry ¶
func (dp DefaultPrivileges) GetMetadataEntry() (string, toc.MetadataEntry)
type Dependency ¶
type DependencyMap ¶
func GetDependencies ¶
func GetDependencies(connectionPool *dbconn.DBConn, backupSet map[UniqueID]bool, tables []Table) DependencyMap
This function only returns dependencies that are referenced in the backup set
type Domain ¶
type Domain struct { Oid uint32 Schema string Name string DefaultVal string Collation string BaseType string NotNull bool }
func GetDomainTypes ¶
func (Domain) GetMetadataEntry ¶
func (t Domain) GetMetadataEntry() (string, toc.MetadataEntry)
func (Domain) GetUniqueID ¶
type EnumType ¶
func GetEnumTypes ¶
func (EnumType) GetMetadataEntry ¶
func (t EnumType) GetMetadataEntry() (string, toc.MetadataEntry)
func (EnumType) GetUniqueID ¶
type EventTrigger ¶
type EventTrigger struct { Oid uint32 Name string Event string FunctionName string Enabled string EventTags string }
func GetEventTriggers ¶
func GetEventTriggers(connectionPool *dbconn.DBConn) []EventTrigger
func (EventTrigger) FQN ¶
func (et EventTrigger) FQN() string
func (EventTrigger) GetMetadataEntry ¶
func (et EventTrigger) GetMetadataEntry() (string, toc.MetadataEntry)
func (EventTrigger) GetUniqueID ¶
func (et EventTrigger) GetUniqueID() UniqueID
type ExchangedPartitionName ¶
type Extension ¶
func GetExtensions ¶
func (Extension) GetMetadataEntry ¶
func (e Extension) GetMetadataEntry() (string, toc.MetadataEntry)
func (Extension) GetUniqueID ¶
type ExternalProtocol ¶
type ExternalProtocol struct { Oid uint32 Name string Owner string Trusted bool `db:"ptctrusted"` ReadFunction uint32 `db:"ptcreadfn"` WriteFunction uint32 `db:"ptcwritefn"` Validator uint32 `db:"ptcvalidatorfn"` }
func GetExternalProtocols ¶
func GetExternalProtocols(connectionPool *dbconn.DBConn) []ExternalProtocol
func (ExternalProtocol) FQN ¶
func (p ExternalProtocol) FQN() string
func (ExternalProtocol) GetMetadataEntry ¶
func (p ExternalProtocol) GetMetadataEntry() (string, toc.MetadataEntry)
func (ExternalProtocol) GetUniqueID ¶
func (p ExternalProtocol) GetUniqueID() UniqueID
type ExternalTableDefinition ¶
type ExternalTableDefinition struct { Oid uint32 Type int Protocol int Location sql.NullString ExecLocation string FormatType string FormatOpts string Command string RejectLimit int RejectLimitType string ErrTableName string ErrTableSchema string LogErrors bool LogErrPersist bool Encoding string Writable bool URIs []string }
type ForeignDataWrapper ¶
type ForeignDataWrapper struct { Oid uint32 Name string Handler uint32 Validator uint32 Options string }
func GetForeignDataWrappers ¶
func GetForeignDataWrappers(connectionPool *dbconn.DBConn) []ForeignDataWrapper
func (ForeignDataWrapper) FQN ¶
func (fdw ForeignDataWrapper) FQN() string
func (ForeignDataWrapper) GetMetadataEntry ¶
func (fdw ForeignDataWrapper) GetMetadataEntry() (string, toc.MetadataEntry)
func (ForeignDataWrapper) GetUniqueID ¶
func (fdw ForeignDataWrapper) GetUniqueID() UniqueID
type ForeignServer ¶
type ForeignServer struct { Oid uint32 Name string Type string Version string ForeignDataWrapper string Options string }
func GetForeignServers ¶
func GetForeignServers(connectionPool *dbconn.DBConn) []ForeignServer
func (ForeignServer) FQN ¶
func (fs ForeignServer) FQN() string
func (ForeignServer) GetMetadataEntry ¶
func (fs ForeignServer) GetMetadataEntry() (string, toc.MetadataEntry)
func (ForeignServer) GetUniqueID ¶
func (fs ForeignServer) GetUniqueID() UniqueID
type ForeignTableDefinition ¶
type Function ¶
type Function struct { Oid uint32 Schema string Name string ReturnsSet bool `db:"proretset"` FunctionBody string BinaryPath string Arguments sql.NullString IdentArgs sql.NullString ResultType sql.NullString Volatility string `db:"provolatile"` IsStrict bool `db:"proisstrict"` IsLeakProof bool `db:"proleakproof"` IsSecurityDefiner bool `db:"prosecdef"` Config string `db:"proconfig"` Cost float32 `db:"procost"` NumRows float32 `db:"prorows"` DataAccess string `db:"prodataaccess"` Language string Kind string `db:"prokind"` // GPDB 7+ PlannerSupport string `db:"prosupport"` // GPDB 7+ IsWindow bool `db:"proiswindow"` // before 7 ExecLocation string `db:"proexeclocation"` Parallel string `db:"proparallel"` // GPDB 7+ TransformTypes string // GPDB 7+ }
func GetFunctions ¶
func GetFunctions4 ¶
* In addition to lacking the pg_get_function_* functions, GPDB 4.3 lacks * several columns in pg_proc compared to GPDB 5, so we don't retrieve those.
func GetFunctionsAllVersions ¶
* The functions pg_get_function_arguments, pg_getfunction_identity_arguments, * and pg_get_function_result were introduced in GPDB 5, so we can use those * functions to retrieve arguments, identity arguments, and return values in * 5 or later but in GPDB 4.3 we must query pg_proc directly and construct * those values here.
func (Function) GetMetadataEntry ¶
func (f Function) GetMetadataEntry() (string, toc.MetadataEntry)
func (Function) GetUniqueID ¶
type FunctionInfo ¶
type FunctionInfo struct { Oid uint32 Name string Schema string QualifiedName string Arguments sql.NullString IdentArgs sql.NullString IsInternal bool }
func (FunctionInfo) FQN ¶
func (info FunctionInfo) FQN() string
func (FunctionInfo) GetMetadataEntry ¶
func (info FunctionInfo) GetMetadataEntry() (string, toc.MetadataEntry)
type IndexDefinition ¶
type IndexDefinition struct { Oid uint32 Name string OwningSchema string OwningTable string Tablespace string Def sql.NullString IsClustered bool SupportsConstraint bool IsReplicaIdentity bool StatisticsColumns string StatisticsValues string ParentIndex uint32 ParentIndexFQN string }
func GetIndexes ¶
func GetIndexes(connectionPool *dbconn.DBConn) []IndexDefinition
* GetIndexes queries for all user and implicitly created indexes, since * implicitly created indexes could still have metadata to be backed up. * e.g. comments on implicitly created indexes
func (IndexDefinition) FQN ¶
func (i IndexDefinition) FQN() string
func (IndexDefinition) GetMetadataEntry ¶
func (i IndexDefinition) GetMetadataEntry() (string, toc.MetadataEntry)
func (IndexDefinition) GetUniqueID ¶
func (i IndexDefinition) GetUniqueID() UniqueID
type MetadataMap ¶
type MetadataMap map[UniqueID]ObjectMetadata
func ConstructMetadataMap ¶
func ConstructMetadataMap(results []MetadataQueryStruct) MetadataMap
func GetCommentsForObjectType ¶
func GetCommentsForObjectType(connectionPool *dbconn.DBConn, params MetadataQueryParams) MetadataMap
func GetMetadataForObjectType ¶
func GetMetadataForObjectType(connectionPool *dbconn.DBConn, params MetadataQueryParams) MetadataMap
type MetadataQueryParams ¶
type MetadataQueryParams struct { NameField string SchemaField string ObjectType string OidField string ACLField string OwnerField string OidTable string CommentTable string CatalogTable string FilterClause string }
var ( TYPE_ACCESS_METHOD MetadataQueryParams TYPE_AGGREGATE MetadataQueryParams TYPE_CAST MetadataQueryParams TYPE_COLLATION MetadataQueryParams TYPE_CONSTRAINT MetadataQueryParams TYPE_CONVERSION MetadataQueryParams TYPE_DATABASE MetadataQueryParams TYPE_EVENTTRIGGER MetadataQueryParams TYPE_EXTENSION MetadataQueryParams TYPE_FOREIGNDATAWRAPPER MetadataQueryParams TYPE_FOREIGNSERVER MetadataQueryParams TYPE_FUNCTION MetadataQueryParams TYPE_INDEX MetadataQueryParams TYPE_PROCLANGUAGE MetadataQueryParams TYPE_TRANSFORM MetadataQueryParams TYPE_OPERATOR MetadataQueryParams TYPE_OPERATORCLASS MetadataQueryParams TYPE_OPERATORFAMILY MetadataQueryParams TYPE_PROTOCOL MetadataQueryParams TYPE_RELATION MetadataQueryParams TYPE_RESOURCEGROUP MetadataQueryParams TYPE_RESOURCEQUEUE MetadataQueryParams TYPE_ROLE MetadataQueryParams TYPE_RULE MetadataQueryParams TYPE_SCHEMA MetadataQueryParams TYPE_STATISTIC_EXT MetadataQueryParams TYPE_TABLESPACE MetadataQueryParams TYPE_TSCONFIGURATION MetadataQueryParams TYPE_TSDICTIONARY MetadataQueryParams TYPE_TSPARSER MetadataQueryParams TYPE_TSTEMPLATE MetadataQueryParams TYPE_TRIGGER MetadataQueryParams TYPE_TYPE MetadataQueryParams TYPE_POLICY MetadataQueryParams )
type MetadataQueryStruct ¶
type ObjectMetadata ¶
type ObjectMetadata struct { Privileges []ACL ObjectType string Owner string Comment string SecurityLabelProvider string SecurityLabel string }
func (ObjectMetadata) GetCommentStatement ¶
func (obj ObjectMetadata) GetCommentStatement(objectName string, objectType string, owningTable string) string
func (ObjectMetadata) GetOwnerStatement ¶
func (obj ObjectMetadata) GetOwnerStatement(objectName string, objectType string) string
func (ObjectMetadata) GetPrivilegesStatements ¶
func (obj ObjectMetadata) GetPrivilegesStatements(objectName string, objectType string, columnName ...string) string
func (ObjectMetadata) GetSecurityLabelStatement ¶
func (obj ObjectMetadata) GetSecurityLabelStatement(objectName string, objectType string) string
type Operator ¶
type Operator struct { Oid uint32 Schema string Name string Procedure string LeftArgType string RightArgType string CommutatorOp string NegatorOp string RestrictFunction string JoinFunction string CanHash bool CanMerge bool }
func GetOperators ¶
func (Operator) GetMetadataEntry ¶
func (o Operator) GetMetadataEntry() (string, toc.MetadataEntry)
func (Operator) GetUniqueID ¶
type OperatorClass ¶
type OperatorClass struct { Oid uint32 Schema string Name string FamilySchema string FamilyName string IndexMethod string Type string Default bool StorageType string Operators []OperatorClassOperator Functions []OperatorClassFunction }
func GetOperatorClasses ¶
func GetOperatorClasses(connectionPool *dbconn.DBConn) []OperatorClass
func (OperatorClass) FQN ¶
func (opc OperatorClass) FQN() string
func (OperatorClass) GetMetadataEntry ¶
func (opc OperatorClass) GetMetadataEntry() (string, toc.MetadataEntry)
func (OperatorClass) GetUniqueID ¶
func (opc OperatorClass) GetUniqueID() UniqueID
type OperatorClassFunction ¶
type OperatorClassOperator ¶
type OperatorFamily ¶
func GetOperatorFamilies ¶
func GetOperatorFamilies(connectionPool *dbconn.DBConn) []OperatorFamily
func (OperatorFamily) FQN ¶
func (opf OperatorFamily) FQN() string
func (OperatorFamily) GetMetadataEntry ¶
func (opf OperatorFamily) GetMetadataEntry() (string, toc.MetadataEntry)
func (OperatorFamily) GetUniqueID ¶
func (opf OperatorFamily) GetUniqueID() UniqueID
type ParserTokenType ¶
type ParserTokenTypes ¶
type ParserTokenTypes struct {
// contains filtered or unexported fields
}
func NewParserTokenTypes ¶
func NewParserTokenTypes() *ParserTokenTypes
type PartitionInfo ¶
type PartitionInfo struct { PartitionRuleOid uint32 PartitionParentRuleOid uint32 ParentRelationOid uint32 ParentSchema string ParentRelationName string RelationOid uint32 PartitionName string PartitionRank int IsExternal bool }
func GetExternalPartitionInfo ¶
func GetExternalPartitionInfo(connectionPool *dbconn.DBConn) ([]PartitionInfo, map[uint32]PartitionInfo)
func (PartitionInfo) GetMetadataEntry ¶
func (pi PartitionInfo) GetMetadataEntry() (string, toc.MetadataEntry)
type PartitionLevelInfo ¶
type ProceduralLanguage ¶
type ProceduralLanguage struct { Oid uint32 Name string Owner string IsPl bool `db:"lanispl"` PlTrusted bool `db:"lanpltrusted"` Handler uint32 `db:"lanplcallfoid"` Inline uint32 `db:"laninline"` Validator uint32 `db:"lanvalidator"` }
func GetProceduralLanguages ¶
func GetProceduralLanguages(connectionPool *dbconn.DBConn) []ProceduralLanguage
func (ProceduralLanguage) FQN ¶
func (pl ProceduralLanguage) FQN() string
func (ProceduralLanguage) GetMetadataEntry ¶
func (pl ProceduralLanguage) GetMetadataEntry() (string, toc.MetadataEntry)
func (ProceduralLanguage) GetUniqueID ¶
func (pl ProceduralLanguage) GetUniqueID() UniqueID
type RLSPolicy ¶
type RLSPolicy struct { Oid uint32 Name string Cmd string Permissive string Schema string Table string Roles string Qual string WithCheck string }
func GetPolicies ¶
func (RLSPolicy) GetMetadataEntry ¶
func (p RLSPolicy) GetMetadataEntry() (string, toc.MetadataEntry)
func (RLSPolicy) GetUniqueID ¶
type RangeType ¶
type RangeType struct { Oid uint32 Schema string Name string SubType string Collation string SubTypeOpClass string Canonical string SubTypeDiff string }
func GetRangeTypes ¶
func (RangeType) GetMetadataEntry ¶
func (t RangeType) GetMetadataEntry() (string, toc.MetadataEntry)
func (RangeType) GetUniqueID ¶
type Relation ¶
func (Relation) GetUniqueID ¶
type ResourceGroup ¶
type ResourceGroup struct { Oid uint32 Name string Concurrency string CPURateLimit string MemoryLimit string MemorySpillRatio string MemoryAuditor string Cpuset string }
func GetResourceGroups ¶
func GetResourceGroups(connectionPool *dbconn.DBConn) []ResourceGroup
func (ResourceGroup) FQN ¶
func (rg ResourceGroup) FQN() string
func (ResourceGroup) GetMetadataEntry ¶
func (rg ResourceGroup) GetMetadataEntry() (string, toc.MetadataEntry)
func (ResourceGroup) GetUniqueID ¶
func (rg ResourceGroup) GetUniqueID() UniqueID
type ResourceQueue ¶
type ResourceQueue struct { Oid uint32 Name string ActiveStatements int MaxCost string CostOvercommit bool MinCost string Priority string MemoryLimit string }
func GetResourceQueues ¶
func GetResourceQueues(connectionPool *dbconn.DBConn) []ResourceQueue
func (ResourceQueue) FQN ¶
func (rq ResourceQueue) FQN() string
func (ResourceQueue) GetMetadataEntry ¶
func (rq ResourceQueue) GetMetadataEntry() (string, toc.MetadataEntry)
func (ResourceQueue) GetUniqueID ¶
func (rq ResourceQueue) GetUniqueID() UniqueID
type Role ¶
type Role struct { Oid uint32 Name string Super bool `db:"rolsuper"` Inherit bool `db:"rolinherit"` CreateRole bool `db:"rolcreaterole"` CreateDB bool `db:"rolcreatedb"` CanLogin bool `db:"rolcanlogin"` Replication bool `db:"rolreplication"` ConnectionLimit int `db:"rolconnlimit"` Password string ValidUntil string ResQueue string ResGroup string Createrexthttp bool `db:"rolcreaterexthttp"` Createrextgpfd bool `db:"rolcreaterextgpfd"` Createwextgpfd bool `db:"rolcreatewextgpfd"` Createrexthdfs bool `db:"rolcreaterexthdfs"` Createwexthdfs bool `db:"rolcreatewexthdfs"` TimeConstraints []TimeConstraint }
func GetRoles ¶
* We convert rolvaliduntil to UTC and then append '-00' so that * we standardize times to UTC but do not lose time zone information * in the timestamp.
func (Role) GetMetadataEntry ¶
func (r Role) GetMetadataEntry() (string, toc.MetadataEntry)
func (Role) GetUniqueID ¶
type RoleGUC ¶
func (RoleGUC) GetMetadataEntry ¶
func (rg RoleGUC) GetMetadataEntry() (string, toc.MetadataEntry)
type RoleMember ¶
func GetRoleMembers ¶
func GetRoleMembers(connectionPool *dbconn.DBConn) []RoleMember
func (RoleMember) GetMetadataEntry ¶
func (rm RoleMember) GetMetadataEntry() (string, toc.MetadataEntry)
type RuleDefinition ¶
type RuleDefinition struct { Oid uint32 Name string OwningSchema string OwningTable string Def sql.NullString }
func GetRules ¶
func GetRules(connectionPool *dbconn.DBConn) []RuleDefinition
* Rules named "_RETURN", "pg_settings_n", and "pg_settings_u" are * built-in rules and we don't want to back them up. We use two `%` to * prevent Go from interpolating the % symbol.
func (RuleDefinition) FQN ¶
func (r RuleDefinition) FQN() string
func (RuleDefinition) GetMetadataEntry ¶
func (r RuleDefinition) GetMetadataEntry() (string, toc.MetadataEntry)
func (RuleDefinition) GetUniqueID ¶
func (r RuleDefinition) GetUniqueID() UniqueID
type Schema ¶
* All queries in the various queries_*.go files come from one of three sources: * - Copied from pg_dump largely unmodified * - Derived from the output of a psql flag like \d+ or \df * - Constructed from scratch * In the former two cases, a reference to the query source is provided for * further reference. * * All structs in these file whose names begin with "Query" are intended only * for use with the functions immediately following them. Structs in the utils * package (especially Table and Schema) are intended for more general use.
func GetAllUserSchemas ¶
func (Schema) GetMetadataEntry ¶
func (s Schema) GetMetadataEntry() (string, toc.MetadataEntry)
func (Schema) GetUniqueID ¶
type Sequence ¶
type Sequence struct { Relation OwningTableOid string OwningTableSchema string OwningTable string OwningColumn string UnqualifiedOwningColumn string OwningColumnAttIdentity string IsIdentity bool Definition SequenceDefinition }
func GetAllSequences ¶
func (Sequence) GetMetadataEntry ¶
func (s Sequence) GetMetadataEntry() (string, toc.MetadataEntry)
type SequenceDefinition ¶
type SequenceDefinition struct { LastVal int64 Type string StartVal int64 Increment int64 MaxVal int64 MinVal int64 CacheVal int64 IsCycled bool IsCalled bool OwningTable string }
func GetSequenceDefinition ¶
func GetSequenceDefinition(connectionPool *dbconn.DBConn, seqName string) SequenceDefinition
type SessionGUCs ¶
type SessionGUCs struct {
ClientEncoding string `db:"client_encoding"`
}
func GetSessionGUCs ¶
func GetSessionGUCs(connectionPool *dbconn.DBConn) SessionGUCs
func (SessionGUCs) GetMetadataEntry ¶
func (sg SessionGUCs) GetMetadataEntry() (string, toc.MetadataEntry)
type ShellType ¶
func GetShellTypes ¶
func (ShellType) GetMetadataEntry ¶
func (t ShellType) GetMetadataEntry() (string, toc.MetadataEntry)
func (ShellType) GetUniqueID ¶
type Sortable ¶
func TopologicalSort ¶
func TopologicalSort(slice []Sortable, dependencies DependencyMap) []Sortable
type SortableDependency ¶
type StatisticExt ¶
type StatisticExt struct { Oid uint32 Name string Namespace string // namespace that statistics object belongs to Owner string TableSchema string // schema that table covered by statistics belongs to TableName string // table covered by statistics Definition string }
func GetExtendedStatistics ¶
func GetExtendedStatistics(connectionPool *dbconn.DBConn) []StatisticExt
func (StatisticExt) FQN ¶
func (se StatisticExt) FQN() string
func (StatisticExt) GetMetadataEntry ¶
func (se StatisticExt) GetMetadataEntry() (string, toc.MetadataEntry)
func (StatisticExt) GetUniqueID ¶
func (se StatisticExt) GetUniqueID() UniqueID
type Table ¶
type Table struct { Relation TableDefinition }
func ConstructDefinitionsForTables ¶
func ConstructDefinitionsForTables(connectionPool *dbconn.DBConn, tableRelations []Relation) []Table
* This function calls all the functions needed to gather the metadata for a * single table and assembles the metadata into ColumnDef and TableDef structs * for more convenient handling in the PrintCreateTableStatement() function.
func GetBackupDataSet ¶
Remove external/foreign tables from the data backup set
func (Table) GetMetadataEntry ¶
func (t Table) GetMetadataEntry() (string, toc.MetadataEntry)
func (Table) SkipDataBackup ¶
type TableDefinition ¶
type TableDefinition struct { DistPolicy string PartDef string PartTemplateDef string StorageOpts string TablespaceName string ColumnDefs []ColumnDefinition IsExternal bool ExtTableDef ExternalTableDefinition PartitionLevelInfo PartitionLevelInfo TableType string IsUnlogged bool ForeignDef ForeignTableDefinition Inherits []string ReplicaIdentity string PartitionAlteredSchemas []AlteredPartitionRelation AccessMethodName string PartitionKeyDef string AttachPartitionInfo AttachPartitionInfo ForceRowSecurity bool }
type TableLocks ¶
type Tablespace ¶
type Tablespace struct { Oid uint32 Tablespace string FileLocation string // FILESPACE in 4.3 and 5, LOCATION in 6 and later SegmentLocations []string Options string }
func GetTablespaces ¶
func GetTablespaces(connectionPool *dbconn.DBConn) []Tablespace
func (Tablespace) FQN ¶
func (t Tablespace) FQN() string
func (Tablespace) GetMetadataEntry ¶
func (t Tablespace) GetMetadataEntry() (string, toc.MetadataEntry)
func (Tablespace) GetUniqueID ¶
func (t Tablespace) GetUniqueID() UniqueID
type TextSearchConfiguration ¶
type TextSearchConfiguration struct { Oid uint32 Schema string Name string Parser string TokenToDicts map[string][]string }
func GetTextSearchConfigurations ¶
func GetTextSearchConfigurations(connectionPool *dbconn.DBConn) []TextSearchConfiguration
func (TextSearchConfiguration) FQN ¶
func (tsc TextSearchConfiguration) FQN() string
func (TextSearchConfiguration) GetMetadataEntry ¶
func (tsc TextSearchConfiguration) GetMetadataEntry() (string, toc.MetadataEntry)
func (TextSearchConfiguration) GetUniqueID ¶
func (tsc TextSearchConfiguration) GetUniqueID() UniqueID
type TextSearchDictionary ¶
type TextSearchDictionary struct { Oid uint32 Schema string Name string Template string InitOption string }
func GetTextSearchDictionaries ¶
func GetTextSearchDictionaries(connectionPool *dbconn.DBConn) []TextSearchDictionary
func (TextSearchDictionary) FQN ¶
func (tsd TextSearchDictionary) FQN() string
func (TextSearchDictionary) GetMetadataEntry ¶
func (tsd TextSearchDictionary) GetMetadataEntry() (string, toc.MetadataEntry)
func (TextSearchDictionary) GetUniqueID ¶
func (tsd TextSearchDictionary) GetUniqueID() UniqueID
type TextSearchParser ¶
type TextSearchParser struct { Oid uint32 Schema string Name string StartFunc string TokenFunc string EndFunc string LexTypesFunc string HeadlineFunc string }
func GetTextSearchParsers ¶
func GetTextSearchParsers(connectionPool *dbconn.DBConn) []TextSearchParser
func (TextSearchParser) FQN ¶
func (tsp TextSearchParser) FQN() string
func (TextSearchParser) GetMetadataEntry ¶
func (tsp TextSearchParser) GetMetadataEntry() (string, toc.MetadataEntry)
func (TextSearchParser) GetUniqueID ¶
func (tsp TextSearchParser) GetUniqueID() UniqueID
type TextSearchTemplate ¶
type TextSearchTemplate struct { Oid uint32 Schema string Name string InitFunc string LexizeFunc string }
func GetTextSearchTemplates ¶
func GetTextSearchTemplates(connectionPool *dbconn.DBConn) []TextSearchTemplate
func (TextSearchTemplate) FQN ¶
func (tst TextSearchTemplate) FQN() string
func (TextSearchTemplate) GetMetadataEntry ¶
func (tst TextSearchTemplate) GetMetadataEntry() (string, toc.MetadataEntry)
func (TextSearchTemplate) GetUniqueID ¶
func (tst TextSearchTemplate) GetUniqueID() UniqueID
type TimeConstraint ¶
type Transform ¶
type Transform struct { Oid uint32 TypeNamespace string `db:"typnamespace"` TypeName string `db:"typname"` LanguageName string `db:"lanname"` FromSQLFunc uint32 `db:"trffromsql"` ToSQLFunc uint32 `db:"trftosql"` }
func GetTransforms ¶
func (Transform) GetMetadataEntry ¶
func (trf Transform) GetMetadataEntry() (string, toc.MetadataEntry)
func (Transform) GetUniqueID ¶
type TriggerDefinition ¶
type TriggerDefinition RuleDefinition
func GetTriggers ¶
func GetTriggers(connectionPool *dbconn.DBConn) []TriggerDefinition
func (TriggerDefinition) FQN ¶
func (t TriggerDefinition) FQN() string
func (TriggerDefinition) GetMetadataEntry ¶
func (t TriggerDefinition) GetMetadataEntry() (string, toc.MetadataEntry)
func (TriggerDefinition) GetUniqueID ¶
func (t TriggerDefinition) GetUniqueID() UniqueID
type TupleStatistic ¶
type TypeMapping ¶
type UserMapping ¶
func GetUserMappings ¶
func GetUserMappings(connectionPool *dbconn.DBConn) []UserMapping
func (UserMapping) FQN ¶
func (um UserMapping) FQN() string
func (UserMapping) GetMetadataEntry ¶
func (um UserMapping) GetMetadataEntry() (string, toc.MetadataEntry)
func (UserMapping) GetUniqueID ¶
func (um UserMapping) GetUniqueID() UniqueID
type View ¶
type View struct { Oid uint32 Schema string Name string Options string Definition sql.NullString Tablespace string IsMaterialized bool DistPolicy string }
func GetAllViews ¶
This function retrieves both regular views and materialized views.
func (View) GetMetadataEntry ¶
func (v View) GetMetadataEntry() (string, toc.MetadataEntry)
func (View) GetUniqueID ¶
func (View) ObjectType ¶
Source Files ¶
- backup.go
- data.go
- dependencies.go
- global_variables.go
- incremental.go
- metadata_globals.go
- postdata.go
- predata_acl.go
- predata_externals.go
- predata_functions.go
- predata_operators.go
- predata_relations.go
- predata_shared.go
- predata_textsearch.go
- predata_types.go
- queries_acl.go
- queries_externals.go
- queries_functions.go
- queries_globals.go
- queries_incremental.go
- queries_operators.go
- queries_postdata.go
- queries_relations.go
- queries_shared.go
- queries_statistics.go
- queries_table_defs.go
- queries_textsearch.go
- queries_types.go
- snapshot.go
- statistics.go
- validate.go
- wrappers.go