Whole record returned in stead of field - Mailing list pgsql-general

From Johann Spies
Subject Whole record returned in stead of field
Date
Msg-id CAGZ55DT2AzVxCy5vgx37-hP9ax9UeHAHauQEFX+HEoTGnm2BsA@mail.gmail.com
Whole thread Raw
Responses Re: Whole record returned in stead of field  (Johann Spies <johann.spies@gmail.com>)
Re: Whole record returned in stead of field  (Andreas Kretschmer <akretschmer@spamfence.net>)
Re: Whole record returned in stead of field  (Berend Tober <btober@broadstripe.net>)
List pgsql-general
The table definition:

CREATE TABLE isi.isi_l1_publication
(
  article_id character varying(15),
  journal_id character varying(7),
  volume character varying(10),
  issue character varying(10),
  publication_year character varying(4),
  publication_date character varying(20),
  id bigint NOT NULL DEFAULT nextval('isi.pubtmp_id_seq'::regclass),
  CONSTRAINT publ_pkey PRIMARY KEY (id)
)
WITH (
  OIDS=FALSE
);

A simple select works as expected:

select article_id, publication_year from isi.isi_l1_publication where article_id='000088352400014':

"000088352400014";"2000"

But this query (which works on a development computer):

WITH UTS AS (select art_id
            from isi.art_country_link
            where countrycode = 'ZA'
            INTERSECT
            select art_id
            from isi.art_country_link
            where
            countrycode = 'CH')
SELECT  A.article_id, A publication_year
            from isi.isi_l1_publication A,
                 UTS B,
                 isi.ritem C     
            where B.art_id = A.article_id
                  and A.publication_year <= '2012'
                  and A.publication_year >= '2000'
                  and C.ut = B.art_id
                  and C.dt  ='@ Article'
            order by A.publication_year;


delivers this result on the server:

"000166055700014";"(000166055700014,35528J0,40,1-2,2000,DEC,2316393)"
"000088352400014";"(000088352400014,12927J0,39,6,2000,JUN,30510144)"
"000166477400015";"(000166477400015,10233J0,11,4,2000,DEC,2530188)"
....

I have seen it once before and could not figured out what is causing it.

Version: Postgresql 9.1

I would like to know...

Regards
Johann

--
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

pgsql-general by date:

Previous
From: saritha N
Date:
Subject: Unable to convert xpath value to date
Next
From: Johann Spies
Date:
Subject: Re: Whole record returned in stead of field