[GENERAL] changing 'mons' in interval?

2007-06-04 Thread Klint Gore
Is there a way to change mons in interval::text to the full word months without resorting to "replace(aninterval::text,'mon','Month')"? If it can handle locales as well that would be good (but I could live without it). klint. +----

Re: [GENERAL] changing 'mons' in interval?

2007-06-04 Thread Klint Gore
On Mon, 4 Jun 2007 11:43:08 +0200, Martijn van Oosterhout <[EMAIL PROTECTED]> wrote: > On Mon, Jun 04, 2007 at 06:51:37PM +1000, Klint Gore wrote: > > Is there a way to change mons in interval::text to the full word months > > without resorting to "replace(aninterval::te

[GENERAL] copy question - fixed width?

2008-02-10 Thread Klint Gore
1234567890 3test36789012345678901234567890 at the moment i have a function that does create temp table tmp1 (line text); copy tmp1 from '/tmp/afile'; looking at information schema for t1 definition> magnitude quicker to use the view> insert into t1 select * from tmpview; klint. -- Klint Gore Database

Re: [GENERAL] How to monitor the progress of a stored procedure?

2008-02-27 Thread Klint Gore
is written in PL/perl. I tried to use Perl's print statement, unbuffered, to print out a message periodically from within the procedure, but I see no output.) elog? (see example in http://www.postgresql.org/docs/8.3/interactive/plperl-database.html) klint. -- Klint Gore Database Ma

Re: [GENERAL] rule question

2008-02-28 Thread Klint Gore
cution of the rule follows what you were saying. klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Problem with async notifications of table updates

2008-03-19 Thread Klint Gore
tion commits. I suggest rethinking your dislike of NOTIFY. What if the trigger is a constraint trigger that is deferred? http://www.postgresql.org/docs/8.3/interactive/sql-createconstraint.html klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2

Re: [GENERAL] COPY to STDOUT and pipes

2008-04-14 Thread Klint Gore
delimiter '|'" | psql -d gpdms -c "create table foo (like pg_class); copy foo from stdin with delimiter '|';" works for me on 8.3.0 win32 klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 F

[GENERAL] pg 8.3.0 unexpected sending network packet?

2008-04-17 Thread Klint Gore
..?..I..1t 0020: 00 00 00 00 00 00 81 B4 : 31 54 30 4C 02 01 00 04 | 1T0L 0030: 06 70 75 62 6C 69 63 A0 : | .public. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMa

Re: [GENERAL] Client Authentication

2008-04-17 Thread Klint Gore
me can help me. try adding a subnet mask host all username 0.0.0.0 0.0.0.0 md5 or a cidr mask host all username 0.0.0.0/0 md5 klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PRO

Re: [GENERAL] Insert Rewrite rules

2008-04-21 Thread Klint Gore
is one of these for each day with only the times changing. Am I missing something or is this just broken? Have you got a statement trigger or a row trigger? klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Klint Gore
ery; for arow in execute query loop return arow; end loop; return null; end; $BODY$ LANGUAGE 'plpgsql' STABLE SECURITY DEFINER; you probably need to protect tfy from sql injection too. see quote_ident. klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. Universi

Re: [GENERAL] Table with differerent Data Types

2008-04-23 Thread Klint Gore
ert into t values(2, 'String', 'test'); insert into t values(3, 'Float', 1.23); How can i do that? Its that possible? How Can i solve this problem? see http://www.varlena.com/varlena/GeneralBits/110.php klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. Uni

Re: [GENERAL] inheritance...

2008-04-27 Thread Klint Gore
Tom Allison wrote: Am I missing something in the fine print? fine print = see 5.8.1 Caveats on http://www.postgresql.org/docs/8.3/interactive/ddl-inherit.html klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773

Re: [GENERAL] Trouble with text search select statement

2008-04-30 Thread Klint Gore
hout it with no change. '' isn't supposed to to be the empty string, it's supposed to be a quoted space. to_tsvector separates on whitespace. So with the space, it will have the words bird and moon.Without the space, it will have the single word birdmoon. klint. -- Klint Gore

Re: [GENERAL] operator is not unique: integer || integer

2008-05-05 Thread Klint Gore
integer as $$ declare ks integer; loopdate timestamp; begin ks := 3; loopdate := now(); raise notice 'blah ks:[EMAIL PROTECTED]', ks, loopdate; return 1; end; $$ language plpgsql; postgres=# select atest(); NOTICE: blah ks:[EMAIL PROTECTED] 09:58:55.812 atest --- 1 (1

Re: [GENERAL] Is this possible in a trigger?

2008-05-06 Thread Klint Gore
re oldblah.' || arecord.columnname || ' <> newblah.' ||arecord.columnnameinto oldval,newval; changes := changes || arecord.columnname || ' was ' || oldval || ' now ' || newval; end loop; execute 'drop table oldblah'; execute 

Re: [GENERAL] triggers: dynamic references to fields in NEW and OLD?

2008-05-15 Thread Klint Gore
tblfld = 'aa' then avalue := new.aa; else if tblfld = 'bb' then avalue := new.bb; end if; end if; raise notice '%',avalue; return new; end; $$ language plpgsql; klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New

Re: [GENERAL] triggers: dynamic references to fields in NEW and OLD?

2008-05-18 Thread Klint Gore
dea what it is or if it's exposed so that it can be called. Maybe someone who knows about the internals of plpgsql could comment - is there a function like getfieldfromrecord(record,text)? klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2

Re: [GENERAL] Download HTML documentation?

2008-05-20 Thread Klint Gore
nload/mirrors-ftp?file=%2Fdev%2Fdoc%2Fpostgres.tar.gz klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] small table, huge table, and a join = slow and tough query. cake inside!

2008-05-28 Thread Klint Gore
p the query, I would be so extremely grateful. What columns are primary keys or indexed? Run this and post what it says vacuum; analyze; explain If you can wait for the query to finish, change the last line to "explain analyze ..." klint. -- Klint Gore Database Manager

Re: [GENERAL] is it a bug in rule system?

2008-05-29 Thread Klint Gore
l; end if; return new; klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: h

Re: [GENERAL] does postgresql works on distributed systems?

2008-06-03 Thread Klint Gore
e firebird and sqlite can handle this way of accessing the data using the embedded engines. Aravind - read http://msdn.microsoft.com/en-us/library/ms190611.aspx and it should help you understand how to database servers (including postgres) work in network environments. klint. -- Klint Gore Da

Re: [GENERAL] psql \e command

2008-06-04 Thread Klint Gore
admin does when you hit the sql button with a function selected. postgres=# create or replace function foo() returns int as $$ select 1; $$ language sql; CREATE FUNCTION postgres=# \e CREATE FUNCTION postgres=# klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New Engla

Re: [GENERAL] Multithreaded queue in PgSQL

2008-06-11 Thread Klint Gore
ack to the application without having to issue a select and an update. The serializable transaction throws an error in other threads that try to claim the same rows. You could add an offset to the limit to try to select different rows. klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. Uni

Re: [GENERAL] inserting to a multi-table view

2008-06-17 Thread Klint Gore
arec.person_id, $1) -- insert into phone (...) values (arec.person_id, $1) return next arec; end loop; return; end; $$ language plpgsql volatile; create rule atest as on insert to studentinfo do instead ( insert into student (person_id) select (select person_id from newperson(

Re: [GENERAL] inserting to a multi-table view

2008-06-17 Thread Klint Gore
Michael Shulman wrote: On Tue, Jun 17, 2008 at 3:46 AM, Klint Gore <[EMAIL PROTECTED]> wrote: The only way I could find to make this work is to use a rule and wrap the inner "insert returning" in a function. Thanks, this works! Although it feels like something of a

Re: [GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-17 Thread Klint Gore
an expected pid file, that went smoothly. Is there an initdb in here somewhere? Or is the 8.3 server trying to start with an 8.1 file structure? 6.) Tried starting the new version, /etc/rc.d/rc.postgresql start. It reported that the server was already running, but that it started anyway.

Re: [GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-17 Thread Klint Gore
Rich Shepard wrote: On Wed, 18 Jun 2008, Klint Gore wrote: >>5.) Built postgresql-8.3.3 using the SlackBuild script, then ran >> 'upgradepkg postgresql-8.3.3*tgz'; other than reporting not finding an >> expected pid file, that went smoothly. >> > Is t

Re: [GENERAL] Problem with volatile function

2008-06-18 Thread Klint Gore
5 33 | 6 10 | 7 56 | 8 78 | 9 87 | 10 (10 rows) postgres=# -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECT

Re: [GENERAL] LIKE not using indexes (due to locale issue?)

2008-06-24 Thread Klint Gore
s is handled by tsearch2? Or I need to do the locale to "C" for this to function? See http://www.postgresql.org/docs/8.3/interactive/indexes-opclass.html. It tells you how to create an index that like might use in non-C locales. As a side note, the ^ in the string above has no spe

Re: [GENERAL] LIKE not using indexes (due to locale issue?)

2008-06-25 Thread Klint Gore
Ow Mun Heng wrote: On Wed, 2008-06-25 at 14:58 +1000, Klint Gore wrote: > Ow Mun Heng wrote: > > explain select * from d_trr where revision like '^B2.%.SX' > > --where ast_revision = 'B2.M.SX' > > > > Seq Scan on d_trr (cost=0.00..2268460.98 r

Re: [GENERAL] LIKE not using indexes (due to locale issue?)

2008-06-25 Thread Klint Gore
xist e.g. if ast_revision can never start with WW then explain select count(*) from d_trr_iw where ast_revision like 'WW.%.SX' klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL P

Re: [GENERAL] dblink to non postgresql dbms

2008-06-26 Thread Klint Gore
/projects/dblink-tds/ -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

[GENERAL] pg_dump - lost synchronization with server: got message type "d", length 6036499

2008-07-01 Thread Klint Gore
1 row) This completes and returns all rows select id, md5(filedata) from uploadeddatafiles klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list

Re: [GENERAL] pg_dump - lost synchronization with server: got message type "d", length 6036499

2008-07-02 Thread Klint Gore
Tom Lane wrote: Klint Gore <[EMAIL PROTECTED]> writes: > Can someone shed some light on what's happening here? > D:\backups>pg_dump -Z 9 -Fc -C -U postgres -f sheepcrc\dbback.dmp sheepcrc2 > pg_dump: Dumping the contents of table "uploadeddatafiles" fail

Re: [GENERAL] pg_dump - lost synchronization with server: got message type "d", length 6036499

2008-07-02 Thread Klint Gore
Tom Lane wrote: Klint Gore <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Maybe it's >> dying here after having leaked a lot of memory for some other reason >> --- try watching the pg_dump process size while it runs. > Peak memory usage was about 540m wh

Re: [GENERAL] pg_dump - lost synchronization with server: got message type "d", length 6036499

2008-07-02 Thread Klint Gore
Tom Lane wrote: Klint Gore <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Maybe you've found a memory leak in pg_dump (it wouldn't be the first >> one). Does this database have a particularly large number of objects? > I wouldn't call it large - 27

Re: [GENERAL] Date Formatting for dd/mm/yyyy

2008-07-02 Thread Klint Gore
x27;s ShortDateFormat set to? Does fieldbyname('Date').asdatetime := strtodate('2/2/2003') make any difference? klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED]

Re: [GENERAL] pg_dump - lost synchronization with server: got message type "d", length 6036499

2008-07-03 Thread Klint Gore
Tom Lane wrote: Klint Gore <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Would you be willing to send me a "pg_dump -s" (ie, just schema no >> data) dump of this DB? Off-list of course. >> > attached. created with pg_dump 8.3.3 win32 to the 8.3.1 win

Re: [GENERAL] Getting source code for database objects

2008-07-08 Thread Klint Gore
27;ve been playing with pgadmin and wireshark trying to figure out what commands or queries it is using to no avail. See GetSql method of schema/*.cpp This used to be on the list of possible PG projects for the google summer of code but seems to have been removed. klint. -- Klint Gore Dat

Re: [GENERAL] rollback

2008-07-09 Thread Klint Gore
p, everything done by anyone else will be forgotten as well) - time / capacity (creating a copy of a large database might take a while and need extra storage) klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 326

Re: [GENERAL] SELECT Query returns empty

2008-07-09 Thread Klint Gore
Once step 6 completes, can psql see the data? Does "select * from pg_stat_activity" show anything unexpected? Are you directly using libpq or some other connection method? klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773

Re: [GENERAL] SELECT Query returns empty

2008-07-09 Thread Klint Gore
ill just tell you that its running "select * from pg_stat_activity", not if it's still in transaction. You could try setting log_statement='all' and check that the logs look like you would expect. Especially the commits from both sides. klint. -- Klint Gore Database M

[GENERAL] Top N within groups?

2008-07-10 Thread Klint Gore
p 3 within each group, something like select distinct on (groupid) FOR 3 groupid, identifier, count(*) from somequery group by groupid, identifier order by 1,3 desc,2; For Ivan's case, groupid = brand, identifer = item. The where clause applies the date limits. klint. -- Klint Gore D

Re: [GENERAL] Restoring Database from Data directory backup.

2008-07-13 Thread Klint Gore
#x27;m assuming that your backup took the entire directory tree under data and postgres wasn't running when you did it? klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Se

Re: [GENERAL] Top N within groups?

2008-07-13 Thread Klint Gore
Martijn van Oosterhout wrote: On Fri, Jul 11, 2008 at 01:24:28PM +1000, Klint Gore wrote: > [thinking out loud] > Can someone familiar with the source for DISTINCT ON comment on how hard > it would be to add another parameter to return more than one row? From a programming point of

Re: [GENERAL] Cause of error message?

2008-07-14 Thread Klint Gore
he failure. The postgres log is a good place to start looking. klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.or

Re: [GENERAL] Out of memry with large result set

2008-07-14 Thread Klint Gore
change the sql query ? Under mysql, I have the same issue, but by using: mysql -quick, I have what I want. Is there something equivalent under postgresql ? Or should I use another clients ? Try copy (query) to stdout. For me, psql sits at 4.9mb ram on a 3x10^16 row query. klint. -- Klin

download latest points to wrong place [was Re: [GENERAL] Installing PostgreSQL without using CygWin]

2008-07-14 Thread Klint Gore
3.3-1.zip klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgre

Re: [GENERAL] Referential integrity vulnerability in 8.3.3

2008-07-16 Thread Klint Gore
1. statement delete from table2 where pk=foo 2. fktrigfn fires 3. found is set to true by the perform 4. null is returned 5. nothing changes You would need to work the same logic into where you return null in your real trigger. klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University

Re: [GENERAL] query optimization

2008-07-17 Thread Klint Gore
atile? As Scott Marlowe suggested, you need to look at the explain results to find out what the plan is in each case. klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent

Re: [GENERAL] Substitute a variable in PL/PGSQL.

2008-07-23 Thread Klint Gore
ted; END LOOP; end loop; RETURN; END $$ LANGUAGE plpgsql; klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgres

Re: [GENERAL] [PERL DBI] Insertiing data across multiple tables

2008-07-24 Thread Klint Gore
klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mai

Re: [GENERAL] copy ... from stdin csv; and bytea

2008-07-27 Thread Klint Gore
other than to fallback on the inserts? Try just a single \ e.g. "ge.xls","application/vnd.ms-excel",71168,"\320\317\021\340\241[snip] klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3

Re: [GENERAL] copy ... from stdin csv; and bytea

2008-07-27 Thread Klint Gore
David Wilson wrote: On Mon, Jul 28, 2008 at 1:24 AM, Klint Gore <[EMAIL PROTECTED]> wrote: > Try just a single \ > > e.g. > "ge.xls","application/vnd.ms-excel",71168,"\320\317\021\340\241[snip] Thanks- I did try that, and it at least gave the expecte

Re: [GENERAL] copy ... from stdin csv; and bytea

2008-07-28 Thread Klint Gore
Tom Lane wrote: Klint Gore <[EMAIL PROTECTED]> writes: > David Wilson wrote: >> I'm not certain how to check the actual byte width of a column within a >> row, > select length(bytea_field) from table If you want the actual on-disk footprint, use pg_column_size()

Re: [GENERAL] a SQL query question

2008-07-28 Thread Klint Gore
ol from atable where pid is not null order by pid, nmol desc If you want the rows tie for max nmol within a pid then you can go to select aid,pid,nmol from atable where (pid,nmol) in (select pid, max(nmol) from atable where pid is not null group by pid) klint. -- Klint Gore Database Man

Re: [GENERAL] why can't I load pgxml.sql

2008-07-28 Thread Klint Gore
klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mai

Re: [GENERAL] Cursor

2008-07-29 Thread Klint Gore
tive/plpgsql-cursors.html klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: h

Re: [GENERAL] bytea encode performance issues

2008-08-07 Thread Klint Gore
the escape might be required. 2. dbmail already chunks email up into ~500k blocks. If that is a configurable setting, turn it down to about 1.5k blocks. klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EM

Re: [GENERAL] Can I search for text in a function?

2008-08-11 Thread Klint Gore
table owned by the system. Is there a query I can use to find what function contains the string "previous_charge"? select proname from pg_proc where prosrc ilike '%previous_charge%'; klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armid

Re: [GENERAL] Need help returning record set from a dynamic sql query

2008-08-12 Thread Klint Gore
[I'm not going to even try to work out that mess to quote it] The following works for me. You can even do it without dynamic sql (see fun_orderreport1). begin; -- dummy up some tables for self contained example create table orders (ordersid int, initiated date, company int, event int); create

[GENERAL] 8.3.3 win32 crashing

2008-08-19 Thread Klint Gore
on a 3.8ghz P4 with 3g memory on a 10mbit network (don't ask about the network - it just is and there's nothing I can do about it). The client is xp pentium M notebook, 2ghz, 1g memory. klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale N

Re: [GENERAL] 8.3.3 win32 crashing

2008-08-19 Thread Klint Gore
Tom Lane wrote: Klint Gore <[EMAIL PROTECTED]> writes: > Faulting application postgres.exe, version 8.3.3.8160, faulting module > msvcr80.dll, version 8.0.50727.1433, fault address 0x0001e44a. > I have a function that's doing a summary report counting data. It makes >

Re: [GENERAL] 8.3.3 win32 crashing

2008-08-19 Thread Klint Gore
Tom Lane wrote: Klint Gore <[EMAIL PROTECTED]> writes: >>> [ heavy RAISE NOTICE traffic crashes the server ] > client=warning, log=warning completes > client=warning, log=notice fails > client=notice, log=warning completes > client=notice, log=notice fails > It

Re: [GENERAL] can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-19 Thread Klint Gore
test=# test=# select * from bar1('!'); NOTICE: 1 hi! NOTICE: 3 hello! bar1 -- t (1 row) test=# -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-gene

Re: [GENERAL] can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-19 Thread Klint Gore
egin test$# test$# UPDATE "EntityRelation" test$# SET "Status" = inStatus, test$# "Modified" = now(), test$# "ModifiedBy" =current_user test$# WHERE ("RelationID" = inRelationID) test$# AND ("EntityID" = inEnityID) test$# AND inRelatedID =

Re: [GENERAL] Fwd: How do I determine my data dir for a created database for pg_ctl?

2008-08-19 Thread Klint Gore
Matthew Pettis wrote: I have a database I can psql into... How can I determine what its absolute path is so I can use pg_ctl on it to restart it? Because when I use pg_ctl, it tells me I have to provide it in the -D flag as an argument. show data_directory; klint. -- Klint Gore Database

Re: [GENERAL] Trigger function is not called

2008-08-25 Thread Klint Gore
insert(); CREATE TRIGGER trigger_test_insert2 BEFORE INSERT ON test.trigger_test2 FOR EACH ROW EXECUTE PROCEDURE test.trigger_test_before_insert(); explain verbose insert into test.trigger_test values (null,'hi'); --explain verbose insert into test.trigger_test2 values (null,'hi');

Re: [GENERAL] Largest PostgreSQL 8.x DB someone is running?

2008-09-21 Thread Klint Gore
parallel operations/features in the product. Any information you can provide would be very helpful. See this thread from last month http://archives.postgresql.org/pgsql-general/2008-08/msg00553.php klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW

Re: [GENERAL] NULL values seem to short-circuit my unique index

2008-09-28 Thread Klint Gore
with only the true value from the comparison causing the constraint violation. Think of the unique constraint check like "does this value equal any other value already recorded". klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph

Re: [GENERAL] Counting unique rows as an aggregate.

2008-09-29 Thread Klint Gore
v/variance. klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.pos

Re: [GENERAL] How do I save data and then raise an exception?

2008-10-02 Thread Klint Gore
, then the update wouldn't be needed at all and the whole thing could just rollback. You have to assume that by the point where Rob's code fires, the bad data is already committed. That update needs to commit to undo that previous transaction, but he still needs to get the 3rd

Re: [GENERAL] feature idea

2008-10-06 Thread Klint Gore
g/pgsql-general/2008-09/msg01234.php klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] again... (win32 logging errors)

2008-10-26 Thread Klint Gore
ut the server. http://archives.postgresql.org/pgsql-general/2008-08/msg00615.php +1 for survey. klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing

Re: [GENERAL] Username and Password authentication using pqxx library.

2008-10-28 Thread Klint Gore
om users where username = 'hfkhsdf' group by 1; username | count --+--- (0 rows) klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general maili

Re: [GENERAL] valid use of wildcard

2008-10-29 Thread Klint Gore
select '2008-10-27%'::date; date 2008-10-27 (1 row) postgres=# explain select * from data where "timestamp" = '2008-10-27%'; QUERY PLAN -- Seq Scan on data (cost=0.00..5

Re: [GENERAL] Date data type

2008-11-02 Thread Klint Gore
date field insert into atable (date_col) values (''); -- syntax error insert into atable (date_col) values (null); -- works klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTE

Re: [GENERAL] exception

2008-11-12 Thread Klint Gore
t; klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.post

Re: [GENERAL] Seek within Large Object, within PL/* function?

2008-11-13 Thread Klint Gore
lo_tell lo_truncate lo_unlink log log log loread lower lowrite It's odd that loread and lowrite don't follow the naming convention with the underscore (8.3.3 win32)? klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789

Re: [GENERAL] Group by clause creating "ERROR: wrong record type supplied in RETURN NEXT" (version 8.1.11 -- grr...)

2008-11-26 Thread Klint Gore
uery_table_data" line 15 at return next sum(int) returns bigint klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@pos

Re: [GENERAL] Favorite Tom Lane quotes

2008-12-01 Thread Klint Gore
ons from http://en.wikipedia.org/wiki/Linear_Tape-Open 4. http://maps.google.com/maps?f=d&saddr=san+francisco&daddr=los+angeles&hl=en&geocode=&mra=ls&sll=37.0625,-95.677068&sspn=58.598104,116.542969&ie=UTF8&ll=35.939855,-120.330885&spn=7.601811,14.567871&a

Re: [GENERAL] Want quit milis

2008-12-08 Thread Klint Gore
and click the "Mail My Password" button. check your email for your list password. go back to the web site and login properly tick the check box next to pgsql-general click the unsubscribe button HTH, klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England

Re: [GENERAL] Problems With Bad PID and Missing Socket -- FIXED

2008-12-08 Thread Klint Gore
annot get SQL-Ledger to load. Time to ask on that mail list. How did you fix it? (so its filed in the archive) klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: [EMAIL PROTECTED] -- Sent

Re: [GENERAL] How restrict select on a view ?

2008-12-15 Thread Klint Gore
gives the same result klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: kgo...@une.edu.au -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Postgresql and Delphi for windows

2005-02-21 Thread Klint Gore
w choices zeos library odbc commercial dbexpress from vitavoom Beyond verifying that they work, I haven't done much with them. klint. +---+-+ : Klint Gore: "Non rhyming: : EMail : [EMAIL PROTECT

Re: [GENERAL] sql question

2005-03-13 Thread Klint Gore
| 34 > > > Do I need a crosstab-query ? select id, fref from mytable union all select id, mref from mytable order by 1,2 klint. +---+-+ : Klint Gore: "Non rhyming: : EMail : [EMAIL PROTE

Re: [GENERAL] inherited table and rules

2005-03-22 Thread Klint Gore
s * 6 updates + original 6 = 42 > -- update table (4) -- 1806 > UPDATE people SET color = 'black' WHERE usr_pkey = 1; 42*42+42 = 1806 klint. +---+-+ : Klint Gore: "Non

Re: [GENERAL] inherited table and rules

2005-03-22 Thread Klint Gore
'black' WHERE usr_pkey = 1; klint. +---+-+ : Klint Gore: "Non rhyming: : EMail : [EMAIL PROTECTED] : slang - the: : Snail : A.B.R.I.: possibilities : : Ma

Re: [GENERAL] inherited table and rules

2005-03-23 Thread Klint Gore
be people_history should use like instead of inherits. klint. +---+-+ : Klint Gore: "Non rhyming: : EMail : [EMAIL PROTECTED] : slang - the: : Snail : A.B.R.I.: possibilities : : Mail University of New England : ar

Re: [GENERAL] Postgres mystery

2005-03-29 Thread Klint Gore
tringvalue'''',''||quote_literal(RECORDNAME.column2)||'')''; > > > Is this a bug, as I am ensuring that the NOT NULL columns are supplied, as > well as one other. At least one of column4, recordname.colum

[GENERAL] field definitions in view results?

2005-04-04 Thread Klint Gore
nion select * from t2) v2 pg 7.4.7 on redhat linux 9. klint. +-------+-+ : Klint Gore: "Non rhyming: : EMail : [EMAIL PROTECTED] : slang - the: : Snail : A.B.R.I.: possib

Re: [GENERAL] Why sequential scan for currval?

2005-04-27 Thread Klint Gore
n a statement to the next. So the scan has to be sequential to check if the value of currval() has changed. klint. +---+-+ : Klint Gore: "Non rhyming: : EMail : [EMAIL PROTECTED] : slang - the: : Snail : A.B.R.I.: possibil

Re: [GENERAL] Problem in creating a table

2005-05-17 Thread Klint Gore
On Tue, 17 May 2005 15:47:55 +0900, "Wen Guangcheng" <[EMAIL PROTECTED]> wrote: > OFFICE_ID VARCHAR2(7)NOT NULL, This used to be oracle? drop the 2 from the varchar. klint. +---+-----+ : Klint Gore

Re: [GENERAL] Problem in creating a table

2005-05-17 Thread Klint Gore
richard said) and change number to numeric klint. +-------+-+ : Klint Gore: "Non rhyming: : EMail : [EMAIL PROTECTED] : slang - the: : Snail : A.B.R.I.: possibilities : :

[GENERAL] mail change for list?

2005-07-07 Thread Klint Gore
Is the new mailing software for the postgres lists going to stay like it is? The list identification header changed from X-Mailing-List: pgsql-general to List-ID: klint. +---+-+ : Klint Gore: "Non rh

Re: [GENERAL] Case insensitive unique constraint

2005-07-14 Thread Klint Gore
on the data's way in. > > Is there an easy way to go about this? Am I about to write my first > server side function for postgresql? how about create unique index tbl_iname_idx on tbl (lower(name_field)) klint. +-----

Re: [GENERAL] EnterpriseDB mentioned in eweek, and...

2005-08-10 Thread Klint Gore
y. Perhaps someone from advocacy could contact eweek and put them straight. klint. +---+-----+ : Klint Gore: "Non rhyming: : EMail : [EMAIL PROTECTED] : slang - the

Re: [GENERAL] Debug plpgSQL stored procedures

2005-09-05 Thread Klint Gore
o it was some time ago. The EMS manager can apparently do it. http://www.sqlmanager.net/en/ klint. +---+-----+ : Klint Gore: "Non rhyming: : EMail : [EMAIL PROTECTED] : slang - the

Re: [GENERAL] MS SQL - PostgreSQL

2005-09-15 Thread Klint Gore
ction has a name. Essentially, it's a generic execute procedure. Pass it a procedure name and it runs it. It's just "execute" from plpgsql. http://www.postgresql.org/docs/8.0/static/plpgsql-statements.html klint. +---+--

  1   2   >