Re: Can I make direct calls to PostgreSQL server? - Mailing list pgsql-general

From Tom Lane
Subject Re: Can I make direct calls to PostgreSQL server?
Date
Msg-id 9871.984610001@sss.pgh.pa.us
Whole thread Raw
In response to Can I make direct calls to PostgreSQL server?  (Roy Souther <roy@silicontao.com>)
List pgsql-general
Roy Souther <roy@silicontao.com> writes:
> Can I make direct calls to PostgreSQL server? I have a lot of data to post to
> the local PostgreSQL server. I am wondering if I can connect directly to it
> to post data so I can by pass the extra layers of
> command -> SQL text string -> port -> SQL interpreter -> internal DB command
> I would like to go
> command -> lib function call  -> internal DB command

You could issue a COPY FROM STDIN command and then send your data in
COPY format.  This assumes that you are setting all the columns
explicitly (COPY doesn't supply defaults for omitted columns, the way
INSERT can) but it saves an awful lot of overhead.

            regards, tom lane

pgsql-general by date:

Previous
From: Alexander Jerusalem
Date:
Subject: LIKE and indexes?
Next
From: Richard H
Date:
Subject: Re: [Q] post-crash behaviour