[GENERAL] disappearing data

2010-08-23 Thread Garry Saddington
We have had a problem with postgresql 8.3 on a Windows server 2008. I wonder whether there has been any other experiences like this. We have connected to Potsgres from Zope via a Psycopg adapter and noticed that sometimes when data is inserted via a form in Zope, the data is available in Zope

[GENERAL] filter tables from database

2010-08-11 Thread Garry Saddington
I can retrieve the table names in my database, but I would like to filter them based on the name of a field. Is this possible? Thanks Garry -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Open Source Forum Software using PostgreSQL?

2010-07-04 Thread Garry Saddington
Andre Lopes wrote: Hi, I need to use an Forum Software. There is any Open Souce Forum Script using PostgreSQL? Best Regards, André. Zforum does, but you will need to install Zope to run it. Garry -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Trying to install ODBC driver on Windows XP notebook

2010-06-22 Thread Garry Saddington
Phil Jackson wrote: I have latest Postgresql installed on a notebook and now trying to install the driver which I have downloaded and run so that it is now available in the ODBC Data Source Administrator This machine has CA security suite, latest version installed and I have added a network

Re: [GENERAL] windows 7 compatiblity?

2010-04-05 Thread Garry Saddington
Frank Heikens wrote: Hi I recently bought Windows 7 32 bit professional. Unfortunately Postgresql 8.4.3 did not install or work. Tell us about your problems, error messages and logs, then we can help you to get it working. I started searching Google and found that a lot of other people

[GENERAL] accounting package

2010-03-18 Thread Garry Saddington
Does anyone know of a web based accounting(finance) package that uses Postgresql as a backend? Thanks Garry -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] modelling question

2009-12-19 Thread Garry Saddington
Anyone have any ideas/suggestions on how to model siblings in a database so that it is possible to eg. only send letters to the parents once. In this scenario each sibling has the contact parents input separately (secretarial input!). Garry -- Sent via pgsql-general mailing list

[GENERAL] all empty tables

2009-11-14 Thread Garry Saddington
How could I list all the tables in a database that do not contain any data? I have looked at reltuples but can't quite work out how to use it, any pointers would be much apreciated. Regards Garry -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] difficulty running pg on XP as appl.

2009-08-13 Thread Garry Saddington
PG Subscriber wrote: I'm on Windows XP SP 2, trying to run PostgreSQL 8.3.4. Running postgres.exe gives the error: Execution of PostgreSQL by a user with administrative permissions is not permitted. The server must be started under an unprivileged user ID to prevent possible system security

[GENERAL] distributing postgresql binaries

2009-08-01 Thread Garry Saddington
I have developed an application using Zope and Postgresql and I want to be able to distribute the application with a full database of data so that there are no setup worries for users. The platform is Windows. When I copy the app over to windows XP home, Postgres refuses to start and I get a

Re: [GENERAL] distributing postgresql binaries

2009-08-01 Thread Garry Saddington
Alan McKay wrote: Why not populate the registry properly? It is not that difficult to do. Good idea, but where do I find the correct entries? Regards Garry -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] distributing postgresql binaries

2009-08-01 Thread Garry Saddington
Garry Saddington wrote: I have developed an application using Zope and Postgresql and I want to be able to distribute the application with a full database of data so that there are no setup worries for users. The platform is Windows. When I copy the app over to windows XP home, Postgres

[GENERAL] running pg_dump from python

2009-06-14 Thread Garry Saddington
I ahve the following python file that I am running as an external method in Zope. def backup(): import os os.popen(c:/scholarpack/postgres/bin/pg_dump scholarpack c:/scholarpack/ancillary/scholarpack.sql) data=open('c:/scholarpack/ancillary/scholarpack.sql','r') r=data.read()

Re: [GENERAL] running pg_dump from python

2009-06-14 Thread Garry Saddington
Scott Mead wrote: On Sun, Jun 14, 2009 at 4:06 PM, Garry Saddington ga...@schoolteachers.co.uk mailto:ga...@schoolteachers.co.uk wrote: I ahve the following python file that I am running as an external method in Zope. def backup(): import os os.popen(c:/scholarpack

[GENERAL] timestamp differences

2008-12-28 Thread Garry Saddington
I have a timestamp column that I want to compare with current timestamp. I want to get all rows that are less than 10 minutes old. I have searched but can not find how to do this, any pointers? regards Garry -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

[GENERAL] aggregates and case statements

2008-11-16 Thread Garry Saddington
Is there a way to make the following statement return the total of all effort. At the moment it gives a list of sum vs case. select sum(effort), CASE WHEN effortandattainment.effort=5 THEN -3 WHEN effortandattainment.effort=4 THEN -2 WHEN effortandattainment.effort=3 THEN 1 WHEN

[GENERAL] grant privileges

2008-11-08 Thread Garry Saddington
Is there a way to grant all priveleges on all tables and sequences in a database at the same time? regards Garry -- 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] grant privileges

2008-11-08 Thread Garry Saddington
On Saturday 08 November 2008 13:01, Andreas Kretschmer wrote: Garry Saddington [EMAIL PROTECTED] schrieb: Is there a way to grant all priveleges on all tables and sequences in a database at the same time? Thanks I've just installed pgAdmin and that has done the trick. Regards Garry -- Sent

[GENERAL] case expression

2008-09-24 Thread Garry Saddington
Can anyone tell me why this will not work? select *, CASE WHEN postcode ilike '%OO%' THEN '' END from addresses where studentid=1234 and addresstype='C' There are postcodes like this: OO00 0OO Regards Garry -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] case expression

2008-09-24 Thread Garry Saddington
On Wednesday 24 September 2008 21:03, Tom Lane wrote: Garry Saddington [EMAIL PROTECTED] writes: Can anyone tell me why this will not work? select *, CASE WHEN postcode ilike '%OO%' THEN '' END from addresses ... Define not work. What are you expecting it to do versus what

[GENERAL] query takes a long time

2008-08-23 Thread Garry Saddington
Can someone suggest how I could speed up the execution of this query? select count(distinct attendance.studentid) from attendance where attendance.studentid not in (select studentid from attendance where auth not in('C','E','F','G','H','I','M','N','O','R','S','T','U')) It returns the correct

[GENERAL] regexp help

2008-07-09 Thread Garry Saddington
I have the following simple regular expression: SELECT substring(addressline1 from '(^[0-9]+)') from addresses How could I find non-matches of this same pattern? regards Garry -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Unicode problem again

2008-06-26 Thread Garry Saddington
On Thursday 26 June 2008 15:41, Michael Fuhr wrote: On Thu, Jun 26, 2008 at 03:31:01PM +0200, Albe Laurenz wrote: Michael Fuhr wrote: Your input data seems to have a mix of encodings: sometimes you're getting pound signs in a non-UTF-8 encoding, but if characters like U+2019 RIGHT

[GENERAL] Unicode problem again

2008-06-23 Thread Garry Saddington
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 teachers.teacherid,teachers.teacherid as thisteacherid,teachers.initials,

Re: [GENERAL] Losing data

2008-06-20 Thread Garry Saddington
On Friday 20 June 2008 05:26, Robert Treat wrote: On Thursday 19 June 2008 14:06:38 Garry Saddington wrote: In any case, however, if PostgreSQL reported the transaction complete and the machine didn't experience any hardware problems (like sudden power or disk failure), I would certainly

[GENERAL] Losing data

2008-06-19 Thread Garry Saddington
I have had a serious loss of data and wondered if anyone could shed any light on what may have happened. My users have been writing reports on students. No error messages have been produced and when called back up the reports seem to be present at the time of writing. However, next day they

Re: [GENERAL] Losing data

2008-06-19 Thread Garry Saddington
On Thursday 19 June 2008 16:55, Joshua D. Drake wrote: On Thu, 2008-06-19 at 16:55 +0100, Garry Saddington wrote: I have had a serious loss of data and wondered if anyone could shed any light on what may have happened. My users have been writing reports on students. No error messages have

Re: [GENERAL] Losing data

2008-06-19 Thread Garry Saddington
On Thursday 19 June 2008 18:10, Bill Moran wrote: In response to Garry Saddington [EMAIL PROTECTED]: On Thursday 19 June 2008 16:55, Joshua D. Drake wrote: On Thu, 2008-06-19 at 16:55 +0100, Garry Saddington wrote: I have had a serious loss of data and wondered if anyone could shed

Re: [GENERAL] Losing data

2008-06-19 Thread Garry Saddington
On Thursday 19 June 2008 18:15, Alan Hodgson wrote: On Thursday 19 June 2008, Garry Saddington [EMAIL PROTECTED] wrote: I read in a Postgres manual that the hard disk may report to the OS that a write has occured when it actually has not, is this possible? Yeah. But unless the power

Re: [GENERAL] Losing data

2008-06-19 Thread Garry Saddington
On Thursday 19 June 2008 18:09, Scott Marlowe wrote: On Thu, Jun 19, 2008 at 9:55 AM, Garry Saddington [EMAIL PROTECTED] wrote: I have had a serious loss of data and wondered if anyone could shed any light on what may have happened. My users have been writing reports on students. No error

Re: [GENERAL] Losing data

2008-06-19 Thread Garry Saddington
On Thursday 19 June 2008 18:52, Adrian Klaver wrote: -- Original message -- From: Garry Saddington [EMAIL PROTECTED] On Thursday 19 June 2008 16:55, Joshua D. Drake wrote: On Thu, 2008-06-19 at 16:55 +0100, Garry Saddington wrote: I have had a serious

Re: [GENERAL] Losing data

2008-06-19 Thread Garry Saddington
On Thursday 19 June 2008 19:03, Joshua D. Drake wrote: On Thu, 2008-06-19 at 19:06 +0100, Garry Saddington wrote: On Thursday 19 June 2008 18:15, Alan Hodgson wrote: On Thursday 19 June 2008, Garry Saddington [EMAIL PROTECTED] Although I appreciate that this is a funky problem, the problem

Re: [GENERAL] UTF8 encoding problem

2008-06-18 Thread Garry Saddington
On Wednesday 18 June 2008 02:04, Michael Fuhr wrote: On Tue, Jun 17, 2008 at 10:48:34PM +0100, Garry Saddington wrote: I am getting illegal UTF8 encoding errors and I have traced it to the £ sign. What's the exact error message? I have set lc_monetary to lc_monetary = 'en_GB.UTF-8

Re: [GENERAL] UTF8 encoding problem

2008-06-18 Thread Garry Saddington
On Wednesday 18 June 2008 14:00, Michael Fuhr wrote: On Wed, Jun 18, 2008 at 08:25:07AM +0200, Giorgio Valoti wrote: On 18/giu/08, at 03:04, Michael Fuhr wrote: Is the data UTF-8? If the error is 'invalid byte sequence for encoding UTF8: 0xa3' then you probably need to set

[GENERAL] UTF8 encoding problem

2008-06-17 Thread Garry Saddington
I am getting illegal UTF8 encoding errors and I have traced it to the £ sign. I have set lc_monetary to lc_monetary = 'en_GB.UTF-8' in postgresql.conf but this has no effect. How can I sort this problem? Client_encoding =UTF8. Regards Garry -- Sent via pgsql-general mailing list

[GENERAL] two not null columns

2008-04-14 Thread Garry Saddington
How would I write a table check constraint to make sure that two columns don't both have nulls at the same time. The following doesn't do it because it because it does not allow one column to be null while the other holds data? check(teachgroup is not null AND set is not null) regards garry

Re: [GENERAL] two not null columns

2008-04-14 Thread Garry Saddington
On Monday 14 April 2008 17:44, Andreas Kretschmer wrote: Garry Saddington [EMAIL PROTECTED] schrieb: How would I write a table check constraint to make sure that two columns don't both have nulls at the same time. The following doesn't do it because it because it does not allow one column

Re: [GENERAL] Find Number Of Sundays Between Two Dates

2008-03-05 Thread Garry Saddington
On Wednesday 05 March 2008 06:16, raghukumar wrote: Hai EverBody, Can I know what is the query by which we can find the number of sundays between two given dates in postgres Thanks In Advance, Raghu... I think the easiest way is to set up a table populated with all dates and

Re: [GENERAL] first message: SELECT column FROM t

2008-02-02 Thread Garry Saddington
On Saturday 02 February 2008 17:43, Aílsom F. Heringer wrote: Hi, This is my first message, and I need some help. I have just installed Postgresql 8.2. (Windows). At pgAdmin III Query, when I send SELECT * FROM USUARIOS, I get all columns correctly. But when I try to get only one column,

[GENERAL] execute pg_dump via python

2007-10-25 Thread Garry Saddington
I am using zope on windows with an external python method to backup my database. I am struggling to run the following command: pg_dump.exe database file I have tried using os.popen - no luck and also subprocess.Popen. eg: import subprocess

Re: [GENERAL] Excell

2007-06-20 Thread Garry Saddington
On Wednesday 20 June 2007 03:09, Bob Pawley wrote: Thanks Does one version of ODBC work for all versions of Excel and Postgresql. I am wanting to transfer one or two tables from Excel and manipulate the information in Postgresql then transfer the results back to Excel as a single table. I

[GENERAL] time without time zone

2007-06-18 Thread Garry Saddington
This is a select on table periods defined as such: CREATE TABLE periods ( periodid serial NOT NULL, periodnumber integer NOT NULL, periodstart time without time zone, periodend time without time zone, PRIMARY KEY (periodid) ) PeriodidPeriodnumberPeriodstart Periodend 6

Re: [GENERAL] time without time zone

2007-06-18 Thread Garry Saddington
On Monday 18 June 2007 21:15, Tom Lane wrote: Garry Saddington [EMAIL PROTECTED] writes: Can anyone explain why time has todays date and time zone? Works for me: regression=# insert into periods values(1,1,'now','now'); INSERT 0 1 regression=# select * from periods; periodid

[GENERAL] xml to db converter

2007-05-10 Thread garry saddington
Does anyone know of a tool that will generate a postgres database schema given an xml schema(xsd). Have tried xmlspy which says it does so but it only has limited postgres support and then it crashes. regards Garry ---(end of broadcast)--- TIP 4:

Re: [GENERAL] delete with self join

2007-04-17 Thread garry saddington
On Tue, 2007-04-17 at 09:21 +0100, Richard Huxton wrote: garry saddington wrote: I am trying this syntax which is my interpretation of the docs: delete from siblings s1 using siblings s2 WHERE s1.principal = s2.principal and s1.sibling=175 Can anyone

Re: [GENERAL] delete with self join

2007-04-17 Thread garry saddington
On Tue, 2007-04-17 at 10:15 +0100, Richard Huxton wrote: garry saddington wrote: On Tue, 2007-04-17 at 09:21 +0100, Richard Huxton wrote: garry saddington wrote: I am trying this syntax which is my interpretation of the docs: delete from siblings s1 using siblings s2

[GENERAL] delete with self join

2007-04-16 Thread garry saddington
I am trying this syntax which is my interpretation of the docs: delete from siblings s1 using siblings s2 WHERE s1.principal = s2.principal and s1.sibling=175 Can anyone tell me where I am going wrong? regards Garry ---(end of

[GENERAL] date format

2007-03-04 Thread Garry Saddington
I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is still rendered in the format (y,m,d) . How can I change this behaviour? regards garry ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an

Re: [GENERAL] date format

2007-03-04 Thread Garry Saddington
On Sunday 04 March 2007 15:28, Raymond O'Donnell wrote: On 04/03/2007 12:58, Jorge Godoy wrote: Garry Saddington [EMAIL PROTECTED] writes: I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is still rendered in the format (y,m,d) . How can I change this behaviour? ISO

Re: [GENERAL] date format

2007-03-04 Thread Garry Saddington
On Sunday 04 March 2007 16:16, Raymond O'Donnell wrote: On 04/03/2007 16:16, Garry Saddington wrote: I tried pgAdmin3 on windows to run 'select now()' and it still does not return the correct datestyle. Probably a silly question, but did you remember to restart the server after changing

Re: [GENERAL] date format

2007-03-04 Thread Garry Saddington
On Sunday 04 March 2007 17:09, Martijn van Oosterhout wrote: On Sun, Mar 04, 2007 at 05:05:44PM +, Garry Saddington wrote: On Sunday 04 March 2007 16:16, Raymond O'Donnell wrote: On 04/03/2007 16:16, Garry Saddington wrote: I tried pgAdmin3 on windows to run 'select now

[GENERAL] simplifying SQL

2007-02-07 Thread garry saddington
I have this query which essentially returns records that exist in one table (studentclass) and not another (effortandattainment) to check when teachers have entered their student grades. select distinct(studentclass.studentclassid),classes.subject,studentclass.studentid as

[GENERAL] counting query

2007-01-28 Thread garry saddington
I have a table definition such as: CREATE TABLE attendance ( attendanceid serial primary key, entered date DEFAULT current_date NOT NULL, absent boolean, authorization text default 'N', timeperiod char(2) check(timeperiod in('AM','PM')), days varchar(10), studentid int,

Re: [GENERAL] counting query

2007-01-28 Thread garry saddington
On Sun, 2007-01-28 at 09:57 -0600, Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/28/07 07:05, garry saddington wrote: I have a table definition such as: CREATE TABLE attendance ( attendanceid serial primary key, entered date DEFAULT current_date

[GENERAL] starting postgres on windows

2006-11-27 Thread garry saddington
How would I start Postgres on windows as an un-privileged user without logging into an un-privileged account. I have tried the -U switch but it still complains. I have version 8. kind regards Garry ---(end of broadcast)--- TIP 1: if posting/reading

[GENERAL] build for none standard socket

2006-11-22 Thread garry saddington
I have searched and Googled but can't find how to do a ./configure to use a different socket than /tmp/.s.PGSQL.5432. It says in the manual that it can be done but then does not say how. Anyone done this before? Regards Garry ---(end of

[GENERAL] None standard install directories

2006-11-22 Thread garry saddington
Thanks to this list I have managed to install into a none standard location and have the socket where I want it -thanks all. However, now I am getting a socket.lock as well and my application is getting a permission denied error on connect, how can I prevent this? I have checked that all directory

[GENERAL] odd result set

2006-11-16 Thread garry saddington
I have the following result from the sql below. Can anyone help by explaining why the last record could be returned. Periodstart and periodend are time data types. I have tried to cast '10.35' to a time type with the same results.

[GENERAL] time type strange behaviour

2006-10-10 Thread garry saddington
I have the following table def. CREATE TABLE periods ( periodid serial NOT NULL, periodnumber integer NOT NULL, periodstart time with time zone, periodend time with time zone, PRIMARY KEY (periodid) ) This definition does not insert time zone. If I use without time zone then the time

Re: [GENERAL] time type strange behaviour

2006-10-10 Thread garry saddington
On Tue, 2006-10-10 at 11:58 -0400, Tom Lane wrote: garry saddington [EMAIL PROTECTED] writes: I have the following table def. CREATE TABLE periods ( periodid serial NOT NULL, periodnumber integer NOT NULL, periodstart time with time zone, periodend time with time zone

[GENERAL] getting dates in the past

2006-09-25 Thread garry saddington
How could I translate this into sql? select result from results where date_entered between (last september and the one before that) Its the part in brackets that has me guessing. I am still experimenting but any help will be gratefully recieved. Kind Regards Garry

[GENERAL] create table as problem

2006-09-15 Thread garry saddington
I am getting a syntax error at or near 'as' in this method, can anyone help? create table iclasses (classid serial, subject text, year text, groups text, teacher text, set text ) as select distinct subject,year,groups,teacher,set from interimclasses I need to make a new table with a classid.

[GENERAL] counting days

2006-08-29 Thread garry saddington
I need to count the days between two dates that are not saturdays or sundays. I have read the manual and searched the lists but I am struggling. I can count the days but am finding difficulty excluding sat and sun from the count. I need this without reference to any tables. Does anyone have any