Re: [GENERAL] problem converting database to UTF-8

2009-01-24 Thread Jasen Betts
On 2009-01-22, David Goodenough wrote: > I have a database which was created as LATIN1 (the machine has the > wrong locales installed when I set up PG). It is running 8.3. > > So I found various places which said the way to do this was to do > a pg_dumpall -f dump_file, get rid of the entire dat

[GENERAL] Re: how to implement a foreign key type constraint against a not unique column

2009-01-24 Thread Jasen Betts
On 2009-01-21, Brent Wood wrote: > Hi, > > I have a table with a column of ID's (integer), these are unique > except where they = -1 (column 1) > I have a partial unique index where the value is not -1 to enforce this. > I want to use this column as a foreign key on a column in another table >

Re: [GENERAL] difference between current_timestamp and now() in quotes

2009-01-24 Thread Jasen Betts
On 2009-01-22, Adrian Klaver wrote: > On Thursday 22 January 2009 8:16:46 am Alvaro Herrera wrote: >> Grzegorz Jaśkiewicz escribió: >> > test2=# insert into dupa(a) select 'current_timestamp' from >> > generate_series(1,100); >> > ERROR: date/time value "current" is no longer supported >> > LINE

Re: [GENERAL] conditional execution of insert/update-s

2009-01-24 Thread Jasen Betts
On 2009-01-22, Dmitry Teslenko wrote: > Hello! > Question is what's the easiest way to implement conditional execution > of insert/update-s via psql interface? > > As far as I know there's following options: > 1) create function in procedural language (plpgsql, for example); > then call that func

Re: [GENERAL] very long update gin index troubles back?

2009-01-24 Thread Ivan Sergio Borgonovo
On Sat, 24 Jan 2009 15:54:37 +0300 Teodor Sigaev wrote: > GIN index is slow for update by its construction. When you update > the rows with or without columns indexed by GIN, postgres (in most > cases) will insert new records, so index insertion will occur. So, > for large updates it's much cheap

[GENERAL] dblink syntax question for remotely invoking void-returning procedures

2009-01-24 Thread Ian Sollars
Hello everyone, I've got some questions about dblink that I couldn't find answers to in the documentation. Any help would be much appreciated. I need to invoke a function on a remote server that returns either void or text, and I'm trying to find a nice way of doing it. My test schema on the rem

Re: [GENERAL] very long update gin index troubles back?

2009-01-24 Thread Teodor Sigaev
GIN index is slow for update by its construction. When you update the rows with or without columns indexed by GIN, postgres (in most cases) will insert new records, so index insertion will occur. So, for large updates it's much cheaper to drop and create index. That was a one of reasons to dev

Re: [GENERAL] very long update gin index troubles back?

2009-01-24 Thread Oleg Bartunov
On Fri, 23 Jan 2009, Ivan Sergio Borgonovo wrote: I've a table that contain a tsvector that is indexed (gin) and triggers to update the tsvector that should then update the index. This gin index has always been problematic. Recreation and updates were very slow. Now I had to update 1M rows of

[GENERAL] Installing PostgreSQL on Windows 7 Beta Build 7000 64bit - first results

2009-01-24 Thread Harald Armin Massa
Hello, my first results of installation-attempts of PostgreSQL 8.3.5 from pginstaller on Windows 7 64bit: 1.) after getting up to "initialize database cluster", Dialog appears: "Secondary Logon" Service not running. Please start this service and retry Maybe some "net start seclogon" would be hel

Re: [GENERAL] failed insert queries to one table-postgis enabled db

2009-01-24 Thread Alban Hertroys
On Jan 24, 2009, at 9:13 AM, m zyzy wrote: I have two type of INSERT queries that keep getting errors no matter how many times I run it in pgadminIII 1.8.4 PostgresQL 8.3.4+PostGIS1.3.5 on centos5 Linux machine. 2. 16mb insert failed . the problem query ; INSERT INTO lutonszone (gid, are

Re: [GENERAL] very long update gin index troubles back?

2009-01-24 Thread Teodor Sigaev
Ответишь ему что-нибудь? Он так мутно излагает, что я ни хрена не понял. Ivan Sergio Borgonovo wrote: I've a table that contain a tsvector that is indexed (gin) and triggers to update the tsvector that should then update the index. This gin index has always been problematic. Recreation and upda

[GENERAL] SQL Source Search for Emacs

2009-01-24 Thread Volkan YAZICI
Hi, I've submitted[1] some useful portions of my SQL editing hacks for emacs. I generally use them for navigating PostgreSQL (dump) scripts, but it works for other RDBMSes as well. I hope it would work for you as well. Regards. [1] http://www.emacswiki.org/emacs/SQLSourceSearch -- Sent via pg

[GENERAL] failed insert queries to one table-postgis enabled db

2009-01-24 Thread m zyzy
I have two type of INSERT queries that keep getting errors no matter how many times I run it in pgadminIII 1.8.4 PostgresQL 8.3.4+PostGIS1.3.5 on centos5 Linux machine. 1. execution of 18MB INSERT queries to one empty table failed in postgis enabled database.sample one of the thousands queries : I