Re: [SQL] Issue with UPDATE statement on v8

2005-09-23 Thread Michael Fuhr
On Thu, Sep 22, 2005 at 11:22:22AM -0500, Kenneth Hutchinson wrote: > UPDATE t_summary > SETavailability = 7 > WHERE oid = 28245084 > > When this query is executed (within a function or without) the database > will simply hang. If the UPDATE is turned into a SELECT, the query > works jus

[SQL] Where are user defined functions stored?

2005-09-23 Thread Hilary Forbes
If I write a rule, I can easily see it by doing select * from pg_rules; and I also get to see all the rules I have created for my database. How can I easily get to see the definition of a user defined function please? I've searched through the online manual but failed to find the answer. TAI

Re: [SQL] Difficulties with a master-detail query

2005-09-23 Thread Bruno Wolff III
On Mon, Sep 19, 2005 at 20:29:40 +0300, "Milen A. Radev" <[EMAIL PROTECTED]> wrote: > > I would like to get all employees, who speak two specified languages > (say german and french). The following query gives me that, bu I don't > like it (see for yourself): > > > SELECT > ?.employee_id, >

Re: [SQL] Where are user defined functions stored?

2005-09-23 Thread Tom Lane
Hilary Forbes <[EMAIL PROTECTED]> writes: > How can I easily get to see the definition of a user defined function > please? Look in pg_proc. regards, tom lane ---(end of broadcast)--- TIP 3: Have you checked our extensive FA

Re: [SQL] [ADMIN] COPY TO / COPY FROM

2005-09-23 Thread Aldor
> I kown I can use pg_dump to perform that "back up" but I wanted to > test performences. pg_dump does the same.. if you same custom it makes binary (WITH BINARY) but with compression. Performance? 1. TOP: inserte into select 2. TOP: copy / pg_restore with uncompressed binary 3. TOP: copy /

Re: [SQL] Where are user defined functions stored?

2005-09-23 Thread Hilary Forbes
Tom Many thanks. Suppose I now want to know if there are any user defined functions set up in my database? I was rather hoping I could do something simple like \df to get a list of **user** defined functions rather as \dt gives me a list of my tables and not the complete list of all the sys

Re: [SQL] Where are user defined functions stored?

2005-09-23 Thread Tom Lane
Hilary Forbes <[EMAIL PROTECTED]> writes: > Many thanks. Suppose I now want to know if there are any user defined > functions set up in my database? I was rather hoping I could do something > simple like > \df > to get a list of **user** defined functions rather as \dt gives me a list of > my

Re: [SQL] Updating cidr column with network operator

2005-09-23 Thread Axel Rau
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 22.09.2005 um 22:26 schrieb Daryl Richter: Axel Rau wrote: Thank you for responding, Daryl, Am 22.09.2005 um 16:45 schrieb Daryl Richter: Axel Rau wrote: Hi SQLers, I have a fk from address to network and try to update the foreign key colum

Re: [SQL] delete item[5] from varchar[] array???

2005-09-23 Thread Matthew Peter
--- Michael Fuhr <[EMAIL PROTECTED]> wrote: > On Wed, Sep 21, 2005 at 06:56:36PM -0700, Matthew > Peter wrote: > > How is it possible to delete an item from a single > > dimension varchar[] array? Lets say it has the > values > > {1,2,3,4,5,6}... how do i delete at position [4]? > > I'm not sur

Re: [SQL] Updating cidr column with network operator

2005-09-23 Thread Michael Fuhr
On Fri, Sep 23, 2005 at 06:31:17PM +0200, Axel Rau wrote: > Networks change during time, being diveded or aggregated or you just > enter wrong data during insert. Have you considered using a CHECK constraint and/or a trigger to ensure that the network in the network column contains the address in

Re: [SQL] Updating cidr column with network operator

2005-09-23 Thread Daryl Richter
Axel Rau wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 22.09.2005 um 22:26 schrieb Daryl Richter: Axel Rau wrote: Thank you for responding, Daryl, Am 22.09.2005 um 16:45 schrieb Daryl Richter: Axel Rau wrote: Hi SQLers, I have a fk from address to network and try to update the

Re: [SQL] delete item[5] from varchar[] array???

2005-09-23 Thread Michael Fuhr
On Fri, Sep 23, 2005 at 10:02:44AM -0700, Matthew Peter wrote: > --- Michael Fuhr <[EMAIL PROTECTED]> wrote: > > test=> UPDATE foo SET a = a[1:3] || a[5:6]; > > I sure hope there is a better way :) There must be an > easy, native way to interface with arrays. Hoping a thing is true doesn't mean it

Re: [SQL] Updating cidr column with network operator

2005-09-23 Thread Axel Rau
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 23.09.2005 um 19:32 schrieb Michael Fuhr: On Fri, Sep 23, 2005 at 06:31:17PM +0200, Axel Rau wrote: Networks change during time, being diveded or aggregated or you just enter wrong data during insert. Have you considered using a CHECK constra

Re: [SQL] Updating cidr column with network operator

2005-09-23 Thread Axel Rau
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 23.09.2005 um 20:43 schrieb Daryl Richter: [snip] I think that I now see what the problem is --> Why do you have a network table at all? It's redundant. There are more attributes and fks, I didn't mention to simplify. The schema is events ->

Re: [SQL] delete item[5] from varchar[] array???

2005-09-23 Thread Matthew Peter
--- Michael Fuhr <[EMAIL PROTECTED]> wrote: > On Fri, Sep 23, 2005 at 10:02:44AM -0700, Matthew > Peter wrote: > > --- Michael Fuhr <[EMAIL PROTECTED]> wrote: > > > test=> UPDATE foo SET a = a[1:3] || a[5:6]; > > > > I sure hope there is a better way :) There must be > an > > easy, native way to i

[SQL] VACUUM FULL vs dump & restore

2005-09-23 Thread Ilya A. Kovalenko
Greetings, What advantages I lose, when using dump-truncate-restore (table or whole DB) instead of performing VACUUM FULL ? In both cases I have no access to data, but first is much faster (by subjective estimate). Thank you, Ilya A. Kovalenko (mailto:[EMAIL PROTECTED])