RE: DBI Module installtion

2013-05-05 Thread Anoop Kumar Paramesweran
Thanks for the replay ,I think we don't have xlc.. but in software listing its 
showing ..but I cannot find the binaries for it.

I have already gcc but it says most of the option are not available with gcc..

Anoop Kumar Paramesweran | Expert - Unix and Storage Systems
e anoop.ku...@nawras.om | m +96895103659
twitter/nawras_oman | facebook/nawras
-Original Message-
From: Martin J. Evans [mailto:boh...@ntlworld.com]
Sent: Wednesday, May 01, 2013 11:07 PM
To: dbi-users@perl.org
Cc: Anoop Kumar Paramesweran
Subject: Re: DBI Module installtion

On 29/04/2013 14:55, Anoop Kumar Paramesweran wrote:
 Hi Support,

 I am receiving below error while installing (make ) DBI module in my
 AIX box. As I am new to Perl installations could you please help me to
 solve this..

 xlc_r -q32 -c -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
 -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT
 -qlanglvl=extended -I/usr/local/include -q32 -D_LARGE_FILES -qlonglong
 -O -DVERSION=\1.625\ -DXS_VERSION=\1.625\
 -I/usr/opt/perl5/lib/5.10.1/aix-thread-multi/CORE Perl.c
 /bin/sh: xlc_r: not found.
 make: 1254-004 The error code from the last command is 127.


 Stop.

The Perl you are using was compiled with the AIX C compiler and it is either a) 
not installed or b) it is not on your path.

You can either:

a) add the AIX compiler xlc_r to your path if you have it installed (you 
usually have to pay IBM for this compiler)

b) install the IBM compiler and add it to your PATH.

c) install another compiler such as gcc (which is free), build Perl yourself 
into some dir you can point your PATH at and then install DBI.
You might find perlbrew useful if you end up here.

Mostly when people report the issue you have they have installed Perl from a 
package provided by IBM that they built with their compiler and you don't have 
this compiler. When Perl is built is records the compiler and options used and 
generally you cannot compile Perl itself with one compiler and then modules 
which require a C compiler with another compiler.

Martin
--
Martin J. Evans
Wetherby, UK
This e-mail including any attachment is intended only for the recipient(s) 
named. It may contain confidential information and should not be read, copied 
or otherwise used by any other person. If you are not a named recipient, please 
contact the sender and delete the e-mail from your system. The sender does not 
accept any liability for errors or omissions in the content of this message or 
for viruses, or any damage due to the e-mail. The recipient is advised to have 
appropriate virus check software


Re: Oracle Freakishness

2013-05-05 Thread Garry T. Williams
On 5-2-13 15:20:23 David E. Wheeler wrote:
 This query:
 
 $dbh-selectrow_hashref(q{
 SELECT c.change_id
  , COLLECT(t.tag) AS tags
   FROM changes   c
   LEFT JOIN tags t ON c.change_id = t.change_id
  WHERE c.project = ?
  GROUP BY c.change_id
 }, undef, 'engine');
 
 Generates this (useless) exception:
 
 ORA-00932: inconsistent datatypes: expected - got - (DBD ERROR:
 error possibly near * indicator at char 51 in '

Perhaps this is due to


http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions031.htm#SQLRF06304
 

COLLECT is an aggregate function that takes as its argument a
column of any type and creates a nested table of the input type
out of the rows selected. To get accurate results from this
function you must use it within a CAST function.

Do you have to define a type and cast COLLECT() to that type?

-- 
Garry T. Williams



Re: Oracle Freakishness

2013-05-05 Thread David E. Wheeler
On May 5, 2013, at 7:34 AM, Garry T. Williams gtwilli...@gmail.com wrote:


 http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions031.htm#SQLRF06304
  
 
COLLECT is an aggregate function that takes as its argument a
column of any type and creates a nested table of the input type
out of the rows selected. To get accurate results from this
function you must use it within a CAST function.
 
 Do you have to define a type and cast COLLECT() to that type?

No, I get the same error if I cast it to a varray. What’s bizarre is that 
Oracle says that the error is on the join to tags, not the collect. Here’s 
another example (with the cast):

ORA-00942: table or view does not exist (DBD ERROR: error possibly near * 
indicator at char 419 in '
SELECT c.change_id AS id, c.change AS name, c.project, c.note,
   to_char(c.planned_at AT TIME ZONE 'UTC', 
'year::month:MM:day:DD') || to_char(c.planned_at AT TIME ZONE 'UTC', 
':hour:HH24:minute:MI:second:SS:time_zone:UTC') AS timestamp, 
c.planner_name, c.planner_email,
   cast(COLLECT(t.tag) AS sqitch_array) AS tags
  FROM changes   c
  LEFT JOIN *tags t ON c.change_id = t.change_id
 WHERE c.project = :p1
 GROUP BY c.change_id, c.change, c.project, c.note, c.planned_at,
   c.planner_name, c.planner_email, c.committed_at
 ORDER BY c.committed_at ASC
')

The problem is not solved if I change the name of the collected column from 
tags to something else. However, the problem goes away if I quote the project 
directly and include it in the statement, rather than use a placeholder. I find 
this bizarre, though there is no doubt a very good explanation for it.

Thanks,

David