Re: DBD::PgSQL: More Queestions

Поиск
Список
Период
Сортировка
От Rudy Lippan
Тема Re: DBD::PgSQL: More Queestions
Дата
Msg-id Pine.LNX.4.44.0211200839150.6288-100000@elfride.ineffable.net
обсуждение исходный текст
Ответ на Re: DBD::PgSQL: More Queestions  (Tim Bunce <Tim.Bunce@pobox.com>)
Ответы Re: DBD::PgSQL: More Queestions  (Tim Bunce <Tim.Bunce@pobox.com>)
Список pgsql-interfaces
On Wed, 20 Nov 2002, Tim Bunce wrote:

> > I notice that 
> > DBD::ODBC, for example, doesn't appear to do anything special with 
> > regard to comments. And if comments *are* supported by DBI, and DBD::Pg 
> > is doing the right thing by watching out for them, wouldn't it be 
> > smarter for DBD::Pg to cut them *out* of its internal copy of the SQL 
> > statement so that dbd_st_execute() doesn't also have to deal with them?
> 
> Why should dbd_st_execute have to "deal" with them? The whole string
> should just be sent off to the server.
> 

PostgreSQL itself does not (yet) support placeholders, so DBD::Pg emulates
them by scanning the string again in dbd_st_execute() looking for
placeholders and substituting them quoted values of what was passed to 
execute().

or maybe more clearly in pseudo code:

preparse {  look for :pn :0 ? type place holders.  replace with :pn type placehoders.
}

execute {   look for :pn type placeholders   replace with for quote(valueof(:pn))   send to db.
}

-r




В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Tim Bunce
Дата:
Сообщение: Re: DBD::PgSQL: More Queestions
Следующее
От: Tim Bunce
Дата:
Сообщение: Re: :PgSQL: More Queestions