Re: PQftype implementation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Golub <pavel(at)gf(dot)microolap(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PQftype implementation
Date: 2010-03-17 15:46:05
Message-ID: 29141.1268840765@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Golub <pavel(at)microolap(dot)com> writes:
> Here I created user-defined type "my_varchar" for internal tests. But
> PQftype returns 1043 (varchar oid) for the "info" column.

Really? I tried it and got 172069, which is about right for where the
OID counter is in my database. I think you messed up your test.

res = PQexec(conn, "select * from my_varchar_test");
if (PQresultStatus(res) != PGRES_TUPLES_OK)
{
fprintf(stderr, "SELECT failed: %s", PQerrorMessage(conn));
PQclear(res);
exit_nicely(conn);
}

nFields = PQnfields(res);
for (i = 0; i < nFields; i++)
printf("%-15s %d\n", PQfname(res, i), PQftype(res, i));

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-03-17 16:00:20 Re: Bug in 9.0Alpha4
Previous Message David Fetter 2010-03-17 13:52:15 Re: Partitioning syntax