pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Change of default type in DBD::Pg 1.42
2+ messages / 2 participants
[nested] [flat]

* Change of default type in DBD::Pg 1.42
@ 2005-09-09 20:44  Mischa Sandberg <mischas@ActiveState.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Mischa Sandberg @ 2005-09-09 20:44 UTC (permalink / raw)
  To: pgsql-interfaces

Was curious about the change that came about in the thread:

Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg

... which (I gather) hinged on an efficiency issue, of type-mismatch between 
passed parameters and indexed columns.

I'm asking because a fair amount of code broke in our app,
when "?" appeared in a context where PG couldn't determine a type from context,
but VARCHAR was appropriate.

In general, Perl, and perl programmers, assume it's okay for any scalar to 
reduce to a string. One even claims that the DBI spec actually says that default 
binding is VARCHAR; I have yet to track down the reference.

I was under the impression that type-mismatch of constants vs indexed-column 
types was something that was fixed in Postgres8; should the above "fix" then not 
be a non-issue? To un-break code here, I'm having to reverse the patch on 
dbdimp.c :-(

-- 
"Dreams come true, not free." -- S.Sondheim.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Change of default type in DBD::Pg 1.42
@ 2005-09-11 00:09  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Mischa Sandberg <mischas@ActiveState.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2005-09-11 00:09 UTC (permalink / raw)
  To: mischa@ActiveState.com; +Cc: pgsql-interfaces

Mischa Sandberg <mischas@ActiveState.com> writes:
> I'm asking because a fair amount of code broke in our app,
> when "?" appeared in a context where PG couldn't determine a type from context,
> but VARCHAR was appropriate.

Would you provide some examples?  I would expect parameters to default
to TEXT in most cases, and that should be close enough ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-09-11 00:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-09-09 20:44 Change of default type in DBD::Pg 1.42 Mischa Sandberg <mischas@ActiveState.com>
2005-09-11 00:09 ` Tom Lane <tgl@sss.pgh.pa.us>

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