pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Wei Weng <wweng@kencast.com>
To: pgsql-interfaces@postgresql.org
Subject: Is this fixed in the 7.4 release?
Date: Mon, 22 Mar 2004 12:09:43 -0500
Message-ID: <405F1DD7.7060400@kencast.com> (raw)

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.




view thread (2+ messages)  latest in thread

Message-ID: <405F1DD7.7060400@kencast.com>
Permalink:  ../405F1DD7.7060400@kencast.com/
Also on:    postgresql.org/message-id/405F1DD7.7060400@kencast.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: wweng@kencast.com
  Subject: Re: Is this fixed in the 7.4 release?
  In-Reply-To: <405F1DD7.7060400@kencast.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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