getOwnedSequence(Oid relid, AttrNumber attnum)
{
	List	   *seqlist = getOwnedSequences(relid, attnum);

	if (list_length(seqlist) > 1)
		elog(ERROR, "more than one owned sequence found");
	else if (list_length(seqlist) < 1)
		elog(ERROR, "no owned sequence found");

	return linitial_oid(seqlist);
}
getOwnedSequence(Oid relid, AttrNumber attnum)
{
	List	   *seqlist = getOwnedSequences(relid, attnum);

	if (list_length(seqlist) > 1)
		elog(ERROR, "more than one owned sequence found");
	else if (list_length(seqlist) < 1)
		elog(ERROR, "no owned sequence found");

	return linitial_oid(seqlist);
}