Grokbase
Topics Posts Groups | in
x
[ help ]

Tom Lane (t...@sss.pgh.pa.us)

Profile | Posts (28729)

User Information

Display Name:Tom Lane
Partial Email Address:t...@sss.pgh.pa.us
Posts:
28729 total
2854 in PostgreSQL - Admin
74 in PostgreSQL - Advocacy
10 in PostgreSQL - Announce
4376 in PostgreSQL - Bugs
32 in PostgreSQL - Cygwin
487 in PostgreSQL - Docs
12125 in PostgreSQL - General
1001 in PostgreSQL - Interfaces
482 in PostgreSQL - JDBC
1724 in PostgreSQL - Novice
203 in PostgreSQL - ODBC
2752 in PostgreSQL - Performance
9 in PostgreSQL - PHP
3112 in PostgreSQL - SQL

5 Most Recent

All Posts
1) Tom Lane Re: [GENERAL] client_encoding
| +1 vote
DEFAULT means that the database isn't overriding anything, so it would be taken from whatever other...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
"Dean Gibson (DB Administrator)" <postgresql@ultimeth.com> writes:
> If I "ALTER DATABASE ... SET client_encoding TO DEFAULT", is the default
> the "client_encoding" in postgresql.conf when the server was last
> started, or the value at the time the "ALTER DATABASE ... SET
> client_encoding TO DEFAULT" statement is executed?

DEFAULT means that the database isn't overriding anything, so it would
be taken from whatever other source exists for the setting.  Your first
suggestion isn't necessarily where it would come from --- but your
second one is definitely wrong.

IIRC client_encoding follows server_encoding unless the client-side code
specifies it wants something else, so this case is not a good example of
the general behavior of ALTER DATABASE.

> What I'm looking for is a way to have the client_encoding of all
> databases track some common setting (eg, the "client_encoding" value in
> postgresql.conf), but that may not be possible.

You can set client_encoding in postgresql.conf if you want to, but
I'm having a hard time understanding why you think that'd be a good
idea --- *particularly* if your database encodings aren't all the same.

   regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [email protected: majo...@postgresql.org] so that your
message can get through to the mailing list cleanly
2) Tom Lane Re: [GENERAL] Mac ordering with locales
| +1 vote
Hmm. In principle we could replace strcoll() with a wrapper around this, using a src/port/ module....
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
"A.M." <agentm@themactionfaction.com> writes:
> On Feb 21, 2008, at 12:01 PM, Tom Lane wrote:
>> It seems to be a deficiency in Apple's locale support. The second
>> message is interesting since it indicates that "smart" sorting is
>> available somewhere/somehow under OS X, but nobody here knows how
>> to get at it :-(

> The function is "CFStringCompareWithOptionsAndLocale()".

> http://developer.apple.com/documentation/CoreFoundation/Reference/CFStringRef/Reference/reference.html#//apple_ref/c/func/CFStringCompareWithOptionsAndLocale

> It is obviously not a portable function (beyond the Core Foundation
> sources being open and available), so there may not be any interest
> in having this in PostgreSQL.

Hmm.  In principle we could replace strcoll() with a wrapper around
this, using a src/port/ module. The real problem with this is that it's
new in Leopard, and thus not even adequately portable within the OSX
world.

> Also, which MacOS X version is under discussion here? Could the
> strcoll() bug have been fixed in Leopard?

I just checked sort(1) on 10.5.2, and it seems to still behave the same
as before, so nope they didn't change it.

   regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [email protected: majo...@postgresql.org] so that your
message can get through to the mailing list cleanly
3) Tom Lane Re: [GENERAL] Disable Triggers
| +1 vote
No, reltriggers is reliable as a disable-all-triggers mechanism; when it's zero the code won't even...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Andrew Sullivan <ajs@crankycanuck.ca> writes:
> On Thu, Feb 21, 2008 at 11:44:25AM -0500, Terry Lee Tucker wrote:
>> table where, when the given trigger does fire, it checks for an entry in the
>> table at the top of the trigger and takes the appropiate action. The problem
>> is that the solution for disabling all triggers is used in several utility
>> programs and I'm trying to avoid changing a bunch of code.
>> I appreciate your input.

> Well, you could try rewriting the function to disable all but the Slony
> trigger.  But there's something else wrong here.

> I seem to recall that we found some code path where reltriggers wasn't
> checked properly anyway, so disabling triggers wouldn't work exactly as you
> are doing it.

No, reltriggers is reliable as a disable-all-triggers mechanism; when
it's zero the code won't even look in pg_trigger.  But you can't use it
to disable just some triggers.  I think the bug you are remembering is
that there's always been a pg_trigger.tgenabled field, but it wasn't
always honored everywhere, so it was unreliable as a selective-disable
mechanism until some recent release (I don't recall which, but I'm
afraid 7.4 is too old).

   regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org/
4) Tom Lane Re: [GENERAL] No pgxs.mk with win32 binaries
| +1 vote
Hmm, it certainly should be there somewhere, but the path might be either of these:...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Mike Leahy <mgleahy@alumni.uwaterloo.ca> writes:
> I'm trying to build the PL/R module on Win32 with PostgreSQL 8.3. I've
> done this before with no trouble using several 8.2.x versions of
> PostgreSQL (from the win32 installer). However, now that I'm trying to
> update things for 8.3, it seems that the pgxs.mk file needed by the PL/R
> Makefile is not included with the PostgreSQL 8.3 installer (PL/R is
> looking for this file in this location:
> c:/progra~1/postgresql/8.3/lib/pgxs/src/makefiles/pgxs.mk).

Hmm, it certainly should be there somewhere, but the path might be
either of these:
.../lib/pgxs/src/makefiles/pgxs.mk
.../lib/postgresql/pgxs/src/makefiles/pgxs.mk
depending on exactly how the build was done. If it's not there at
all this is an installer bug.

   regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq
5) Tom Lane Re: [GENERAL] Mac ordering with locales
| +1 vote
Yeah, this has been complained of before, eg here...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Pascal Cohen <pcohen@wimba.com> writes:
> The fact is that works on Linux and win but under Mac I always get the
> ordering with 'default' C locale (I displayed all the lc_* and all are
> right set)

Yeah, this has been complained of before, eg here
http://archives.postgresql.org/pgsql-general/2005-11/msg00047.php
and here
http://archives.postgresql.org/pgsql-general/2004-04/msg00564.php

It seems to be a deficiency in Apple's locale support.  The second
message is interesting since it indicates that "smart" sorting is
available somewhere/somehow under OS X, but nobody here knows how
to get at it :-(

   regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
match

spacer
Profile | Posts (28729)
Home > People > Tom Lane