Re: [GENERAL] Is it possible to delete a single value from an enum type?

2016-03-31 Thread Nik Mitev
On 31/03/16 14:14, Sándor Daku wrote: > On 31 March 2016 at 14:35, Nik Mitev <mailto:n...@mitev.eu>> wrote: > > Hi, > > In summary, I am looking for the opposite functionality to 'ALTER TYPE > typename ADD VALUE IF NOT EXISTS new_value' >

[GENERAL] Is it possible to delete a single value from an enum type?

2016-03-31 Thread Nik Mitev
einitialising the type in the process, deleting the old table and moving the updated one in its place. That would be disruptive though and rather clunky, so I think I'd rather give up on using an enumerated type for this value altogether... I'd be grateful for any advice you may

Re: [GENERAL] No caching sql query

2013-08-21 Thread Nik Tek
Prabhjot, You could clear the cache at the disk level, not at the db level. Follow the link: http://linux-mm.org/Drop_Caches You can look into the cache by using pg_buffercache, if you want to. Hope it helps Nik On Wed, Aug 21, 2013 at 1:31 PM, Prabhjot Sheena < prabhjot.

[GENERAL] Find all the the SELECT statements that occured

2013-05-23 Thread Nik Tek
this simple or possible in postgres? Thank you Nik

[GENERAL] Partition Reindexing

2007-09-04 Thread Nik
What is the effect of reindexing a partition on the inherited table? For example I have a table 'test' with partitions 'test_01_07', 'test_02_07', 'test_03_07', 'test_04_07', corresponding to data from January 2007, February 2007, and so on. I noticed that when I run a reindex on 'test_02_07' (wit

[GENERAL] Limit connections per username

2007-07-12 Thread Nik
PostgreSQL 8.2 on Windows 2003 Server. Is it possible to limit number of connections per username? ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so

[GENERAL] pg_dump is stuck

2007-03-29 Thread Nik
PostgreSQL 8.1.3 on Windows 2003 Server. I am running pg_dumpall on my cluster that is about 500Gb in size. The dump started ok, but then it gets to a table that's about 160Mb in size with a 100Mb of indexes and it seems stuck. The dump file is getting larger, but the dump is not finishing this ta

Re: [GENERAL] No buffer space available

2007-03-08 Thread Nik
On Mar 6, 2:20 pm, [EMAIL PROTECTED] ("Andrej Ricnik-Bay") wrote: > On 3/7/07, andyk <[EMAIL PROTECTED]> wrote: > > > 1) try to use client software, which is not depends on libpq, > > or > > 2) divide your query into smaller parts, > > or > > 3) use software which parses long queries, separates the

[GENERAL] No buffer space available

2007-03-06 Thread Nik
, the file executes fine. What could be the issue? Thank you. Nik ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Record not returned until index is rebuilt

2007-01-29 Thread Nik
d the contents and see if I face any other problems. Nik On Jan 26, 4:26 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > "Nik" <[EMAIL PROTECTED]> writes: > > I have the following table definition in postgres 8.0:PG 8.0.what, exactly? > > > Why is it that therecordis

[GENERAL] Record not returned until index is rebuilt

2007-01-26 Thread Nik
I have the following table definition in postgres 8.0: CREATE TABLE "userInfo" ( "userID" character varying(32) NOT NULL, "password" character varying(32) NOT NULL, salt character varying(16) NOT NULL, CONSTRAINT "userInfo_PK" PRIMARY KEY ("userID") ) ; Administrators are able to add new

Re: [GENERAL] IN clause in a cursor

2006-11-30 Thread Nik
Nevermind. I used: OPEN test FOR EXECUTE 'SELECT a, b, c FROM tbl WHERE d IN ' values; Nik wrote: > I have a dynamic set of clauses that I would like to use in the cursor. > Is there a way to achieve this using the "IN" clause and a string, or > multiple &quo

[GENERAL] Upgrade problem

2006-06-29 Thread Nik
I am trying to upgrade from 8.1.3 to 8.1.4 on Windows XP. I am a user with admin rights and I am able to install programs, services and such. I used the same account to install Postgres in the first place. However, when I try to run the upgrade batch file, it goes through most of the installation (

Re: [GENERAL] Insert into partition table hangs

2006-06-01 Thread Nik
I am still having the same problem. I tried to eliminate any possible network issues by placing the application on the server itself, but the same thing happened. However, I had an interesting discovery today that I don't understand. I left the insert query that was stuck running. Then, without c

Re: [GENERAL] Insert into partition table hangs

2006-05-26 Thread Nik
I thought that since application continues running fine after I restart it, I would try creating a separate connection for each insert statement, and then disconnect when it's completed. However, this had the same problem. It would connect, insert, and disconnect several hundred times, and then at

Re: [GENERAL] Insert into partition table hangs

2006-05-25 Thread Nik
Ok, that's a good point. I overlooked the possibility of this considering that I didn't think the timestamp resolution was that high. I changed my rules and constraints on tables to take care of this case. Thanks. However, how does this affect the problem I having considering that inserts that wer

Re: [GENERAL] Insert into partition table hangs

2006-05-23 Thread Nik
I do not run the INSERTs concurrently. They are being executed as the data comes in sequentially. I attempted to create a stand-alone example to reproduce the issue, but I was not successful. I will post the example anyway. This example ran fine, and did not hang at any point, but it might give a g

[GENERAL] Insert into partition table hangs

2006-05-19 Thread Nik
I have an application that executes an INSERT statement every second or two. In my old design this data was inserted into one table. However, I changed the design to have one table with multiple partitions. Now when I run the application it runs for some random amount of time (random number of INSE

Re: [GENERAL] Partitioning rule not behaving as expected

2006-04-25 Thread Nik
Oh ok, that makes sense. Thanks for the explanation. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] Partitioning rule not behaving as expected

2006-04-25 Thread Nik
I created a master table and three partition tables as per Postgres documentation. I also created three rules that match the check constraints. When I insert the values into the master table, the rules seem to be functional since the data is routed to the appropriate partition tables. However, data

Re: [GENERAL] Comparing text field

2006-04-17 Thread Nik
It is possible that one had /r/n and the other just /n. I was doing the comparison using psql. The issue was not using LIKE and %. I resolved the problem by removing chr(13) from both sides. So my working query was had a where clause like this: WHERE REPLACE(message, chr(13), '') = REPLACE('', c

[GENERAL] Comparing text field

2006-04-15 Thread Nik
I am trying to compare a large string (that has new line characters in it) to the contents of the text field (which also has new line characters in it) and it is not behaving as expected. For example I have the following record in the database: id=83 message=VAC153-683-685-131830- /O.NEW.KLWX.SV.W

[GENERAL] Storage Estimates

2006-03-09 Thread Nik
Is there any documentation or literature on storage estimation for PostgreSQL 8.1 on Windows? If I am given raw data file structure and frequency, I want to be able to calculate the amount of storage necessary to store one day, one month, six months, one year, or two years worth of data. So I am l

Re: [GENERAL] Out of memory error on pg_restore

2006-03-09 Thread Nik
Yes, I was indeed out of memory. That is the problem: the postgres.exe process corresponding to the pg_restore continuously consumes more and more memory until it runs out and fails with the mentioned error. Since I already have 4Gb of RAM, throwing more hardware at it is not a feasible solution, s

Re: [GENERAL] Out of memory error on pg_restore

2006-03-09 Thread Nik
Tom was exactly right. I was trying to restore the dump file into an already created table structure that did have three foreign key constraints. I removed the primary key constraint to speed up the load, but was not aware of the memory usage of the foreign keys. I dropped the table and ran the p

[GENERAL] Out of memory error on pg_restore

2006-03-08 Thread Nik
I am running PostgreSQL 8.1.3 on Windows 2003 Server. I am trying to transfer the data from a table in db1on one machine to a table in db2 on a different machine. The table size is about 22Gb (about 280 million rows). I was trying to do it by generating a backup file of the table in db1 and resto

[GENERAL] Postgres using 100% CPU

2006-02-15 Thread Nik
I have a fairly large (about 30Gb) PostgreSQL 8.1 database running on Windows 2003 Server. I noticed that CPU utilization on the server is 100% for past few days, and postgres process is taking up most of that CPU (95%-100%). There is only one connection to the database at the time and that one is

Re: [GENERAL] Connections not closing

2006-01-19 Thread Nik
Ok, I simplified the problem. I tried just running psql from the command line, and I noticed that it opens two connection on two different ports, and it closes only one. For example I do the following in the command prompt: ---

[GENERAL] Connections not closing

2006-01-19 Thread Nik
I have a batch file that calls two separate sql scripts as follows: ECHO **| psql -h host_name -p 5432 db_name -f script1.sql user_name ECHO **| psql -h host_name -p 5432 db_name -f script2.sql user_name EXIT script1.sql contains something like this: BEGIN; TRUNCATE TABLE table2; INSERT

[GENERAL] Permission denied on relation

2006-01-19 Thread Nik
I have PostgreSQL 8.0.6 running on Windows 2003 Server. A few days ago I noticed that my logs are getting filled pretty fast. When I checked the issue, I noticed that every one second I get the same error as follows: 2006-01-17 05:07:38 ERROR: could not open relation 20321/20322/796354: Permissi