pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How and when are encoding DLLs used on Windows?
4+ messages / 3 participants
[nested] [flat]

* How and when are encoding DLLs used on Windows?
@ 2011-11-16 16:04 David Schnur <dnschnur@gmail.com>
  2011-11-16 23:57 ` Re: How and when are encoding DLLs used on Windows? Tom Lane <tgl@sss.pgh.pa.us>
  2011-11-17 02:28 ` Re: How and when are encoding DLLs used on Windows? Craig Ringer <ringerc@ringerc.id.au>
  0 siblings, 2 replies; 4+ messages in thread

From: David Schnur @ 2011-11-16 16:04 UTC (permalink / raw)
  To: pgsql-admin

I bundle Postgres (8.3.15) with another product as a back-end database.  On
Windows, the default build includes a bunch of what appear to be codec
libraries, with names like, utf8_and_cyrillic.dll, ascii_and_mic.dll, etc.
 But using Microsoft's dependency walker tool, I see no references to any
of these in libpq.dll, psql, postgres or initdb.

So I'm wondering what these are used for, what executable or library ends
up loading them, and when/how exactly this happens.  I'd like to know
whether they're actually necessary, since we could save some space in our
installer by omitting them.

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

* Re: How and when are encoding DLLs used on Windows?
  2011-11-16 16:04 How and when are encoding DLLs used on Windows? David Schnur <dnschnur@gmail.com>
@ 2011-11-16 23:57 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2011-11-16 23:57 UTC (permalink / raw)
  To: David Schnur <dnschnur@gmail.com>; +Cc: pgsql-admin

David Schnur <dnschnur@gmail.com> writes:
> I bundle Postgres (8.3.15) with another product as a back-end database.  On
> Windows, the default build includes a bunch of what appear to be codec
> libraries, with names like, utf8_and_cyrillic.dll, ascii_and_mic.dll, etc.
>  But using Microsoft's dependency walker tool, I see no references to any
> of these in libpq.dll, psql, postgres or initdb.

> So I'm wondering what these are used for, what executable or library ends
> up loading them, and when/how exactly this happens.

They're used for character set encoding conversions, eg when
database_encoding = UTF8 and client_encoding = LATIN1 (or any other
non-identical combination).

> I'd like to know
> whether they're actually necessary, since we could save some space in our
> installer by omitting them.

AFAIR, the system will function without 'em ... until you try to set
client_encoding different from database_encoding.  Removing that
functionality doesn't seem like a good idea to me, but if you know the
needs of your userbase precisely, maybe you could get away with it.

			regards, tom lane



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

* Re: How and when are encoding DLLs used on Windows?
  2011-11-16 16:04 How and when are encoding DLLs used on Windows? David Schnur <dnschnur@gmail.com>
@ 2011-11-17 02:28 ` Craig Ringer <ringerc@ringerc.id.au>
  2011-11-21 18:54   ` Re: How and when are encoding DLLs used on Windows? David Schnur <dnschnur@gmail.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Craig Ringer @ 2011-11-17 02:28 UTC (permalink / raw)
  To: David Schnur <dnschnur@gmail.com>; +Cc: pgsql-admin

On 11/17/2011 12:04 AM, David Schnur wrote:
> I bundle Postgres (8.3.15) with another product as a back-end database.
>   On Windows, the default build includes a bunch of what appear to be
> codec libraries, with names like,
> utf8_and_cyrillic.dll, ascii_and_mic.dll, etc.  But using Microsoft's
> dependency walker tool, I see no references to any of these in
> libpq.dll, psql, postgres or initdb.

They're loaded by LoadLibrary calls. You'll see that the names do appear 
in the server executable as strings.

The PL libraries and contrib libraries are similar, in that you won't 
see direct dependencies but they'll still get used via LoadLibrary if 
your database calls for them.

--
Craig Ringer



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

* Re: How and when are encoding DLLs used on Windows?
  2011-11-16 16:04 How and when are encoding DLLs used on Windows? David Schnur <dnschnur@gmail.com>
  2011-11-17 02:28 ` Re: How and when are encoding DLLs used on Windows? Craig Ringer <ringerc@ringerc.id.au>
@ 2011-11-21 18:54   ` David Schnur <dnschnur@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: David Schnur @ 2011-11-21 18:54 UTC (permalink / raw)
  To: pgsql-admin

On Wed, Nov 16, 2011 at 6:57 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> They're used for character set encoding conversions, eg when
> database_encoding = UTF8 and client_encoding = LATIN1 (or any other
> non-identical combination).


Thanks, Tom and Craig; that makes perfect sense.  I'd rather not assume
anything about the client encoding, but I do know that the server encoding
will always be UTF8.  Am I correct, then, in thinking that I only need the
conversion procs whose names start with utf8_and...?

(I wrote this response a few days ago, but realized that I forgot to
reply-all to the list)

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


end of thread, other threads:[~2011-11-21 18:54 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-11-16 16:04 How and when are encoding DLLs used on Windows? David Schnur <dnschnur@gmail.com>
2011-11-16 23:57 ` Tom Lane <tgl@sss.pgh.pa.us>
2011-11-17 02:28 ` Craig Ringer <ringerc@ringerc.id.au>
2011-11-21 18:54   ` David Schnur <dnschnur@gmail.com>

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