dump_results

A

aaron80v

Does anyone know if DBI dump results API allow a dump without putting
single quotes around the column values?
I don't see an option.

Aaron
 
M

Martien verbruggen

On Tue, 03 Jul 2007 04:13:25 -0700,
Does anyone know if DBI dump results API allow a dump without putting
single quotes around the column values?

DBI::dump_results() calls DBI::neat_list() for each row, which calls
DBI::neat() for each element. DBI::neat() quotes string valuess, which
is, I presume, what you're asking about?
I don't see an option.

I don't know of a (documented) option either. You could always replace
DBI::neat() with your own method, but I wouldn't recommend that without
knowing what the puprose is.

What is the purpose of your question?

Martien
 
A

aaron80v

DBI::dump_results() calls DBI::neat_list() for each row, which calls
DBI::neat() for each element. DBI::neat() quotes string valuess, which
is, I presume, what you're asking about?


I don't know of a (documented) option either. You could always replace
DBI::neat() with your own method, but I wouldn't recommend that without
knowing what the puprose is.

What is the purpose of your question?

Martien
--
|
Martien Verbruggen | Unix is user friendly. It's just selective
| about its friends.
|

The purpose is to get the right value delimiter such as double-quote,
no quote at all etc for batch load data into database. For example, by
default using dump_results(), even integer, smallint, decimal are
delimited with single quote which during loaded will be mistaken to be
varchar.

Aaron
 
M

Martien verbruggen

On Tue, 03 Jul 2007 06:49:02 -0700,
The purpose is to get the right value delimiter such as double-quote,
no quote at all etc for batch load data into database. For example, by
default using dump_results(), even integer, smallint, decimal are
delimited with single quote which during loaded will be mistaken to be
varchar.

dump_results() is meant, according to the DBI documentation, to provide
output for humans. Specifically it states:

Since it uses "neat_list" to format and edit the string for reading
by humans, it is not recomended for data transfer applications.

So you're using a function for a purpose for which it is specifically
documented not to be meant. I suggest that maybe you need to have a look
at the DBI::Dumper module, or maybe you should simply override
DBI::neat() as I suggested.

Martien
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top