pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedIs this fixed in the 7.4 release?
2+ messages / 2 participants
[nested] [flat]
* Is this fixed in the 7.4 release?
@ 2004-03-22 17:09 Wei Weng <wweng@kencast.com>
2004-03-22 17:44 ` Re: Is this fixed in the 7.4 release? Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Wei Weng @ 2004-03-22 17:09 UTC (permalink / raw)
To: pgsql-interfaces
I am having troubles the following code on PostgreSQL 7.3.1.
[snip]
res = PQexec(conn, "SELECT '' AS blah");
if (!res)
{
fprintf(stderr, "SELECT command failed: %s\n",
PQerrorMessage(conn));
PQclear(res);
exit_nicely(conn);
}
fprintf(stdout, "OID(%d)\n", PQftype(res, 0));
PQclear(res);
[/snip]
Basically, I am asking the program to return me the field type of the
first column in the command "select '' AS blah". I was expecting
something like a CHAROID, but the return value is UNKNOWNOID (OID(705)).
D'oh. And I also tried "select ' ' AS blah", as well as "select 'A' AS
blah", they all returned me UNKNOWNOID (OID(705)) for the first column.
Is this a bug? If it is, is it fixed in 7.4 release possibly?
--
Wei Weng
KenCast Inc.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Is this fixed in the 7.4 release?
2004-03-22 17:09 Is this fixed in the 7.4 release? Wei Weng <wweng@kencast.com>
@ 2004-03-22 17:44 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2004-03-22 17:44 UTC (permalink / raw)
To: Wei Weng <wweng@kencast.com>; +Cc: pgsql-interfaces
Wei Weng <wweng@kencast.com> writes:
> Basically, I am asking the program to return me the field type of the
> first column in the command "select '' AS blah". I was expecting
> something like a CHAROID, but the return value is UNKNOWNOID (OID(705)).
> Is this a bug?
No. There isn't anything in that command that constrains the datatype
of the literal, so its type remains UNKNOWN.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-03-22 17:44 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-03-22 17:09 Is this fixed in the 7.4 release? Wei Weng <wweng@kencast.com>
2004-03-22 17:44 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox