Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for PostgreSQL v11 #1

Merged
merged 1 commit into from
Oct 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/multicorn.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ multicornGetForeignRelSize(PlannerInfo *root,

for (i = 0; i < desc->natts; i++)
{
Form_pg_attribute att = desc->attrs[i];
Form_pg_attribute att = TupleDescAttr(desc, i);

if (!att->attisdropped)
{
Expand Down Expand Up @@ -599,7 +599,7 @@ multicornAddForeignUpdateTargets(Query *parsetree,

for (i = 0; i < desc->natts; i++)
{
Form_pg_attribute att = desc->attrs[i];
Form_pg_attribute att = TupleDescAttr(desc, i);

if (!att->attisdropped)
{
Expand Down Expand Up @@ -681,7 +681,7 @@ multicornBeginForeignModify(ModifyTableState *mtstate,
}
for (i = 0; i < desc->natts; i++)
{
Form_pg_attribute att = desc->attrs[i];
Form_pg_attribute att = TupleDescAttr(desc, i);

if (!att->attisdropped)
{
Expand Down
8 changes: 4 additions & 4 deletions src/python.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ getColumnsFromTable(TupleDesc desc, PyObject **p_columns, List **columns)

for (i = 0; i < desc->natts; i++)
{
Form_pg_attribute att = desc->attrs[i];
Form_pg_attribute att = TupleDescAttr(desc, i);

if (!att->attisdropped)
{
Expand Down Expand Up @@ -1214,7 +1214,7 @@ pythonDictToTuple(PyObject *p_value,
for (i = 0; i < slot->tts_tupleDescriptor->natts; i++)
{
char *key;
Form_pg_attribute attr = slot->tts_tupleDescriptor->attrs[i];
Form_pg_attribute attr = TupleDescAttr(slot->tts_tupleDescriptor,i);
AttrNumber cinfo_idx = attr->attnum - 1;

if (cinfos[cinfo_idx] == NULL)
Expand Down Expand Up @@ -1263,7 +1263,7 @@ pythonSequenceToTuple(PyObject *p_value,
for (i = 0, j = 0; i < slot->tts_tupleDescriptor->natts; i++)
{
PyObject *p_object;
Form_pg_attribute attr = slot->tts_tupleDescriptor->attrs[i];
Form_pg_attribute attr = TupleDescAttr(slot->tts_tupleDescriptor,i);
AttrNumber cinfo_idx = attr->attnum - 1;

if (cinfos[cinfo_idx] == NULL)
Expand Down Expand Up @@ -1658,7 +1658,7 @@ tupleTableSlotToPyObject(TupleTableSlot *slot, ConversionInfo ** cinfos)

for (i = 0; i < tupdesc->natts; i++)
{
Form_pg_attribute attr = tupdesc->attrs[i];
Form_pg_attribute attr = TupleDescAttr(tupdesc,i);
bool isnull;
Datum value;
PyObject *item;
Expand Down
2 changes: 1 addition & 1 deletion src/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ initConversioninfo(ConversionInfo ** cinfos, AttInMetadata *attinmeta)

for (i = 0; i < attinmeta->tupdesc->natts; i++)
{
Form_pg_attribute attr = attinmeta->tupdesc->attrs[i];
Form_pg_attribute attr = TupleDescAttr(attinmeta->tupdesc,i);
Oid outfuncoid;
bool typIsVarlena;

Expand Down