Roy Souther <roy(at)silicontao(dot)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