Re: DBD::Pg func() question

2001-11-10 Thread Alex Pilosov

Why are you using func()?

You should be using dbd->table_attributes("tablename")

But actually, yes, DEFAULT is not being set by DBD::Pg.

If you want to fix it, please edit table_attributes function in Pg.pm in
DBD::Pg source. 

-alex
On 9 Nov 2001, Brad Hilton wrote:

> Hello,
> 
> I am new to using Postgresql and DBD::Pg, so please bear with my
> ignorance.  In using the func() method to get column attributes, I am
> finding that DEFAULT is always undefined, even when the relevant column
> does have a default value.  Is that attribute not storing what I think
> it is?
> 
> I am using DBD::Pg 1.01, DBI 1.20, and perl 5.6.1.
> 
> While I am writing, let me mention why I am using func() to see if
> someone has a better approach for what I'm trying to accomplish.
> 
> I have some perl modules which act as an interface to DBI.  One of the
> functions they perform is scanning the table structure at run-time to
> determine things about the tables.  For example, whether a given column
> is auto incrementing.  The only way I can find to determine that in
> postgres is to look for a default value of nextval().  In MySQL I could
> look for an attribute of auto_increment.
> 
> Is there a recommended way of determining if a column is a 'serial'
> column in postgresql?
> 
> Please cc me on replies, as I am not subscribed to the list   .
> 
> Many thanks,
> Brad Hilton
> 
> 
> 




problem Re. perl:DBI:ORACLE usage

2001-11-10 Thread KN Velayutham

Mr Tim Bunce

I tried to execute the following code with  Active perl 5 . 6 . 0  .623  on 
Windows 95 platform:

use DBI;
$dbh = DBI->connect('dbi:ORACLE:DSN', 'user', 'password');

I have installed dbd-oracle  by Tim Bunce  (win32 build) properly.
I am getting compilation error as follows:
Install driver(ORACLE) failed: Cann't load 
'C:/perl560/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::ORACLE: 
load_file:One of the library files needed to run this application cannot be 
found at C:/perl560/lib/DynaLoader.pm line 200.
Oracle.dll is available in the above path The same error occurs with 
dbd-oracle8 also.
What else should be installed to make the compilation go through properly.

When I tried ODBC in the place of ORACLE, the compilation passes through 
properly.

Thanking you,

KN Velayutham
Flat No.8,96/97, Lloyds Road, Chennai 600014, India.
Phone/Fax: 91 44 8113150
Email: [EMAIL PROTECTED]
website: www.lakshmisoftware.com




DBD::Pg func() question

2001-11-10 Thread Brad Hilton

Hello,

I am new to using Postgresql and DBD::Pg, so please bear with my
ignorance.  In using the func() method to get column attributes, I am
finding that DEFAULT is always undefined, even when the relevant column
does have a default value.  Is that attribute not storing what I think
it is?

I am using DBD::Pg 1.01, DBI 1.20, and perl 5.6.1.

While I am writing, let me mention why I am using func() to see if
someone has a better approach for what I'm trying to accomplish.

I have some perl modules which act as an interface to DBI.  One of the
functions they perform is scanning the table structure at run-time to
determine things about the tables.  For example, whether a given column
is auto incrementing.  The only way I can find to determine that in
postgres is to look for a default value of nextval().  In MySQL I could
look for an attribute of auto_increment.

Is there a recommended way of determining if a column is a 'serial'
column in postgresql?

Please cc me on replies, as I am not subscribed to the list .

Many thanks,
Brad Hilton





DBI for IA-64

2001-11-10 Thread Ramesh Radhakrishnan


Hi,

I am trying to install DBI-1.20 on a IA64 box running Windows XP. I was
able to install MySql sucessfully, but cannot install DBI. I get the
following error message -

Microsoft (R) Program Maintenance Utility   Version 7.00.8827
Copyright (C) Microsoft Corp 1988-1999. All rights reserved.

link -out:blib\arch\auto\DBI\DBI.dll -dll -nologo -nodefaultlib
-release  -libpath:"C:\Perl\

BI.obj   C:\Perl\lib\CORE\perl56.lib oldnames.lib kernel32.lib user32.lib
gdi32.lib winspool.lib  co

hell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib wsock32.lib
mpr.lib winmm.lib  version.lib
svcrt.lib -def:DBI.def
DBI.obj : fatal error LNK1112: module machine type 'IA64' conflicts with
target machine type 'IX86'
NMAKE : fatal error U1077: 'link' : return code '0x458'
Stop.

Is there a version of DBI that is targetted for IA64? If not how can I
modify the present version to compile on IA64 (it does not matter if the
target machine type is X86, as IA64 can run X86 code).

Thanks,
Ramesh