[GENERAL] Views - Under the Hood

2010-11-04 Thread Terry Lee Tucker
any of the attributes of a table, but is it a table? Is the data pulled together when one selects from the view or is it maintained as a table all along. Guidance to the ignorant appreciated... -- Terry Lee Tucker tel: (336) 372-5432; cell: (336) 404-6897 te...@chosen-ones.org -- Sent via pgs

Re: [GENERAL] Views - Under the Hood

2010-11-04 Thread Terry Lee Tucker
On Thursday, November 04, 2010 15:03:49 Scott Marlowe wrote: > On Thu, Nov 4, 2010 at 12:43 PM, Terry Lee Tucker wrote: > > Greetings: > > > > Lately, I've begun using views quite often especially when queries for > > various reports, etc. become complicated

[GENERAL] Disable Triggers

2008-02-21 Thread Terry Lee Tucker
reSQL 7.4.19 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-9) -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-Hessey Logistics 2251 Jesse Jewell Pkwy NE Gainesville, GA 30501 Tel: (336) 372-6812 Fax: (336) 372-6812 Cell: (336) 404-6

[GENERAL] Disable Triggers

2008-02-21 Thread Terry Lee Tucker
reSQL 7.4.19 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-9) -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-Hessey Logistics 2251 Jesse Jewell Pkwy NE Gainesville, GA 30501 Tel: (336) 372-6812 Fax: (336) 372-6812 Cell: (336) 404-6

Re: [GENERAL] Disable Triggers

2008-02-21 Thread Terry Lee Tucker
On Thursday 21 February 2008 11:26, A.M. wrote: > On Feb 21, 2008, at 10:20 AM, Terry Lee Tucker wrote: > > Greetings: > > > > We have been working diligently toward integrating Slony into our > > production > > databases. We've been having trouble w

Re: [GENERAL] Disable Triggers

2008-02-21 Thread Terry Lee Tucker
Unless I get a better idea, I'm going to change the disable_triggers function to duplicate all the records in pg_trigger belonging to a given table, delete the records except for the Slony trigger, update pg_class setting reltriggers to 1, do the work, and then restore everything with

Re: [GENERAL] Disable Triggers

2008-02-21 Thread Terry Lee Tucker
On Thursday 21 February 2008 12:56, Scott Marlowe wrote: > On Thu, Feb 21, 2008 at 9:20 AM, Terry Lee Tucker <[EMAIL PROTECTED]> wrote: > > Greetings: > > > > We have been working diligently toward integrating Slony into our > > production databases. We've b

Re: [GENERAL] Disable Triggers

2008-02-21 Thread Terry Lee Tucker
rs oids will all have changed and you'll get errors to > that effect. Also, are there these triggers on the slony replicas? You > really need to be doing DROP TRIGGER/STORE TRIGGER operations if so. > Otherwise, very surprising things may happen. > Gee, I hadn't thought about that.

Re: [GENERAL] Disable Triggers

2008-02-21 Thread Terry Lee Tucker
n April. We needed to get replication going now. You've been a big help. Thanks... -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-Hessey Logistics 2251 Jesse Jewell Pkwy NE Gainesville, GA 30501 Tel: (336) 372-6812 Fax: (336) 372-6812 Cell: (336) 404-6987 [EMA

[GENERAL] LIMIT Question

2008-02-28 Thread Terry Lee Tucker
20060404 (Red Hat 3.4.6-9) Thanks... -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-Hessey Logistics 2251 Jesse Jewell Pkwy NE Gainesville, GA 30501 Tel: (336) 372-6812 Fax: (336) 372-6812 Cell: (336) 404-6987 [EMAIL PROTECTED] www.turbocor

[GENERAL] Escaping \n

2008-03-28 Thread Terry Lee Tucker
ll SET notes = 'blah, blah, yea\nmore stuff'; How to I escape the newline embeded in the string? I've tried the advice from HINT, but have been unable to get it to work. Thanks... Thanks... -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-Hessey Logistics 2

Re: [GENERAL] Escaping \n

2008-03-28 Thread Terry Lee Tucker
On Friday 28 March 2008 17:21, Sam Mason wrote: > On Fri, Mar 28, 2008 at 05:06:10PM -0400, Terry Lee Tucker wrote: > > HINT: Use the escape string syntax for escapes, e.g., E'\r\n'. > > > > The problem is a line like 'UPDATE bill SET notes = 'blah, bla

[GENERAL] Proper Way to Disable Triggers

2008-04-02 Thread Terry Lee Tucker
ble. Should I simply alter disable_triggers to set tgenabled in pg_trigger to "D" for all the triggers I want to disable for a given operation, and then code enable_triggers to restore the value to "O" for said triggers? Thanks in advance for any insight you can give... -- T

[GENERAL] Conversion to 8.3

2008-04-04 Thread Terry Lee Tucker
#x27; THEN . . END IF; With the new casting rules, this doesn't work. How can I determine if this on-time value is "ago", that is, the shipment is late? Thanks for any help you can give... -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-Hessey Logis

Re: [GENERAL] Conversion to 8.3

2008-04-04 Thread Terry Lee Tucker
On Friday 04 April 2008 15:01, Craig Ringer wrote: > Terry Lee Tucker wrote: > > Greetings: > > > > I am converting our application from 7.4.19 to 8.3.1. In the old scheme > > of things, I was generating an interval between two timestamps and > > evaluating the

Re: [GENERAL] Conversion to 8.3

2008-04-04 Thread Terry Lee Tucker
On Friday 04 April 2008 16:36, Tom Lane wrote: > Terry Lee Tucker <[EMAIL PROTECTED]> writes: > > I am converting our application from 7.4.19 to 8.3.1. In the old scheme > > of things, I was generating an interval between two timestamps and > > evaluating the interv

Re: [GENERAL] Conversion to 8.3

2008-04-05 Thread Terry Lee Tucker
On Friday 04 April 2008 16:36, Tom Lane wrote: > Terry Lee Tucker <[EMAIL PROTECTED]> writes: > > I am converting our application from 7.4.19 to 8.3.1. In the old scheme > > of things, I was generating an interval between two timestamps and > > evaluating the interv

Re: [GENERAL] Conversion to 8.3

2008-04-07 Thread Terry Lee Tucker
> assuming... > >regards, tom lane Well, I didn't realize that "ago" was only applicable to a certain date style setting. I don't recall ever reading that anywhere but maybe I missed it. Now I know how to do it correctly. Thanks to all who responded... -- Terry L

[GENERAL] Subtracting Two Intervals

2008-04-07 Thread Terry Lee Tucker
tes' - interval '29 hours'; ?column? @ 1 day -13 hours -30 mins (1 row) Is that right? I mean if you take 1 day (24 hours) and add -13 hours and -30 minutes, you get 10 hours and 30 minutes, but is it supposed to display that way? TIA -- Terry Lee Tuck

[GENERAL] Disable Triggers

2008-04-09 Thread Terry Lee Tucker
rigger records associated with the cust table, and tgenabled is set to "D", but the triggers still fire. session_replication_role is set to "origin". I thought this was supposed to be fixed in later versions of Postgres (I'm converting from 7.4.19 to 8.3.1), so apparently I

Re: [GENERAL] Disable Triggers

2008-04-09 Thread Terry Lee Tucker
quot;origin", when the process is complete? > > -- > Greg Sabino Mullane [EMAIL PROTECTED] > PGP Key: 0x14964AC8 200804091058 > http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-Hessey

Re: [GENERAL] Disable Triggers

2008-04-09 Thread Terry Lee Tucker
" to prevent a particular trigger from firing. Using ALTER TABLE to disable the trigger won't work because the whole table is locked during the transaction and I only want the disabled trigger to apply to the current transaction in the current session. TIA -- Terry Lee Tucker Turbo's

Re: [GENERAL] Disable Triggers

2008-04-09 Thread Terry Lee Tucker
On Wednesday 09 April 2008 13:12, Tom Lane wrote: > Terry Lee Tucker <[EMAIL PROTECTED]> writes: > > My question is: When tgenabled is set to "D", how does that setting > > interact with session_replication_role and, is there a way to use > > tgenabled with a s

Re: [GENERAL] Disable Triggers

2008-04-10 Thread Terry Lee Tucker
e yields: > > CREATE TRIGGER > psql:trig.example:53: NOTICE: I am trigger one > psql:trig.example:53: NOTICE: I am trigger two > psql:trig.example:53: NOTICE: I am trigger three > UPDATE 1 > ALTER TABLE > ALTER TABLE > psql:trig.example:59: NOTICE: I am trigger one > ps

[GENERAL] session_replication_role

2008-04-15 Thread Terry Lee Tucker
Version 8.3.1: Is there a distinction between "ORIGIN" and "LOCAL" as related to session_replication_role, and if so, what is it? I am unable to understand from the documentation any distinction between the two settings. TIA -- Terry Lee Tucker Turbo's IT Manager

Re: [GENERAL] session_replication_role

2008-04-15 Thread Terry Lee Tucker
On Tuesday 15 April 2008 14:26, Chris Browne wrote: > [EMAIL PROTECTED] (Terry Lee Tucker) writes: > > Is there a distinction between "ORIGIN" and "LOCAL" as related to > > session_replication_role, and if so, what is it? I am unable to > > understand from

[GENERAL] Duplicate Symbols - Compiler Warnings

2008-04-17 Thread Terry Lee Tucker
pplication into production and it concerns me greatly. So, my question is, do you see this as a serious problem and, if so, what shall I do to resolve it? By the way, this problem does not exist when compiling with 7.4.19. TIA -- Terry Lee Tucker Turbo's IT Manager Turbo, division o

Re: [GENERAL] Duplicate Symbols - Compiler Warnings

2008-04-17 Thread Terry Lee Tucker
Didn't get any nibbles on this one. Can anybody provide any insight on this? Thanks... On Thursday 17 April 2008 10:03, Terry Lee Tucker wrote: > Greetings: > > We are converting from 7.4.19 to 8.3. While compiling our application using > version 8.3, I have noticed the follo

Re: [GENERAL] Duplicate Symbols - Compiler Warnings

2008-04-17 Thread Terry Lee Tucker
On Thursday 17 April 2008 19:32, Tom Lane wrote: > Terry Lee Tucker <[EMAIL PROTECTED]> writes: > > Didn't get any nibbles on this one. Can anybody provide any insight on > > this? > > You're complaining in the wrong place ... I dunno what perlAPI.c is, but

Re: [GENERAL] How to retore a pg_dumpall dump?

2008-04-18 Thread Terry Lee Tucker
On Wednesday 16 April 2008 13:38, wasenbr wrote: > Hello, > > how can I restore a pg_dumpall dump? > > Cleiton http://www.postgresql.org/docs/8.3/interactive/backup.html -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-Hessey Logistics 2251 Jesse Jewell

Re: [GENERAL] Deny creation of tables for a user

2008-04-23 Thread Terry Lee Tucker
; I mean she could insert, update delete rows but not create tables. > > I did not find a way to revoke such thing. Is it possible ? > > Thanks! Have you looked at GRANT? http://www.postgresql.org/docs/8.3/interactive/sql-grant.html -- Terry Lee Tucker Turbo's IT Manager Turbo,

Re: [GENERAL] Backup setup

2008-04-23 Thread Terry Lee Tucker
e files there every hour or so. > Your suggestions are much appreciated! > -Gabor I would use pg_dump. It will ensure that you get a complete set of data and not something half written. -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-Hessey Logistics 2251 Jesse Jewel

[GENERAL] Generate SQL Statements

2008-06-03 Thread Terry Lee Tucker
Greetings: I was wondering if anyone knows of a third party product that will generate SQL statements for creating existing tables. We have to provide table definition statements for out parent company. Any ideas? -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-H

Re: [GENERAL] Generate SQL Statements

2008-06-03 Thread Terry Lee Tucker
On Tuesday 03 June 2008 20:10, Steve Crawford wrote: > Terry Lee Tucker wrote: > > Greetings: > > > > I was wondering if anyone knows of a third party product that will > > generate SQL statements for creating existing tables. We have to provide > > table def

Re: [GENERAL] warm standby with WAL shipping

2009-06-03 Thread Terry Lee Tucker
On Wednesday 03 June 2009 15:26, Greg Smith wrote: > On Wed, 3 Jun 2009, Geoffrey wrote: > > My assumption was that since pg_standby does not have the scp/rsync > > functionality, I would have to either modify it, change the way we do > > things, or 'reinvent' a little different wheel. > > There ar

Re: [GENERAL] warm standby with WAL shipping

2009-06-03 Thread Terry Lee Tucker
On Wednesday 03 June 2009 17:11, Joshua D. Drake wrote: > On Wed, 2009-06-03 at 16:45 -0400, Terry Lee Tucker wrote: > > > -- > > > * Greg Smith gsm...@gregsmith.com http://www.gregsmith.com Baltimore, > > > MD > > > > Our circumstance here is that

[GENERAL] C Function Question

2009-07-27 Thread Terry Lee Tucker
Greetings: Does anyone know if a function written in C and linked into the backend in a shared library with a statically declared structure, maintain that data for the life of the backend process such that, when the function is called again, the structure data is intact? Thanks for any insight

Re: [GENERAL] C Function Question

2009-07-28 Thread Terry Lee Tucker
On Tuesday 28 July 2009 03:22, Albe Laurenz wrote: > Terry Lee Tucker wrote: > > Does anyone know if a function written in C and linked into the backend > > in a shared library with a statically declared structure, maintain that > > data for the life of the backend proces

[GENERAL] Configuration Question

2009-08-18 Thread Terry Lee Tucker
Greetings: Is there a way to get hold of an environment variable such that it can be referenced in postgresql.conf? In particular, I'd like to be able to point dynamic_library_path to an environment variable defined at the system level as in dynamic_library_path = '$SOURCE:$libdir'. master=# s

Re: [GENERAL] Configuration Question

2009-08-18 Thread Terry Lee Tucker
On Tuesday 18 August 2009 09:28, Martin Gainty wrote: > v8.3 FAQ_Solaris > > To point it to the right location, set the > LD_LIBRARY_PATH environment variable, e.g., > > LD_LIBRARY_PATH=/usr/sfw/lib:/opt/sfw/lib:/usr/local/lib > export LD_LIBRARY_PATH > > and restart configure. You will al

Re: [GENERAL] What does "INSERT 0 1" mean?

2009-10-14 Thread Terry Lee Tucker
On Wednesday 14 October 2009 11:05, [.::MDT::.] wrote: > Hi, > I can't find what does > INSERT 0 1 > mean. > > "1" stands for the number of the records added to the table, as far as I > understood, but what about the "0"? > > Thank you very much. > -- > View this message in context: > http://www.na

[GENERAL] Marking a Column for Special Use

2011-07-12 Thread Terry Lee Tucker
Greetings: I have a scenario in which it would be quite convenient to mark about 20 existing columns in a table such that I can select those fields programatically, based on my flag, for some specialized processing. What I am trying to avoid is storing a list of columns somehere. Is there somet

Re: [GENERAL] Marking a Column for Special Use

2011-07-12 Thread Terry Lee Tucker
On Tuesday, July 12, 2011 11:47:33 AM Andrew Sullivan wrote: > On Tue, Jul 12, 2011 at 11:25:24AM -0400, Terry Lee Tucker wrote: > > Greetings: > > > > I have a scenario in which it would be quite convenient to mark about 20 > > existing columns in a table such tha

Re: [GENERAL] Marking a Column for Special Use

2011-07-12 Thread Terry Lee Tucker
On Tuesday, July 12, 2011 11:33:34 AM David Johnston wrote: > Can you make use of "COMMENT ON ."? > > > > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Terry Lee Tucker > Sent: Tuesday, July 12, 20

Re: [GENERAL] running out of oids

2011-08-03 Thread Terry Lee Tucker
On Wednesday, August 03, 2011 04:24:32 PM Joshua D. Drake wrote: > On 08/03/2011 12:41 PM, Geoffrey Myers wrote: > > Am I correct in assuming that the 'running out of oids' issue was > > resolved with a design change within Postgresql? > > Yes, many, many, many years ago. The only way to encounter

[GENERAL] Locking Down a Database

2010-07-15 Thread Terry Lee Tucker
working at that time is limited to five or six. Is there some easy way of doing this without having people log out of the application? TIA... -- Terry Lee Tucker tel: (336) 372-5432; cell: (336) 404-6897 te...@chosen-ones.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Question on trigger data visibility

2010-08-30 Thread Terry Lee Tucker
see" rows recently inserted into the tablex? > > Thanks, > Maurice They do "see" those rows. Are you sure that the inner join with tab_Y is not causing the problem? Just a guess... -- Terry Lee Tucker tel: (336) 372-5432; cell: (336) 404-6897 te...@chosen-ones.org -- 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] varchar lengths

2010-09-21 Thread Terry Lee Tucker
on the length of the text, you can use a trigger for this and when the constraint changes, and it will, you simply modify the trigger. -- Terry Lee Tucker tel: (336) 372-5432; cell: (336) 404-6897 te...@chosen-ones.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] Script to export all privileges to csv or similar

2008-08-22 Thread Terry Lee Tucker
Cheers > Anton > > -- > echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc > This will help you for 99.9% of your problems ... Have you looked at pg_dumpall -g ? -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-Hessey Logistics 2251 Jesse J

Re: [GENERAL] ENABLE / DISABLE ALL TRIGGERS IN DATABASE

2008-08-27 Thread Terry Lee Tucker
by manipulating the run time parameter, session_replication_role. For example, from within your psql session: SET SESSION session_replication_role = replica; This will prevent all triggers from firing for the entire session except those defined as "replica". We use this all the time. HTH... -- Terry

Re: [GENERAL] Dumping/Restoring with constraints?

2008-08-27 Thread Terry Lee Tucker
then the data using --disable-triggers. I'm assuming you are doing a binary dump. See the man page for pg_restore. HTH -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-Hessey Logistics 2251 Jesse Jewell Pkwy NE Gainesville, GA 30501 Tel: (336) 372-6812 Fax:

Re: [GENERAL] Dumping/Restoring with constraints?

2008-08-27 Thread Terry Lee Tucker
On Wednesday 27 August 2008 09:36, Phoenix Kiula wrote: > On Wed, Aug 27, 2008 at 9:29 PM, Terry Lee Tucker <[EMAIL PROTECTED]> wrote: > > We have all sorts of constraints and foreign keys and we have never had > > any problem with pg_restore related to dumping such

Re: [GENERAL] Trigger disable for table

2008-10-02 Thread Terry Lee Tucker
istence of a record matching the trigger name and some other criteria. If we find it, we simply return from the trigger at that point. The trigger on table B would be responsible for inserting the record into override and then deleting the record after the update is done. We've build wrapper

Re: [GENERAL] question on trigger

2012-02-11 Thread Terry Lee Tucker
se performance; however, it seems to me that you would waste more cycles checking if things changed than simply forcing upper case for all to which this criteria applies. The whole record is going to be written to the database anyway. Terry Lee Tucker Office: 336-372-6812

Re: [GENERAL] open transaction?

2008-12-29 Thread Terry Lee Tucker
Did postgres handle this for me? How do I see if the > transaction is still open? > > Thanks! If you don't commit, it is rolled back when you exit. -- Terry Lee Tucker Turbo's IT Manager Turbo, division of OHL 2251 Jesse Jewell Pkwy Gainesville, GA 30501 tel: (33

[GENERAL] Two Questions Re: Warm Backup

2009-05-01 Thread Terry Lee Tucker
Greetings: We are researching implementing a warm backup solution for our existing databases. We have a two node cluster running RH which are connected to a SAN. There is a total of 11 database clusters with the two node linux cluster balancing the load. At the moment, we are not doing any WAL

Re: [GENERAL] Two Questions Re: Warm Backup

2009-05-02 Thread Terry Lee Tucker
On Saturday 02 May 2009 13:08, Daniel Verite wrote: > Terry Lee Tucker writes > > > Q1: Can we set up a scenario where there is more that one > > warm standby? > > Yes. But you'll have to consider what you want to happen when one > standby is correctly receiv

Re: [GENERAL] Simple client messages from within pgPL/SQL

2005-02-23 Thread Terry Lee Tucker
This may be too simplistic an answer, but can't you just have the function return a text string and return the message you want to deliver back to the client? On Wednesday 23 February 2005 05:00 am, Andre Schnoor saith: > > I'm desparately seeking for a simple way to send messages to the client

[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 c

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

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 writ

Re: [GENERAL] Questions regarding notify processing.

2005-02-25 Thread Terry Lee Tucker
PQnotifies... And that is where it sits until I send a message notification from a separate client (plsql). When 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

Re: [GENERAL] Questions regarding notify processing.

2005-02-25 Thread Terry Lee Tucker
ounding 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

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. str

Re: [GENERAL] Questions regarding notify processing.

2005-02-25 Thread Terry Lee Tucker
ust need 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

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 tra

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: >

[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 temora

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 jug

Re: [GENERAL] pg_index question

2005-03-25 Thread Terry Lee Tucker
ure 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: >

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 w

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: Hav

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 inse

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 continue

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 fol

[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
ady. On Friday 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

Re: [GENERAL] Question regarding FOUND

2005-09-02 Thread Terry Lee Tucker
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 > diffe

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 PROTECT

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 y

Re: [GENERAL] Route Miles

2005-09-09 Thread Terry Lee Tucker
zip to another using 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 Messa

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 it

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 3.2.

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] 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

[GENERAL] Question Regarding a Temporary Table

2006-09-20 Thread Terry Lee Tucker
Greetings: I have have a plpgsql function that creates a temporary table to facilitate some processing. Here is the code: CREATE TEMP TABLE tmp (code VARCHAR, booked INTEGER, availINTEGER, c

Re: [GENERAL] Question Regarding a Temporary Table

2006-09-20 Thread Terry Lee Tucker
Thanks for the reponse Jeff. See comments below. On Wednesday 20 September 2006 05:09 pm, Jeff Davis <[EMAIL PROTECTED]> thus communicated: --> On Wed, 2006-09-20 at 16:51 -0400, Terry Lee Tucker wrote: --> > Greetings: --> > --> > I have have a plpgsql function that c

Re: [GENERAL] Postgres Team: Thank You All

2006-09-21 Thread Terry Lee Tucker
On Wednesday 20 September 2006 09:59 pm, "Brian Maguire" <[EMAIL PROTECTED]> thus communicated: --> To all involved in this project, --> --> I justed wanted to let you know how impressed and pleased I have been with postgres over the past 5 years . The timeliness and quality of the releases ar

Re: [GENERAL] After Trigger

2006-09-21 Thread Terry Lee Tucker
On Thursday 21 September 2006 12:44 pm, Bob Pawley <[EMAIL PROTECTED]> thus communicated: --> I am seeking wording for a procedure that will initiate a trigger only after another trigger has completed its function. In this case I want to drop a table that is created and used by the first trigger

Re: [GENERAL] printf-like format strings

2007-01-22 Thread Terry Lee Tucker
I understand the question correctly, couldn't you use pop @_ in the Perl function? -- Terry Lee Tucker Turbo's IT Manager Turbo, division of Ozburn-Hessey Logistics 2251 Jesse Jewell Pkwy NE Gainesville, GA 30501 Tel: (336) 372-6812 Fax: (336) 372-6812 Cell: (336) 363-4719 [EMAIL P

Re: [GENERAL] upgrading pl/pgsql triggers from 7.4 to 8.2

2007-01-25 Thread Terry Lee Tucker
een these two version? > > Thanks, > > ---(end of broadcast)--- > TIP 2: Don't 'kill -9' the postmaster We have to do this as well so your question is of great interest to me. I hope you/we get lots of answers. -- Ter

Re: [GENERAL] Trigger Question

2007-03-14 Thread Terry Lee Tucker
ROCEDURE public.update_unit_spec_changed_date(); > > Thanks for the help. :) > > - > Jason Lee, SCJP > Senior Software Engineer > http://www.iec-okc.com <http://www.iec-okc.com/> Your trigger needs to be a BEFORE UPDATE trigger and you simply set the value of the fie

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
ULL as much 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. > > Te

[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 d

[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 a

Re: [GENERAL] Question Regarding Locks

2004-10-28 Thread Terry Lee Tucker
short 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 presen

[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 remem

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 ta

  1   2   >