MCPcopy Create free account
hub / github.com/apache/cloudberry / CopyIndexAttOptions

Function CopyIndexAttOptions

src/backend/utils/cache/relcache.c:5924–5938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5922}
5923
5924static bytea **
5925CopyIndexAttOptions(bytea **srcopts, int natts)
5926{
5927 bytea **opts = palloc(sizeof(*opts) * natts);
5928
5929 for (int i = 0; i < natts; i++)
5930 {
5931 bytea *opt = srcopts[i];
5932
5933 opts[i] = !opt ? NULL : (bytea *)
5934 DatumGetPointer(datumCopy(PointerGetDatum(opt), false, -1));
5935 }
5936
5937 return opts;
5938}
5939
5940/*
5941 * RelationGetIndexAttOptions

Callers 1

Calls 2

datumCopyFunction · 0.85
pallocFunction · 0.50

Tested by

no test coverage detected