[GENERAL] Could not read block of temporary files

2015-03-25 Thread Rebecca Clarke
Hi all, I'm creating a table from a select query. During the execution it errors with: ERROR: could not read block 13 of temporary file: Success I am running Postgresql 9.1 on a Debian/Linux server. Does anyone have any suggestions on what could be causing this? I checked diskspace and permis

Re: [GENERAL] Index usage with slow query

2014-07-25 Thread Rebecca Clarke
rmance is unacceptable. The logs show that the first query when it was execute took 70466.757 ms where as the second one took 11032.459 ms. I've begun to create a duplicate environment to play with so hopefully I'm able to weed out a solution. On Wed, Jul 23, 2014 at 3:57 PM, Bill Moran w

[GENERAL] Index usage with slow query

2014-07-23 Thread Rebecca Clarke
Hi all, Looking for some advice regarding a slow query I have and indexing. I'm using postgresql 9.1 and this is my table that has around 680 rows: CREATE TABLE mytable ( class character varying, floor character varying, source_id integer, the_geom geometry ) WITH ( OIDS=TRUE );

[GENERAL] What query currently running within function

2014-07-22 Thread Rebecca Clarke
Hi all, Presently I'm executing a function that runs many queries within it. select * from _myfunction(); Is there a way to see what query it is up to within the function? When I do a select of pg_stat_activity it just shows me the _myfunction() query. I'm running postgresql 9.1 Thanks in adva

Re: [GENERAL] Track changes to function code

2014-07-21 Thread Rebecca Clarke
Thanks guys. I'll check that out. On Mon, Jul 21, 2014 at 2:12 PM, Pavel Stehule wrote: > > Hi > > 2014-07-21 14:36 GMT+02:00 Jacob Bunk Nielsen : > > Rebecca Clarke writes: >> >> > At present when a function is being edited we keep note of when

[GENERAL] Track changes to function code

2014-07-21 Thread Rebecca Clarke
Hi all, At present when a function is being edited we keep note of when and by who within comments in the function's code. Is there, or can anyone recommend, any open source software that tracks function activity when it comes to edits (not executions)? I tried searching on the web, but all I fin

Re: [GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-07-01 Thread Rebecca Clarke
rs. On Mon, Jun 30, 2014 at 5:15 PM, Arup Rakshit wrote: > On Monday, June 30, 2014 04:52:32 PM Rebecca Clarke wrote: > > Hi Arup, > > > > Two ways come to mind for me. They're pretty much the same as Szymon's, > > just minus the sample table creation.

Re: [GENERAL] Re: collecting employees who completed 5 and 10 years in the current month

2014-07-01 Thread Rebecca Clarke
Right you are David re my first query. That'll be more appropriate if you want to establish if they're in their 5th year, or 10th year. On Mon, Jun 30, 2014 at 6:08 PM, David G Johnston < david.g.johns...@gmail.com> wrote: > Rebecca Clarke-2 wrote > > create view vw_

Re: [GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Rebecca Clarke
Hi Arup, Two ways come to mind for me. They're pretty much the same as Szymon's, just minus the sample table creation. I would suggest creating a view instead, so you can just select from it whenever you please. create view vw_employee as select * from employees where ((age(joining_date::

Re: [GENERAL] Initial queries of day slow

2014-04-07 Thread Rebecca Clarke
ow. Will run both nightly manual and autovac to see how things go. On a side not, we're not doing a vacuumdb, but individual vacuum analyze statements on each table. Not sure if that makes any difference. On Mon, Apr 7, 2014 at 9:13 PM, Jeff Janes wrote: > On Mon, Apr 7, 2014 at 3:58 AM,

Re: [GENERAL] Initial queries of day slow

2014-04-07 Thread Rebecca Clarke
three hours. We orginally found autovacuum too intrusive so switched to manual. We've had no problems with performance at all, only this. We're going to turn autovacuum back on to see if it makes any impact to this particular issue. On Mon, Apr 7, 2014 at 10:50 AM, Albe Laurenz wrote: &

[GENERAL] Initial queries of day slow

2014-04-07 Thread Rebecca Clarke
Hi all. I'm a bit stumped. At present I'm finding that queries to my database, that normally execute promptly, are taking a long time when they are executed first thing in the morning (after the database has been inactive for several hours). After the first execution, everything is back to normal.

Re: [GENERAL] .pgpass being ignored

2013-06-24 Thread Rebecca Clarke
I could be wrong, but shouldn't the owner of .pgpass be postgres? On Mon, Jun 24, 2013 at 3:17 PM, Ziggy Skalski wrote: > On 13-06-21 06:19 PM, Stephen Rasku wrote: > >> I am trying to write a script that will create and populate a >> database. I don't want to enter a password every time so I w

Re: [GENERAL] Get data type aliases

2013-06-13 Thread Rebecca Clarke
That's great, thank you! worked like a charm. On Wed, Jun 12, 2013 at 8:31 PM, Alvaro Herrera wrote: > Rebecca Clarke escribió: > > Hi all. > > > > I have a function that has an attribute with datatype of character > varying. > > In the pg_type table the

[GENERAL] Get data type aliases

2013-06-12 Thread Rebecca Clarke
Hi all. I have a function that has an attribute with datatype of character varying. In the pg_type table the oid of the data type points to type varchar Is there somewhere that identifies the alias for each type? E.g. int4 = integer varchar = character varying. and so on. I can do an if statem

[GENERAL] Function tracking

2013-06-07 Thread Rebecca Clarke
Hi all I'm looking for suggestions on the best way to track the updates to a function. We have two databases, Dev & Live, so I want to update Live with just the functions that have been modified in the DEV databas3e. Is there another, easier way to track the updates than manually recording it in

Re: [GENERAL] Storing Special Characters

2013-05-15 Thread Rebecca Clarke
Thanks everyone for your help. I changed the encoding as directed on the PHP documentation provided by Leif to LATIN1 instead of the UTF-8. This resolved the issue and the records with £ and é inserted into the database without complaint. On Tue, May 14, 2013 at 11:36 PM, CR Lender wrote: > O

[GENERAL] Storing Special Characters

2013-05-14 Thread Rebecca Clarke
Hi there. This may be the wrong forum to inquire in, but I'd be grateful if I could directed in the right direction if that is the case. I am currently using Postgresql 9.1. I have a table in which I want to store shop names. Some of the shop names contain 'é' and '£'. The query below works whe

[GENERAL] No Default Text Search Parser

2012-09-04 Thread Rebecca Clarke
Hi there Postgresql 8.4. I keep getting this error multiple times when I tried to access the pg_catalog in pg_admin: Cache lookup failed for text search parser 3722. The logs show that the query that was being executed was: (example is one of many) SELECT (SELECT t.alias FROM pg_ca

Re: [GENERAL] Databas has no Object Identifier Types & Functions

2012-09-04 Thread Rebecca Clarke
Returns 0 rows. On Tue, Sep 4, 2012 at 11:41 AM, Pavan Deolasee wrote: > > > On Tue, Sep 4, 2012 at 3:58 PM, Rebecca Clarke wrote: > >> Hi there, >> >> I'm running postgresql 8.4 on a debian system. I have a database that has >> no object identifier type

[GENERAL] Databas has no Object Identifier Types & Functions

2012-09-04 Thread Rebecca Clarke
Hi there, I'm running postgresql 8.4 on a debian system. I have a database that has no object identifier types and functions in the pg_catalog, e.g. regclass, regclassout. What's the best way to get these in to this database? I don't want to upgrade postgresql. There are other databases on the

Re: [GENERAL] .pgpass not working

2012-05-08 Thread Rebecca Clarke
n May 4, 2012, at 9:30 AM, Rebecca Clarke wrote: > > I do not want to touch the pg_hba.conf so I have generated the .pgpass > file. > The permissions is set to 600, and I have correctly inputted the details > into .pgpass, there are no leading spaces. > > *myhostname:myport:*:

[GENERAL] .pgpass not working

2012-05-04 Thread Rebecca Clarke
Hi Apologies in advance if this is the wrong place to ask. I have Postres 8.4 and I am setting up replication with Slony. I'm having password issues with slony. I have roamed the net for a solution and the way to fix it is to use the .pgpass file or change pg_hba.conf to accept trusted connection

Re: [GENERAL] how to drop function?

2011-11-15 Thread Rebecca Clarke
DROP FUNCTION process_table; should work. On Tue, Nov 15, 2011 at 11:38 PM, J.V. wrote: > How do I drop a function that was created like so: > > create or replace function process_table (action TEXT, v_table_name > varchar(100)) RETURNS BOOLEAN > AS $$ > DECLARE > > BEGIN > ... > END; >

Re: [GENERAL] Transfer 8.3 to 8.4 - FUNCTION gtsq_in(cstring) does not exist

2011-10-14 Thread Rebecca Clarke
Your right. I'm actually transferring from 8.2. Dumb moment for me there! I am using tsvector so unable to uninstall. I will look into documentation.. Thanks for your help. Rebecca On Thu, Oct 13, 2011 at 3:43 PM, Tom Lane wrote: > Rebecca Clarke writes: > > I'm transferr

[GENERAL] Transfer 8.3 to 8.4 - FUNCTION gtsq_in(cstring) does not exist

2011-10-13 Thread Rebecca Clarke
Hi I'm transferring a database from 8.3 to 8.4 and I've done a pg_dump of the db schema on 8.3. When I pg_restore it to 8.4 I get the following: pg_restore: creating FUNCTION gtsq_in(cstring) pg_restore: [archiver (db)] Error from TOC entry 550; 1255 4231868780 FUNCTION gtsq_in(cstring) postgres p

[GENERAL] Transfer 8.3 to 8.4 - FUNCTION gtsq_in(cstring) does not exist

2011-10-13 Thread Rebecca Clarke
Hi I'm transferring a database from 8.3 to 8.4 and I've done a pg_dump of the db schema on 8.3. When I pg_restore it to 8.4 I get the following: pg_restore: creating FUNCTION gtsq_in(cstring) pg_restore: [archiver (db)] Error from TOC entry 550; 1255 4231868780 FUNCTION gtsq_in(cstring) postgres p

Re: [GENERAL] Connection Error during Pg_restore

2011-08-24 Thread Rebecca Clarke
That worked thank you On Wed, Aug 17, 2011 at 1:01 PM, raghu ram wrote: > > > On Wed, Aug 17, 2011 at 4:32 PM, Rebecca Clarke wrote: > >> Hi there >> >> I'm doing a restore of a large table. The backup file is 18gb. When I run >> the restore after some

[GENERAL] Connection Error during Pg_restore

2011-08-17 Thread Rebecca Clarke
Hi there I'm doing a restore of a large table. The backup file is 18gb. When I run the restore after sometime it comes up with this error while it is restoring the data. pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 3022; 0 4287406059 TAB

[GENERAL] Pg_dump Query

2011-08-15 Thread Rebecca Clarke
Hi I want to pg_dump only a select amount of rows from a table and restore them to a table on another server. Is there away to do this? I thought of using a view but how would I upload that into a specific table. Copy? or is there something I can do with pg_restore. Rebecca

[GENERAL] List Functions and Code

2011-07-28 Thread Rebecca Clarke
Hi I want to search and list all the functions in a database that reference a particular table within its code. Is there a way to do this? I can list all the functions from pg_proc, however there is nothing there which provides the code of the function, so therefore I can't query if it mentions a

Re: [GENERAL] Error creating function

2011-07-21 Thread Rebecca Clarke
restoration. So after I created the language and restarted the restoration from scratch with the public schema first, I no longer received this error. Thanks Rebecca On Wed, Jul 20, 2011 at 3:46 PM, Tom Lane wrote: > Rebecca Clarke writes: > > I'm doing a restore into Postgresq

[GENERAL] Error creating function

2011-07-20 Thread Rebecca Clarke
Hi I'm doing a restore into Postgresql 8.4, postgis 1.5.1 and I'm getting the following error when it creates the below function: pg_restore: creating FUNCTION _get_buffer(geometry, double precision, integer) pg_restore: [archiver (db)] Error from TOC entry 966; 1255 49162661 FUNCTION _get_buffer

[GENERAL] Database Restore Fail - No liblwgeom.so

2011-07-19 Thread Rebecca Clarke
Hi there I'm transferring a database from 8.2 to 8.4 and I have some triggers that reference liblwgeom.so within the database. When I restore a dump of the 8.2 database into my 8.4 database it says that liblwgeom.so does not exist. From various forums on the internet I have discovered that this h