summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/lib/descriptor.c
blob: 09815b2d103cc5e8fe946ed7363cd047f3030969 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <ecpgtype.h>
#include <ecpglib.h>

bool
ECPGget_desc_header(int lineno, char * desc_name, int *count)
{
	PGresult *ECPGresult = ECPGresultByDescriptor(lineno, desc_name);
	
	if (!ECPGresult)
		return false;

	*count = PQnfields(ECPGresult);
	ECPGlog("ECPGget-desc_header: found %d sttributes.\n", *count);
	return true;
}