1717
1818#include "postgres.h"
1919
20+ #include "nodes/value.h"
21+ #include "postgres.h"
22+
2023#include "access/heapam.h"
2124#include "access/table.h"
2225#include "access/tableam.h"
@@ -336,7 +339,7 @@ form_strings_vector(List *relnames)
336339
337340 foreach (lc , relnames )
338341 {
339- char * relname = ( lfirst_node ( String , lc ))-> sval ;
342+ char * relname = strVal ( lfirst ( lc ));
340343
341344 rels [i ++ ] = CStringGetTextDatum (relname );
342345 }
@@ -359,9 +362,9 @@ deform_strings_vector(Datum datum)
359362 & values , NULL , & nelems );
360363 for (i = 0 ; i < nelems ; ++ i )
361364 {
362- String * s = makeNode ( String ) ;
365+ Value * s ;
363366
364- s -> sval = pstrdup (TextDatumGetCString (values [i ]));
367+ s = makeString ( pstrdup (TextDatumGetCString (values [i ]) ));
365368 relnames = lappend (relnames , s );
366369 }
367370
@@ -448,7 +451,7 @@ load_fss(uint64 fs, int fss, OkNNrdata *data, List **relnames)
448451 elog (ERROR , "unexpected number of features for hash (" \
449452 UINT64_FORMAT ", %d):\
450453 expected %d features, obtained %d" ,
451- fs , fss , ncols , DatumGetInt32 (values [2 ]));
454+ fs , fss , data -> cols , DatumGetInt32 (values [2 ]));
452455 }
453456 else
454457 success = false;
@@ -583,7 +586,7 @@ update_fss(uint64 fs, int fss, OkNNrdata *data, List *relnames)
583586 */
584587 elog (ERROR , "AQO data piece (" UINT64_FORMAT " %d) concurrently"
585588 " updated by a stranger backend." ,
586- fhash , fsshash );
589+ fs , fss );
587590 result = false;
588591 }
589592 }
0 commit comments