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

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

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

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

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

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

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

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

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

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

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

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

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

[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

[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

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

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

[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

[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

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

[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

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

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

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

[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

[GENERAL] Sharing News

2006-09-01 Thread Terry Lee Tucker
Greetings List: I just want to share with my Open Source commrads a success story. We have been working on converting a rather large and complex Logistics application from a Commercial database engine and 4GL supplied Progress Software Corp. We wrote the user interface in native X-Windows using

Re: [GENERAL] Newbie "Copy From" not working

2006-08-17 Thread Terry Lee Tucker
On Thursday 17 August 2006 03:27 pm, Walter Vaughan <[EMAIL PROTECTED]> thus communicated: > The problem is I need to load a field that is allowed to be null with > nothing and it work The above statement is not the problem you are having. We dumped and loaded a 4 gig Progress database with

Re: [GENERAL] PostgreSQL on Embeded Systems

2006-07-18 Thread Terry Lee Tucker
On Tuesday 18 July 2006 05:50 am, Adem HUR <[EMAIL PROTECTED]> thus communicated: --> Hi, --> --> I am sory for my bad English :) --> --> --> We try to use PostgreSQL on an Embeded System. --> --> Plan to use this PC/104 Module --> http://www.icop.com.tw/products_detail.asp?ProductID=106 --> --> -

Re: [GENERAL] Performance Question

2006-06-14 Thread Terry Lee Tucker
On Wednesday 14 June 2006 03:57 pm, Terry Lee Tucker <[EMAIL PROTECTED]> thus communicated: --> Hello List: --> --> I've been told that an update to a record is equivalent to a delete and insert --> operation. We have a utility written in Perl that brings into sync cer

[GENERAL] Performance Question

2006-06-14 Thread Terry Lee Tucker
Hello List: I've been told that an update to a record is equivalent to a delete and insert operation. We have a utility written in Perl that brings into sync certain elements of 50 thousand records on 8 structurally identical databases. We threw together the script and decided to just delete th

Re: [GENERAL] are there static variables in pgsql?

2006-06-10 Thread Terry Lee Tucker
On Saturday 10 June 2006 06:31 pm, "Yavuz Kavus" <[EMAIL PROTECTED]> thus communicated: --> i am writing a recursive procedure in pl/pgsql. --> i need to check whether a condition is true in any step of recursive calls. --> --> if i get a true response in one call, i wont make other recursive cal

Re: [GENERAL] OID

2006-06-09 Thread Terry Lee Tucker
On Friday 09 June 2006 06:34 am, "Bert" <[EMAIL PROTECTED]> thus communicated: --> Hi list --> What is the comment to add OIDs to a already existing table, or i have --> to recreate the table? --> --> Thanks, --> Clemens --> --> Well, according on \h ALTER TABLE on version 7.4.6 all you can do is

Re: [GENERAL] How to do a "CREATE DATABASE" and then connect to it?

2006-06-03 Thread Terry Lee Tucker
On Saturday 03 June 2006 04:07 am, Joseph Brenner <[EMAIL PROTECTED]> thus communicated: --> --> Joshua D. Drake <[EMAIL PROTECTED]> wrote: --> --> > Joseph Brenner wrote: --> --> > > After you do a "CREATE DATABASE", how do you programatically --> > > connect to what you just created? --> > > -->

Re: [GENERAL] help me on a trigger

2006-06-02 Thread Terry Lee Tucker
On Friday 02 June 2006 02:09 am, Pedro <[EMAIL PROTECTED]> thus communicated: --> I need to create a trigger that decreases on a "stocks" table the amount --> that have been inserted on the "tooken_from_stock" table. --> --> the trigger should be something like: --> --> CREATE TRIGGER triggerdecrea

Re: [GENERAL] Problems posting messages in this mailing-list?

2006-05-31 Thread Terry Lee Tucker
On Wednesday 31 May 2006 07:51 am, Tino Wildenhain <[EMAIL PROTECTED]> thus communicated: --> Philippe Lang schrieb: --> > Hi, --> ... --> > Can anyone read this message? --> --> No, sorry. Please repost. --> --> Thx --> Tino .-) --> :oD ---(end of broadcast)-

Re: [GENERAL] Question Regarding DELETE FROM ONLY

2006-05-29 Thread Terry Lee Tucker
On Monday 29 May 2006 09:43 am, Michael Fuhr <[EMAIL PROTECTED]> thus communicated: --> On Mon, May 29, 2006 at 08:40:43AM -0400, Terry Lee Tucker wrote: --> > INSERT INTO ctable (code, name) VALUES ('code_one', 'Code One'); --> >

[GENERAL] Question Regarding DELETE FROM ONLY

2006-05-29 Thread Terry Lee Tucker
Hello List: Please observe the following example that reproduces my problem: CREATE TABLE ptable (code VARCHAR) WITHOUT OIDS; CREATE TABLE CREATE TABLE ctable (code VARCHAR, name VARCHAR) INHERITS (ptable) WITHOUT OIDS; NOTICE: merging column "code" with inherited definition CREATE TABL

Re: [GENERAL] background triggers?

2006-05-23 Thread Terry Lee Tucker
On Tuesday 23 May 2006 11:19 am, Sim Zacks <[EMAIL PROTECTED]> thus communicated: --> Is there any way to write a statement trigger that runs in the --> background? In my testing, when I have an After Insert For Each --> Statement trigger, the function call does not end until the trigger is --> fi

Re: [GENERAL] DB structure of PostGRE

2006-05-17 Thread Terry Lee Tucker
On Wednesday 17 May 2006 12:19 pm, "venu Vempati" <[EMAIL PROTECTED]> thus communicated: --> Hi, --> my confession first..I have introduced myself this PostGRE db and I have a --> basic doubt? --> --> Where can I find a document about the structure of database/schema/users --> etc.. --> and how i

Re: [GENERAL] pl/pgsql question

2006-05-12 Thread Terry Lee Tucker
On Friday 12 May 2006 10:54 am, "Rhys Stewart" <[EMAIL PROTECTED]> thus communicated: --> hi all, --> are there any function in pl/pgsql to call a shell script? or like is --> there a pl/bash? --> You can use Perl in "untrusted" mode as a backend function and accomplish something like that. ---

Re: [GENERAL] file I/O in plpgsql

2006-04-29 Thread Terry Lee Tucker
On Saturday 29 April 2006 10:23 am, Terry Lee Tucker <[EMAIL PROTECTED]> thus communicated: --> You cannot do that with plpgsql. You can use Perl in "trusted" mode and pass --> the query results to the Perl function which can write the output to a ffile. --> Co

Re: [GENERAL] file I/O in plpgsql

2006-04-29 Thread Terry Lee Tucker
On Friday 28 April 2006 03:47 pm, Jessica M Salmon <[EMAIL PROTECTED]> thus communicated: --> --> I'm trying to write out query results to a text file from within a plpgsql --> function, but having trouble. Can anyone tell me if this is possible? I'm --> trying to perform \o filename, then selec

Re: [GENERAL] Order of triggers and sequences...

2006-04-29 Thread Terry Lee Tucker
On Saturday 29 April 2006 08:34 am, Alex Mayrhofer <[EMAIL PROTECTED]> thus communicated: --> Hi, --> --> i'm about to implement a trigger on a table with an id field populated by a --> sequence (the usual 'id SERIAL NOT NULL PRIMARY KEY'). --> --> Just a short (probably lame) question: Would a "

Re: [GENERAL] For vim users: Syntax highlighting for PostgreSQL

2006-04-28 Thread Terry Lee Tucker
On Thursday 27 April 2006 07:43 pm, Devrim GUNDUZ <[EMAIL PROTECTED]> thus communicated: --> Hi, --> --> I just wrote a pgsql.vim file for vim users. It helps you to colorize --> the file which contains PostgreSQL SQL keywords: --> --> http://www.gunduz.org/postgresql/pgsql.vim --> --> In orde

Re: [GENERAL] Daylight Savings Time

2006-04-21 Thread Terry Lee Tucker
On Friday 21 April 2006 05:47 pm, Tom Lane <[EMAIL PROTECTED]> thus communicated: --> Terry Lee Tucker <[EMAIL PROTECTED]> writes: --> > I need to know if there is a convienient way of establishing whether DST is --> > active within a function dealing with adjustin

[GENERAL] Daylight Savings Time

2006-04-21 Thread Terry Lee Tucker
Hello List: I need to know if there is a convienient way of establishing whether DST is active within a function dealing with adjusting timestamps to other time zones. The problem is that if I have the following timestamp: '04/21/2006 17:05 EDT' and I use the timezone() function in the followi

Re: [GENERAL] Triggers and Transactions

2006-04-21 Thread Terry Lee Tucker
On Thursday 20 April 2006 12:25 pm, "Chris Coleman" <[EMAIL PROTECTED]> thus communicated: --> Hi, --> --> I have a question about how much of a trigger is in a transaction. --> I've read the docs and googled around but can't seem to find a --> concrete answer. --> --> I have two triggers that are

Re: [GENERAL] trigger firing order

2006-04-10 Thread Terry Lee Tucker
On Monday 10 April 2006 05:09 pm, Hugo saith: > Hi, how can I tell in which order are triggered different triggers on the > same table, let me explain , > I have three triggers for table A, all of then are intended for "before > insert" on the table, in ASA I can tell the Db in which order I want t

Re: [GENERAL] plgpsql and transactions

2006-04-07 Thread Terry Lee Tucker
> > > > In the latter, you have expanded the scope of the transaction; which, > > sometimes you might want to do. > > Yes, I might. But, I'd like to understand it so I do know when I might > or might not want to do it. Understanding is good. You need to read the documentation on transactions: htt

Re: [GENERAL] Running Command Line From Trigger?

2006-04-07 Thread Terry Lee Tucker
On Friday 07 April 2006 03:52 pm, Yudie Pg saith: > Help! > Try to install plperl > ./createlang plperl mydb > > createlang: language installation failed: ERROR: could not access file > "$libdir/plperl": No such file or directory Do you have the Perl module on your machine? If not, you can get

Re: [GENERAL] Running Command Line From Trigger?

2006-04-07 Thread Terry Lee Tucker
saith: > On Fri, 2006-04-07 at 12:38, Terry Lee Tucker wrote: > > On Friday 07 April 2006 01:32 pm, Yudie Pg saith: > > > Back to my original question where is it possible to run a command line > > > from a function? > > > > From an earlier post: > > &q

Re: [GENERAL] Running Command Line From Trigger?

2006-04-07 Thread Terry Lee Tucker
On Friday 07 April 2006 01:32 pm, Yudie Pg saith: > Back to my original question where is it possible to run a command line > from a function? From an earlier post: "Note that plpgsql cannot run external programs on purpose. It's a security and safety issue." ---(end of b

Re: [GENERAL] plgpsql and transactions

2006-04-06 Thread Terry Lee Tucker
On Thursday 06 April 2006 03:27 pm, Bill Moseley saith: > On Thu, Apr 06, 2006 at 01:44:57PM -0500, Terry Lee Tucker wrote: > > Triggers fire inside a transaction. > > Ah, thanks. Makes sense since each statement is in an implicit > transaction. > > Granted, would help

Re: [GENERAL] Running Command Line From Trigger?

2006-04-06 Thread Terry Lee Tucker
On Thursday 06 April 2006 03:48 pm, Yudie Pg saith: > I want to execute a command line from trigger function. > The reason is I want to execute my perl script from stored procedure. > > any idea? > > > Yudie Yudie, You might want to write your perl script as a trusted perl funcion and call from

Re: [GENERAL] plgpsql and transactions

2006-04-06 Thread Terry Lee Tucker
On Thursday 06 April 2006 02:36 pm, Bill Moseley saith: > In a BEFORE INSERT trigger, depending on input values, I need to lock > a table and do a few selects. Of course, the "lock table" isn't much > use if not currently in a transaction. > > So my question is this: can I tell if I'm inside a t

Re: [GENERAL] Updating a primary key

2006-03-22 Thread Terry Lee Tucker
On Wednesday 22 March 2006 06:32 am, Paul Mackay saith: > I was surprised to see that PostgreSQL doesn't execute a multiple row > update as an atomic operation, but apparently one row at a time, with > primary key uniqueness being checked after each row update. Actually, I think its done before t

Re: [GENERAL] Order of Update - Second Try

2006-03-21 Thread Terry Lee Tucker
Stephan, Thanks for the reply. We will be upgrading to version 8.x in the third quarter of the year. As I said, I have a workaround. I just wanted to know why it was behaving that way and you provided that. Thanks for the help. On Tuesday 21 March 2006 11:36 am, Stephan Szabo saith: > > Ok, fin

Re: [GENERAL] Order of Update - Second Try

2006-03-21 Thread Terry Lee Tucker
Hat Linux 3.2.3-49) (1 row) Any insight is appreciated. TIA On Tuesday 21 March 2006 09:11 am, Terry Lee Tucker saith: > Thanks for the response. I'm working on a simplified example now. It will > take a little time to set it up. I will post all the code for creating the > much sim

Re: [GENERAL] Order of Update - Second Try

2006-03-21 Thread Terry Lee Tucker
; On Tue, Mar 21, 2006 at 06:56:23AM -0500, Terry Lee Tucker wrote: > > Hello List: > > > > I posted a question over the weekend regarding this issue but I failed to > > communicate effectively what the problem is. I was weary :o[ Let me try > > again. > > I thi

[GENERAL] Order of Update - Second Try

2006-03-21 Thread Terry Lee Tucker
Hello List: I posted a question over the weekend regarding this issue but I failed to communicate effectively what the problem is. I was weary :o[ Let me try again. I have a plpgsql function which makes updates to a set of records across two tables in a One to Many relationship hereinafter re

Re: [GENERAL] passing parameters to a trigger function

2006-03-21 Thread Terry Lee Tucker
On Tuesday 21 March 2006 09:21 am, Larry White saith: > I can't figure out how to pass parameters to a trigger function. > > I checked the documentation and saw that trigger functions don't take > params in the usual fashion, > but couldn't find an example of a pl-sql trigger function that used > t

  1   2   >