Re: [GENERAL] Exporting postgres query to CSV

2006-05-10 Thread Nis Jorgensen
[EMAIL PROTECTED] wrote: > A word of advice: if there is any chance that a column (e.g. text) contains > an embedded newline, you will be much better off outputting the data in > simple xml, instead of CSV. This works very well with Excel for import. I > just did a simple program for this recentl

Re: [GENERAL] Bug in ordered views?

2006-05-15 Thread Nis Jorgensen
Sebastian Böck wrote: > Hello all, > > I think I found a little but annoying bug in views when ordering is > involved. First, my version of Postgres: > > PostgreSQL 8.1.3 on i386-portbld-freebsd6.1, compiled by GCC cc (GCC) > 3.4.4 [FreeBSD] 20050518 > > Please try the following: > > CREATE TAB

Re: [GENERAL] invalid byte sequence for encoding error

2006-05-19 Thread Nis Jorgensen
Oliver A. Rojo wrote: Hi! I've just recently upgraded my database from 7.4.8 to 8.0.1. Im dumping data i got from my old db to my new db but eventually an error occured ERROR: invalid byte sequence for encoding "UNICODE": 0xd141 I tried setting the client encoding to UNICODE but to no avail

Re: [GENERAL] invalid byte sequence for encoding error

2006-05-19 Thread Nis Jorgensen
Oliver A. Rojo wrote: Nis Jorgensen wrote: Oliver A. Rojo wrote: Hi! I've just recently upgraded my database from 7.4.8 to 8.0.1. Im dumping data i got from my old db to my new db but eventually an error occured I fixed it by fixing the original db and dumping again. If this i

Re: [GENERAL] a row disapearing

2006-05-29 Thread Nis Jorgensen
Rafal Pietrak wrote: On Sat, 2006-05-27 at 14:06 -0400, Bruce Momjian wrote: Is this a feature, or a bug? And in fact, is there a construct to get both the count() and its selectors *in*case*, when the count is ZERO? All the above in postgres 8.1. It is supposed to work that way. In the first

Re: [GENERAL] List of countries (WAS: National Number to text conversion)

2006-05-29 Thread Nis Jorgensen
brian ally wrote: I was thinking the same. But Bob's reply has me wondering if there are any online resources for this sort of thing. Specifically, i have a look-up table, with most (possibly all - i don't know) countries' 2-letter ISO codes and english names. Just this weekend, i've learned

Re: [GENERAL] List of countries (WAS: National Number to text conversion)

2006-05-30 Thread Nis Jorgensen
brian ally wrote: Thanks, Nis. Here's my revised list, using those (errors of letter-case entirely my own, owing to my hazy understanding of capitilisation for hyphenated french nouns): With the risk of getting horribly off topic, you may want to be consistent between the languages in whethe

Re: [GENERAL] Lossy character conversion to Latin-1

2006-05-31 Thread Nis Jorgensen
John DeSoi wrote: I have a client that only supports Latin-1 and needs to connect to a UTF-8 database to retrieve some data. Some columns may contain characters that have no Latin-1 equivalent. I would like to convert these to a blank or perhaps some hex value. Is there any way to do this in P

Re: [GENERAL] PGSQL 7.4 -> 8.1 migration & performance problem

2006-05-31 Thread Nis Jorgensen
Philippe Lang wrote: Hi, For an unknown reason, I cannot post this message to the mailing-list! Here it is: http://www.attiksystem.ch/postgresql-general.txt Please post query and table structure as well. And since you are using a medium with no limitation on line lenght, unwrap the query pla

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully implementing

2006-06-09 Thread Nis Jorgensen
Agent M wrote: > If you don't use NULL, then you don't > come across 3-valued logic--problem solved. So was does "SELECT sum(1) FROM dual WHERE false" return? /Nis ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully implementing

2006-06-09 Thread Nis Jorgensen
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2006-06-09 10:12:21 +0200: >> Agent M wrote: >>> If you don't use NULL, then you don't >>> come across 3-valued logic--problem solved. >> So was does "SELECT sum(1) FROM dual WHERE false" return? > > You stripped this: > >>> Some Tutorial D notio

Re: [GENERAL] A few questions about carriage returns (\r)

2006-06-15 Thread Nis Jorgensen
Martijn van Oosterhout wrote: > I beleive there is a regexp_replace. In psql, if you type \df you get a > list of all defined functions. The docs have info too. The function is confusingly not mentioned in the documentation under "String Functions and Operators", but only under "Pattern Matching"