Re: [GENERAL] database corruption

2009-04-09 Thread Albe Laurenz *EXTERN*
This thread is a top posting mess. I'll try to rearrange: Jeff Brenton wrote: REINDEX INDEX testrun_log_pkey; ERROR: could not write block 1832079 of temporary file: No space left on device HINT: Perhaps out of disk space? There is currently 14GB free on the disk that postgres is

Re: [GENERAL] Will PostgreSQL 8.4 allow having different encoding databases on a same PostgreSQL server ?

2009-04-09 Thread Albe Laurenz *EXTERN*
Bruno Baguette wrote: Currently, I have several PostgreSQL databases, some of them are using LATIN1 encoding, some of them are using UTF-8 encoding. In order to have theses two encoding, we had to install two PostgreSQL server on two different ports. One is for LATIN1 databases and one is

Re: [GENERAL] Querying Large Objects

2009-04-07 Thread Albe Laurenz
David Kerr wrote: I'm having a heck of a time trying to track this down. Is it possible to retrive a large object from psql/pgbench? I don't want just the OID, i want the actual streamed data. I'm doing a timing comparison between bytea and lo's. So it'd be ideal if I can pull it with

Re: [GENERAL] writing c functions for postgres

2009-04-07 Thread Albe Laurenz
eehab hamzeh wrote: I am trying to build some functions using C language. these functions are mentioned in the postgresql documentation. the only function that are work are the one with int32 variable. the other function bring errors and are not working any body can give directions

Re: [GENERAL] Convert Oracle function to PostgreSQL

2009-04-07 Thread Albe Laurenz
SHARMILA JOTHIRAJAH wrote: I use this Oracle function(from AskTom - http://asktom.oracle.com/pls/asktom/f?p=100:11:0P11_QUESTION_ID:210612357425) SQL create or replace type myTableType as table of varchar2 (255); 2 / Type created. ops$tk...@dev8i create or

Re: [GENERAL] Postgres Security Checklist

2009-04-06 Thread Albe Laurenz
Eduardo Henrique wrote: Hi, I'm developing a Graduation Work about Database security. My idea is develop an application that connect in an database (in this case Postgres) and make some security verification of that db. The problem is that my verification only can be in a dabatase scope.

Re: [GENERAL] Postgres Security Checklist

2009-04-06 Thread Albe Laurenz
Tom Lane wrote: Here is my personal security checklist for PostgreSQL: - Check that there is no SQL function with SECURITY DEFINER. Uh, that seems a pretty strange restriction. Generally, if you are actually concerned about security at the SQL-command level, you're going to have to

Re: [GENERAL] Number Conversion Function

2009-04-06 Thread Albe Laurenz
Abdul Rehman wrote: Can any body help me in converting numeric values into words via postgres function: i.e. 313 to THREE HUNDRED THREE Here is a little PL/pgSQL function that should do what you want for numbers 1. It should be easy to extend if you switch to bigint and decide if

Re: [GENERAL] [ADMIN] Can we load all database objects in memory?

2009-03-26 Thread Albe Laurenz
Iñigo Martinez Lasala wrote: Hi All, I have a database of 10GB. My Database Server has a RAM of 16GB Is there a way that I can load all the database objects to memory? Thanks for your time and taking a look at this question. Thanks Deepak Increase effective_cache_size parameter.

Re: [GENERAL] Weird encoding behavior

2009-03-26 Thread Albe Laurenz
Leonardo M. Ramé wrote: Hi, I'm experiencing a weird behavior when storing latin characters to a PostgreSQL 8.3.1.876 server. The database is Latin1 encoded, and it is working since September 2008, it wasn't updated nor replaced since its first installation. The weirdness of the problem

Re: [GENERAL] Weird encoding behavior

2009-03-26 Thread Albe Laurenz
Leonardo M. Ramé wrote: As a first step, can you find out the code point of the character that is represented as ? in your E-Mail? Something like SELECT ascii(substr('NU?EZ', 3, 1)); except that instead of the string literal you substitute the column containing the bad value. I did

Re: [GENERAL] Accessing large objects

2009-03-24 Thread Albe Laurenz
how to access large objects from the database when using PGAdmin like client applications? When a normal select is executed on lo type columns it gives only the number which refers to large objects stored in 'pg_largeobjects' table. When records from pg_largeobjects are fetched using

Re: [GENERAL] Move PG installation to a new computer

2009-03-24 Thread Albe Laurenz
Thomas Kellerer wrote: I'm getting a new notebook and want to confirm that my idea on how to move my Postgres installation will work This is a development/test installation and not a production system, so it doesn't need to be 100% fail safe. Both systems are Windows XP 32bit. My plan

Re: [GENERAL] Single missing WAL in long sequence..

2009-03-24 Thread Albe Laurenz
Aimon Bustardo wrote: Hi, I ran into a recovery problem where I have a single missing WAL file in a long sequence. I need a way to recover past that missing WAL archive. I am desperately hoping there is a way to do this. Any help that can be given will be extremely appreciated! I am

Re: [GENERAL] Special charaters

2009-03-20 Thread Albe Laurenz
Alvaro Herrera wrote: This happens when I import csv file via my app into postgres. The csv file has some “hello” from microsoft word 2003. In postgres it appears as hello Could somebody help on this? Check your encodings. I doubt that's it, but I've been wrong

Re: [GENERAL] Using xmin to identify last modified rows

2009-02-25 Thread Albe Laurenz
Stéphane A. Schildknecht wrote: Trying to identify last modified (updated or inserted) rows in a table, I thought I could use xmin. I tried is to get some lines sorted by xmin. When doing it on a slonified database, I had no problem getting these lines. But, trying the same query on a

Re: [GENERAL] restore single table

2009-02-24 Thread Albe Laurenz
Kevin Duffy wrote: I need guidance on how move some changes that I have made to my production database. On my development database I made changes to a table called DEPT. I added a column, added a couple of records and did some general data cleanup What I did not do was change

Re: [GENERAL] connecting using libpq breaks printf

2009-02-20 Thread Albe Laurenz
Joey Morris wrote: This is my first attempt at using libpq, and I'm running across a strange problem. Here is my bare-bones program: #include stdio.h #include libpq-fe.h int main(int argc, char **argv) { PGconn *conn; fprintf(stderr, connecting\n); conn =

Re: [GENERAL] Question about functions that return a set of records

2009-02-20 Thread Albe Laurenz
Mike Christensen wrote: I have the following function: CREATE FUNCTION foo(_userid uuid) RETURNS SETOF record AS $BODY$ BEGIN RETURN QUERY select n.UserId, u.Alias, n.Date, n.Data --Bunch of joins, etc If I understand correctly, I have to return SETOF record since my

Re: [GENERAL] Strange Grant behavior in postgres 8.3

2009-02-18 Thread Albe Laurenz
John R Pierce wrote: that is correct. DATABASE privileges relate to connecting to the database, permissions to create objects and so forth. To be precise, there are 3 privileges: - create temporary tables - connect to the database - create schemata To be allowed to create a table, you need

Re: [GENERAL] Strange Grant behavior in postgres 8.3

2009-02-17 Thread Albe Laurenz
Schwaighofer Clemens wrote: Version: PostgreSQL 8.3.5 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real(Debian 4.3.2-1) 4.3.2 I have a DB foo created and owned by postgres. No I created another role called bar and with the user postgres in the db foo I did: # grant all on foo to

Re: [ADMIN] [GENERAL] bytea size limit?

2009-01-22 Thread Albe Laurenz
Please don't top post. paulo matadr wrote: My aplication return erro: 2009-01-20 10:22:03,264 INFO [STDOUT] Caused by: org.postgresql.util. PSQLException: ERROR: invalid memory alloc request size 1705447581 What are you doing in terms of SQL? INSERT, UPDATE, DELETE? How big are the

Re: [GENERAL] how to specify the locale that psql uses

2009-01-22 Thread Albe Laurenz
Kent Tong wrote: I am referring to the locale on the client that determines the text prompts it outputs. I think Reg me Please got you wrong, here's the answer: To set the locale for server messages, set the server configuration parameter lc_messages to the appropriate value. You can either

Re: [ADMIN] [GENERAL] bytea size limit?

2009-01-22 Thread Albe Laurenz
Please don't top post. paulo matadr wrote: I think identified the problem lts's check log below: Query: SELECTSTATEMENT: select relatorios0_.fuin_id as fuin5_1_, relatorios0_.rege_id as rege1_1_, relatorios0_.rege_id as r ege1_624_0_, relatorios0_.rege_tmultimaalteracao as rege2_624_0_,

Re: [GENERAL] bytea size limit?

2009-01-21 Thread Albe Laurenz
paulo matadr wrote: I everyone, need help!!! My aplication return erro: 2009-01-20 10:22:03,264 INFO [STDOUT] Caused by: org.postgresql.util. PSQLException: ERROR: invalid memory alloc request size 1705447581 TABLE batch.relatorio_gerado rege_id integer NOT NULL, fuin_id

Re: [GENERAL] How to find how much postgresql use the memory?

2009-01-21 Thread Albe Laurenz
Luki Rustianto wrote: Ok I see. So what's the best way to find optimum value for various memory-related setting of postgresql ? How much memory is there in the machine? Are there other programs running or is the machine dedicated to the database? Are the queries you run complicated (order /

Re: [GENERAL] How to find how much postgresql use the memory?

2009-01-20 Thread Albe Laurenz
I wonder how to find how much postgresql memory consumption is (real, not allocated) ? You could install the pg_buffercache contrib and SELECT pg_size_pretty( CAST(current_setting('block_size') AS integer) * max(bufferid) ) FROM pg_buffercache WHERE relfilenode IS NOT NULL;

Re: [GENERAL] accessing user table structures from SQL

2009-01-20 Thread Albe Laurenz
Vincent Predoehl wrote: Sent: Saturday, January 17, 2009 5:33 AM Does postgresql have a system table that has the table structure of user tables, like systables and sysobjects in MS SQL Server? All the details about database objects are in the system catalogs:

Re: [GENERAL] Can I separate my Databases as in FireBird? Working with DataBases...

2009-01-20 Thread Albe Laurenz
Durumdara wrote: I came from SQLite, FireBird and DBISAM world. These database systems have a speciality that they stores one database in one file, or in one directory. Each of databases have separated file (or dir with files), and when I want to copy a database, I have MORE possibility

Re: [GENERAL] fire trigger for a row without update?

2009-01-14 Thread Albe Laurenz
Gerhard Heift wrote: is it possible to call a trigger for a row in a table without updating the row? I want to do it in plpgsql. Something like UPDATE table WHERE id = 10; or PERFORM table.trigger('UPDATE', row) WHERE id = 10; Think twice if you really need that - it sounds a little odd.

Re: [GENERAL] How to cast a general record?

2009-01-01 Thread Albe Laurenz
Gerhard Heift wrote: I want to log with triggers or in functions, and these logs should be independet of the transaction. Beside i want to have the information which action was commited and which not. So my idea was to log into the same database with dblink, return the primary keys and add

Re: [GENERAL] return X number of refcursors from a function

2008-12-31 Thread Albe Laurenz
Derek Liang wrote: I tried to use the following code to retrieve the content of table1 4 times (in my application, the total number of refcursors that will be returned is determined by the data in the database). I am getting the error message says ERROR: cursor unnamed portal 2 already in

Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-31 Thread Albe Laurenz
Please don't top post. Julius Tuskenis wrote: Large Objects (http://www.postgresql.org/docs/current/static/largeobjects.html) use OID columns, and they work fine for storing binary data like images. In the article you provided it is said that The return value is the OID that was assigned

Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-30 Thread Albe Laurenz
dbalinglung wrote: I seriously doubt you could store an image in oid typed column, because The oid type is currently implemented as an unsigned four-byte integer. (from postgresql 8.2 manual). I too use Zeos with no problems using bytea type. Ok, I'll try your sugestion, many thanks bro.

Re: [GENERAL] Is this a security risk?

2008-12-17 Thread Albe Laurenz
Adam Witney wrote: I would like to provide a limited view of my database to some users, so i thought of creating a second database (I can control access by IP address through pg_hba.conf) with some views that queried the first database using dblink. In my opinion dblink is not the right

Re: [GENERAL] Is this a security risk?

2008-12-16 Thread Albe Laurenz
Adam Witney wrote: I would like to provide a limited view of my database to some users, so i thought of creating a second database (I can control access by IP address through pg_hba.conf) with some views that queried the first database using dblink. In my opinion dblink is not the right

Re: [GENERAL] Tool to converter plsql in pgplsql

2008-12-11 Thread Albe Laurenz
paulo matadr wrote: you knowns a tool for automatic converter plsql in pgplsql? this tool exist? EnterpriseDB claim that they can do something like this, but I don't believe that there is any tool which can do more than assist you. Yours, Laurenz Albe -- Sent via pgsql-general mailing list

Re: [GENERAL] c function - undefined symbols

2008-12-10 Thread Albe Laurenz
Steffn wrote: I am currently trying my first steps in writing my own functions in C. I read through the documentation and tried the most simple examples as shown in http://www.postgresql.org/docs/8.3/static/xfunc-c.html. Sadly this was already the point where I stumbled. I luckily compiled

Re: [GENERAL] tune postgres for UPDATE

2008-12-09 Thread Albe Laurenz
Scott Marlowe wrote: Sebastian Böhm wrote: I have a table with a lot of columns (text and integer). It currently has 3Mio Rows. Updating a column in all rows (integer) takes endless (days). I'm afraid you may not understand how postgresql's MVCC implementation works here. Updating

Re: [GENERAL] pg_xlog content

2008-12-02 Thread Albe Laurenz
Siddharth Shah wrote: I am not using wall based replication ? I no not have frequent long transaction , need of checkpoints Just want to get what data resides in pg_xlog that it takes 16MB without any transactions. It contains the transaction log files. The files are precreated with a

Re: [GENERAL] configure options

2008-12-01 Thread Albe Laurenz
Siddharth Shah wrote: I am compiling postgres, I have some doubts on ./configure options --enable-nls[=LANGUAGES] enable Native Language Support Do I need to supply each language name which i am going to store in my database or just have to take support UTF-8 ? You need to

Re: [GENERAL] configure options

2008-12-01 Thread Albe Laurenz
Siddharth Shah wrote: I am compiling postgres, I have some doubts on ./configure options --disable-largefile Does it refers to for storing blob objects to store or anything else ? I couldn't find this configure switch in the documentation for 8.3 or 8.4. Can you explain where

Re: [GENERAL] configure options

2008-12-01 Thread Albe Laurenz
Siddharth Shah wrote: In My Application I have only 256MB storage device and I have to manage many other application in same storage So, have to remove use less files , From configuration disabling unwanted options helps to reduce the size. So, I need detail description on compile

Re: [GENERAL] configure options

2008-12-01 Thread Albe Laurenz
Siddharth Shah wrote: In My Application I have only 256MB storage device and I have to manage many other application in same storage Do you only need the PostgreSQL client or also the server? Will that small storage device also contain the database? Yes, I need to run Client Server both

Re: [GENERAL] Prepared statement already exists

2008-11-20 Thread Albe Laurenz
WireSpot wrote: I'm trying to use prepared statements in an application and I'm running into this error: Query failed: prepared statement already exists. The reason is obvious. What I want to know is the best way to avoid getting this error. The client application sets statement names as

Re: [GENERAL] Prepared statement already exists

2008-11-20 Thread Albe Laurenz
Please, send your replies to the list as well. WireSpot wrote: Do you still need the old prepared statement? If not, you can simple DEALLOCATE it and then try the PREPARE again. Yes, I'd like to keep the old statements, that's part of the perks -- if a query will be repeated it will

Re: [GENERAL] pgsql-general@postgresql.org

2008-11-18 Thread Albe Laurenz
Tomas Lanczos wrote: I am using Postgresql to store all my research related data. At the moment I am just finishing my PhD thesis and I want to cite postgresql correctly but can't find how to do it. Could somebody give me an advice? I'm not sure if the citation list is the right thing for

Re: [GENERAL] strange commit behavior

2008-11-18 Thread Albe Laurenz
Flavio Palumbo wrote: I developed a little tool in Java that updates databases throught text files. In this tool there is an option that allows the user accepts a defined amount of errors and save the well formed data. To do this I start commitment control when the process begins and,

Re: [GENERAL] postgresql installation - PL/???

2008-11-05 Thread Albe Laurenz
Tom Allison wrote: This should be a dumb question: --with-perl I don't see that I have to do this in order to load pl/perl as a function/trigger language option. So I should assume that this will compile pl/perl in rather than having it available as a loadable function. Nice for

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-11-05 Thread Albe Laurenz
Michelle Konzack wrote: I think you want a sequence. Give the serial number the type bigserial or serial. See http://www.postgresql.org/docs/current/static/functions-sequence.html for more. OK, thats cool... I have found an example in sql-createsequence.html CREATE SEQUENCE serial

Re: [GENERAL] COPY TO duplicates \ signs

2008-11-05 Thread Albe Laurenz
Abraham, Danny wrote: String in DB: D:\Program Files\BMC Software\CONTROL-D\wa/reports In the output files \| are duplicated: The string in the output text fileis D:\\Program Files\\BMC Software\\CONTROL-D\\wa/reports == ==== ==

Re: [GENERAL] Visualizer

2008-11-05 Thread Albe Laurenz
Mohammad Ali Darvish Darab wrote: I have got an already existing Porstgres DB which is pretty large (including more than 650 table with considerable number of constraints etc). And now I am supposed to realize generally how it is constructed and works. I thought it would be good to have a

Re: [GENERAL] Date data type

2008-11-03 Thread Albe Laurenz
Mike Hall wrote: I'm currently converting an MS Access database to PostgreSQL (version 8.1 as it is the vesion that ships with CentOS 5). I'm having trouble with an INSERT statement attempting to insert an empty value ('') into a field with data type DATE. This produces the following

Re: [GENERAL] [Help] Config Failure on Mac OSX: psqlodbc-08.03.0300

2008-10-29 Thread Albe Laurenz
Brent Austin wrote: Configure still failsI've tried everything I can figure [...] configure: error: pg_config not found (set PG_CONFIG environment variable) It's quite simple: - Find out where pg_config is. - If you don't have it, install the appropriate package. - Make sure it's in

Re: [GENERAL] [Help] Config Failure on Mac OSX: psqlodbc-08.03.0300

2008-10-28 Thread Albe Laurenz
Brent Austin wrote: Trying to install psqlodbc-08.03.0300 on Mac gets me this while I configure: client-6X-XXX-17-X14:~ brent1a$ cd /psqlodbc-08.03.0300 client-6X-XXX-17-X14:psqlodbc-08.03.0300 brent1a$ sudo ./configure checking for a BSD-compatible install... /usr/bin/install -c

Re: [GENERAL] Query m:n-Combination

2008-10-24 Thread Albe Laurenz
Ludwig Kniprath wrote: A typical M:N-constellation, rivers in one table, communities in the other table, m:n-join-informations (which river is running in which community) in a third table. Table rivers: R_ID R_Name 1 river_1 2 river_2 3 river_3 4 river_4 5

Re: [GENERAL] Varchar vs varchar(64)

2008-10-21 Thread Albe Laurenz
Rob Richardson wrote: The database we install at our customers as part of our product includes an event_history table. For some reason lost in the mists of time, the most important field in that table, the description, is a varchar field specified to be only 64 characters long. This

Re: [GENERAL] problem with check constraints

2008-10-13 Thread Albe Laurenz
Anton Andreev wrote: When I create a check constraint in PgAdmin3 1.8.4 on a Postgresql 8.3.3: ((A and B) or (C and D)) I get with create script: (A and B or C and D) which is wrong. No, it isn't - both are the same. AND has higher operator precedence than OR, see

Re: [GENERAL] how to remove the duplicate records from a table

2008-10-13 Thread Albe Laurenz
Robert Treat wrote: I have a table contains some duplicate records, and this table create without oids, for example: id | temp_id +- 10 | 1 10 | 1 10 | 1 20 | 4 20 | 4 30 | 5 30 | 5 I want get the duplicated records removed

Re: [GENERAL] How to find not unique rows in a table?

2008-10-08 Thread Albe Laurenz
A B wrote: Assuming you have a table where some rows have the same values in all columnes, how do you find these rows? There is no reliable, time-independent way. That's one reason why you have primary keys on tables. There is the system column ctid, but that may change any second. Yours,

Re: [GENERAL] how to remove the duplicate records from a table

2008-10-07 Thread Albe Laurenz
Yi Zhao wrote: I have a table contains some duplicate records, and this table create without oids, for example: id | temp_id +- 10 | 1 10 | 1 10 | 1 20 | 4 20 | 4 30 | 5 30 | 5 I want get the duplicated records removed and

Re: [GENERAL] DBD::Pg 2.10.7 compile failed on RH4

2008-10-07 Thread Albe Laurenz
Tapio.Niva wrote: we have 32-bit PostgreSQL version 8.3.4 on 64-bit RHEL4 , Postgres itself is working as expected. We are using PostreSQL via following perl version # perl -v This is perl, v5.10.0 built for i686-linux-thread-multi (with 4

Re: [GENERAL] restore a dump db from tar file

2008-10-06 Thread Albe Laurenz
Alain Roger wrote: i backup my database sewe using a standard process. 1. it backups only database and not roles :-( roles are backuped separately. 2. backup is a tar file 3. backup command is : pg_dump -v -o -U myuser -ci -Ft -f sewe.tar sewe Question how can i restore it now ? could

Re: [GENERAL] Transactions within a function body

2008-10-02 Thread Albe Laurenz
Alvaro Herrera wrote: Is there a way to have (sub)transactions within a function body? I'd like to execute some code (a transaction!) inside a function and later decide whether that transaction is to be committed or not. You could issue a SAVEPOINT name. If at the end you don't want

Re: [GENERAL] Transactions within a function body

2008-10-02 Thread Albe Laurenz
Richard Huxton wrote: After a discussion on comp.databases.postgresql I realized that this is actually a limitation. Consider the following: BEGIN UPDATE ... UPDATE ... UPDATE ... EXCEPTION WHEN integrity_constraint_violation THEN ... END; If the first UPDATE

Re: [GENERAL] namespace in pgsql

2008-09-25 Thread Albe Laurenz
Bhavik wrote: I am newbie for pgsql. Im using Solaris. 1) Is it possible to have namespace like in OOP, in pgsql query. means as I know we can reference table or its column with fashion like schema.table_name, but is it possible like db_name.schema.table_name ??? 2) Is it

Re: [GENERAL] ENABLE / DISABLE ALL TRIGGERS IN DATABASE

2008-08-27 Thread Albe Laurenz
Teemu Juntunen wrote: I think this has been asked before, but I can't find the answer from arcive nor google. How to disable/enable all the riggers in a database? I have problem with disabled triggers after database restore. If there is no simple way, could this be made in a function

Re: [GENERAL] [ADMIN] Regarding access to a user

2008-08-21 Thread Albe Laurenz
Shashwat_Nigam wrote: Thanks for the help. But still the user is able to see all the databases. I defined something like this # IPv4 local connections: hostall all 127.0.0.1/32 md5 hostHMRI_database hmri127.0.0.1/32 md5 in the above case

Re: [GENERAL] cache lookup failed

2008-08-20 Thread Albe Laurenz
c k wrote: I got following error while testing some newly created functions. ERROR: cache lookup failed for function 111462 CONTEXT: PL/pgSQL function uf_postdoc line 25 at FOR over SELECT rows ** Error ** ERROR: cache lookup failed for function 111462 SQL state:

Re: [GENERAL] How to execute 'set session role' from plpgsql function?

2008-08-19 Thread Albe Laurenz
Олег Василенко wrote: I wish to have a function with code above, but compiller generate syntactic error at the line SET SESSION ROLE wishedrole;. How to pass the wishedrole value to the structure? CREATE OR REPLACE FUNCTION f_switch_role(INOUT text,INOUT boolean) AS $BODY$ DECLARE

Re: [GENERAL] looking for psql without server-installation

2008-08-07 Thread Albe Laurenz
Christian Strobl wrote: thanks for your answers. unfortunately i misworded my problem again. i have a very clear problem and i am looking for a solution of this problem (if it is basic or not) and i am not using RedHatEL/CentOS/Fedora. i am looking for a solution which is applicable to

Re: [GENERAL] Installation problem ~!

2008-08-06 Thread Albe Laurenz
Harshad Pethe wrote: I have recently tried to install pgsql on Windows but I get the following error consistently ! Error : psql : recieved invalid response to SSL negotiation ! This error is encountered as soon as I try to start psql ! Sounds like an SSL problem. Check the

Re: [GENERAL] A couple of newbie questions ...

2008-07-23 Thread Albe Laurenz
admin wrote: So anyway, life story aside, I have a couple of very newbie questions after tinkering with PostgreSQL 8.1.9 for a day converting some PHP/MySQL code: Here I have to ask the obvious thing: Why not a more current version? 1. Is a SEQUENCE what I use instead of auto_increment?

Re: [GENERAL] information related to blobs

2008-07-09 Thread Albe Laurenz
aravind chandu wrote: Blobs stores large amount can you please tell me what is the limit i.e hw many kb of data can it store ? say 4000k like that. For suppose if a 4000kb data can be stored using blob and the data stored in blob is 3600k what about the remaining

Re: [GENERAL] please explain vacuum with WAL

2008-07-08 Thread Albe Laurenz
Dmitry Melekhov wrote: I tried to ask this question in novice list. Just because there are no replies I try here. This is really novice question- I'm oracle dba :-) I just installed 8.3 with WAL enabled. But I can't understand why postgres generated many archive logs during vacuum, if

Re: [GENERAL] please explain vacuum with WAL

2008-07-08 Thread Albe Laurenz
Dmitry Melekhov wrote: So, if I have database backup and WAL generated after this backup, I can do recovery, this mean WAL already contains all changes to database, without vacuum. Could you tell me what is wrong in my sentence? VACUUM *is* a change to the database. Yours, Laurenz Albe --

Re: [GENERAL] SAST FATAL: could not access private key file server.key

2008-07-02 Thread Albe Laurenz
Dave Coventry wrote: If you want SSL, 2) Is there a file server.key? If yes, make it readable to the postgres user. If not, create it as documented. Here is the contents of my /var/lib/postgresql/8.2/main/ : [EMAIL PROTECTED]:/var/lib/postgresql/8.2/main# ls -l total 9 drwx-- 7

Re: [GENERAL] SAST FATAL: could not access private key file server.key

2008-07-01 Thread Albe Laurenz
Dave Coventry wrote: When starting Postgres I get the following: [EMAIL PROTECTED]:/home/it# /etc/init.d/postgresql-8.2 start * Starting PostgreSQL 8.2 database server * The PostgreSQL server failed to start. Please check the log output: 2008-07-01 13:37:39 SAST FATAL: could

Re: [GENERAL] Postgresql 8.3 Installer issue

2008-06-30 Thread Albe Laurenz
Jamie Deppeler wrote: I am trying to build a new installer application. I am in the process of upgrading postgresql 8.1 to 8.3.3 but i am having a issue which i can't seemed to resolve. Error output from rpmbuilder + su -c - user'$RPM_BUILD_ROOT/usr/local/app/pgsql/bin/postmaster -D

Re: [GENERAL] allowed variable names in functions?

2008-06-30 Thread Albe Laurenz
A B wrote: Here is the entire function and it fails with the names c2,c2div,c3,c3div, but if names are changed, it works! (by works I mean I get the hello lines printed) There is nothing wrong with the select statement either, that works fine if I run it stand-alone, or with the names of

Re: [GENERAL] Unicode problem again

2008-06-26 Thread Albe Laurenz
Michael Fuhr wrote: ProgrammingError Error Value: ERROR: character 0xe28099 of encoding UTF8 has no equivalent in LATIN1 select distinct [...] This is UNICODE 0x2019, a right single quotation mark. This is a Windows character - the only non-UNICODE codepages I know that contain

Re: [GENERAL] Unicode problem again

2008-06-24 Thread Albe Laurenz
Garry Saddington wrote: I have the following error: Postgres 8.3 via psycopg 1.1.21 and zope 2.10. ProgrammingError Error Value: ERROR: character 0xe28099 of encoding UTF8 has no equivalent in LATIN1 select distinct [...] This is UNICODE 0x2019, a right single quotation mark. This is a

Re: [GENERAL] Error when trying to drop a tablespace

2008-06-18 Thread Albe Laurenz
Cyril SCETBON wrote: I get the following error : postgres=# DROP TABLESPACE IF EXISTS my_tbs; ERROR: tablespace my_tbs is not empty I've searched in pg_class and I'm not able to find a relation which refers to my_tbs with : You can find the dependent objects with: SELECT t.relname AS

Re: [GENERAL] Error when trying to drop a tablespace

2008-06-18 Thread Albe Laurenz
Cyril SCETBON wrote: I get the following error : postgres=# DROP TABLESPACE IF EXISTS my_tbs; ERROR: tablespace my_tbs is not empty I've searched in pg_class and I'm not able to find a relation which refers to my_tbs with : Find out the directory: SELECT oid, spclocation FROM

Re: [GENERAL] problem with to_ascii() function in version 8.3.3

2008-06-18 Thread Albe Laurenz
Pavel Arnošt wrote: insert into chartest (c) values ('á'); select to_ascii(encode(convert_to(c,'LATIN9'),'escape'),'LATIN9') from chartest; to_ascii -- \341 What answer do you get to the following two SQL statements: SHOW server_encoding; SHOW client_encoding; both commands

Re: [GENERAL] Controlling write access to a table

2008-06-18 Thread Albe Laurenz
Dave Coventry wrote: I have a database with all of the particulars of our students and I am adding a table that will contain all of the courses and the grades attained by the students. All this information is to be read by just about everybody, and the bulk of the data will be written by

Re: [GENERAL] Error when trying to drop a tablespace

2008-06-18 Thread Albe Laurenz
Cyril SCETBON wrote: I get the following error : postgres=# DROP TABLESPACE IF EXISTS my_tbs; ERROR: tablespace my_tbs is not empty I've searched in pg_class and I'm not able to find a relation which refers to my_tbs with : Find out the directory: SELECT oid,

Re: [GENERAL] Error when trying to drop a tablespace

2008-06-17 Thread Albe Laurenz
Cyril SCETBON wrote: I get the following error : postgres=# DROP TABLESPACE IF EXISTS my_tbs; ERROR: tablespace my_tbs is not empty I've searched in pg_class and I'm not able to find a relation which refers to my_tbs with : postgres=# select * from pg_class where

Re: [GENERAL] problem with to_ascii() function in version 8.3.3

2008-06-17 Thread Albe Laurenz
Pavel Arnošt wrote: i have a problem with to_ascii() function in version 8.3.3. I have read Mr. Gonzales's post at http://groups.google.com/group/pgsql.general/browse_thread/thread/f74650e3b3248ff0/9f36fb072ea1dc98?lnk=gstq=to_ascii#9f36fb072ea1dc98 and he managed to use to_ascii function

Re: [GENERAL] Error when trying to drop a tablespace

2008-06-17 Thread Albe Laurenz
Cyril SCETBON wrote: I get the following error : postgres=# DROP TABLESPACE IF EXISTS my_tbs; ERROR: tablespace my_tbs is not empty I've searched in pg_class and I'm not able to find a relation which refers to my_tbs with : postgres=# select * from pg_class where reltablespace=100456;

Re: [GENERAL] encoding confusion

2008-06-11 Thread Albe Laurenz
Sim Zacks wrote: We originally tested it on mysql and now we are migrating it to postgresql. The messages are stored in a longblob field on mysql and a bytea field in postgresql. I set the database up as UTF-8, even though we get emails that are not UTF encoded, mostly because I didn't

Re: [GENERAL] libpq.so.4

2008-06-08 Thread Albe Laurenz
Oliver Kohll wrote: I have the same issue as this poster with libpq.so.4: http://www.nabble.com/8.3.0-upgrade-td16093803.html In short, I've upgraded to 8.3.1 from 8.1 on RHEL 4 (with some CentOS packages). I have apps with dependencies of libpq.so.4 but this is no longer available. 8.3.1

Re: [GENERAL] how to sync the system table with pg_dump

2008-06-05 Thread Albe Laurenz
Gary Fu wrote: I tried to use pg_dump to restore (sync) a database, but I noticed that the system table pg_namespace was not synced. If you restore a database, entries in pg_namespace will be created if the dump contains any CREATE SCHEMA statements, i.e. if there are schemas in your original

Re: [GENERAL] Howto implement sxntax and semantic complie time chock for

2008-05-29 Thread Albe Laurenz
marco-oweber wrote: I'd like to implement some query checking at compile time for haskell using template haskell. Is there any query method such as explain input and output types of query SELECT (1,'string') or INSERT INTO foo (a,b,c) VALUES (?,?,?) ? returning Int, String or such? Could

Re: [GENERAL] escaping and quoting

2008-05-21 Thread Albe Laurenz
Maarten Deprez wrote: My dbmail server using postgresql produces a lot of warnings about '\\' in strings. The particular string it is complaining about is escaped by EscapeBytea, and included in single quotes (not E''). Is it all right to set standard_compliant_strings to on? Depends.

Re: [GENERAL] escaping and quoting

2008-05-21 Thread Albe Laurenz
Maarten Deprez wrote: [wants to get rid of backslash escape warnings] Does the program work correctly despite the warnings? At least it seems so. I'm using it as email server without problems. What API are you using (there is no EscapeBytea function in the C API)? It's the

Re: [GENERAL] Postgre Deployment and Installation options

2008-05-20 Thread Albe Laurenz
J Ottery wrote: I am trying to distribute PostgreSQL with my applications but and need to simplify the installation procedure as much as possible for obvious reasons. Installing it to Windows environments only. Currently I prompt the end user to just start the postgre-8.3.msi install

Re: [GENERAL] escaping and quoting

2008-05-20 Thread Albe Laurenz
Maarten Deprez wrote: My dbmail server using postgresql produces a lot of warnings about '\\' in strings. The particular string it is complaining about is escaped by EscapeBytea, and included in single quotes (not E''). Is it all right to set standard_compliant_strings to on? Depends. Yours,

Re: [GENERAL] SSL auth problem

2008-05-19 Thread Albe Laurenz
Vitaliyi wrote: %openssl x509 -noout -dates -issuer -subject -in postgresql.crt notBefore=May 16 13:55:49 2008 GMT notAfter=Jun 15 13:55:49 2008 GMT issuer= /C=UK/ST=Some-State/L=Kiev/O=0x2A/CN=80.93.122.34/[EMAIL PROTECTED] subject= /C=UK/ST=Some-State/L=Kiev/O=Internet Widgits Pty

Re: [GENERAL] SSL auth problem

2008-05-16 Thread Albe Laurenz
Vitaliyi wrote: I'm trying to setup SSL auth. creating CA: openssl genrsa -out our.key 2048 openssl req -new -key our.key -out our.req openssl req -x509 -in our.req -text -key our.key -out root.crt then I copy root.crt on postgresql host and to client host in ~/.postgresql

<    5   6   7   8   9   10   11   12   13   >