Re: PQftype implementation

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

Hello, Tom.

Yes, you are absolutely right. My bad!

Sorry guys! :)

You wrote:

TL> 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.

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

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

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

TL> regards, tom lane

--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gokulakannan Somasundaram 2010-03-18 08:59:23 Re: An idle thought
Previous Message Simon Riggs 2010-03-18 07:02:29 Re: Getting to beta1