[GENERAL] Executing script file

2004-04-13 Thread Tumurbaatar S.
Hi! I cannot imagine how to create db from a script file and execute other DDL statements on this new db. Currently I use 'psql -f file' to perform all needed DDL statements except of create db. Because when I insert 'CREATE DATABASE' at the beginning of the script, the server creates a db but foll

Re: [GENERAL] Executing script file

2004-04-13 Thread Chris
> Currently I use 'psql -f file' to perform all needed DDL statements > except of create db. Because when I insert 'CREATE DATABASE' > at the beginning of the script, the server creates a db but following > commands like 'CREATE TABLE' and etc run on the current db, i.e. > not in context of newly

[GENERAL] Filesystem vs. Postgres for images

2004-04-13 Thread Michal Hlavac
Hello, I am working on web portal. There are some ads. We have about 200 000 ads. Every ad have own directory called ID, where is 5 subdirectories with various sizes of 5 images. Filesystem is too slow. But I don't know, if I store these images into postgres, performace will grow. Second question

Re: [GENERAL] Executing script file

2004-04-13 Thread Richard Huxton
On Tuesday 13 April 2004 08:40, Tumurbaatar S. wrote: > Hi! > I cannot imagine how to create db from a script file and execute > other DDL statements on this new db. > P.S. Some RDBMS automatically switches to a newly created db > after 'CREATE DATABASE' and some other languages have command > lik

Re: [GENERAL] Data Encryption in PostgreSQL, and a Tutorial.

2004-04-13 Thread Michal Hlavac
I think, that all is about key management. You can store your data with strong RSA encryption. On server you will have only public key and on client PC private key. it's not so easy to use, but it's more secure than symmetrical cipher. miso ---(end of broadcast)

Re: [GENERAL] Filesystem vs. Postgres for images

2004-04-13 Thread Development - multi.art.studio
Hello, >Filesystem is too slow. But I don't know, if I store these images into >postgres, performace will grow. but postres also stores its data on the filesystem. maybe take a better FS like XFS (xfs is very nice and performes good), imho other filesystems like reiser have some version-problems

[GENERAL] verifying unicode locale support

2004-04-13 Thread Holger Klawitter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there, triggered by the recent questions about sorting, I started digging into my problems with upper('ä')='ä' when using LC_CTYPE and LANG = de_DE.UTF-8. I have checked with Java (toUpperCase()) and C (see attached program, might help others) t

Re: [GENERAL] Filesystem vs. Postgres for images

2004-04-13 Thread Holger Klawitter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, > imho other filesystems like reiser have some version-problems ;) Oh please. Reiser is as unstable as postgres is slow - in other words, both have to suffer prejudice which used to be true lng ago. ;-) In cases of large directories ext2/3

[GENERAL] performance problem aftrer update from 7.1 to 7.4.2

2004-04-13 Thread Development - multi.art.studio
Hello everyone, i just upgraded my old postgres-database from version 7.1 to 7.4.2. i dumped out my 7.1 database (with pg_dump from 7.1) as an sql-file with copy-commands and to one file using insert-statements. after initalizing and starting postgres 7.4 on a different port and datadirectory,

Re: [GENERAL] Filesystem vs. Postgres for images

2004-04-13 Thread Cott Lang
On Tue, 2004-04-13 at 01:44, Michal Hlavac wrote: > Hello, > > I am working on web portal. There are some ads. We have about 200 000 > ads. Every ad have own directory called ID, where is 5 subdirectories > with various sizes of 5 images. > > Filesystem is too slow. But I don't know, if I store t

Re: [GENERAL] Filesystem vs. Postgres for images

2004-04-13 Thread Jeremiah Jahn
There has got to be some sort of standard way to do this. We have the same problem where I work. Terabytes of images, but the question is still sort of around "BLOBs or Files?" Our final decision was to use the file system. We found that you didn't really gain anything by storing the images in the

Re: [GENERAL] Filesystem vs. Postgres for images

2004-04-13 Thread Joshua D. Drake
Hello, No standard way that I know of :). We tend to use BLOBS because we can have associated tables with metadata about the images that can be searched etc Of course you could that with the filesystem as well but we find blobs easier. I will say we tend to use BLOBS or Bytea. J Jeremiah

Re: [GENERAL] Filesystem vs. Postgres for images

2004-04-13 Thread Christopher Petrilli
On Apr 13, 2004, at 9:40 AM, Jeremiah Jahn wrote: There has got to be some sort of standard way to do this. We have the same problem where I work. Terabytes of images, but the question is still sort of around "BLOBs or Files?" Our final decision was to use the file system. We found that you didn'

Re: [GENERAL] performance problem aftrer update from 7.1 to 7.4.2

2004-04-13 Thread Joshua D. Drake
Hello, You are probably missing a step some where... I know you got your data imported but you might try using the pg_dump from 7.4.2 to grab the 7.1 database and import from there. It sounds to me like you are missing an index or something. Also it would help if we new your data structure, if

Re: [GENERAL] Filesystem vs. Postgres for images

2004-04-13 Thread Anton Nikiforov
Michal Hlavac пишет: Hello, I am working on web portal. There are some ads. We have about 200 000 ads. Every ad have own directory called ID, where is 5 subdirectories with various sizes of 5 images. Filesystem is too slow. But I don't know, if I store these images into postgres, performace will

Re: [GENERAL] Filesystem vs. Postgres for images

2004-04-13 Thread Jeremiah Jahn
I tried the bytea types, but the parsing done by the system on insert etc. was so bad that it made it usable for me. Our solution is to keep all of the metadata in the db plus an id and then a web service that gets the image from the FS. On Tue, 2004-04-13 at 09:05, Joshua D. Drake wrote: > Hello

Re: [GENERAL] verifying unicode locale support

2004-04-13 Thread Tom Lane
Holger Klawitter <[EMAIL PROTECTED]> writes: > I have checked with Java (toUpperCase()) and C (see attached program, might > help others) that my locale is working, but postgres (initdb and postmaster > running with LANG=de_DE.utf8, -E UNICODE) still insists that upper('ä') > equals 'ä'. What el