[GENERAL] Order of Update

2006-03-18 Thread Terry Lee Tucker
Hello List: I'm having an interesting problem. I know what is happening, but I do not know why; therefore, I am hoping that some of those very familiar with the internals can/will explain it to me. I have a function A written in plpgsql which is designed to undo changes to several records.

Re: [GENERAL] Order of Update

2006-03-18 Thread Terry Lee Tucker
) 3.2.3 20030502 (Red Hat Linux 3.2.3-49) (1 row) On Saturday 18 March 2006 09:16 am, Terry Lee Tucker saith: Hello List: . . . ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail

Re: [GENERAL] to_char() Question

2005-12-14 Thread Terry Lee Tucker
a couple overloaded functions handling this as well as ensuring that I'm not dropping the negative sign on a number that actually is negative. Anyway, thanks again for the response... On Wednesday 14 December 2005 01:09 pm, Bruno Wolff III saith: On Tue, Dec 13, 2005 at 11:30:36 -0500, Terry Lee

[GENERAL] to_char() Question

2005-12-13 Thread Terry Lee Tucker
Greetings List: I am using to_char to format numeric data into a string that is ultimately displayed in an XmText widget. Much of the numeric data is always going to be positive. In some of the windows that display this data, space is at a premium. Basically, I need to display something like

Re: [GENERAL] to_char() Question

2005-12-13 Thread Terry Lee Tucker
On Tuesday 13 December 2005 11:20 am, John Sidney-Woollett saith: Not sure if there is a numeric formatting option that allows what you want. But how about? substr(to_char(1029, '9,999'),2) That's so simple, I'm embarrased ;o) Thanks for the help... John Terry Lee Tucker said

Re: [GENERAL] post

2005-12-13 Thread Terry Lee Tucker
Well, go ahead... On Tuesday 13 December 2005 10:41 am, Huub Fleuren saith: i would like to make a post -- -- Geodan IT b.v. Buitenhaven 27-A 5211 TP 's-Hertogenbosch (NL) - Tel: +31 (0)73 - 692 5151 Fax: +31 (0)73

[GENERAL] Issue With PQftable()

2005-12-12 Thread Terry Lee Tucker
Hello List: I have a situation where I'm doing a select statement of the form: SELECT column_1, column_2, my_func(column_3) AS column_3, column_4... FROM my_table INNER JOIN other_table ON ... There are several tables involved in the query. Note that my_func(column_3) from above does some

Re: [GENERAL] Issue With PQftable()

2005-12-12 Thread Terry Lee Tucker
, Richard Huxton saith: Terry Lee Tucker wrote: There are several tables involved in the query. Note that my_func(column_3) from above does some formatting of the data. I issue the command with PQsendQuery(). When loading a widget with data, I have a need of knowing the table oid from which

[GENERAL] Regular Expression Question

2005-12-03 Thread Terry Lee Tucker
RE Gurus: I have a situation where I need to extract a couple pieces of information from a string. The string, if entered perfectly by the user, would look someting like this: DUN: 006235835 SID: KT-3616* I need to extract the 006235835 into one variable and the KT-3616 into another. Both

Re: [GENERAL] hello

2005-12-03 Thread Terry Lee Tucker
On Saturday 03 December 2005 03:10 pm, Andrew Toth saith: Hello to the list. Howdy... ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do

Re: [GENERAL] beginne' - inserting a record

2005-12-03 Thread Terry Lee Tucker
I'm not familiar with version 8.1; however, you to use single quotes, not double quotes as in: INSERT INTO media VALUES ('000', 120, '1'); That should work... On Saturday 03 December 2005 03:48 pm, Andrew Toth saith: Dear List, I have managed some small databases with FoxPro, but

Re: [GENERAL] Function returning SETOF

2005-12-02 Thread Terry Lee Tucker
Simpler is better ;o) Thanks for the input... On Thursday 01 December 2005 10:31 pm, David Fetter saith: On Thu, Dec 01, 2005 at 12:32:02PM -0500, Terry Lee Tucker wrote: List, I have a simple function: I have a simpler one :) CREATE OR REPLACE FUNCTION split_to_rows(TEXT, TEXT

Re: [GENERAL] date/time function

2005-12-01 Thread Terry Lee Tucker
rnd=# select extract(epoch from timestamp '2002-09-08 05:29:41'); date_part 1031477381 (1 row) See the date/time functions documentation. On Thursday 01 December 2005 04:07 am, Sterpu Victor saith: I need a function that will transform from the format '2002-09-08 05:29:41' to

[GENERAL] Function returning SETOF

2005-12-01 Thread Terry Lee Tucker
List, I have a simple function: CREATE OR REPLACE FUNCTION parse_string (TEXT, TEXT) RETURNS SETOF TEXT AS ' DECLARE str ALIAS FOR $1; -- the string to parse delimiter ALIAS FOR $2; -- the delimiter field TEXT; --

Re: [GENERAL] Function returning SETOF

2005-12-01 Thread Terry Lee Tucker
parse_string ('1/2/3/4/5', '/')); NOTICE: parse_string () ?column? - {1,2,3,4,5} (1 row) On Thursday 01 December 2005 12:32 pm, Terry Lee Tucker saith: List, I have a simple function: CREATE OR REPLACE FUNCTION parse_string (TEXT, TEXT) RETURNS SETOF TEXT AS ' DECLARE str

Re: [GENERAL] unsubscribe pgsql-general

2005-11-17 Thread Terry Lee Tucker
:oD On Thursday 17 November 2005 02:45 pm, [EMAIL PROTECTED] saith: On Thu, Nov 17, 2005 at 09:53:26AM -0800, Peter Atkins wrote: unsubscribe pgsql-general O dear ... I haven't posted this in a while :-) Here's how to unsubscribe: First, ask your Internet Provider to mail you an

Re: [GENERAL] querying PostgreSQL version?

2005-10-26 Thread Terry Lee Tucker
rnd=# select version(); version -- PostgreSQL 7.4.6 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 20030502 (Red Hat Linux

Re: [GENERAL] Error Message

2005-10-26 Thread Terry Lee Tucker
Bob, You cannot pass argments to trigger functions. You can to other types of functions, but not functions used as triggers. Arguments are passed regarding the old and new records and other built in variables regarding what kind of operation is going on, but all of that is unseen. They must

Re: [GENERAL] triggers/constraints?

2005-10-08 Thread Terry Lee Tucker
I believe you have a design problem. It seems to me that you need two tables; one with (id, path) and the other with (parent_id, path). Then you can use an UPDATE trigger on item which checks for a change in path. If it has changed, then you can update all those records in table item2 where

Re: [GENERAL] Route Miles

2005-09-09 Thread Terry Lee Tucker
We use PCMiler and Rand McNally products, but they certainly aren't free. Both programs have good API's and run on Linux, which is of interest to us. We have the mileage lookup functionality integerated in to trigger code with C functions that do the work. I don't know of any free products. For

Re: [GENERAL] Route Miles

2005-09-09 Thread Terry Lee Tucker
: On Fri, 2005-09-09 at 10:13 -0400, Terry Lee Tucker wrote: we would have to use the [non-free] products above because the customers demand calculations based on a commercial product. Are you saying that customers demand that you use a non-free product, or are you saying that customers demand

Re: [GENERAL] Route Miles

2005-09-09 Thread Terry Lee Tucker
with PCMiler or Rand McNally. Is it just a query on some route table ie: select miles from route where zip1 = '1' and zip2 = '2'. Also do either of these cover Canada? Thanks Jim -- Original Message --- From: Terry Lee Tucker [EMAIL PROTECTED] To: pgsql-general

[GENERAL] Question regarding FOUND

2005-09-02 Thread Terry Lee Tucker
Greetings, I have a question regarding the use of the FOUND variable within a plpgsql function. I have a trigger fuction which executes a dynamic update on a different table with the EXECUTE statement. Here's the question: Will the FOUND variable be set, when using EXECUTE, as it would be with

Re: [GENERAL] Question regarding FOUND

2005-09-02 Thread Terry Lee Tucker
02 September 2005 09:14 am, Michael Fuhr saith: On Fri, Sep 02, 2005 at 08:51:41AM -0400, Terry Lee Tucker wrote: Will the FOUND variable be set, when using EXECUTE, as it would be with a normal UPDATE statement? What happened when you tried it? -- Michael Fuhr

Re: [GENERAL] Question regarding FOUND

2005-09-02 Thread Terry Lee Tucker
of the dynamic update statement performed with EXECUTE? On Friday 02 September 2005 08:51 am, Terry Lee Tucker saith: Greetings, I have a question regarding the use of the FOUND variable within a plpgsql function. I have a trigger fuction which executes a dynamic update on a different table

Re: [GENERAL] Question regarding FOUND

2005-09-02 Thread Terry Lee Tucker
I looked at the documentation before I ever posted anything. I didn't know how EXECUTE works and I actually thought the UPDATE statement itself would set the variable. Thanks for the reply. On Friday 02 September 2005 10:47 am, Tom Lane saith: Terry Lee Tucker [EMAIL PROTECTED] writes

Re: [GENERAL] unsubscribe

2005-08-26 Thread Terry Lee Tucker
I tried that, but it didn't work ;o) On Friday 26 August 2005 01:11 am, [EMAIL PROTECTED] saith: On Thu, Aug 25, 2005 at 07:30:07AM +0800, Richard Sydney-Smith wrote: unsubscribe Here's how to unsubscribe: First, ask your Internet Provider to mail you an Unsubscribing Kit. Then follow

Re: [GENERAL] Raise Notice question

2005-07-28 Thread Terry Lee Tucker
From the 7.4.6 Documentation: [Begin Quote] 27.9. Notice Processing Notice and warning messages generated by the server are not returned by the query execution functions, since they do not imply failure of the query. Instead they are passed to a notice handling function, and execution

Re: [GENERAL] Determining when a row was inserted

2005-06-02 Thread Terry Lee Tucker
I don't think there is a way to do that. You'll have to create an audit table and a rule to update it or you'll have to add a column to the table and a trigger to update it. On Thursday 02 June 2005 01:22 am, Eisenhut, Glenn saith: Folks - hi Is it possible to determine when a row was

Re: [GENERAL] UNSUBSCRIBE

2005-04-20 Thread Terry Lee Tucker
http://archives.postgresql.org/pgsql-general/ Please follow the above link and click the To subscribe or unsubscribe link. On Wednesday 20 April 2005 09:18 am, K.RajaSekar saith: Please Unsubcribe My Mail Id ---(end of broadcast)--- TIP 5: Have

[GENERAL] pg_index question

2005-03-25 Thread Terry Lee Tucker
Hi, If I were to set the value of pg_class.indisunique on a unique index to False inside a transaction so I could juggle sequence numbers around on a table with a unique two element index, and then set it back again to its proper value, all in the same transaction, would that allow me to

Re: [GENERAL] pg_index question

2005-03-25 Thread Terry Lee Tucker
To answer my own question, No it won't work. I still get a unique constraint error. On Friday 25 March 2005 04:10 pm, Terry Lee Tucker saith: Hi, If I were to set the value of pg_class.indisunique on a unique index to False inside a transaction so I could juggle sequence numbers around

Re: [GENERAL] pg_index question

2005-03-25 Thread Terry Lee Tucker
you got the right relid? On Fri, 2005-03-25 at 15:30, Terry Lee Tucker wrote: To answer my own question, No it won't work. I still get a unique constraint error. On Friday 25 March 2005 04:10 pm, Terry Lee Tucker saith: Hi, If I were to set the value of pg_class.indisunique

Re: [GENERAL] pg_index question

2005-03-25 Thread Terry Lee Tucker
Thanks Tom. One never knows until he asks... On Friday 25 March 2005 06:36 pm, Tom Lane saith: Scott Marlowe [EMAIL PROTECTED] writes: Umm, I tried it and it worked. Sure you got the right relid? I think the relation cache will probably not notice a manual update on pg_index. So whether

Re: [GENERAL] Disabling triggers in a transaction

2005-03-03 Thread Terry Lee Tucker
This caught my eye the other day, but didn't take the time to examine it. I find that I am now very interested in it. Could you please elaborate on your method and how this works? TIA On Sunday 27 February 2005 05:37 pm, Jay Guerette saith: If I disable INSERT and UPDATE triggers inside a

Re: [GENERAL] Disabling triggers in a transaction

2005-03-03 Thread Terry Lee Tucker
Tom, Do you feel this is a safe method for disabling triggers in the rare cases where one finds that it is prudent to do that? Do you think that the column, reltriggers, is permanent fixture in pg_class? What is your advice on this? TIA On Monday 28 February 2005 03:22 pm, Tom Lane saith:

Re: [GENERAL] Questions regarding notify processing.

2005-02-25 Thread Terry Lee Tucker
See partial output from strace below. On this particular run, the command locked up during the second edit operation. The notify message, move_update, was delivered, but the PQsendquery never returns. Any ideas Tom? recv(3, A\0\0\0\25\0\0~3move_update\0\0C\0\0\0\rUPDAT..., 16384, 0) = 42

Re: [GENERAL] Questions regarding notify processing.

2005-02-25 Thread Terry Lee Tucker
the message is sent, the process continues. Is this a bug? Did anybody look at the stack trace is sent? I don't have the expertise to analyze it. TIA On Friday 25 February 2005 06:00 am, Terry Lee Tucker saith: See partial output from strace below. On this particular run, the command locked up during

Re: [GENERAL] Questions regarding notify processing.

2005-02-25 Thread Terry Lee Tucker
on it, will 1/10 of a second still be long enough? And, why does it have to be there at all? Points to ponder, or not... On Friday 25 February 2005 01:05 pm, Terry Lee Tucker saith: This thing is hanging up in PQnotifies. I have added a simple fprintf statement to the following function: void

Re: [GENERAL] Questions regarding notify processing.

2005-02-25 Thread Terry Lee Tucker
... On Friday 25 February 2005 03:06 pm, Tom Lane saith: Terry Lee Tucker [EMAIL PROTECTED] writes: Is this a bug? Did anybody look at the stack trace is sent? I don't have the expertise to analyze it. I haven't seen any stack trace. strace is not a stack trace --- I'm talking about attaching

Re: [GENERAL] Questions regarding notify processing.

2005-02-25 Thread Terry Lee Tucker
the notification in a reasonable amount of time after the Edit operation and can even extend the timer that calls CheckForNotifies if necessary. You've been very helpful. Thanks... On Friday 25 February 2005 03:51 pm, Tom Lane saith: Terry Lee Tucker [EMAIL PROTECTED] writes: Sorry, I didn't know what you

[GENERAL] Questions regarding notify processing.

2005-02-24 Thread Terry Lee Tucker
Hello List: I am working on the proper method for Notification processing. The application interface is X-Windows and I am using the database socket as an alternate input source to the X-Server. I have a callback that fires when there is data to read on the socket. Here is the setup: /* This

Re: [GENERAL] Questions regarding notify processing.

2005-02-24 Thread Terry Lee Tucker
Thanks for the reply Tom. See comments below: On Thursday 24 February 2005 12:06 pm, Tom Lane saith: Terry Lee Tucker [EMAIL PROTECTED] writes: All this works great except for certain cases where one of the notify messages, the one I'm really interested in, gets spooled, queued

Re: [GENERAL] a few doubts regarding postgres

2005-02-11 Thread Terry Lee Tucker
On Friday 11 February 2005 07:47 am, Shridhar Daithankar saith: No. PostgreSQL backend process is single threaded. However each connection gets a separate backend process. Hence on SMP machines, all available CPUs can potentially be used for multiple connections. Regards, Shridhar So

Re: [GENERAL] Prompt User From a pgplsql Function

2005-01-31 Thread Terry Lee Tucker
back to the server. Back to the drawing board :o/ On Saturday 29 January 2005 02:00 pm, Ragnar Hafsta saith: On Sat, 2005-01-29 at 13:21 -0500, Terry Lee Tucker wrote: [on prompting user in the middle of a transaction] Thanks for the reply, Tom. I just had an idea about writting the answer

[GENERAL] Prompt User From a pgplsql Function

2005-01-29 Thread Terry Lee Tucker
Greetings List, I am working on converting a large set of code from a commercial 4gl known as Progress to plpgsql. This code defines a rating system for a transportation logistics package. In the Progress world, one is able to prompt the user for input during the execution of a trigger or a

Re: [GENERAL] Prompt User From a pgplsql Function

2005-01-29 Thread Terry Lee Tucker
January 2005 07:34 am, Terry Lee Tucker saith: Greetings List, I am working on converting a large set of code from a commercial 4gl known as Progress to plpgsql. This code defines a rating system for a transportation logistics package. In the Progress world, one is able to prompt the user

Re: [GENERAL] Prompt User From a pgplsql Function

2005-01-29 Thread Terry Lee Tucker
. I have successfully created my own notice receiver and it works. Maybe I can rewrite all this in C when I have more time. The heat is on to get this thing done :o/ On Saturday 29 January 2005 11:09 am, Tom Lane saith: Terry Lee Tucker [EMAIL PROTECTED] writes: Is there any way to gather

Re: [GENERAL] Prompt User From a pgplsql Function

2005-01-29 Thread Terry Lee Tucker
: On Sat, 2005-01-29 at 13:21 -0500, Terry Lee Tucker wrote: [on prompting user in the middle of a transaction] Thanks for the reply, Tom. I just had an idea about writting the answer from the client to a table designed for that purpose. It could have a unique key as the pid and a column

Re: [GENERAL] pg_dump shell script with ~/.pgpass

2005-01-27 Thread Terry Lee Tucker
On Thursday 27 January 2005 11:47 am, [EMAIL PROTECTED] saith: My other question... Is cron.daily is being run by root? If so would I need to put the .pgpass file in root's home directory? -- I don't know about .pgpass, so I can't help you with that. Root does run cron.daily. You can setup

Re: [GENERAL] disable trigger from transaction

2005-01-25 Thread Terry Lee Tucker
the trigger to execute) finishes. Yours doesn't require any special locking, so it seems yours would be the preferred solution. Regards, Jeff Davis On Mon, 2005-01-24 at 13:45 -0500, Terry Lee Tucker wrote: I don't know if droping a trigger inside a transaction will work. Besides

Re: [GENERAL] disable trigger from transaction

2005-01-24 Thread Terry Lee Tucker
Razvan, I don't believe there is a way of doing this from by way of some postgreSQL command. We accomplish this by creating a table called override. It is defined as: recid | integer| not null default nextval('public.override_recid_seq'::text) trig_name |

Re: [GENERAL] disable trigger from transaction

2005-01-24 Thread Terry Lee Tucker
figured this was a safe approach. On Monday 24 January 2005 01:27 pm, Jeff Davis saith: Would it work to just do a DROP TRIGGER at the begining of the transaction and a CREATE TRIGGER at the end? Regards, Jeff Davis On Mon, 2005-01-24 at 06:50 -0500, Terry Lee Tucker wrote: Razvan

Re: [GENERAL] Best Linux Distribution

2005-01-21 Thread Terry Lee Tucker
:oD On Friday 21 January 2005 03:46 pm, [EMAIL PROTECTED] saith: I don't think there are any Amish PostgreSQL users. Geoffrey [EMAIL PROTECTED]To: pgsql-general@postgresql.org Sent by: cc:

Re: [GENERAL] OID Usage

2005-01-14 Thread Terry Lee Tucker
It's not very hard to do. I just got rid them. It took me about a day. Our application is an X-Windows front end written is C. I wrote a function to return the next value of the serial key for any table. Here is the select statement buitl with sprintf: SELECT relname FROM pg_class WHERE relkind

Re: [GENERAL] Trace triggers

2005-01-13 Thread Terry Lee Tucker
I don't know if there is some built in way of doing it, but we have implemented the following in all our trigger code: DECLARE dbg BOOLEAN DEFAULT False; -- debug messages flag BEGIN IF dbg THEN RAISE NOTICE ''% (%)'', TG_NAME, TG_OP; END IF;

Re: [GENERAL] Interval Question

2005-01-12 Thread Terry Lee Tucker
provided the patch. On Wednesday 12 January 2005 04:32 am, Marco Colombo saith: On Tue, 11 Jan 2005, Geoffrey wrote: Tom Lane wrote: Terry Lee Tucker [EMAIL PROTECTED] writes: Apparently, if DateStyle is set to Sql, it always returns the absolute value. Is this due to some Sql standard

[GENERAL] Interval Question

2005-01-11 Thread Terry Lee Tucker
Greetings: I am working on a function which returns an interval value. The work of the function is to calculate the difference between the appointment timestamp and and the current timestamp, represented as an interval, and the the time required to travel from point A to B, represented as an

Re: [GENERAL] Interval Question

2005-01-11 Thread Terry Lee Tucker
); CREATE TABLE azrael=# insert into interval_test select '3 days 4 hours 17 mins'::interval - '3 days 6 hours 17 mins'::interval; INSERT 13615943 1 azrael=# select * from interval_test; dif --- -02:00:00 (1 row) On Jan 11, 2005, at 8:34 AM, Terry Lee Tucker wrote: Greetings

Re: [GENERAL] Interval Question

2005-01-11 Thread Terry Lee Tucker
saith: Terry Lee Tucker [EMAIL PROTECTED] writes: I thought that subtracting the larger interval from the small would return this but it is always the absolute value. Eh? regression=# set DateStyle TO ISO; SET regression=# select '@ 3 days 4 hours 17 mins'::interval - regression-# '@ 3 days

Re: [GENERAL] Interval Question

2005-01-11 Thread Terry Lee Tucker
Apparently, if DateStyle is set to Sql, it always returns the absolute value. Is this due to some Sql standard or is it a bug? On Tuesday 11 January 2005 10:19 am, Tom Lane saith: Terry Lee Tucker [EMAIL PROTECTED] writes: I thought that subtracting the larger interval from the small would

Re: [GENERAL] Interval Question

2005-01-11 Thread Terry Lee Tucker
simply wanted it to show up as a netative value if the load is going to be late. Thanks for all the help... On Tuesday 11 January 2005 01:19 pm, Tom Lane saith: Terry Lee Tucker [EMAIL PROTECTED] writes: Apparently, if DateStyle is set to Sql, it always returns the absolute value. Is this due

[GENERAL] Trigger Question

2005-01-05 Thread Terry Lee Tucker
Greetings: Is there any way to pass dynamic data into a trigger function? I think the answer is no, but just in case... TIA -- Work: 1-336-372-6812 Cell: 1-336-363-4719 email: [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: the planner will

Re: [GENERAL] Trigger Question

2005-01-05 Thread Terry Lee Tucker
:27PM -0500, Terry Lee Tucker wrote: Is there any way to pass dynamic data into a trigger function? I think the answer is no, but just in case... What do you mean by dynamic data? What problem are you trying to solve? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ -- Work: 1-336-372-6812

Re: [GENERAL] Trigger Question

2005-01-05 Thread Terry Lee Tucker
1) INSERT INTO logs (carr_code, ..., ..., ...) VALUES('ABCDEFG', ..., ...); logs is table A in my question 2) logs_insert fires (This is a AFTER INSERT trigger) 3) in this trigger, I need to do the following: update avlds set carr_code = new.carr_code where avlds.recid = ??;

Re: [GENERAL] Trigger Question

2005-01-05 Thread Terry Lee Tucker
, and the rest of the row that was modified (It really can't have anything else if you think about it) Stored procedures are an exellent way to guarantee atomic access to data in an application. Alex Turner NetEconomist On Wed, 5 Jan 2005 16:35:42 -0500, Terry Lee Tucker [EMAIL PROTECTED

Re: [GENERAL] Merry Christmas

2004-12-25 Thread Terry Lee Tucker
Merry Christmas to you from North Carolina, USA. :o) On Saturday 25 December 2004 07:32 am, Cornelia Boenigk saith: Hi all, Merry Christmas and best wishes for the New Year. Conni ---(end of broadcast)--- TIP 9: the planner will ignore your

Re: [GENERAL] transactions, functions, foreign keys

2004-12-15 Thread Terry Lee Tucker
I have never tested a particular scenario like this out, but would AFTER INSERT triggers resolve this issue for you? On Wednesday 15 December 2004 11:53 am, Larry White saith: Hi, I've run into a situation (I should have forseen) and was hoping someone could show me a way out. I have a

Re: [GENERAL] Rules

2004-12-02 Thread Terry Lee Tucker
Have you looked at the html docs? It looks like 34.2. Views and the Rule System might be what you are looking for, but I didn't check it closely. On Thursday 02 December 2004 05:34 pm, Jamie Deppeler saith: HI, Planning on witting a rule for a view, and i was wondering if anyone could

Re: [GENERAL] How to handle larger databases?

2004-11-22 Thread Terry Lee Tucker
Yes, I would like to hear about this as well, especially since all my character strings are defined as varchar. On Monday 22 November 2004 02:09 am, Patrick B Kelly saith: On Nov 19, 2004, at 2:37 AM, Jerry III wrote: Do not use variable length types. Why do you suggest not using variable

Re: [GENERAL] Can COPY skip columns?

2004-11-18 Thread Terry Lee Tucker
Another thing you can do if you know how to use Perl is to write a load procedure for the ascii file. We are dumping data from a Progress database so there was quite a lot of massaging to do, especially with some tables. We read the Progress dump in and write it back out in the format we need

Re: [GENERAL] only seeing first of many COPY commands in input file

2004-11-18 Thread Terry Lee Tucker
We are loading a whole database using multiple copy command from inside a sql script. Here is a couple of sample lines: COPY choice FROM '/esc/pgrnd/prog/choice/choice.d.txt' DELIMITERS '|' WITH NULL AS '?'; \i choice/choicePostLoad.sql; COPY glacct FROM '/esc/pgrnd/prog/glacct/glacct.d.txt'

Re: [GENERAL] OID's

2004-11-17 Thread Terry Lee Tucker
Helps me. Thanks for the clairification. On Wednesday 17 November 2004 06:49 am, Martijn van Oosterhout saith: Just to clarify, there is a difference between OIDs and XIDs. Object IDs (OID) are a system assigned field to every row that eventually wraps around. If you don't use them in your

[GENERAL] OID Question

2004-11-11 Thread Terry Lee Tucker
Greetings, Here is a simple question: Is it ok to put a unique index on the oid for my tables? We are in the process of moving from Progress Software to PostgreSQL. In the Progress world, you can always uniquely, and quickly find a record by using their version of oid, which is recid. I

Re: [GENERAL] OID Question

2004-11-11 Thread Terry Lee Tucker
Many thanks to all who have responded. I hope to be as helpful to the list someday as each of you have been. Thanks... On Thursday 11 November 2004 10:04 am, Terry Lee Tucker saith: Greetings, Here is a simple question: Is it ok to put a unique index on the oid for my tables? We

Re: [GENERAL] Question Regarding Locks

2004-10-28 Thread Terry Lee Tucker
period of time. Thanks again... On Wednesday 27 October 2004 06:44 pm, Tom Lane saith: Terry Lee Tucker [EMAIL PROTECTED] writes: I would like to be able to provide feedback to the user when they select a row for update (using SELECT FOR UPDATE). At present, if the row is being accessed

[GENERAL] Question Regarding Locks

2004-10-27 Thread Terry Lee Tucker
Greetings: I am working on converting a transportation application from a Progress database to PostgreSQL. This application will be hammered by about 75 users at any given time. Also, depending on the operation, there are many record updates that occur at the trigger level. I would like to be

[GENERAL] A Simple Question

2004-10-22 Thread Terry Lee Tucker
Greetings: While working with plpgsql and triggers, I've been using TG_NAME to display the trigger name at various points where I need to raise an exception and return a message. I was thinking how nice it would be if I could display the line number as well. Is there a special variable that

Re: [GENERAL] update sequence conversion script

2004-10-11 Thread Terry Lee Tucker
Question: When one moves from version 7.x to 8.x, will my old pgplsql functions continue to work with the single quotes or will everything have to be changed to the dollar quoting functionality? Thanks... On Monday 11 October 2004 05:28 am, Richard Huxton saith: For those that are puzzled,

Re: [GENERAL] when to use NULL and when to NOT NULL DEFAULT ''

2004-10-08 Thread Terry Lee Tucker
Why would you never define a column as NOT NULL, or am I misunderstanding what you are saying? On Friday 08 October 2004 06:07 am, Peter Eisentraut saith: Briefly, you always do the first and never do the second. -- Peter Eisentraut http://developer.postgresql.org/~petere/

Re: [GENERAL] when to use NULL and when to NOT NULL DEFAULT ''

2004-10-08 Thread Terry Lee Tucker
as possible, because NULL is slow... :-) For me it's pretty obvious, if you are never going to allow the column to have an unknown value, then define it NOT NULL to let the database guarantee that. Otherwise, nullable it is. Terry Lee Tucker wrote: Why would you never define a column

Re: [GENERAL] Queries slow from within plpgsql

2004-06-05 Thread Terry Lee Tucker
Question: Would this problem exist if zip were defined as varchar with no specific length defined? Is there a difference between varchar and text, at least in the context of this discussion? Thanks... On Saturday 05 June 2004 12:36 am, Tom Lane saith: David Boone [EMAIL PROTECTED] writes:

Re: [GENERAL] Dazed and Confused

2004-06-03 Thread Terry Lee Tucker
that the code initally loaded without complaint, but now, upon trying to reload, I was getting an error with the same code. Anyway, thanks for the response... On Monday 16 February 2004 07:58 am, Robert Creager saith: When grilled further on (Mon, 16 Feb 2004 07:39:25 -0500), Terry Lee Tucker [EMAIL

[GENERAL] A linking Question

2004-06-03 Thread Terry Lee Tucker
Let me explain: I have written a C function which contains calls to other functions, all of which work with an API to a mileage database product called PCMiler. These functions make connections to the PCMiler databae, do error checking on the origin and destination, get directions, etc. There

Re: [GENERAL] A linking Question

2004-06-03 Thread Terry Lee Tucker
Ah, that's the information I needed. I already have a split version, I just wanted to know if it was possible to it the other way. You've been very helpful. Thanks... On Thursday 03 June 2004 09:50 am, Martijn van Oosterhout saith: On Thu, Jun 03, 2004 at 09:08:40AM -0400, Terry Lee Tucker

Re: [GENERAL] Passing a row

2004-03-26 Thread Terry Lee Tucker
... On Friday 26 March 2004 10:59 am, Tom Lane saith: Terry Lee Tucker [EMAIL PROTECTED] writes: Can anybody show me the error of my ways? Seems like I just answered this yesterday ... ah, here we go: http://archives.postgresql.org/pgsql-general/2004-03/msg00862.php I don't recall if 7.3 has

Re: [GENERAL] function returning a record

2004-03-25 Thread Terry Lee Tucker
Thanks Pascal. You just helped me :o) On Tuesday 17 February 2004 06:39 am, Pascal Polleunus saith: I hope it will at least help some one... Pascal -- Work: 1-336-372-6812 Cell: 1-336-363-4719 email: [EMAIL PROTECTED] ---(end of

[GENERAL] Dazed and Confused

2004-02-16 Thread Terry Lee Tucker
I have just upgraded Postgres from version: PostgreSQL 7.2.3-RH on i686-pc-linux-gnu, compiled by GCC 2.96 to: PostgreSQL 7.3.4 on i386-redhat-linux-gnu, compiled by GCC i386-redhat-linux-gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) All of my trigger code loaded successfully; however, I am

[GENERAL] Return Value of a Function

2004-02-02 Thread Terry Lee Tucker
I need to return a row of data from a function. I've been looking the the HTML docs and have found nothing of value. If I try to return a variable of type RECORD, I get the following error: NOTICE: plpgsql: ERROR during compile of last_log near line 0 ERROR: fmgr_info: function 0: cache lookup

Re: [GENERAL] Foreign key question

2004-01-15 Thread Terry Lee Tucker
From the HTML docs: The referenced columns must be the columns of a unique or primary key constraint in the referenced table. I personally don't know of a work around. Maybe some of the others do. On Thursday 15 January 2004 10:56 am, Victor Spng Arthursson wrote: New to foreign keys and

Re: [GENERAL] Postgress and MYSQL

2004-01-14 Thread Terry Lee Tucker
We are in the process of porting a logistics application to Postgres from a Progress Software database. We have about 75 employees and will be putting Postgres to work in a real time business situation where there are lots of transactions. Once we are successful in this endeavor, how can we get

<    1   2