[GENERAL] Changing boolean to a smallint

2010-11-04 Thread Christine Penner
I have a table column I want to change from a boolean to a smallint. changing false to 0 and true to 1. How do I do that? Christine Penner Ingenious Software 250-352-9495 ch...@fp2.ca -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription

[GENERAL] function problems

2010-11-16 Thread Christine Penner
T_CODE=meetCode; Display := meetType Return; end if; else Display := subj Return; end if; Return; END; $BODY$ LANGUAGE plpgsql IMMUTABLE COST 100; Christine Penner -- Sent via pgsql-

Re: [GENERAL] function problems

2010-11-16 Thread Christine Penner
I have seen other functions (written by others) that do this. So I assume its ok. I'm open to suggestions though. As long as it works. At 01:54 PM 16/11/2010, you wrote: On 16/11/2010 21:27, Christine Penner wrote: create or replace function SubjectDisplay(IN subj varchar,IN mee

Re: [GENERAL] function problems

2010-11-16 Thread Christine Penner
I am returning one value (text). Each of the selects in the function should also return only one value. At 02:06 PM 16/11/2010, you wrote: On 11/16/2010 3:57 PM, Christine Penner wrote: I have seen other functions (written by others) that do this. So I assume its ok. I'm open to sugges

Re: [GENERAL] function problems

2010-11-16 Thread Christine Penner
1 Hint: If you want to discard the results of a SELECT, use PERFORM instead. Context: PL/pgSQL function "subjectdisplay" line 7 at SQL statement At 02:09 PM 16/11/2010, Raymond O'Donnell wrote: On 16/11/2010 21:57, Christine Penner wrote: I have seen other functions (written by ot

[GENERAL] finding strings with quotes

2011-02-25 Thread Christine Penner
ut have double quotes in the string instead of single quotes this works. -- Christine Penner Ingenious Software 250-352-9495 ch...@fp2.ca

[GENERAL] adding years to a date field

2011-04-06 Thread Christine Penner
life but I can't seem to do that without getting syntax errors -- Christine Penner Ingenious Software 250-352-9495 ch...@fp2.ca

Re: [GENERAL] adding years to a date field

2011-04-06 Thread Christine Penner
This still gave me a sytax error. The other suggestion to multiply the interval field by 1 year also gave me a syntax error. ii_purchased is a timestamp without time zone ii_expected_life is a smallint Any other suggestions? Christine Penner Ingenious Software 250-352-9495 ch...@fp2.ca On

Re: [GENERAL] adding years to a date field

2011-04-06 Thread Christine Penner
This worked. Thanks Christine Penner Ingenious Software 250-352-9495 ch...@fp2.ca On 06/04/2011 9:23 AM, Osvaldo Kussama wrote: SELECT ii_purchased + ii_expected_life * '1 year'::interval FROM inventory_item;

[GENERAL] String Manipulation

2009-06-12 Thread Christine Penner
??),7) instead of ?? I need to know the position of the last numeric character. Any suggestions would be appreciated Christine Penner Ingenious Software 250-352-9495 christ...@ingenioussoftware.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] String Manipulation

2009-06-12 Thread Christine Penner
the manual but I'm still stuck. Christine At 03:05 PM 12/06/2009, you wrote: On Fri, Jun 12, 2009 at 12:36:27PM -0700, Christine Penner wrote: > I want to calculate a new field I added to a table but I'm not sure > how to do it. This will be a copy of another field with any non >

Re: [GENERAL] String Manipulation

2009-06-12 Thread Christine Penner
Sam, I get nothing. I just updated recently but the only version number I can find is 8.3. I know its at least 8.3.4 but should be more. Christine At 03:58 PM 12/06/2009, you wrote: On Fri, Jun 12, 2009 at 03:35:44PM -0700, Christine Penner wrote: > The problem with making it a nume

Re: [GENERAL] String Manipulation

2009-06-15 Thread Christine Penner
Alban, That was exactly what I was looking for. Thanks Christine At 03:45 AM 13/06/2009, you wrote: On Jun 13, 2009, at 12:35 AM, Christine Penner wrote: Sam, The problem with making it a numeric field is that I have seen things like A123, #123a or 23-233. This is only here to make most

[GENERAL] 8.4 installer

2009-09-16 Thread Christine Penner
alling the data directory in a place other than the program files directory. I have done this a few times now and I'm just not seeing what I'm missing. When I originally installed Postgres 8.3 I didn't use the one click installer. Since then I have upgraded to another 8.3.x withou

Re: [GENERAL] 8.4 installer

2009-09-21 Thread Christine Penner
te that you may need to provide a full path to initdb if it isn't in a place covered by your PATH variable. Also, try giving a full path to the data directory for your -D argument. It might not be finding one of them. --- David Spadea Spadea Enterprises, Inc <http://www.s

[GENERAL] Find \ in text

2010-09-07 Thread Christine Penner
MM_PATH_FILE)=0 -this gives me an error Any other suggestions? Christine Penner Ingenious Software 250-352-9495 christ...@ingenioussoftware.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] query join issue

2010-09-16 Thread Christine Penner
IN_COMP ON TRAIN_MOD.TRM_TRC_SEQ=TRAIN_COMP.TRC_SEQ_NO where TC_PUB_ED IS TRUE OR TC_SEQ_NO IS NULL Christine Penner Ingenious Software 250-352-9495 christ...@ingenioussoftware.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscrip

[GENERAL] query join issue

2010-09-16 Thread Christine Penner
IN_COMP ON TRAIN_MOD.TRM_TRC_SEQ=TRAIN_COMP.TRC_SEQ_NO where TC_PUB_ED IS TRUE OR TC_SEQ_NO IS NULL Christine Penner Ingenious Software 250-352-9495 christ...@ingenioussoftware.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscrip

Re: [GENERAL] query join issue

2010-09-16 Thread Christine Penner
r the query. Hope this info helps. I'm sure there is something wrong with the join or something, I just don't see it. Christine At 10:22 AM 16/09/2010, you wrote: On 16/09/2010 16:05, Christine Penner wrote: I have a query that joins 3 tables, TRAIN_MOD,TRAIN_COMP and TRAINING_COURS

Re: [GENERAL] query join issue

2010-09-16 Thread Christine Penner
I decided to approach this a different way. Not worth the time to figure out. I get all records from all tables and put them together in the program using this. Thanks for your help. Christine At 12:20 PM 16/09/2010, you wrote: On 16/09/2010 18:33, Christine Penner wrote: Training Course

[GENERAL] Testing query times

2009-12-03 Thread Christine Penner
to make them faster. I have tried restarting the Postgres service but that doesn't help. Christine Penner Ingenious Software 250-352-9495 christ...@ingenioussoftware.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] Server Requirements

2009-12-16 Thread Christine Penner
l but that can change of course. Christine Penner Ingenious Software 250-352-9495 christ...@ingenioussoftware.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Simple function

2009-12-23 Thread Christine Penner
ement. Christine Penner Ingenious Software 250-352-9495 <mailto:christ...@ingenioussoftware.com>christ...@ingenioussoftware.com -- 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] Simple function

2009-12-23 Thread Christine Penner
Thanks a lot, that worked great. Saved me a lot of time trying to figure it out too. Christine It works for me: postgres=# CREATE OR REPLACE FUNCTION countertest(integer) RETURNS bigint AS $$ SELECT COUNT(*) FROM test WHERE nbr = $1; $$ LANGUAGE SQL; CREATE FUNCTION postgres=# select countert

[GENERAL] Connect to Postgres problems

2010-02-01 Thread Christine Penner
orking I noticed that the port forwarding got disabled somehow so I set that up again but still no luck. I'm at a loss here. What else can I be missing? Christine Penner Ingenious Software 250-352-9495 christ...@ingenioussoftware.com -- Sent via pgsql-general mailing list (pgsql-g

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Christine Penner
I have re started the computer (a few times) since I did all that. Christine At 09:08 AM 01/02/2010, you wrote: On 02/01/2010 08:36 AM, Christine Penner wrote: Hi, I'm having trouble getting a connection to Postgres to work from outside of my local network. It was working fine at one

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Christine Penner
When we try to connect we don't get a specific error, just that it can't connect. I'm not sure what logs to look in or on what end. Christine At 09:13 AM 01/02/2010, you wrote: On 02/01/2010 09:10 AM, Christine Penner wrote: I have re started the computer (a few times) since

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Christine Penner
look at the firewall settings and see. Christine At 09:20 AM 01/02/2010, you wrote: Christine Penner wrote: Hi, I'm having trouble getting a connection to Postgres to work from outside of my local network. It was working fine at one point. Then I had to change IP addresses and I can&#

[GENERAL] Cast char to number

2010-02-24 Thread Christine Penner
I have a character field I want to change to a number. The values in that field are all numbers that may or may not be padded with spaces or 0's. What is the best way to do that? Christine Penner Ingenious Software 250-352-9495 christ...@ingenioussoftware.com -- Sent via pgsql-ge

Re: [GENERAL] Cast char to number

2010-02-24 Thread Christine Penner
: In response to Christine Penner : > I have a character field I want to change to a number. The values in > that field are all numbers that may or may not be padded with spaces > or 0's. What is the best way to do that? Put the values in numeric fields to begin with and cast to chars as

Re: [GENERAL] Cast char to number

2010-02-24 Thread Christine Penner
This is what I did. set all blank columns to '0' because they were causing errors. alter table T alter column a type integer using a::integer That worked perfectly. Thanks everyone for the help. Christine At 12:46 PM 24/02/2010, Scott Marlowe wrote: On Wed, Feb 24, 2010 at 1:43 PM, Tom Lane

[GENERAL] Postgres windows user

2011-11-16 Thread Christine Penner
standard SP2 (VMware Virtual Software) The server has Postgres 9.0.3 (I believe) They are also using a domain which I believe is causing the problem but I dont know enough about that to say for sure. Has anyone seen this before and know what they can do? -- Christine Penner Ingenious Software 250

[GENERAL] Error installing Postgres

2009-04-22 Thread Christine Penner
When trying to upgrade Postgres I got this message: The existing data directory (Date/time settings: floating -point numbers) is not compatible with this server (Date/Time setting: 64-bit integers) I saw a few posts about this but I'm still not sure how to fix it. I think one of them said I

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Christine Penner
I am upgrading from 8.3.4 to 8.3.7. That's why I'm confused. The notes said I wouldn't have to do that. 8.3.4 was the original install. Christine At 10:09 AM 22/04/2009, you wrote: On 22/04/2009 16:57, Christine Penner wrote: > The existing data directory (Date/time setting

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Christine Penner
all defaults for directories because I want to keep my existing data etc. Christine At 10:24 AM 22/04/2009, you wrote: On Wed, 2009-04-22 at 10:13 -0700, Christine Penner wrote: > I am upgrading from 8.3.4 to 8.3.7. That's why I'm confused. The > notes said I wouldn't h

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Christine Penner
It was a zip file with an msi installer in it. I tried to find a similar one for the update but all I could find was the one click installer. Christine At 11:00 AM 22/04/2009, you wrote: Joshua D. Drake wrote on 22.04.2009 19:34: Huh, I wonder when the windows package changed its defaults.

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Christine Penner
The link below takes me to the same place I got this installer I'm having problems with. I am pretty sure I got the original installer from the Postgres web site just like I just did. Christine At 11:14 AM 22/04/2009, you wrote: On 22/04/2009 19:05, Christine Penner wrote: > It w

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Christine Penner
nstaller I got was called a binary package. I think that will work for me. Thanks Christine At 11:27 AM 22/04/2009, you wrote: On 22/04/2009 19:21, Christine Penner wrote: > The link below takes me to the same place I got this installer I'm > having problems with. I am pretty su

[GENERAL] Restore Crashes Postgres

2009-04-28 Thread Christine Penner
existing database but not always. Doesn't seem to make a difference. The big problem with the crashes is the only way to be able to use Postgres at that point is to restart the whole computer. We are all using 8.3.4 on Windows XP Christine Penner Ingenious Software 250-352-9495 c

Re: [GENERAL] Restore Crashes Postgres

2009-04-28 Thread Christine Penner
traints present. pg_dump has an elegant way of avoiding such pitfalls. Allan. On Tue, Apr 28, 2009 at 5:43 PM, Christine Penner wrote: > We are in the process of converting our application to use Postgres. We have > about 5 computers in the office. We frequently create a database on

Re: [GENERAL] Restore Crashes Postgres

2009-04-28 Thread Christine Penner
test86+? All computers are running NOD32 for anti-virus. All are updated and running. I haven't run Memtest86 on any of them. This has happened on 5 different computers including my personal laptop which is never connected to the network at the office. Christine At 11:35 AM 28/04/2009

Re: [GENERAL] Welcome to the pgsql-bugs list!

2009-04-28 Thread Christine Penner
After looking closer at the log file I found something interesting: 2009-04-27 17:38:38 PDT ERROR: column "f_township" of relation "fire_report" does not exist at character 3584. Almost every insert got an error about a duplicate primary key. That shouldn't happen because all these records we