Sending queries directly

Поиск
Список
Период
Сортировка
Искать

Sending queries directly

От:
"Pedro Belmino" <pedrobelmino@gmail.com>
Дата:
Hello, 
I am creating an agent that runs alongside the postgres written in c++, I have a question: How send sql queries directly for the database without going need to make any connection?
What I call function, which I use file?

Thanks,
--
Pedro Belmino.
--------------------------------------------------------------------
# Ciência da Computação - UNIFOR
# pedrobelmino@gmail.com
--------------------------------------------------------------------

Re: Sending queries directly

От:
"Heikki Linnakangas" <heikki@enterprisedb.com>
Дата:
Pedro Belmino wrote:
> I am creating an agent that runs alongside the postgres written in c++, I
> have a question: How send sql queries directly for the database without
> going need to make any connection?

You can't. Why would you not want to open a connection?

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com

Re: Sending queries directly

От:
Andrew Dunstan <andrew@dunslane.net>
Дата:


Pedro Belmino wrote:
> Hello,
> I am creating an agent that runs alongside the postgres written in 
> c++, I have a question: How send sql queries directly for the database 
> without going need to make any connection?
> What I call function, which I use file?
>
>

You can't. Why can't you use a connection?

cheers

andrew

Re: Sending queries directly

От:
Chris Browne <cbbrowne@acm.org>
Дата:
pedrobelmino@gmail.com ("Pedro Belmino") writes:
>  I am creating an agent that runs alongside the postgres written in
>  c++, I have a question: How send sql queries directly for the
>  database without going need to make any > connection?  > What I
>  call function, which I use file?

You don't do that; your agent should use libpq to establish a
connection just like everyone else.
-- 
(format nil "~S@~S" "cbbrowne" "cbbrowne.com")
http://cbbrowne.com/info/linux.html
I just removed the instructions in MC:COMMON;LINS > which specify that
it should be installed on AI.  We'll certainly  miss that machine, and
probably spend the rest of our lives fixing programs that mention it.

FAQ