[GENERAL] ODBC and bytea

2012-01-20 Thread Andreas Lubensky
Hi, currently we are trying to integrate Postgres with ODBC and have problems with blobs. We tried to use bytea and were under the impression that bytea would act like a blob in other databases when used through ODBC. So far we could not make it work properly. It seems we still have to do the en

Re: [GENERAL] [RFE] auto ORDER BY for SELECT

2012-01-23 Thread Andreas Kretschmer
ql/83v82_scans.html Your suggestion can't work in this way. That's only one problem, there are more. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was

Re: [GENERAL] I cant create excluding constaint

2012-01-24 Thread Andreas Kretschmer
's cool, isn't it? Sorry, but you have to wait for 9.2, or you should use the temporal-patch from Jeff Davis. http://thoughts.j-davis.com/2010/03/09/temporal-postgresql-roadmap/ Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side eff

Re: [GENERAL] How do clients failover in hot standby/SR?

2012-02-01 Thread Andreas Kretschmer
nection-pooler. pgpool can detect a failed node, can create the trigger-file and connects clients now to the other server. > > Is there a good Internet resource for reading on this? google -> pgpool, for instance. There are other solutions, heartbeat for instance (with flying service

Re: [GENERAL] Understanding EXPLAIN

2012-02-03 Thread Andreas Kretschmer
g 0.27 from? > > If I modify the example to insert 10,000 rows, the cost stays the same. > Only if I go for 100,000 rows will the computed cost increase to 8.29. > > Can anybody enlighten me, please ;-). There are some other costs, in your case cpu_tuple_cost and cpu_index_tuple_cost

Re: [GENERAL] last entry per person

2012-02-03 Thread Andreas Kretschmer
user" ? Btw.: user is a reserved word, don't use it as column-name. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with

Re: [GENERAL] Backup database remotely

2012-02-06 Thread Andreas Kretschmer
#x27;t know waht you mean with 'add a connection to a server'. You should use something like: pg_dump -h (or pg_dumpall) Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "

Re: [GENERAL] Postgres Table level statement logging

2012-02-07 Thread Andreas Kretschmer
rchives/100-Log-Table-Changes-in-PostgreSQL-with-tablelog.html Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly."

Re: [GENERAL] easy function or trigger to UPPER() all alpha data

2012-02-08 Thread Andreas Kretschmer
name each column (maybe not within triggers written in pl/perl, i'm not sure ...) Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile p

Re: [GENERAL] easy function or trigger to UPPER() all alpha data

2012-02-08 Thread Andreas Kretschmer
3rd, i understand your problem, but afaik, you have to name all fields and you can't interate to NEW and you can't grag the column-names. As i said, maybe with pl/perl, i'm not sure. (and 4th, don't use images in your mail, in particular within mailinglists) Regards,

[GENERAL] ERROR: operator does not exist: integer = character varying

2012-02-11 Thread Andreas Berglund
't figure out what's wrong. regards Andreas -- 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] Backup database remotely

2012-02-15 Thread Andreas Kretschmer
Andre Lopes wrote: > Hi all, > > To do this backup remotely we need to open the 5434 port in the Firewall? If the database running on this port and if there are a firewall, so yes. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintention

[GENERAL] query problems

2012-02-15 Thread Andreas Berglund
he problem then I'm open to suggestions. regards Andreas Berglund -- 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] Drop big index

2012-02-16 Thread Andreas Kretschmer
d includes the last N days), and sometimes we have trouble with this. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable

Re: [GENERAL] Dynamic update of a date field

2012-02-16 Thread Andreas Kretschmer
x27; or an insert-trigger > smallint,month smallint,day smallint,time_stamp date); I would like to That's silly, use one (and only one) field, timestamp (or timestamptz) Don't use never ever multiple columns for the same information! Andreas -- Really, I'm not out to destro

[GENERAL] Determine dead files

2012-03-05 Thread Andreas Brandl
r per cluster? Is there any explanation why this situation lead to dead files? Thank you! Regards, Andreas -- 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] Temporal foreign keys

2012-03-16 Thread Andreas Kretschmer
violates foreign key constraint "y_d_fkey" DETAIL: Key (d)=([2012-01-01,2012-01-20)) is not present in table "x". Jeff: thx for YOUR work! Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect.

Re: [GENERAL] Value to long for type ....: Columnname missing

2012-04-16 Thread Andreas Kretschmer
gt; 9.1.3 > > postgres=# create table "foo" ("bar" varchar(1)); > CREATE TABLE > postgres=# insert into foo values ('asdf'); > ERROR: value too long for type character varying(1) > postgres=# select version(); Yeah

Re: [GENERAL] Starnge things with big datas...

2012-04-21 Thread Andreas Kretschmer
octet_length(TTT_DATAFIX), | pg_column_size(TTT_DATAVARBIG), | char_length(TTT_DATAVARBIG), | octet_length(TTT_DATAFIX) | FROM T_TEST_TAILLE;" > out.txt | kretschmer@tux:~$ ls -l out.txt | -rw-r--r-- 1 kretschmer kretschmer 37134 2012-04-21 16:32 out.txt

Re: [GENERAL] how robust are custom dumps?

2012-04-24 Thread Andreas Kretschmer
is your advice on custom dumps? Can i bet my life on > them? I think so, yes. Early versions contains some errors with the correct order of objects (dumping a view before the table -> error whilst restore ...) Andreas -- Really, I'm not out to destroy Micr

Re: [GENERAL] How to insert random character data into tables for testing purpose. THanks.

2012-05-02 Thread Andreas Kretschmer
- 1 | ef82dcb3e8465fa9a7494c569dfa093f 2 | ad6ae62bb4a49c7889aba0bfcba224ff 3 | 27717d30d8cf069b3129853d90ae5035 4 | 530c200678711a414e000c60e73286bd 5 | 2b2c3692da1b60760ff95d41cdf9b82d (5 rows) Andreas -- Really, I'm not out to destroy Microsoft. That wi

Re: [GENERAL] Isolating a record column from a PL-Pgsql function call ?

2008-12-16 Thread Andreas Kretschmer
unction? Please, show us your real function, maybe someone can help you more. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enab

Re: [GENERAL] Isolating a record column from a PL-Pgsql function call ?

2008-12-16 Thread Andreas Kretschmer
ime: 0.412 ms test=*# select 5 where 3=(select b from x(2)); ?column? -- (0 rows) Time: 0.335 ms test=*# select 5 where 2=(select b from x(2)); ?column? -- 5 (1 row) Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side

[GENERAL] MD5 password issue

2009-01-15 Thread Andreas Wenk
result in pg_authid (if this makes sense or not is another question ;-) ). Now the question: why is the user pgadmin able to connect to the database using pgAdmin III from 192.168.97.30? That sould not be possible ... or am I wrong? Thanks for any advice Cheers Andy - -- St.Pauli - Hambur

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Andreas Wenk
Hi Joshua Joshua D. Drake schrieb: On Thu, 2009-01-15 at 18:05 +0100, Andreas Wenk wrote: postgres=# SELECT rolname,rolpassword from pg_authid; rolname | rolpassword - ---+- postgres | pgadmin | plaintext odie

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Andreas Wenk
Alvaro Herrera schrieb: Andreas Wenk wrote: Yes thats correct with the IP address range. Maybe I did not understand the auth concept yet. I thought, that with METHOD set to md5, a md5 hashed password is required. The password is submitted with the PHP 5 pg_connect function - as plain

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Andreas Wenk
Hi Tom, Tom Lane schrieb: Andreas Wenk writes: In pg_hba.conf we have: # TYPE DATABASEUSERCIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all ident sameuser # IPv4 local connect

Re: [GENERAL] pg_restore: [archiver] entry ID -825110830 out of range -- perhaps a corrupt TOC

2009-01-20 Thread Andreas Wenk
res version you want to restore to? I am not sure, but maybe there are occuring some problems ... $ less test.toc | grep "^;" [...] ; Dumped from database version: 8.3.5 ; Dumped by pg_dump version: 8.3.5 [...] Cheers Andy - -- St.Pauli - Hamburg - Germany Andreas Wenk Den

[GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread Andreas Wenk
garfield > sys_language.tar Thanks for any advice Andy - -- Andreas Wenk St.Pauli - Hamburg - Germany -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJdaQsVa7znmSP9AwRAlE0AKCVTqsD9X8nMtGHcTsfzHVElK5ePQCeMC3c

Re: [GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread Andreas Wenk
asap ;-) - -- St.Pauli - Hamburg - Germany Andreas Wenk hubert depesz lubaczewski schrieb: > On Tue, Jan 20, 2009 at 11:15:08AM +0100, Andreas Wenk wrote: >> Where can I prevent bulding the language again? My idea was to do that while >> creating the >> dump or while impor

Re: [GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread Andreas Wenk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adrian Klaver schrieb: > On Tuesday 20 January 2009 2:15:08 am Andreas Wenk wrote: >> Hi everybody, >> >> I have an automated mechanism to restore a demo database each night with an >> SQL dump. What I do inbetween a sh

Re: [GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread Andreas Wenk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adrian Klaver schrieb: > On Tuesday 20 January 2009 7:05:23 am Andreas Wenk wrote: > >> Adrian, >> >> no lack of coffee but my fault. You are totally right - that was a copy and >> paste error. For sure the dump is *.sq

Re: [GENERAL] pg_restore: [archiver] entry ID -825110830 out of range -- perhaps a corrupt TOC

2009-01-21 Thread Andreas Wenk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dennis C schrieb: > OK that was it! Wow, thank you so very much! Nice to know it was just > plpython tracking such an obsolete version of postgresql much to my > dismay now (especially even going backwards, which didn't even occur to > me), as oppose

Re: [GENERAL] autovacuum daemon

2009-01-21 Thread Andreas Wenk
'autovacuum'; Cheers Andy - -- Andreas Wenk St.Pauli - Hamburg - Germany > Regards, > Avdul Rehman. > > -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJdzk6Va7znmSP9AwRAk2nAJ

Re: [GENERAL] Text search with ispell

2009-01-27 Thread Andreas Wenk
8.3. The behaviour for implementing in earlier versions is therefore different ... Cheers Andy - -- St.Pauli - Hamburg - Germany Andreas Wenk -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJfum6Va7znm

[GENERAL] ALTER TABLE with TYPE serial does not work

2009-01-31 Thread Andreas Wenk
CE: ALTER TABLE will create implicit sequence "tab1_nr_seq" for serial column "tab1.nr" ALTER TABLE Sitting in front of a MAC OS X Leo with pg 8.2 Thanks a lot! Cheers Andy -- St.Pauli - Hamburg - Germany Andreas Wenk -- Sent via pgsql-general mailing list (pgsql-g

Re: [GENERAL] ALTER TABLE with TYPE serial does not work

2009-02-01 Thread Andreas Wenk
Jasen Betts schrieb: On 2009-01-31, Andreas Wenk wrote: Hi List, I have a short question to psql. Why does this not work: postgres=# ALTER TABLE tab1 ALTER COLUMN nr TYPE serial; ERROR: type "serial" does not exist but this: postgres=# ALTER TABLE tab1 DROP COLUMN nr; A

Re: [GENERAL] ALTER TABLE with TYPE serial does not work

2009-02-01 Thread Andreas Wenk
Richard Broersma schrieb: On Sat, Jan 31, 2009 at 3:16 PM, Andreas Wenk wrote: Why does this not work: postgres=# ALTER TABLE tab1 ALTER COLUMN nr TYPE serial; ERROR: type "serial" does not exist serial is really just "short-hand" for making an integer column use

Re: [GENERAL] ALTER TABLE with TYPE serial does not work

2009-02-01 Thread Andreas Wenk
Scott Marlowe schrieb: On Sat, Jan 31, 2009 at 9:04 PM, Richard Broersma wrote: On Sat, Jan 31, 2009 at 3:16 PM, Andreas Wenk wrote: Why does this not work: postgres=# ALTER TABLE tab1 ALTER COLUMN nr TYPE serial; ERROR: type "serial" does not exist serial is really just &

Re: [GENERAL] Vacuums taking forever :(

2009-02-03 Thread Andreas Wenk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Phoenix Kiula schrieb: > In my conf_pg, the autovacuum is on, so the DB should be (or I hope is > being) regularly vacuumed. > > These are my settings: > > > work_mem = 20MB > temp_buffers = 4096 > authentication_

Re: [GENERAL] Vacuums taking forever :(

2009-02-03 Thread Andreas Wenk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Phoenix Kiula schrieb: > On Tue, Feb 3, 2009 at 9:09 PM, Andreas Wenk > wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Phoenix Kiula schrieb: >>> In my conf_pg, the autovacuum is on, so t

Re: [GENERAL] Track a function

2009-02-14 Thread Andreas Kretschmer
;m here %', variable; to display where the function is and also the content of variables. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile

Re: Fwd: [GENERAL] Connection refused (0x0000274D/10061)

2009-02-23 Thread Andreas Kretschmer
Same goes if I use in command prompt > net start pgsql-8.3 > Any solution.. See the server-log for details. And please no top-posting, thx. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Li

Re: [GENERAL] Product Roadmap question and request for recommendation

2009-02-23 Thread Andreas Kretschmer
t;The next release of PostgreSQL is planned to be the 8.4 release. A > > tentative schedule for this version has a release in the first quarter of > > 2009." > > That's out of date --- there is absolutely zero chance of 8.4 being > released in March. This summer, pe

[GENERAL] cursor question

2009-02-25 Thread Andreas Wenk
, how do I set a parameter when using cursor? Thanks in advance - -- St.Pauli - Hamburg - Germany Andreas Wenk -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJpWlyVa7znmSP9AwRAv2MAJ9jHICtLeIEv

Re: [GENERAL] cursor question

2009-02-25 Thread Andreas Wenk
' || $2; RETURN $1; END; $$ LANGUAGE plpgsql; Cheers Andy > 2009/2/25 Andreas Wenk : > Hi, > > short question. Why is this not possible: > > CREATE OR REPLACE FUNCTION user_cursor_open(text) RETURNS refcursor AS $$ > DECLARE >curs1 CURSOR FOR SE

Re: [GENERAL] Returning null for joined tables when one column non existant

2009-02-26 Thread Andreas Kretschmer
c.id); foo | bar | batz -+-+-- foo | bar | batz foo | | (2 Zeilen) Zeit: 0,595 ms test=*# insert into c values (2,'bla'); INSERT 0 1 Zeit: 0,410 ms test=*# select a.foo, b.bar, c.batz from a left join b on (a.id=b.id) left join c on (a.id=c.id); foo | bar | batz -+

[GENERAL] Why not working under 8.3

2009-03-04 Thread Andreas Moeller
Following lines produce an error message under 8.3. - but not under 8.1. Why? CREATE OR REPLACE FUNCTION dodi() RETURNS boolean AS $$ BEGIN SELECT 'abc' INTO TEMPORARY foonana; RETURN FALSE; END; $$ LANGUAGE 'plpgsql'; FEHLER: syntax error at "TEMPORARY" DETAIL: Expected record

Re: [GENERAL] Enable user access from remote host

2009-03-08 Thread Andreas Wenk
ident sameuser I inserted the "" to allow to everyone to access to the db. But if I try to access, from another host, I receive an error. What is the error in that line? just leave it blank ... no "" signs ... Cheers Andy -- Andreas Wenk Hamburg - Germany Thanks, bye by

Re: [GENERAL] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Andreas Wenk
test CONTEXT: I think the user does not have the rights for the schema ... Cheers Andy -- St.Pauli - Hamburg - Germany Andreas Wenk -- 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] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Andreas Wenk
Ivan Sergio Borgonovo schrieb: On Tue, 10 Mar 2009 14:31:56 +0100 Andreas Wenk wrote: which rights does the actual user have for the schema user_test? > Query failed: ERROR: permission denied for schema user_test > CONTEXT: I think the user does not have the rights for the schema .

Re: [GENERAL] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Andreas Wenk
Tom Lane schrieb: Ivan Sergio Borgonovo writes: I get a Query failed: ERROR: permission denied for schema user_test CONTEXT: SQL statement "UPDATE ONLY "user_test"."shop_commerce_baskets" SET "sid" = NULL WHERE $1::pg_catalog.text OPERATOR(pg_catalog.=) "sid"::pg_catalog.text This query is

Re: [GENERAL] Include script within a script

2009-03-10 Thread Andreas Kretschmer
Bill Todd wrote: > Is there any mechanism to include (call) one SQL script file from another? You can use \i Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was

Re: [GENERAL] Postgresql

2009-03-12 Thread Andreas Kretschmer
Depends. > tell me something because i really need this You can change (edit) your pg_hba.conf, setting the auth-method to trust. But this is only a guess, because i don't know what you have tried exactly and i don't know the error-message you got, never even your operating system...

Re: Fwd: [GENERAL] Question about Privileges

2009-03-13 Thread Andreas Wenk
eady mentioned, you should use group roles and then grant the privileges for the schema to the group role if you have more different users ... Cheers Andy -- St.Pauli - Hamburg - Germany Andreas Wenk Jack -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To m

Re: [GENERAL] sql transaction

2009-03-18 Thread Andreas Kretschmer
Jasid ZA wrote: > Hi, > > Can we use sql transactions(BEGIN, ROllBACK, COMMIT etc) in a postgresql > function(user defined) which is written in PL/Perl? No. A function is an autonomous transaction. You can use savepoints. Andreas -- Really, I'm not out to destroy Microsof

Re: [GENERAL] sql transaction

2009-03-18 Thread Andreas Kretschmer
Alvaro Herrera wrote: > Andreas Kretschmer wrote: > > Jasid ZA wrote: > > > > > Hi, > > > > > > Can we use sql transactions(BEGIN, ROllBACK, COMMIT etc) in a postgresql > > > function(user defined) which is written in PL/Perl? > > >

Re: [GENERAL] Converting Rows to Columns

2009-05-05 Thread Andreas Kretschmer
coalesce((array_accum(name))[3],'---') as name3 from joshua group by id order by id) foo; id | name1 | name2 | name3 +---+---+--- 1 | user1 | user2 | user3 2 | user4 | user5 | --- 3 | user6 | --- | --- (3 rows) Andreas -- Really, I'm not out to destroy Mic

Re: [GENERAL] Converting Rows to Columns

2009-05-05 Thread Andreas Kretschmer
CREATE AGGREGATE array_accum (anyelement) test-# ( test(# sfunc = array_append, test(# stype = anyarray, test(# initcond = '{}' test(# ); CREATE AGGREGATE Time: 0.503 ms test=*# select id, array_accum(name) from joshua group by id order by id; id | array_accum +---

[GENERAL] Different execution time from psql and JDBC

2005-02-22 Thread Andreas Hartmann
advance! -- Andreas ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Different execution time from psql and JDBC

2005-02-23 Thread Andreas Hartmann
Richard Huxton wrote: Andreas Hartmann wrote: Dear postgresql community, I have a quite complex statement. When I execute it directly via psql, the execution time is approx. 2000 ms. When I execute it via JDBC (Apache Cocoon), the execution time is either 600..1000 ms or approx. 10.000 ms, based

[GENERAL] Massive performance differences

2005-03-15 Thread Andreas Hartmann
tgreSQL versions? Is there a typical cause for such performance problems? How can I find out what's wrong with installation (B)? Thanks in advance! -- Andreas ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregi

Re: [GENERAL] Massive performance differences

2005-03-15 Thread Andreas Hartmann
Andreas Hartmann wrote: Hi all, I'm running the same database on two systems: A) Debian PostgreSQL 7.4.7 B) SuSE PostgreSQL 7.3.4 Both machines have approx. 1GHz and 1GB RAM. The amount of data is almost equal (+- 10%). But I'm facing huge performance differences. For instance

Re: [GENERAL] Accessing environment variables from psql (SOLVED)

2005-04-09 Thread Andreas Seltenreich
\i test.sql > leif=> \cd :olddir You can concatenate values using \set. So using \set importfile :importdir /test.sql \i :importfile you won't have to mess with $PWD. regards, Andreas ---(end of broadcast)--- TIP 2: you can g

Re: [GENERAL] Encoding problem

2005-04-20 Thread Andreas Seltenreich
and tries to do something smart with it. You can display the current setup by running "locale". Does it work when you export LC_CTYPE=de_DE before running psql? regards, Andreas ---(end of broadcast)--- TIP 5: Have you checked our extensive FA

Re: [GENERAL] Limits of SQL

2005-06-05 Thread Andreas Seltenreich
This is the other thing I am missing. But OK, WITH Isn't this already possible by representing the relation through its canonical mapping (i.e. f(a)=f(b) <=> a relates to b)? You could then use GROUP BY f(x) to group data into its equivalence classes. regards, Andreas

Re: [GENERAL] Case insensitive unique constraint

2005-07-14 Thread Andreas Seltenreich
way to go about this? Would creating an unique index on an expression be easy enough? E.g. create unique index idx_foo_unique_nocase on foo ((lower(bar))); > Am I about to write my first server side function for postgresql? I'm afraid not :-) regards, Andreas --

Re: [GENERAL] Sorting by related tables

2005-08-13 Thread Andreas Seltenreich
n call the UPDATE to move the > item up. I guess you want a boolean value here? SELECT EXISTS around your above query as a subselect should do the trick. You also want to use LIMIT 1 in the statement, to avoid fetching unnecessary records. > Again, a very basic question: What method should be used to be sure > that nothing changes between the SELECT and the UPDATE? You can achieve that using transactions. Concurrency control is explained here: <http://www.postgresql.org/docs/8.0/static/mvcc.html>. regards Andreas -- ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [despammed] Re: [GENERAL] ~/pgpass

2005-08-15 Thread Andreas Kretschmer
a is ~/.pgpass and on > Windows it is in %APPDATA%/postgresql as pgpass.conf. > > It did not work in Windows and Fedora. On Fedora: wrong file permissions? Btw.: ~/.pgpass is only supported in 7.3 and later. Andreas -- Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-

Re: [GENERAL] Sorting by related tables

2005-08-15 Thread Andreas Seltenreich
Bill Moseley schrob: > On Sat, Aug 13, 2005 at 06:44:09PM +0200, Andreas Seltenreich wrote: >> > 3) Oh, and I have also this for checking IF there are items in >> > "region" that are "above" the item in question -- to see IF an item >> > can o

Re: [GENERAL] Set autocommit to off

2005-08-17 Thread Andreas Kretschmer
Aliomar Mariano Rego <[EMAIL PROTECTED]> schrieb: > Does somebody knows why the Postgresql 7.4.8 or later doesn't supports > the option "SET AUTOCOMMIT TO OFF"? \set AUTOCOMMIT off works fine in 8.0.3 Regards, Andreas -- Diese Message wurde erstellt mit freun

Re: [GENERAL] Using gdb to obtain statement

2005-08-24 Thread Andreas Seltenreich
Markus Wollny schrob: > 0x40198cd4 in read () from /lib/i686/libc.so.6 > (gdb) p debug_query_string > $1 = 137763608 > > What am I doing wrong? You are looking at the string's pointer. You could display it with e.g. printf "%s\n", d

Re: [GENERAL] Function to test for Valid Date

2005-09-11 Thread Andreas Kretschmer
mple. Regards, Andreas -- Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau- fenden Pinguins aus artgerechter Freilandhaltung. Er ist garantiert frei von Micro$oft'schen Viren. (#97922 http://counter.li.org) GPG 7F4584DA Was, Sie wissen nicht, wo Kaufbach ist?

Re: [GENERAL] Multiple database queries

2005-10-02 Thread Andreas Kretschmer
d have share customer's ID and other info. You can't. > If not, what is the best workaround? dblink. http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dblink Regards, Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintention

Re: [GENERAL] Portable PostgreSQL

2005-10-02 Thread Andreas Kretschmer
server running on port 5432 and accepting > connections? You can install PG on Windows and restore Backups. Independent of the operating system. Regards, Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds)

Re: [GENERAL] Oracle buys Innobase

2005-10-08 Thread Andreas Kretschmer
Bruce Momjian schrieb: > Ultimately, MySQL should drop InnoDB. http://forums.mysql.com/read.php?3,48400,48400#msg-48400 InnoDB is GPL. But, i'm also confused. My guess: a fork in the future. Regards, Andreas -- Really, I'm not out to destroy Microsoft. That will just be

Re: [GENERAL] getting around---division by zero on numeric

2005-10-19 Thread Andreas Kretschmer
t; select * from foo; id | wert +-- 0 |0 1 |1 2 | (3 Zeilen) test=> select id, case when wert != 0 then 5/wert end from foo; id |case + 0 | 1 | 5. 2 | (3 Zeilen) HTH, Regards, Andreas -- Really, I'm not out to

Re: [GENERAL] pg_dump with low priority?

2005-10-22 Thread Andreas Kretschmer
ce', see see the man-page. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889° ---(end of broadcast)---

Re: [GENERAL] STL problem in stored procedures

2005-10-25 Thread Andreas Seltenreich
t load > library "/usr/lib/postgresql/proximity.so": /usr/lib/postgresql/proximity.so: > undefined symbol: _ZNKSs17find_first_not_ofERKSsj > > What should I do to be able to use this extension? It looks like your .so isn't linked to libstdc++

Re: [GENERAL] STL problem in stored procedures

2005-10-25 Thread Andreas Seltenreich
to > replace, libc in the first place. That would depend a lot on what > platform you are on --- I think it might work OK with modern glibc, > but my last experience with C++ was back when it wasn't so. The most annoying non-cooperation for me was the STL's ignorance of Pg's

Re: [GENERAL] STL problem in stored procedures

2005-10-25 Thread Andreas Seltenreich
Tom Lane schrob: > Andreas Seltenreich <[EMAIL PROTECTED]> writes: >> Tom Lane schrob: >>> It *might* work to put a generic "catch/report via elog" handler around >>> each one of your entry-point functions. Haven't tried it. > >>

Re: [GENERAL] Dump only functions...

2005-10-26 Thread Andreas Kretschmer
Cristian Prieto <[EMAIL PROTECTED]> schrieb: > Any of you knows is there is any way in pg_dump or anything to dump just the > functions from a database? Net really a solution, but your defined functions are stored in information_schema.routines HTH, Andreas -- Really, I'm n

Re: [GENERAL] Looking for a command to list schemas

2005-10-26 Thread Andreas Kretschmer
we can get this important info? \dn in psql list all schemas. HTH, Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889° -

Re: [GENERAL] Learning server programming

2005-10-28 Thread Andreas Kretschmer
d ein paar Leute der deutschen PG-Szene sind dort. http://linux-info-tag.de Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889° ---

Re: [GENERAL] pgsql "info" files?

2005-10-29 Thread Andreas Seltenreich
\+/(postgres.info/\ }' \ > postgres.texi postgres.info: postgres.texi makeinfo --no-validate postgres.texi -o postgres.info --8<---cut here---end--->8--- However, the resulting info documentation is still lacking an index, which

Re: [GENERAL] Postgresql connection on suse 10

2005-11-05 Thread Andreas Kretschmer
Yes, of course, in CIDR-Notation. HTH, Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889° ---(end of broadcast)

Re: [GENERAL] How to create a virtual column

2005-11-06 Thread Andreas Kretschmer
'Middle', 'Surname'); INSERT 934777 1 t=> create view view_person as select first || ' ' || middle || ' ' || surname from person; CREATE VIEW test=> select * from view_person ; ?column? -- First Middle Surname (1 Zeil

Re: [GENERAL] psql error on quitting...

2005-11-09 Thread Andreas Seltenreich
state: Exp; lines: +2 -2 Use saveHistory so we get a nice error message on failure. --8<---cut here---end--->8--- So, the error probably also occured in 8.0.4, but just wasn't reported at all. regards, Andreas ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] A good postgresql book

2005-11-11 Thread Andreas Kretschmer
which was very good; it's material is > probably a bit more intermediate level. Based on which PG-version? Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) Kaufbach, Saxony, Germany, Euro

Re: [GENERAL] Bug with index-usage?

2005-11-14 Thread Andreas Kretschmer
Sebastian Böck <[EMAIL PROTECTED]> schrieb: > Hello, > > I get unpredictibale results selecting from a view depending on > index-usage. > [ snipp ] > > SELECT * from test WHERE type = 'a'; unfortunately, no result. What Du you expect? Andreas -- Rea

Re: [GENERAL] Restore a PG database in Windows

2005-11-15 Thread Andreas Kretschmer
k under windows too. http://www.postgresql.org/docs/current/static/backup.html HTH, Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.

Re: [GENERAL] Wrong rows selected with view

2005-11-16 Thread Andreas Seltenreich
. So I started the brute force method of removing one thing at > a time in the view to see what would make it start returning the > correct number of rows. That just confused me more. How does the query plan change when you make those changes? If it only occurs if a certain index is used, it m

Re: [GENERAL] Anomalies with the now() function

2005-11-18 Thread Andreas Seltenreich
Byrne Kevin-kbyrne writes: > I have a trigger set up on a db - when a row is added to a certain > table (say Table A) in my db the trigger calls a function and then the > function enters another line in a related table (say Table B). Here's > the problem, the first addition to Table A may show the

Re: [GENERAL] hi, what is wrong with my newbie sql?

2006-09-27 Thread Andreas Kretschmer
+ 1; is not visible outer. The loop runs from k=1 to k=10, and the returning k is the last loop-value k, 10. You need a extra variable for the loop-counter. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect.

Re: [GENERAL] memory issues when running with mod_perl

2006-09-30 Thread Andreas Rieke
s, I see that the postmaster uses 10 M of shared memory, why do I not see any increase of free memory (or cache) when stopping pg? Thanks in advance, Andreas P.S.: Jonathan has described nearly the same thing in the mod_perl list on Wed, 06 Sep, 21:36. ---

Re: [GENERAL] strange sql issue

2006-10-01 Thread Andreas Seltenreich
the respective query plans (explain analyze). Comparing them might give a clue what is going wrong. regards, andreas ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] memory issues when running with mod_perl

2006-10-01 Thread Andreas Rieke
in that time, I restart pg only very few times, say 3-4 times. Does pg allocate other shmem blocks? If there is really a kernel memory problem in shmem, how can I loose so much memory? Thanks in advance, Andreas ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] memory issues when running with mod_perl

2006-10-01 Thread Andreas Rieke
al memory or swap size, ...)? Andreas ---(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

Re: [GENERAL] memory issues when running with mod_perl

2006-10-01 Thread Andreas Rieke
Any ideas? Andreas ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Advantages of postgresql

2006-10-02 Thread Andreas Kretschmer
? > I mean could someone pls tell me some advantages and disadvantages of working > with postgresql? Read http://sql-info.de/mysql/gotchas.html versus http://sql-info.de/postgresql/postgres-gotchas.html HTH, Andreas -- Really, I'm not out to destroy Microsoft. That

<    2   3   4   5   6   7   8   9   10   11   >