Re: [GENERAL] Linux OOM-Killer

2014-03-17 Thread Karsten Hilbert
On Mon, Mar 17, 2014 at 12:21:30PM +0100, basti wrote: uname -a Linux h2085616 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux At any time there are not more than 20-30 Connections at once. Swap is disabled. free -m total used free shared

Re: [GENERAL] Restore postgresql data directory to tablespace on new host? Or swap tablespaces?

2014-02-15 Thread Karsten Hilbert
On Sat, Feb 15, 2014 at 06:15:04PM +, Antman, Jason (CMG-Atlanta) wrote: I also asked this question on dba.stackexchange.com, where it received a very detailed enumeration of the associated problems from Craig Ringer: ... Perhaps there's a postgres internals expert around, someone

Re: [GENERAL] Restore postgresql data directory to tablespace on new host? Or swap tablespaces?

2014-02-15 Thread Karsten Hilbert
On Sat, Feb 15, 2014 at 10:17:05PM +, Antman, Jason (CMG-Atlanta) wrote: [...] I see how my original brilliant idea (multiple DBs per postgres instance on one host, [...]) is insane, without some specific support for it in postgres. multiple DBs per PostgreSQL instance on one host is

Re: [GENERAL] Any freeware graphic display of DDL software available?

2014-01-16 Thread Karsten Hilbert
On Thu, Jan 16, 2014 at 08:45:44AM -0800, Susan Cassidy wrote: Is there any free or cheap software that will read in DDL and output a graphic display of it? Preferably showing links for foreign keys. pg_autodoc Karsten -- GPG key ID E4071346 @ gpg-keyserver.de E167 67FD A291 2BEA 73BD 4537

Re: [GENERAL] getting domain information from query results

2014-01-09 Thread Karsten Hilbert
On Thu, Jan 09, 2014 at 12:10:34PM +0100, Marco Baringer wrote: assuming i have this schema: create domain almost_a_string AS text; create table object ( name_like_thing almost_a_string ); and i'm trying to go from the results, using postgresql's frontend/backend protocol, of this

[GENERAL] a PostgreSQL slogan misused

2013-11-26 Thread Karsten Hilbert
I suppose the PostgreSQL Publice Relations people might be interested in this misuse of PostgreSQL phrase: http://www.computerweekly.com/blogs/open-source-insider/2013/11/why-elephants-never-forget-big-data.html Karsten -- GPG key ID E4071346 @ gpg-keyserver.de E167 67FD A291 2BEA 73BD

Re: [GENERAL] pg_upgrade ?deficiency

2013-11-22 Thread Karsten Hilbert
Bruce Momjian br...@momjian.us writes: Not sure about backpatching. default_transaction_read_only has been around since 7.4. Setting it to true would cause pg_dump to fail unless you changed the database setting, and pg_dumpall would fail completely as there is no way to turn off the

Re: [GENERAL] pg_upgrade ?deficiency

2013-11-21 Thread Karsten Hilbert
On Thu, Nov 21, 2013 at 06:22:50AM -0800, Kevin Grittner wrote: I would be happy to supply a patch to treat default_transaction_read_only the same as statement_timeout or standard_conforming_strings in pg_dump and related utilities. Since it causes backup/restore failure ... (and pg_upgrade

Re: [GENERAL] pg_upgrade ?deficiency

2013-11-20 Thread Karsten Hilbert
On Tue, Nov 19, 2013 at 11:22:47AM +0100, Karsten Hilbert wrote: ERROR: transaction is read-only Now, this is quite understandable since one of the databases is set to ALTER DATABASE ... SET DEFAULT_TRANSACTION_READ_ONLY TO ON; However, since the above setting

Re: [GENERAL] pg_upgrade ?deficiency

2013-11-20 Thread Karsten Hilbert
Karsten Hilbert wrote: Let me try to rephrase: Fact: pg_upgrade can NOT properly upgrade clusters which contain databases that are set to default_transaction_read_only on Question: Is this intended ? I am pretty sure that this is an oversight and hence a bug. oversight

Re: [GENERAL] pg_upgrade ?deficiency

2013-11-20 Thread Karsten Hilbert
On Wed, Nov 20, 2013 at 02:36:08PM +0100, Karsten Hilbert wrote: Karsten Hilbert wrote: Let me try to rephrase: Fact: pg_upgrade can NOT properly upgrade clusters which contain databases that are set to default_transaction_read_only on Question: Is this intended

[GENERAL] pg_upgrade ?deficiency

2013-11-19 Thread Karsten Hilbert
Hello all, I am upgrading a 8.4 cluster to 9.1 and am seeing the following: SQL command failed CREATE TEMPORARY TABLE info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON

Re: [GENERAL] Stop execution without ERROR

2013-10-16 Thread Karsten Hilbert
On Wed, Oct 16, 2013 at 12:04:53PM +1100, James Sewell wrote: Let's say I'm running the following SQL script via psql -f BEGIN \set ON_ERROR_STOP SELECT myFunction(); CREATE TABLE x(id int); END; Is there anything I can do in myFunction which will: a) Stop execution of the script so

Re: [GENERAL] Timestamp with and without timezone conversion confusion.

2013-10-02 Thread Karsten Hilbert
On Wed, Oct 02, 2013 at 09:49:38PM +1300, Tim Uckun wrote: Maybe the question I need to ask is how can I store the time zone along with the timestamp You need an extra field, say, of type interval. Karsten -- GPG key ID E4071346 @ gpg-keyserver.de E167 67FD A291 2BEA 73BD 4537 78B9 A9F9

Re: [GENERAL] Timestamp with and without timezone conversion confusion.

2013-10-02 Thread Karsten Hilbert
On Wed, Oct 02, 2013 at 09:49:38PM +1300, Tim Uckun wrote: The reason for that is that in PostgreSQL there is no time zone information stored along with a timestamp with time zone, it is stored in UTC. A better name might perhaps been timezone aware timestamp. Karsten -- GPG key ID E4071346

Re: [GENERAL] Timestamp with and without timezone conversion confusion.

2013-10-02 Thread Karsten Hilbert
On Wed, Oct 02, 2013 at 09:18:30AM +, Albe Laurenz wrote: Maybe the question I need to ask is how can I store the time zone along with the timestamp Store an additional field offset. If you want to invest more energy and don't mind writing C, you could create your own data type.

Re: [GENERAL] Timestamp with and without timezone conversion confusion.

2013-10-02 Thread Karsten Hilbert
On Wed, Oct 02, 2013 at 11:48:02AM +, Albe Laurenz wrote: Or does that still need some C sprinkling (for operator support, say) ? Exactly. If you want to work right for this data type that's the road you have to go. I see. Whatever became of the 2011 intent to implement the above

Re: [GENERAL] Timestamp with and without timezone conversion confusion.

2013-10-02 Thread Karsten Hilbert
On Wed, Oct 02, 2013 at 02:09:23PM +, Albe Laurenz wrote: Karsten Hilbert wrote: Whatever became of the 2011 intent to implement the above that's linked to in the blog post ? You'd have to ask Alvaro. I figured he'd maybe read this on-list :-) Karsten -- GPG key ID E4071346 @ gpg

Re: [GENERAL] Timestamp with and without timezone conversion confusion.

2013-10-02 Thread Karsten Hilbert
On Wed, Oct 02, 2013 at 10:40:36AM -0700, Steve Crawford wrote: The reason for that is that in PostgreSQL there is no time zone information stored along with a timestamp with time zone, it is stored in UTC. A better name might perhaps been timezone aware timestamp. Karsten The trouble

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-10 Thread Karsten Hilbert
...I wonder how long it will be before we have mugs where you can actually tap the logo with a finger and get send to the website! A QR code is as close as it gets these days. Karsten Hilbert -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] question about age()

2013-08-29 Thread Karsten Hilbert
On Thu, Aug 29, 2013 at 09:11:07PM +0200, Andreas Kretschmer wrote: test=*# select * from birthday where age(birthday) != age (current_date-1, birthday); id | birthday +-- (0 rows) '3 years' != '2 years 11 mons 30 days', but i got 0 rows, why? What does select

Re: [GENERAL] pg 9.2.4 dblink

2013-07-09 Thread Karsten Hilbert
On Tue, Jul 09, 2013 at 03:55:47PM +0200, Peter Kroon wrote: I want to talk to multiple db's in one session. You'll have to define session to get meaningful answers. Karsten -- GPG key ID E4071346 @ gpg-keyserver.de E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- Sent via

Re: [GENERAL] Semi-Pseudo Data Types Procedure Arguments

2013-06-26 Thread Karsten Hilbert
On Wed, Jun 26, 2013 at 01:50:46AM -0400, Joshua Burns wrote: Example #1: -- A stored procedure which can accept two arguments, each of which could be text, character varying, character varying(any length) or character(any length). SELECT * FROM my_fn('val1'::text, 'val2'::character(4));

[GENERAL] regex help wanted

2013-04-25 Thread Karsten Hilbert
Hi, I am in the process of converting some TEXT data which I try to identify by regular expression. What I don't understand is: Why does the following return a substring ? select substring ('junk $allergy::test::99$ junk' from '\$[^]+?::[^:]+?\$'); I would have thought the '::[^:]+?'

Re: [GENERAL] regex help wanted

2013-04-25 Thread Karsten Hilbert
On Thu, Apr 25, 2013 at 10:32:26AM -0400, Tom Lane wrote: Karsten Hilbert karsten.hilb...@gmx.net writes: What I don't understand is: Why does the following return a substring ? select substring ('junk $allergy::test::99$ junk' from '\$[^]+?::[^:]+?\$'); There's a perfectly

Re: [GENERAL] regex help wanted

2013-04-25 Thread Karsten Hilbert
On Thu, Apr 25, 2013 at 03:40:51PM +0100, Thom Brown wrote: On 25 April 2013 15:32, Tom Lane t...@sss.pgh.pa.us wrote: Karsten Hilbert karsten.hilb...@gmx.net writes: What I don't understand is: Why does the following return a substring ? select substring ('junk $allergy::test

Re: [GENERAL] Need solution for weekly database snapshot

2013-04-22 Thread Karsten Hilbert
On Mon, Apr 22, 2013 at 11:58:58AM -0400, Moshe Jacobson wrote: We have a report in our system that is pulled many times each week, but needs to be based off data from Sunday at noon. So every Sunday at noon, we back up our main database and restore it into a new reporting snapshot database.

Re: [GENERAL] Need solution for weekly database snapshot

2013-04-22 Thread Karsten Hilbert
On Mon, Apr 22, 2013 at 03:16:19PM -0400, Moshe Jacobson wrote: Not bad, but the transaction logs would fill up the file system. I'm not sure I understand that comment. Why would the transaction logs be particularly voluminous in this case? I assumed the logs would be shipping to

Re: [GENERAL] PostgreSQL registry entries for apt-get/yum/rpm install

2013-04-15 Thread Karsten Hilbert
On Mon, Apr 15, 2013 at 01:21:55PM +0530, dinesh kumar wrote: Would like to request you to share your valuable inputs on this. I would like to know the PostgreSQL registry entries when we install it through apt-get/yum/rpm. I mean, when we install the EnterpriseDB PostgreSQL one click

Re: [GENERAL] How to store version number of database layout

2013-02-12 Thread Karsten Hilbert
It's more like a question of best practice: How do you managing different version of database layout for e.g. software releases? We are planing to do an application based on postgres and want to store some version number of database layout to ensure correct upgrade-scripts can be applied in

Re: [GENERAL] Database schema

2012-12-02 Thread Karsten Hilbert
I have created a database name 'ofbiz. then the default schema name public created automatically. I want to create schema name ofbiz in the database ofbiz  when I create database name ofbiz then the schema name ofbiz will create automatically. how it is possible if yes, Pre-create the

Re: [GENERAL] Four issues why old elephants lack performance: Explanation sought Four issues why old elephants lack performance: Explanation sought

2012-02-26 Thread Karsten Hilbert
On Sun, Feb 26, 2012 at 08:37:54AM -0600, Andy Colson wrote: 3. WAL logging PG writes a transaction twice. Once to WAL and once to the DB. WAL is a simple and quick write, and is only ever used if your computer crashes and PG has to re-play transactions to get the db into a good/known

Re: [GENERAL] Extraneous Files

2011-10-20 Thread Karsten Hilbert
On Thu, Oct 20, 2011 at 02:32:18PM -0400, Scott Mead wrote: On Thu, Oct 20, 2011 at 1:12 PM, Ian Harding harding@gmail.com wrote: If someone happened to accidentally end up with a lot of files that were NOT part of their database in the data/base/X directory, how could they go

Re: [GENERAL] PG 9.1 on Debian Squeeze

2011-10-08 Thread Karsten Hilbert
On Sat, Oct 08, 2011 at 12:19:22PM +0100, Raymond O'Donnell wrote: I'm not sure if this is the correct place for this, but here goes: I've just installed Postgres 9.1.1 from backports.debian.org on a fresh installation of Debian Squeeze, and when I run psql here's what I get: rod@simecom:~$

Re: [GENERAL] PG 9.1 on Debian Squeeze

2011-10-08 Thread Karsten Hilbert
On Sat, Oct 08, 2011 at 03:54:31PM +0100, Raymond O'Donnell wrote: Oh, wait, you said Squeeze - which doesn't have: Thanks everyone - I installed dpkg-dev, and it now produces a different message: rod@simecom:~$ psql -U postgres -h localhost DEB_HOST_MULTIARCH is not a supported variable

Re: [GENERAL] (another ;-)) PostgreSQL-derived project ...

2011-09-25 Thread Karsten Hilbert
On Sun, Sep 25, 2011 at 09:41:19PM +, Albretch Mueller wrote: I am amazed to read that you/the PC community were still running regression tests *in ASCII*: http://www.postgresql.org/docs/9.1/static/release-9-1.html (E.1.3.12. Source Code) * Run regression tests

Re: [GENERAL] md5 of table

2011-09-01 Thread Karsten Hilbert
On Thu, Sep 01, 2011 at 11:47:24AM +0300, Sim Zacks wrote: Is there a way to get an md5 or other hash of an entire table? I want to be able to easily compare 2 tables in different databases. I thought about using dblink and the EXCEPT query, but then I need to know the field list of each

Re: [GENERAL] Implementing thick/fat databases

2011-07-27 Thread Karsten Hilbert
I wonder which other languages have first class support for these areas of Pg? While already supporting most if not all standard PG datatypes the psycopg2 interface lets you write in/out wrappers of arbitray complexity mapping PG - Python datatypes and insert them into the driver at runtime.

Re: [GENERAL] Implementing thick/fat databases

2011-07-24 Thread Karsten Hilbert
Hello Chris, In LedgerSMB, we take this a step further by making the procedures into discoverable interfaces, how do you do that ? Karsten -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone -- Sent

Re: [GENERAL] Streaming replication on 9.1-beta2 after pg_restore is very slow

2011-07-07 Thread Karsten Hilbert
On Thu, Jul 07, 2011 at 11:14:05AM -0400, Tom Lane wrote: Looking back, I notice that you built with gcc 4.6.0. At least on Red Hat machines, that gcc has a rather nasty optimization bug that breaks WAL replay, with symptoms that seem to match what you have here --- namely, the replay

Re: [GENERAL] rationale behind quotes for camel case?

2011-06-28 Thread Karsten Hilbert
On Tue, Jun 28, 2011 at 11:09:52AM -0500, dennis jenkins wrote: Any suggestions on how to name tables when table names contain both multi-word nouns and mutli-table many-many mappings? Example: Suppose that I have a table called foo and another table called barBiz (or bar_biz if you

Re: [GENERAL] determine client os

2011-06-14 Thread Karsten Hilbert
On Tue, Jun 14, 2011 at 09:35:52AM +0300, Sim Zacks wrote: Sim Zackss...@compulab.co.il writes: All the suggestions given are for the server OS :-( My purpose is to be able to return a correct file path to the client without it specifying the OS. File path? Seems to me that even if you

Re: [GENERAL] Per-query local timezone

2011-06-14 Thread Karsten Hilbert
On Tue, Jun 14, 2011 at 09:40:20AM +, Mark Morgan Lloyd wrote: Is it possible to incorporate SET TIMEZONE into a query, so that to_char(...'TZ') etc. is appropriately localised? You seem to want AT TIME ZONE. Karsten -- GPG key ID E4071346 @ gpg-keyserver.de E167 67FD A291 2BEA 73BD

Re: [GENERAL] Need suggestion

2011-06-03 Thread Karsten Hilbert
On Fri, Jun 03, 2011 at 07:15:40AM +0200, to...@tuxteam.de wrote: but you wouldn't have large blobs of data clobbering your regular queries. You would want to write better queries than select * from my_table_with_bytea_column; anyway. You could pass the scans and pics piecemeal

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-04 Thread Karsten Hilbert
On Wed, May 04, 2011 at 09:33:57AM -0400, David Johnston wrote: “Hello - person born in Liverpool London, St. Whatever hospital, Room 101 @ 13:14:57AM on the 5th of March 2001 – how may I direct your call?” (I guess you could use the conception date as well That will rarely be known to any

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-03 Thread Karsten Hilbert
On Tue, May 03, 2011 at 10:52:23AM +0800, Craig Ringer wrote: ... and that's before we get into the horror of what is someone's name. Which name? Which spelling? Do they even have a single canonical name? - people have, at least over time, several compound names - they have, at any one time,

Re: [GENERAL] [ADMIN] Can we Flush the Postgres Shared Memory ?

2011-05-03 Thread Karsten Hilbert
On Tue, May 03, 2011 at 03:33:34PM +0100, Simon Riggs wrote: The contents of this email may not be copied or forwarded in part or in whole without the express written consent of the author. Pleased to meet you Mark. If you post here, the above disclaimer is not effective. Right now

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-01 Thread Karsten Hilbert
On Fri, Apr 29, 2011 at 10:14:07AM -0500, Merlin Moncure wrote: I took a quick look at the gnumed schema and found it to be generally very thorough and excellent. If you're going to use surrogate keys, that's they way to do it. Good to know since I'm only a lowly medical doctor not having

Re: [GENERAL] plpython module import errors

2011-04-28 Thread Karsten Hilbert
On Thu, Apr 28, 2011 at 09:15:06AM -0400, Martin Gainty wrote: mv python python5 (for python version 5 binary) mv python python6 (for python version 6 binary) Do you happen to mean 2.5 and 2.6 ? Given that, say, our Electronic Medical Record solution happily runs on Python 2.5, 2.6, and 2.7 I

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-04-28 Thread Karsten Hilbert
On Thu, Apr 28, 2011 at 03:39:19PM -0500, Merlin Moncure wrote: They are fairly pervasive, and increasingly so, which I find to be really unfortunate. Personally I think rote use of surrogate keys is terrible and leads to bad table designs, especially if you don't identify the true natural

Re: [GENERAL] problem with parent/child table and FKs

2011-04-27 Thread Karsten Hilbert
On Thu, Apr 21, 2011 at 07:15:38PM +0200, Alban Hertroys wrote: What is the suggested approach for this situation ? (there will be more tables like icd10 holding other coding systems of fairly diverse nature but all of them sharing .code and .term: LOINC, ATC, ICPC-2, ICD-9, ...). I

Re: [GENERAL] problem with parent/child table and FKs

2011-04-21 Thread Karsten Hilbert
Does anyone have any suggestions regarding the below ? Thanks, Karsten On Mon, Apr 18, 2011 at 03:53:16PM +0200, Karsten Hilbert wrote: Hello all, since (according to the docs) PostgreSQL does not propagate INSERTs from child tables unto parent tables the below does not work

Re: [GENERAL] problem with parent/child table and FKs

2011-04-21 Thread Karsten Hilbert
On Thu, Apr 21, 2011 at 01:36:51PM +0200, Karsten Hilbert wrote: Does anyone have any suggestions regarding the below ? If you guys happen to think this could be a please-do-my-class-assignment-for-me question -- I'd be glad to read up on things if someone clues me in on the relevant keywords

Re: [GENERAL] problem with parent/child table and FKs

2011-04-21 Thread Karsten Hilbert
On Thu, Apr 21, 2011 at 07:53:04AM -0700, Adrian Klaver wrote: On Thursday, April 21, 2011 4:36:51 am Karsten Hilbert wrote: Does anyone have any suggestions regarding the below ? The only thing I can come up with is to eliminate the FK : fk_code integer not null

Re: [GENERAL] problem with parent/child table and FKs

2011-04-21 Thread Karsten Hilbert
On Thu, Apr 21, 2011 at 07:15:38PM +0200, Alban Hertroys wrote: BTW, do you really need those artificial PK's? If not, you may well be better off dropping them. That way (code, term) could be your PK instead. I don't know enough about your data to make more than a guess though, I just get

[GENERAL] problem with parent/child table and FKs

2011-04-18 Thread Karsten Hilbert
Hello all, since (according to the docs) PostgreSQL does not propagate INSERTs from child tables unto parent tables the below does not work, unfortunately. What is the suggested approach for this situation ? (there will be more tables like icd10 holding other coding systems of fairly diverse

Re: [GENERAL] Auto Adjust Age

2011-04-06 Thread Karsten Hilbert
On Wed, Apr 06, 2011 at 11:15:31AM -0400, Jerry Sievers wrote: I'd suggest not storing age but instead wrapping with a view that calls date_trunc('year', now() - dob). Or put that in the query: SELECT ..., date_trunc('year', now() - dob) as age FROM users ; Karsten --

Re: [GENERAL] adding years to a date field

2011-04-06 Thread Karsten Hilbert
On Wed, Apr 06, 2011 at 09:18:15AM -0700, Christine Penner wrote: This still gave me a sytax error. The other suggestion to multiply the interval field by 1 year also gave me a syntax error. ... Any other suggestions? ... Christine Penner Ingenious Software Live up to to it ? Karsten

Re: [GENERAL] Database recovery.

2011-03-24 Thread Karsten Hilbert
On Thu, Mar 24, 2011 at 04:31:19PM +0500, Waqar Azeem wrote: The postgresql-8.4 - PostgreSQL Server 8.4 service could not be started. The service did not report an error. More help is available by typing NET HELPMSG 3534. The start command returned an error (2) Press return to

Re: [GENERAL] Database recovery.

2011-03-24 Thread Karsten Hilbert
On Thu, Mar 24, 2011 at 12:37:25PM +0100, Karsten Hilbert wrote: More help is available by typing NET HELPMSG 3534. ... any clue? And the second Google result has this: http://archives.postgresql.org/pgsql-bugs/2009-05/msg5.php Karsten -- GPG key ID E4071346 @ gpg

Re: [GENERAL] problematic view definition

2011-02-20 Thread Karsten Hilbert
For the record: On Wed, Feb 09, 2011 at 11:12:01PM +0100, Karsten Hilbert wrote: Attached find some table and view definitions from the GNUmed (www.gnumed.de) database. Unfortunately I do not understand why PostgreSQL says psql:xx.sql:14: ERROR: could not implement UNION

Re: [GENERAL] problematic view definition

2011-02-20 Thread Karsten Hilbert
On Sun, Feb 20, 2011 at 02:31:46PM -0500, Tom Lane wrote: Karsten Hilbert karsten.hilb...@gmx.net writes: On Wed, Feb 09, 2011 at 11:12:01PM +0100, Karsten Hilbert wrote: Unfortunately I do not understand why PostgreSQL says psql:xx.sql:14: ERROR: could not implement UNION DETAIL

[GENERAL] problematic view definition

2011-02-09 Thread Karsten Hilbert
Hi all ! Attached find some table and view definitions from the GNUmed (www.gnumed.de) database. Unfortunately I do not understand why PostgreSQL says psql:xx.sql:14: ERROR: could not implement UNION DETAIL: Some of the datatypes only support hashing, while others only

Re: [GENERAL] problematic view definition

2011-02-09 Thread Karsten Hilbert
I should have mentioned this is on PostgreSQL 8.4.5 on i486-pc-linux-gnu, compiled by GCC gcc-4.4.real (Debian 4.4.5-4) 4.4.5, 32-bit Karsten On Wed, Feb 09, 2011 at 11:12:01PM +0100, Karsten Hilbert wrote: Date: Wed, 9 Feb 2011 23:12:01 +0100 From: Karsten Hilbert karsten.hilb

Re: [GENERAL] Displaying text appears as hex data

2011-02-08 Thread Karsten Hilbert
On Tue, Feb 08, 2011 at 11:39:04AM +0100, Michael wrote: I'm trying to view text data stored by OpenSIPS 1.6.4 (the latest) as BLOB I take it you mean BYTEA. and PostgreSQL is displaying it in hex format like so: $ TERM=vt100 /pfx/bin/psql opensips opensips psql (9.0.2) Type help for

Re: [GENERAL] Displaying text appears as hex data

2011-02-08 Thread Karsten Hilbert
On Tue, Feb 08, 2011 at 02:19:49PM +0100, Michael wrote: The arrow in the last line indicates that 'convert_from' is not correctly parsed. My understanding was that your msg column was of type bytea. Is this not the case? Or is it a different column which needs converting? The main

Re: [GENERAL] Are there any projects interested in object functionality? (+ rule bases)

2011-01-21 Thread Karsten Hilbert
2. Inheritance This feature is now used almost exclusively for physical partitioning rather than logical design. GNUmed uses it for logical design (albeit not OO) a lot. Karsten -- NEU: FreePhone - kostenlos mobil telefonieren und surfen! Jetzt informieren:

Re: [GENERAL] Case Sensitivity

2011-01-13 Thread Karsten Hilbert
you should to use a citext datatype http://www.postgresql.org/docs/9.0/interactive/citext.html Or: - use a functional index with lower() to ensure uniqueness - use a BEFORE trigger to lower() the inserted data Karsten -- GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit gratis

Re: [GENERAL] Survey on backing up unlogged tables: help us with PostgreSQL development!

2010-11-18 Thread Karsten Hilbert
On Thu, Nov 18, 2010 at 08:49:12AM +0100, Alban Hertroys wrote: From the discussion so far it appears to me that unlogged should probably be split into various gradations of unlogged. There appear to be a number of popular use-cases for such tables, with different requirements, That's

Re: [GENERAL] Survey on backing up unlogged tables: help us with PostgreSQL development!

2010-11-18 Thread Karsten Hilbert
On Thu, Nov 18, 2010 at 10:30:46AM +0100, Karsten Hilbert wrote: That is why I argued for options: - alter database dump_unlogged_tables to on/off default on: better safe than sorry, point the gun but don't pull the trigger (I agree, however, that the database metadata isn't

Re: [GENERAL] Survey on backing up unlogged tables: help us with PostgreSQL development!

2010-11-17 Thread Karsten Hilbert
On Tue, Nov 16, 2010 at 10:25:13PM -0500, Tom Lane wrote: 4. The last bit of discussion on -hackers concerned what to do in the case where the server got shut down cleanly. If it was shut down cleanly, then any data for unlogged tables would have been written out from shared buffers ... but

Re: [GENERAL] Survey on backing up unlogged tables: help us with PostgreSQL development!

2010-11-16 Thread Karsten Hilbert
PostgreSQL 9.1 is likely to have, as a feature, the ability to create tables which are unlogged, meaning that they are not added to the transaction log, and will be truncated (emptied) on database restart. Such tables are intended for highly volatile, but not very valuable, data, such as

Re: [GENERAL] Linux

2010-11-04 Thread Karsten Hilbert
On Thu, Nov 04, 2010 at 11:10:24AM -0400, Bill Moran wrote: Beyond that, I think that any Linux distro that caters to a server environment will work well for you. The thing (in my experience) that's going to make you happy or angry is how well the packaging system works. Find a distro whos

Re: [GENERAL] Internationalisation of database content (text columns)

2010-10-17 Thread Karsten Hilbert
On Fri, Oct 08, 2010 at 12:12:54PM +0200, Wolfgang Keller wrote: I'm working on a database schema which contains lots of type code lookup tables. The entries of these tables are also hierarchically related among themselves (subtype/supertype), to store rather large and quite complex

Re: [GENERAL] Preserving order through an inner join

2010-09-26 Thread Karsten Hilbert
On Sun, Sep 26, 2010 at 07:32:01PM +, Kevin Jardine wrote: Hi Pavel, I'm not really interested in a my database is better than your database discussion. Pavel did not say that his database is better than yours. What he said was that your query is wrong (with respect to what you said

Re: [GENERAL] where does postgres keep the query result until it is returned?

2010-09-20 Thread Karsten Hilbert
On Mon, Sep 20, 2010 at 03:37:58PM +0200, Willy-Bas Loos wrote: Rows are sent back in the entireity, so the PG instance would need enough memory to work with that row.  When you're running a 32bit version of PG, values whose size is beyond ~100MB are a bit touch and go whether it will

Re: [GENERAL] Getting FATAL: terminating connection due to administrator command

2010-09-15 Thread Karsten Hilbert
On Wed, Sep 15, 2010 at 02:55:39PM +0200, Peter Hopfgartner wrote: Where could I start to troubleshoot this problem. First with staff, then with unauthorized access, then with failover software. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407

Re: [GENERAL] Inheritance and trigger/FK propagation

2010-07-29 Thread Karsten Hilbert
On Thu, Jul 29, 2010 at 10:50:02AM +0200, Davor J. wrote: For completeness, I think this link (http://projects.nocternity.net/index.py/en/psql-inheritance) provides some scripts you mention. Very interesting. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537

Re: [GENERAL] Inheritance and trigger/FK propagation

2010-07-28 Thread Karsten Hilbert
On Tue, Jul 27, 2010 at 10:36:16AM +0200, Davor J. wrote: For me Vick's question just proves that inheritance in relational databases is a complex issue. It shows that trigger propagation is not always desired, Now that's for sure :-) Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167

Re: [GENERAL] Inheritance and trigger/FK propagation

2010-07-28 Thread Karsten Hilbert
On Tue, Jul 27, 2010 at 10:33:19AM +0200, Davor J. wrote: Well... I found it out the hard way :). There are some extra caveats I have come along. There is the very clumsy ALTER TABLE table_name INHERIT(parent_table) which simply presupposes the parent's columns, but doesn't enforce it

Re: [GENERAL] Inheritance and trigger/FK propagation

2010-07-19 Thread Karsten Hilbert
On Thu, Jul 15, 2010 at 4:05 AM, Davor J. dav...@live.com wrote: It seems no secret that a child table will not fire a trigger defined on it's parent table. Various posts comment on this. But nowhere could I find a reason for this. Do you want your trigger that redirects insert on

Re: [GENERAL] copy/duplicate database schemas

2010-06-24 Thread Karsten Hilbert
On Thu, Jun 24, 2010 at 11:29:48AM +0800, Craig Ringer wrote: You might want to investigate internationalization options instead, where you can process your master sources to produce a list of strings, and have translators translate those strings. Your code loads the string lists, and

Re: [GENERAL] copy/duplicate database schemas

2010-06-24 Thread Karsten Hilbert
This adds significant complexity to your code, especially since (AFAIK) there aren't really any good i18n tools for Pg's SQL, PL/PgSQL, etc. But there is - whether good or not: Go to http://gitorious.org/gnumed and browse the tree under gnumed/server/SQL/. Look at the i18n schema which

Re: [GENERAL] [offtopic] How do you name a table...

2010-04-08 Thread Karsten Hilbert
On Thu, Apr 08, 2010 at 10:16:57PM +0900, Ian Barwick wrote: How do you name a table which sole purpose is to store a list of values? (...) Is this: a. Lookup table b. Classifier c. Cypher(er)? lookup (*_lu, lu_*) or enum or just what it is (gender, document_type, ...) Karsten --

Re: [GENERAL] PostgreSQL licence

2010-02-02 Thread Karsten Hilbert
On Tue, Feb 02, 2010 at 02:30:47PM +, Thom Brown wrote: I guess it's not a major point considering BSD and MIT are so similar, but people may become confused when Wikipedia says one thing, and the official site says another. Then it seems prudent to add clarification (as to the ambiguity)

Re: [GENERAL] Research and EAV models

2009-10-23 Thread Karsten Hilbert
On Fri, Oct 23, 2009 at 11:53:26PM +0200, Leif B. Kristensen wrote: I'm a researcher type, and I've made an EAV model that suits me well in my genealogy research. How can you associate an essentially unknown number of sundry events to a person without an EAV model? create table person (

Re: [GENERAL] multiple paramters in aggregate function

2009-08-20 Thread Karsten Hilbert
On Thu, Aug 20, 2009 at 10:36:37AM +0300, Sim Zacks wrote: In other words, I have a conversion table of all different units. If there is no conversion between 2 units (such as volume and area) then the sum returns null. Shouldn't that return NULL IOW unknown ? Karsten -- GPG key ID E4071346

Re: [GENERAL] multiple paramters in aggregate function

2009-08-20 Thread Karsten Hilbert
On Thu, Aug 20, 2009 at 03:30:00PM +0300, Sim Zacks wrote: In other words, I have a conversion table of all different units. If there is no conversion between 2 units (such as volume and area) then the sum returns null. Shouldn't that return NULL IOW unknown ?

Re: [GENERAL] Re: Unit conversion database (was: multiple paramters in aggregate function)

2009-08-20 Thread Karsten Hilbert
On Thu, Aug 20, 2009 at 12:06:19PM +, Jasen Betts wrote: what is vv Vice versa, I'd assume. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Unit conversion database (was: multiple paramters in aggregate function)

2009-08-20 Thread Karsten Hilbert
On Wed, Aug 19, 2009 at 08:31:17PM +0200, Alban Hertroys wrote: He he, all right then! There certainly are some things left to improve. One thing I noticed from the links you sent is that I ignored a few units used in medicine assuming they were deprecated ages ago - apparently not... Ah,

Re: [GENERAL] Unit conversion database (was: multiple paramters in aggregate function)

2009-08-19 Thread Karsten Hilbert
Alban, I think having an installable schema for units of measure with definitions and functions would be a great addition to PostgreSQL. I for one know we would use it in GNUmed (wiki.gnumed.de). A few points: Would these guys be of use as a source for reference data ?

Re: [GENERAL] Does derby have an embedded Mode like Derby ?

2009-08-04 Thread Karsten Hilbert
On Tue, Aug 04, 2009 at 04:04:42PM +0100, Paul Taylor wrote: You don't really need to run an installer and/or create registry entries (for windows). This would then resemble more the Derby network server setup. Yeah, but this is messy and low because you have to wait the database to be fully

Re: [GENERAL] timestamp with time zone tutorial

2009-07-20 Thread Karsten Hilbert
I just have to read more on how to get it out relative to a different time zone than it went in. I'll find it. Sounds like a job for SELECT ... AT TIME ZONE ...; Karsten -- Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate für nur 19,99 Euro/mtl.!*

Re: [GENERAL] High I/O writes activity on disks causing images on browser to lag and not load

2009-06-04 Thread Karsten Hilbert
On Thu, Jun 04, 2009 at 01:48:28PM +0300, Jennifer Trey wrote: and its possible that the two drives are misconfigured. I have checked into that a little and can't rule it out completely. See, this is what others have talked about. You don't give details on what you checked, what you found,

Re: [GENERAL] Need help

2009-05-18 Thread Karsten Hilbert
On Mon, May 18, 2009 at 11:33:03PM +0430, Zico wrote: we still don't understand exactly what you have to work from Do you have a backup of the Postgres data directory, No, I don`t have any data of Postgres data directory. Well, in that case I would suggest to IMMEDIATELY STOP WRITING

Re: [GENERAL] Help request to improve function performance

2009-04-23 Thread Karsten Hilbert
On Wed, Apr 22, 2009 at 06:21:41PM -0600, Scott Marlowe wrote: CREATE TABLE app.archetype_data (   id BIGINT NOT NULL,   context_id VARCHAR(1000),   archetype_name VARCHAR(1000),   archetype_path VARCHAR(1000),   name VARCHAR(1000),   value_string VARCHAR(1000),   value_int

Re: [GENERAL] Help request to improve function performance

2009-04-23 Thread Karsten Hilbert
On Thu, Apr 23, 2009 at 09:44:53AM +0100, Seref Arikan wrote: I have worked with very capable DBAs before, and even though it has been quite some time since I've done real DB work, I would like to invest in postgresql as much as I can Seref, if you can muster the man power to build archetypes

Re: [GENERAL] varchar vs. text + constraint/triggers was: Help request to improve function performance

2009-04-23 Thread Karsten Hilbert
On Thu, Apr 23, 2009 at 11:33:34AM +0200, Ivan Sergio Borgonovo wrote: Karsten Hilbert karsten.hilb...@gmx.net wrote: On Thu, Apr 23, 2009 at 12:02:13AM +0100, Seref Arikan wrote: I have a set of dynamically composed objects represented in Java, with string values for various

Re: [GENERAL] Help request to improve function performance

2009-04-23 Thread Karsten Hilbert
On Thu, Apr 23, 2009 at 12:02:13AM +0100, Seref Arikan wrote: I have a set of dynamically composed objects represented in Java, with string values for various attributes, which have variable length. In case you have suggestions for a better type for this case, it would be my pleasure to hear

Re: [GENERAL] varchar vs. text + constraint/triggers was: Help request to improve function performance

2009-04-23 Thread Karsten Hilbert
On Thu, Apr 23, 2009 at 01:21:05PM +0200, Ivan Sergio Borgonovo wrote: I'll try to rephrase to check if I understood and for reference. varchar is slower than text since it has to do some data type check. Yes but no. It is said to be slower because it has to do a data length check, not a

<    1   2   3   4   5   6   7   >