[GENERAL] Problem with pg_dump - reg.

2004-04-07 Thread Shanmugasundaram Doraisamy
Dear Group, Thanks for all your support to my previous postings. I am currently using Postgresql 7.3.4-2PGDG. The problem I am facing is that when I take a dump of the DB using pg_dump and restore it using the cat pg_dump_file |psql dbname, I find that some views and funct

Re: [GENERAL] eval in plpgsl

2004-04-07 Thread Bruce Momjian
Mage wrote: > Hello, > > is there any variable variable syntax or function in plpgsql? I didn't > find it. > > I mean something like: magic(''new.'' || TG_ARGV[0]) = 5; Uh, we have EXECUTE, but I don't know if will allow you to set a local variable. Maybe you can do: EXECUTE

Re: [GENERAL] ERROR: invalid memory alloc request size 0

2004-04-07 Thread Tom Lane
"John Hagstrand" <[EMAIL PROTECTED]> writes: > I'm getting the following error when I try to update or insert into a table. > This just started happening today. The table has been working fine up to > now. The table has 27,000 rows and 24 columns. > ERROR: invalid memory alloc request size 0 W

Re: [GENERAL] Evening in NYC

2004-04-07 Thread Jan Wieck
Bruce Momjian wrote: SRA America is sponsoring an evening event with me in NYC. If folks want to go, the details are on our web site under "Events". I marked my calendar. If anyone wants to talk replication on the sidelines, I'll be there. Jan -- #==

Re: [GENERAL] Can we have time based triggers in Postgresql??

2004-04-07 Thread Jan Wieck
Gregory Wood wrote: Andrew Sullivan wrote: On Tue, Mar 30, 2004 at 12:16:50PM -0500, Steve Manes wrote: I think he probably means like an Oracle job. Although cron works, that would be handy so you wouldn't need to write wrapper scripts just to run a proc. I hate to sound like an oldbie crank

Re: [GENERAL] Cursors and Transactions, why?

2004-04-07 Thread Wes Palmer
On 4/6/04 11:09 PM, "Tom Lane" <[EMAIL PROTECTED]> wrote: > What "out of memory thing"? The tuplestore code is perfectly capable of > spilling to disk --- in fact the usual performance gripe against it has > to do with spilling too soon, because sort_mem is set too small. I tried doing a mass up

Re: [GENERAL] Create Type Problem

2004-04-07 Thread Vinay Jain
hi stephan thank you for giving this information.. actually i have found problem in order by clause when i insert data in local language of india (i.e. Hindi) it sorts in order of length which is incorrect so i ve written routine & trying it for some new data type now problem is this if i can not

[GENERAL] timestamp precision with or without timezones

2004-04-07 Thread mboes
Hi there, Is there a way of specifying the precision of a timestamp *with timezone* field? It works fine for timestamps *without* timezones, but gives me a syntax error if I try with timestamptz: tweag=> create table tbl1 (t timestamp(0)); CREATE TABLE tweag=> \d tbl1 Table "pub

Re: [GENERAL] [MACTCL] Tcl load command and mac os x

2004-04-07 Thread Daniel A. Steffen
On Wednesday, Apr 7, 2004, at 13:52 Australia/Sydney, Jerry LeVan wrote: pgtksh behaves badly, clicking on the "pgtksh" window generates an error: set front process failed,-606 I can't get the menu for the wish window ;( once again, this has come up many times before on tcl-mac, see the list

[GENERAL] Subqueries failing inside pl/pgsql fuction called by trigger

2004-04-07 Thread Bob
Hi, I have a very odd postgresql problem. I have some subqueries contained within a function which are looking for unrefernced data and then delete any rows that are found: CREATE OR REPLACE FUNCTION housekeeping() RETURNS TRIGGER AS ' BEGIN DELETE FROM properties WHERE NOT EXISTS (SELECT

Re: [GENERAL] Creating a trigger function

2004-04-07 Thread Peter Erickson
Richard Huxton wrote: On Sunday 04 April 2004 20:40, Peter Erickson wrote: Ok, I have determined that i can't do: IF NEW IS NOT NULL -- or -- IF OLD IS NOT NULL and that is what is causing the error. So, with this now known, is there a way to create a trigger & function that will allow inserts,

Re: [GENERAL] [MACTCL] Tcl load command and mac os x

2004-04-07 Thread Daniel A. Steffen
Jerry, On Wednesday, Apr 7, 2004, at 08:25 Australia/Sydney, Jerry LeVan wrote: % load /usr/local/pgsql/lib/libpgtcl.so dyld: tclsh malformed library: /usr/local/pgsql/lib/libpgtcl.so (not a Mach-O library file, bad filetype value) this should do it, however it appears that your library isn't a M

[GENERAL] \? not working in psql

2004-04-07 Thread Francisco Reyes
Today I was using \e to edit the buffer, something I don't commonly do. Somehow that screwed up my help file for psql. When I do \? instead of getting help for the slash commands I get General General General General General ull and not nosend; Any thoughts? The last line "ull and not nosend;"

Re: [GENERAL] More aggregate functions?

2004-04-07 Thread Tom Lane
David Garamond <[EMAIL PROTECTED]> writes: > What do people think of adding some more aggregate functions. These are > the ones that MySQL has and PG doesn't: > - STD/STDDEV > - VARIANCE Have you read the documentation lately? > - BIT_OR > - BIT_AND > - GROUP_CONCAT (for strings, added in MySQL

Re: [GENERAL] Can we have time based triggers in Postgresql??

2004-04-07 Thread Greg Stark
David Garamond <[EMAIL PROTECTED]> writes: > In short, it would be nice if we have a scheduling system where one can run > queries or in-process procedures/functions instead of external commands. Also > where one can use normal SQL/psql commands to manipulate the jobs; cron > entries aren't exact

Re: [GENERAL] Cursors and Transactions, why?

2004-04-07 Thread Eric Ridge
On Apr 7, 2004, at 12:43 AM, Joe Conway wrote: Eric Ridge wrote: On Apr 6, 2004, at 11:54 AM, Jan Wieck wrote: And now you know why they are so good if you don't use all rows. This benefit I think goes away if you use Joe Conway's suggestion of WITH HOLD. Okay, so WITH HOLD is actually materiali

Re: [GENERAL] Cursors and Transactions, why?

2004-04-07 Thread Eric Ridge
On Apr 7, 2004, at 7:51 AM, Jan Wieck wrote: Eric Ridge wrote: On Apr 6, 2004, at 11:54 AM, Jan Wieck wrote: If the underlying query is for example a simple sequential scan, then the result set is not materialized but every future fetch operation will read directly from the base table. This woul

[GENERAL] How to list domains

2004-04-07 Thread Alexander Cohen
How can i get list of all domains available? thanks! -- Alexander Cohen http://www.toomuchspace.com (819) 348-9237 (819) 432-3443 ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail com

Re: [GENERAL] Can we have time based triggers in Postgresql??

2004-04-07 Thread Martijn van Oosterhout
On Wed, Apr 07, 2004 at 08:25:32AM -0500, Mike Nolan wrote: > The security aspects of them could be important to some users or > potential users. Using cron either forces one to have passwords out > there in plaintext in the .pgpass file or to use a 'trusted' username > that could also be a maj

Re: [GENERAL] Can the username calling a function be made available within the function?

2004-04-07 Thread Bruno Wolff III
On Wed, Apr 07, 2004 at 11:23:25 +0100, Adam Witney <[EMAIL PROTECTED]> wrote: > > I'd like to be able to have a PL/pgSQL function defined as SECURITY DEFINER, > but still have access to the calling username within the function. Is this > possible? > > I could pass current_user as a parameter,

Re: [GENERAL] Can we have time based triggers in Postgresql??

2004-04-07 Thread Mike Nolan
> Not that jobs built into the database are of no value, but shell scripts > seem to do everything you need and when there are other things to put into > posgtresql I wouldn't vote to waste time on jobs. I wonder if Oracle's time-based jobs feature came to be as a result of some other uses for th

Re: [GENERAL] Can we have time based triggers in Postgresql??

2004-04-07 Thread Bob . Henkel
Just my experience, but we when I have used Oracle as my database. My processes that run in batch use shell scripts to kick of stored procedures even though Oracle does provide jobs. Shell scripts can be much more flexible in many cases. You can have dependancies on all kinds of things (tim

Re: [GENERAL] Can the username calling a function be made available within the function?

2004-04-07 Thread Richard Huxton
On Wednesday 07 April 2004 11:23, Adam Witney wrote: > I'd like to be able to have a PL/pgSQL function defined as SECURITY > DEFINER, but still have access to the calling username within the function. > Is this possible? > > I could pass current_user as a parameter, but of course this could easily

Re: [GENERAL] More aggregate functions?

2004-04-07 Thread Stephen Frost
* David Garamond ([EMAIL PROTECTED]) wrote: > What do people think of adding some more aggregate functions. These are > the ones that MySQL has and PG doesn't: > > - STD/STDDEV > - VARIANCE > - BIT_OR > - BIT_AND > - GROUP_CONCAT (for strings, added in MySQL 4.x) [...] > Btw, I have written 1 or

Re: [GENERAL] Cursors and Transactions, why?

2004-04-07 Thread Jan Wieck
Eric Ridge wrote: On Apr 6, 2004, at 11:54 AM, Jan Wieck wrote: If the underlying query is for example a simple sequential scan, then the result set is not materialized but every future fetch operation will read directly from the base table. This would obviously get screwed up if vacuum would th

[GENERAL] Can the username calling a function be made available within the function?

2004-04-07 Thread Adam Witney
I'd like to be able to have a PL/pgSQL function defined as SECURITY DEFINER, but still have access to the calling username within the function. Is this possible? I could pass current_user as a parameter, but of course this could easily be bypassed. Is there a way of coding this? Thanks for any

[GENERAL] How estimated rows is running ?

2004-04-07 Thread Hervé Piedvache
Hi, I have a database with one table with about 22 millions records. I have a script every day wich insert about 200 000 records ... Sometime my script takes 4 hours to insert the data, sometime 1 hour. Then I have a question does for inserting data PostgreSQL use somewhere the number of estimat

Re: [GENERAL] Informations about functions ...

2004-04-07 Thread Richard Huxton
On Wednesday 07 April 2004 08:46, Cyrille Gautard wrote: > Hello, > > Is there a way to see the different functions I add to a database with > create or replace function ? I browse the documentation but was not able > to find anything to see it. >From psql, if you added some functions called my_fu

Re: [GENERAL] Can we have time based triggers in Postgresql??

2004-04-07 Thread David Garamond
Gregory Wood wrote: I think he probably means like an Oracle job. Although cron works, that would be handy so you wouldn't need to write wrapper scripts just to run a proc. I hate to sound like an oldbie crank (although I'll admit to being a crank), but what exactly is the advantage supposed to

Re: [GENERAL] PERFORM statement inside procedure

2004-04-07 Thread Richard Huxton
On Wednesday 07 April 2004 08:30, Rajat Katyal wrote: > Actually my problem is PERFORM is not updating the FOUND variable to false > even when my query return no rows. Can you please tell me the better way to > use PERFORM so that by running my select query I just come to know whether > it returns

[GENERAL] More aggregate functions?

2004-04-07 Thread David Garamond
What do people think of adding some more aggregate functions. These are the ones that MySQL has and PG doesn't: - STD/STDDEV - VARIANCE - BIT_OR - BIT_AND - GROUP_CONCAT (for strings, added in MySQL 4.x) Particularly, I find GROUP_CONCAT practical to quickly display 1-many relationship, e.g.:

[GENERAL] Informations about functions ...

2004-04-07 Thread Cyrille Gautard
Hello, Is there a way to see the different functions I add to a database with create or replace function ? I browse the documentation but was not able to find anything to see it. How can we set the users permissions to give him the ability to add a function in C ? Actually, I occur an error like

Re: [GENERAL] PERFORM statement inside procedure

2004-04-07 Thread Rajat Katyal
Actually my problem is PERFORM is not updating the FOUND variable to false even when my query return no rows. Can you please tell me the better way to use PERFORM so that by running my select query I just come to know whether it returns 0 rows or not. Regards, Rajat. - Original Message - F