Re: [GENERAL] rotate psql output

2010-10-04 Thread Tommy Gildseth
e end-of-statement character: ';' or '\g' gives the usual orientation, '\G' gives the rotated orientation. No, that is exactly the same as \x or psql -x does. -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] rotate psql output

2010-09-30 Thread Tommy Gildseth
ad no luck searching for this as rotate usually means log rotation. BC Have you tried \x ? -- Tommy Gildseth DBA, Gruppe for databasedrift Universitetet i Oslo, USIT m: +47 45 86 38 50 t: +47 22 85 29 39 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your su

Re: [GENERAL] Hosting Account with PostgreSQL and PHP?

2010-02-16 Thread Tommy Gildseth
know what they're talking about, and thinks Postgres works the same way as MySQL, where you do indeed have to be an administrator to create triggers. -- Tommy Gildseth DBA, Gruppe for databasedrift Universitetet i Oslo, USIT m: +47 45 86 38 50 t: +47 22 85 29 39 -- Sent via pgs

Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-10 Thread Tommy Gildseth
true/false. Arrays, I don't know, since I don't use them. -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Best way to "mask" password in DBLINK

2009-08-12 Thread Tommy Gildseth
Ow Mun Heng wrote: -Original Message- From: Magnus Hagander [mailto:mag...@hagander.net] On Wed, Aug 12, 2009 at 09:30, Ow Mun Heng wrote: From: Tommy Gildseth [mailto:tommy.gilds...@usit.uio.no] Ow Mun Heng wrote: I'm starting to use DBLink / DBI-Link and one of the "bad&

Re: [GENERAL] Best way to "mask" password in DBLINK

2009-08-12 Thread Tommy Gildseth
Ow Mun Heng wrote: -Original Message- From: Tommy Gildseth [mailto:tommy.gilds...@usit.uio.no] Ow Mun Heng wrote: I'm starting to use DBLink / DBI-Link and one of the "bad" things is that the password is out in the clear. What can I do to prevent it from being

Re: [GENERAL] Best way to "mask" password in DBLINK

2009-08-12 Thread Tommy Gildseth
your password in the .pgpass file in the postgres-users home folder, on the server where the postgres cluster is running. -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Converting SQL to pg

2009-07-24 Thread Tommy Gildseth
) PostgreSQL doesn't have anything similar to IGNORE (afaik), but depending on what you want to do, you may be able to work around that with deferred constraints etc. -- Tommy Gildseth DBA, Gruppe for databasedrift Universitetet i Oslo, USIT m: +47 45 86 38 50 t: +47 22 85 29 39 -- Sent via

[GENERAL] Finding time of last pg_stat_reset

2009-06-12 Thread Tommy Gildseth
3, without f.ex adding a call to pg_stat_reset() in our startup scripts? -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to restore a SQL-ASCII encoded database to a new UTF-8 db?

2009-05-22 Thread Tommy Gildseth
in;" You may be able to import it. IIRC, PostgreSQL doesn't do any automatic conversion between SQL-ASCII <-> Any encoding, but if you put the correct encoding, PostgreSQL will deal with the conversion automatically. -- Tommy Gildseth DBA, Gruppe for databasedrift Universitetet i Oslo,

Re: [GENERAL] Crash of Postgresql on Windows

2009-02-04 Thread Tommy Gildseth
Andrew Gould wrote: What does '--' do? -- Is an SQL comment -- Tommy Gildseth DBA, Gruppe for databasedrift Universitetet i Oslo, USIT m: +47 45 86 38 50 t: +47 22 85 29 39 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscrip

Re: [GENERAL] Text search segmentation fault

2009-01-29 Thread Tommy Gildseth
7;s many projects or commercial products that can compete with that ;-) -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Text search segmentation fault

2009-01-29 Thread Tommy Gildseth
38 in PostmasterMain () #20 0x00529f5b in main () -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Text search segmentation fault

2009-01-29 Thread Tommy Gildseth
I tried without specifying a StopWords-list as well, but same thing happens. Teodor Sigaev wrote: Could you provide a backtrace? Do you use unchanged norwegian.stop file? I'm not able to reproduce the bug - postgres just works. Tommy Gildseth wrote: While trying to create a new dictionar

Re: [GENERAL] Text search segmentation fault

2009-01-29 Thread Tommy Gildseth
e bug - postgres just works. Tommy Gildseth wrote: While trying to create a new dictionary for use with PostgreSQL text search, I get a segfault. My Postgres version is 8.3.5 -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Text search segmentation fault

2009-01-29 Thread Tommy Gildseth
x27;); ts_lexize -- {over,buljong,terning,pakk,mester,assistent} (1 row) Time: 922.364 ms Oleg On Thu, 29 Jan 2009, Tommy Gildseth wrote: While trying to create a new dictionary for use with PostgreSQL text search, I get a segfault. My Postgres version is 8.3.5 The dictio

[GENERAL] Text search segmentation fault

2009-01-29 Thread Tommy Gildseth
] [pgtest02] [:] [] [12023] [0] LOG: autovacuum launcher started [2009-01-29 13:55:12.011 CET] [pgtest02] [:] [] [26466] [0] LOG: database system is ready to accept connections -- Tommy Gildseth DBA, Gruppe for databasedrift Universitetet i Oslo, USIT m: +47 45 86 38 50 t: +47 22 85 29 39 --

Re: [GENERAL] Text search with ispell

2009-01-27 Thread Tommy Gildseth
Oleg Bartunov wrote: On Tue, 27 Jan 2009, Tommy Gildseth wrote: Tommy Gildseth wrote: Oleg Bartunov wrote: Have you read http://www.postgresql.org/docs/current/static/textsearch-dictionaries.html#TEXTSEARCH-ISPELL-DICTIONARY We suggest to use dictionaries which come with openoffice

Re: [GENERAL] Text search with ispell

2009-01-27 Thread Tommy Gildseth
Tommy Gildseth wrote: Oleg Bartunov wrote: Have you read http://www.postgresql.org/docs/current/static/textsearch-dictionaries.html#TEXTSEARCH-ISPELL-DICTIONARY We suggest to use dictionaries which come with openoffice, hunspell, probably has better support of composite words. Thanks

Re: [GENERAL] Text search with ispell

2009-01-27 Thread Tommy Gildseth
right track. To easy to miss the blindingly obvious at times. :-) Works beautifully now. -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Text search with ispell

2009-01-27 Thread Tommy Gildseth
Oleg Bartunov wrote: On Tue, 27 Jan 2009, Tommy Gildseth wrote: I'm trying to figure out how to use PostgreSQL's fulltext search with an ispell dictionary. I'm having a bit of trouble figuring out where this norwegian.dict comes from though. When I install the norwegian ispel

Re: [GENERAL] Text search with ispell

2009-01-27 Thread Tommy Gildseth
Andreas Wenk wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tommy Gildseth schrieb: I'm trying to figure out how to use PostgreSQL's fulltext search with an ispell dictionary. I'm having a bit of trouble figuring out where this norwegian.dict comes from though. Whe

[GENERAL] Text search with ispell

2009-01-27 Thread Tommy Gildseth
I'm trying to figure out how to use PostgreSQL's fulltext search with an ispell dictionary. I'm having a bit of trouble figuring out where this norwegian.dict comes from though. When I install the norwegian ispell dictionary, i get 4 files, nb.aff, nb.hash, nn.aff and nn.hash. What I'm unable to

Re: [GENERAL] Minor bug/inconveniance with restore from backup, using PITR base backup and archived wal files

2008-09-27 Thread Tommy Gildseth
Tom Lane wrote: Tommy Gildseth <[EMAIL PROTECTED]> writes: After a bit of looking around, and with some help from the fine people in #postgresql on freenode, I think I figured out what was going on. The last wal archive file was 00010003009F, and after finishing re

Re: [GENERAL] Minor bug/inconveniance with restore from backup, using PITR base backup and archived wal files

2008-09-25 Thread Tommy Gildseth
Tommy Gildseth wrote: I've recently been testing our backup/restore procedures, and discovered a minor inconvenience. Running 8.2.9 btw -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresq

[GENERAL] Minor bug/inconveniance with restore from backup, using PITR base backup and archived wal files

2008-09-25 Thread Tommy Gildseth
ng the wal-file in pg_xlog/, and trying to restart the cluster did not work, and I found no other way to recover from this, other than to start over again from the beginning. -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your sub

Re: [GENERAL] "Stuck" query

2008-09-10 Thread Tommy Gildseth
Erik Jones wrote: On Sep 10, 2008, at 5:57 AM, Tommy Gildseth wrote: Tom Lane wrote: Tommy Gildseth <[EMAIL PROTECTED]> writes: Richard Huxton wrote: For what it's worth, I've run into a situation similar to this with a client a couple time in the last week or two (I can

Re: [GENERAL] "Stuck" query

2008-09-10 Thread Tommy Gildseth
Tom Lane wrote: Tommy Gildseth <[EMAIL PROTECTED]> writes: Richard Huxton wrote: Looks like part of your query results being sent. Is it hung in that one system-call? Yes, I left it there for about ~1 hour, and that was all that ever came. Seems like you have got a network issue.

Re: [GENERAL] "Stuck" query

2008-09-10 Thread Tommy Gildseth
Richard Huxton wrote: Tommy Gildseth wrote: SELECT pg_cancel_backend(17504) has no effect, neither does kill 17504 from the shell. Strange. I tried "strace -p17504", and this gave me just the following output: sendto(7, "\7\0\0\0\003771\0\0\0\00224\0\0\0\017127.120.213.18&qu

[GENERAL] "Stuck" query

2008-09-10 Thread Tommy Gildseth
;..., 968, 0, NULL, 0 Does anyone have any further troubleshooting suggestions that I can do, to figure out why this query have "crashed"? The pg version is 8.2.9 on RHEL4 -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] big database with very small dump !?

2008-08-12 Thread Tommy Gildseth
Joao Ferreira gmail wrote: On Mon, 2008-08-11 at 10:58 -0600, Scott Marlowe wrote: If I try cluster, I'm guessing I'll choose the big index and forget about the smaller ones... is this right ? CLUSTER will sort out all the indexes, even though you're just clustering on

Re: [GENERAL] big database with very small dump !?

2008-08-12 Thread Tommy Gildseth
n up things and free diskspace both in the table and the indexes. It does require quite extensive locking though, so might not be an option if you can't afford having the database unavailable for a few (10-15) minutes. -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Method to detect certain characters in column?

2008-06-23 Thread Tommy Gildseth
Ian Meyer wrote: So I have a column that contains usernames that have characters such as Ã(c)(R), for example: fuchÃ(c)r.. is there any way to find names with non A-Za-z0-9? ...WHERE col ~ '[^a-zA-Z0-9]'; Someone with a bit more regex fu can probably condense down the regex.

Re: [GENERAL] ERROR: missing FROM-clause entry for table on postgresql 8.1 not on 7.4; deleting from a join

2008-06-17 Thread Tommy Gildseth
m laks wrote: --- On *Tue, 6/17/08, Tommy Gildseth /<[EMAIL PROTECTED]>/* wrote: F How about something along these lines: delete from instancetable USING imagelevel WHERE ( (imagelevel.serparent= '1.2.840.113704.1.111.4640.1185891

Re: [GENERAL] ERROR: missing FROM-clause entry for table on postgresql 8.1 not on 7.4; deleting from a join

2008-06-16 Thread Tommy Gildseth
e from instancetable USING imagelevel WHERE ( (imagelevel.serparent= '1.2.840.113704.1.111.4640.1185891989.4') and (instancetable.imageuid= imagelevel.sopinsuid) ); -- Tommy Gildseth DBA, Gruppe for databasedrift Universitetet i Oslo, USIT m: +47 45 86 38 50 t: +47 22 85 29 39 -- Sent

Re: [GENERAL] Stored procs / functions - execution failure

2008-06-14 Thread Tommy Gildseth
h is what you got now, you use sp_scheduleFromDate('2008-01-01'::date); which seems to be what the function expects. -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Re: Accessing other databases with DBLink when leaving user/password empty

2008-06-10 Thread Tommy Gildseth
privileges to superuser. See http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-3278 and http://www.securityfocus.com/archive/1/archive/1/471541/100/0/threaded for more info on this issue. -- Tommy Gildseth DBA, Gruppe for databasedrift Universitetet i Oslo, USIT m: +47 45 86 38 50 t: +47 22

Re: [GENERAL] Performance of update

2008-03-27 Thread Tommy Gildseth
your WHERE indexed? What does EXPLAIN ANALYZE say? -- Tommy Gildseth -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] ascii to utf-8

2008-01-23 Thread Tommy Gildseth
"SET client_encoding = 'SQL_ASCII';" to "SET client_encoding = 'LATIN1';" -- Tommy Gildseth ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail comman

Re: [GENERAL] (Never?) Kill Postmaster?

2007-10-23 Thread Tommy Gildseth
to use more gently way select pg_cancel_backend() http://www.postgresql.org/docs/current/interactive/functions-admin.html The problem is that pg_cancel_backend() is somewhat unreliable at cancelling wayward queries. You can try other options for kill though, other than -9, which is kind of a l

Re: [GENERAL] ORDER BY - problem with NULL values

2007-10-12 Thread Tommy Gildseth
any way to a) make the countries with NULL values appear at the bottom of the list ... ORDER BY y_2000 IS NULL [DESC], y_2000; b) neglect the NULL values by still allowing the countries to be displayed Not quite sure what you mean by this. -- Tommy Gildseth

Re: [GENERAL] URGENT: Whole DB down ("no space left on device")

2007-08-31 Thread Tommy Gildseth
; on my system shows this: /dev/sda2 ext39.9G 9.5G 0 100% /var Well, the error message is pretty clear, and assuming you don't keep your database in any non-standard location, you /var partition is indeed full. -- Tommy Gildseth ---

Re: [GENERAL] Internal Postgre SQL documentation

2007-08-09 Thread Tommy Gildseth
/hacking/ http://doxygen.postgresql.org/ is probably usefull too. -- Tommy Gildseth ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Is this a bug? Sequences and rules

2007-04-10 Thread Tommy Gildseth
ence twice. -- Tommy Gildseth -- Tommy Gildseth DBA, Gruppe for databasedrift Universitetet i Oslo, USIT m: +47 45 86 38 50 ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] UPDATE on two large datasets is very slow

2007-04-04 Thread Tommy Gildseth
Martijn van Oosterhout wrote: On Mon, Apr 02, 2007 at 08:24:46PM -0700, Steve Gerhardt wrote: I've been working for the past few weeks on porting a closed source BitTorrent tracker to use PostgreSQL instead of MySQL for storing statistical data, but I've run in to a rather large snag. The tra

Re: [GENERAL] Best way to store and retrieve photo from PostGreSQL

2007-02-25 Thread Tommy Gildseth
Andreas Kretschmer wrote: Alain Roger <[EMAIL PROTECTED]> schrieb: Hi, I would like to store picture in my DB and after to display them on my PHP pages. What is the best solution for that ? Store the pictures in the filesystem and only the path, description and other metadata in the

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Tommy Gildseth
Ben wrote: I'm sorry maybe I missed something, but if you don't need NULLs and feel they just add extra work, why don't you just declare all your columns to be not null and have them default to zero or an empty string? which is what mySQL does by default :-) The statement CREATE TABLE foo

Re: [GENERAL] how to store whole XML file in database

2007-02-12 Thread Tommy Gildseth
deepak pal wrote: hi,, i have to insert whole xml file in database ,there is a text field for that.but it shows error parse error where there are attribute ..plz help me out. I'm guessing you have a quoting problem. Try escaping the XML-data before inserting it into the database, so

Re: [GENERAL] Problem with result ordering

2007-01-25 Thread Tommy Gildseth
672089) ORDER BY m_id=26250, m_id=11042, m_id=16279, m_id=42197, m_id=672089; -- Tommy Gildseth http://www.gildseth.com/ ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Trouble creating database with proper encoding

2007-01-22 Thread Tommy Gildseth
Rob Tanner wrote: createdb -U xythos -E UNICODE XythosDocumentStoreDB createdb -U xythos -E UNICODE XythosGlobalDB When I look at what I've done with psql -l, I get List of databases Name | Owner | Encoding ---+--+-- Xythos

[GENERAL] pg_proc_proname_args_nsp_index error

2004-06-20 Thread Tommy Gildseth
I've got a standard setup on Debian woody, with postgreSQL backports from http://people.debian.org/~elphick Last night, I started getting mails from the cron daemon that this command: /usr/bin/test -x /usr/lib/postgresql/bin/do.maintenance && /usr/lib/postgresql/bin/do.maintenance -a -F was spit