Re: [GENERAL] a question for the way-back machine

2006-12-13 Thread Richard Huxton
Ben wrote: When you insert a tuple, it needs to be inserted into the index, yes. There is no way an insert can cause a sequential scan, except by some trigger defined on the table. Actually, as it happens, there *is* a trigger defined on the table to fire before insert, but it too uses an ind

Re: [GENERAL] about the RULE system

2006-12-13 Thread Rafal Pietrak
On Wed, 2006-12-13 at 15:43 -0600, Scott Marlowe wrote: > On Wed, 2006-12-13 at 15:36, Rafal Pietrak wrote: > > > > > > "REVOKE ALL ON FUNCTION piti() FROM PUBLIC" > > > > Doe not seam to have any effect on functions installed as a trigger. > > Does your "common user" have the permission to cre

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Steve Atkins
On Dec 13, 2006, at 11:21 AM, Tom Lane wrote: Markus Schiltknecht <[EMAIL PROTECTED]> writes: John D. Burger wrote: Sure, but they won't use PG either, for essentially the same reason, since =all= PG support is "third party". So one can debate if i.e. EnterpriseDB is providing third party

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Reece Hart
On Wed, 2006-12-13 at 14:21 -0500, Tom Lane wrote: > I think the real criterion for big companies is not so much whether > you're supporting your "own" product as whether you're big enough to > be worth suing if things go wrong. This is a common misunderstanding and it is incorrect, at least in

Re: [GENERAL] a question on SQL

2006-12-13 Thread Gregory S. Williamson
Bruce Momjian wrote: > > Tom Lane wrote: > > "Greg Sabino Mullane" <[EMAIL PROTECTED]> writes: > > >> It's the single most useful non-standard SQL feature postgresql has. It > > >> is thus simultaneously bad (from a portatbility aspect) and brilliant > > >> (because it's a million times easier and

Re: [GENERAL] selinux/postgresql/jfs

2006-12-13 Thread Richard P. Welty
Richard P. Welty wrote: i'm working with an FC5 test server which i'm trying to get set up so we can benchmark xfs vs. jfs vs. ext3(writeback). does anyone have any suggestions on setting up a tablespace on a jfs partition with selinux in enforcing mode? following myself up here, as i made sign

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/13/06 20:05, Gregory S. Williamson wrote: > FWIW, there is a follow-up note on the original posting from a > MySQL person: > > "we are just starting to roll out [Enterprise] binaries... We > don't build binaries for Debian in part because the De

Re: [GENERAL] a question on SQL

2006-12-13 Thread Bruce Momjian
Tom Lane wrote: > "Greg Sabino Mullane" <[EMAIL PROTECTED]> writes: > >> It's the single most useful non-standard SQL feature postgresql has. It > >> is thus simultaneously bad (from a portatbility aspect) and brilliant > >> (because it's a million times easier and faster than the alternatives). >

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Gregory S. Williamson
FWIW, there is a follow-up note on the original posting from a MySQL person: "we are just starting to roll out [Enterprise] binaries... We don't build binaries for Debian in part because the Debian community does a good job themselves... If you call MySQL and you have support we support you if y

Re: [GENERAL] forcing compression of text field

2006-12-13 Thread Bruce Momjian
Tom Lane wrote: > Scott Marlowe <[EMAIL PROTECTED]> writes: > > On Mon, 2006-12-11 at 10:18, Jonathan Ellis wrote: > >> I have a table of log messages. They are mostly in the 100-200 > >> character length, which apparently isn't large enough for PG to want > >> to compress it (length == octet_leng

Re: [GENERAL] Slow query in 8.2.0

2006-12-13 Thread Tom Lane
Manuel Sugawara writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> 8.2 is a good bit more conservative than previous releases about >> optimizing views involving volatile functions, so I'm wondering whether >> that could have anything to do with it ... > Just out of curiosity, why the change? Peo

Re: [GENERAL] Slow query in 8.2.0

2006-12-13 Thread Manuel Sugawara
Tom Lane <[EMAIL PROTECTED]> writes: > 8.2 is a good bit more conservative than previous releases about > optimizing views involving volatile functions, so I'm wondering whether > that could have anything to do with it ... Oh well, you are indeed right, I went through the whole view hierarchy and

Re: [GENERAL] ALTER TABLE RENAME and primary key

2006-12-13 Thread Bruce Momjian
Raymond O'Donnell wrote: > On 9 Dec 2006 at 18:22, brian wrote: > > > I'd like to rename a table but am unsure how this will affect the > > primary key. That is, the table currently being named 'service', it has a > > pkey named 'service_id_pkey'. I'd like to change the table name to > > 'service

Re: [GENERAL] Slow query in 8.2.0

2006-12-13 Thread Tom Lane
Manuel Sugawara writes: > I have a query that use to work fine in 3 or 4 releases before 8.2 but > now it's very slow, same database same data set, explain analyze > follows: You've omitted all the interesting details --- obviously registro_trayectoria is a view, but of what? Please show the tab

[GENERAL] Slow query in 8.2.0

2006-12-13 Thread Manuel Sugawara
Hi all, I have a query that use to work fine in 3 or 4 releases before 8.2 but now it's very slow, same database same data set, explain analyze follows: 8.2.0 ciencias=# explain analyze SELECT registro_id FROM vregacd.registro_trayectoria WHERE cuenta = '086521071' AND grupo_id = '160940';

Re: [GENERAL] Marking indexes out of date (WAS: loading data,

2006-12-13 Thread Bruce Momjian
Glen Parker wrote: > Martijn van Oosterhout wrote: > > On Fri, Dec 08, 2006 at 12:49:30PM -0800, Glen Parker wrote: > >> I'd like to see a general way to take indexes off line without actually > >> losing their definitions. For example, something like "ALTER TABLE [EN > >> | DIS] ABLE INDEXES",

Re: [GENERAL] creating an index with tablespace on a dedicated filesystem (postgresql 8.1.5)

2006-12-13 Thread Tom Lane
Vlad <[EMAIL PROTECTED]> writes: > we use tablespace feature to keep indexes on a dedicated raid array > (for performance). What I've noticed is that when the index were > created, based on the i/o activity it seemed that postgres was > creating the index file somewhere on the array where the defau

[GENERAL] creating an index with tablespace on a dedicated filesystem (postgresql 8.1.5)

2006-12-13 Thread Vlad
Hello, we use tablespace feature to keep indexes on a dedicated raid array (for performance). What I've noticed is that when the index were created, based on the i/o activity it seemed that postgres was creating the index file somewhere on the array where the default table space is hosted and the

Re: [GENERAL] INSERT INTO row value constructors

2006-12-13 Thread Brandon Aiken
Cool. Now I just have to wait for Debian backports, or figure it out for myself if I can find the time. *sigh* 8.2 isn't even in Portage yet. -- Brandon Aiken CS/IT Systems Engineer -Original Message- From: Martijn van Oosterhout [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 13

Re: [GENERAL] a question for the way-back machine

2006-12-13 Thread Tom Lane
Ben <[EMAIL PROTECTED]> writes: > Wouldn't it need to check the unique constraint (an index on the table) > before the insert can succeed? It seems like it would be better to check > the index than to do a full table scan to try to satisfy that constraint. Postgres contains no code that would ev

[GENERAL] pg_controldata output documentation

2006-12-13 Thread andy rost
I'd like to calculate the name of the WAL file associated with the latest checkpoint using the output from pg_controldata: Latest checkpoint location: 74/FD9827C0 Prior checkpoint location:74/FD6FCDC8 Latest checkpoint's REDO location:74/FD87DDF8 Latest checkpoint's UND

Re: [GENERAL] a question for the way-back machine

2006-12-13 Thread Ben
When you insert a tuple, it needs to be inserted into the index, yes. There is no way an insert can cause a sequential scan, except by some trigger defined on the table. Actually, as it happens, there *is* a trigger defined on the table to fire before insert, but it too uses an index scan, at l

Re: [GENERAL] plperl exception catching

2006-12-13 Thread Martijn van Oosterhout
On Wed, Dec 13, 2006 at 05:04:42PM -0500, Tom Lane wrote: > Bricklen Anderson <[EMAIL PROTECTED]> writes: > > Marc Evans wrote: > >> OK, I must be missing something obvious: > >> ERROR: creation of Perl function failed: 'eval "string"' trapped by > >> operation mask at line 2. > > > Try as plper

Re: [GENERAL] a question for the way-back machine

2006-12-13 Thread Martijn van Oosterhout
On Wed, Dec 13, 2006 at 02:01:46PM -0800, Ben wrote: > > > On Wed, 13 Dec 2006, Martijn van Oosterhout wrote: > > >>- 7.3 isn't smart enough to use an index on an insert? Seems unlikely. > > > >This question makes no sense, you don't need an index to insert. > > Wouldn't it need to check the un

Re: [GENERAL] plperl exception catching

2006-12-13 Thread Tom Lane
Bricklen Anderson <[EMAIL PROTECTED]> writes: > Marc Evans wrote: >> OK, I must be missing something obvious: >> ERROR: creation of Perl function failed: 'eval "string"' trapped by >> operation mask at line 2. > Try as plperlu This brings up the question of whether it'd be safe to allow eval in

Re: [GENERAL] a question for the way-back machine

2006-12-13 Thread Ben
On Wed, 13 Dec 2006, Martijn van Oosterhout wrote: - 7.3 isn't smart enough to use an index on an insert? Seems unlikely. This question makes no sense, you don't need an index to insert. Wouldn't it need to check the unique constraint (an index on the table) before the insert can succeed?

Re: [GENERAL] INSERT INTO row value constructors

2006-12-13 Thread Martijn van Oosterhout
On Wed, Dec 13, 2006 at 04:55:00PM -0500, Brandon Aiken wrote: > This is just an odd question. Previously RDBMSs (MySQL, SQLite, IIRC) I've > used have allowed row value constructors (optional feature F641 in SQL'03) on > INSERT statements. That is: > > INSERT INTO mytable > VALUES (0,'hello')

[GENERAL] INSERT INTO row value constructors

2006-12-13 Thread Brandon Aiken
This is just an odd question. Previously RDBMSs (MySQL, SQLite, IIRC) I've used have allowed row value constructors (optional feature F641 in SQL'03) on INSERT statements. That is: INSERT INTO mytable VALUES (0,'hello'),(1,'world'); Is essentially shorthand for: INSERT INTO mytable VALUES (0

Re: [GENERAL] about the RULE system

2006-12-13 Thread Scott Marlowe
On Wed, 2006-12-13 at 15:36, Rafal Pietrak wrote: > On Wed, 2006-12-13 at 14:01 -0500, Tom Lane wrote: > > Rafal Pietrak <[EMAIL PROTECTED]> writes: > > > I thought trigger functions execute at root/postgres security level? > > > > No. You probably want to make that function SECURITY DEFINER so i

Re: [GENERAL] about the RULE system

2006-12-13 Thread Rafal Pietrak
On Wed, 2006-12-13 at 14:01 -0500, Tom Lane wrote: > Rafal Pietrak <[EMAIL PROTECTED]> writes: > > I thought trigger functions execute at root/postgres security level? > > No. You probably want to make that function SECURITY DEFINER so it > executes as the owner, but this isn't default for trigge

Re: [GENERAL] a question for the way-back machine

2006-12-13 Thread Martijn van Oosterhout
On Wed, Dec 13, 2006 at 01:10:44PM -0800, Ben wrote: > I'm using an ancient version of postgresql (7.3 - don't ask) and I'm > experiencing a problem where many inserts into an empty table slow down > over time, even if I analyze in the middle of the insertions. > pg_stat_user_tables shows lots a

Re: [GENERAL] Large IN query optimization

2006-12-13 Thread Karsten Hilbert
On Wed, Dec 13, 2006 at 02:08:44PM -0500, Tom Lane wrote: > Are you on 8.2? 8.1 is pretty stupid about joins to inheritance trees. To put up a number for "stupid": For GNUmed a particular query involving one-level inheritance went down from over ten minutes to under one second just by running ag

[GENERAL] a question for the way-back machine

2006-12-13 Thread Ben
I'm using an ancient version of postgresql (7.3 - don't ask) and I'm experiencing a problem where many inserts into an empty table slow down over time, even if I analyze in the middle of the insertions. pg_stat_user_tables shows lots and lots of full scans, which explains the slowdown, but lead

Re: [GENERAL] grant all privileges on database

2006-12-13 Thread Tony Caduto
[EMAIL PROTECTED] wrote: grant all privileges on database test to auser As far as I can tell this does nothing. Intuitively this command suggests that the auser would be able to access and modify the database test in anyway. It would also suggest that as new tables for the database auser would

Re: [GENERAL] plperl exception catching

2006-12-13 Thread Bricklen Anderson
Marc Evans wrote: OK, I must be missing something obvious: c3i=> CREATE OR REPLACE FUNCTION foo_trigger() RETURNS TRIGGER AS $$ c3i$> eval { spi_exec_query('INSERT INTO FOO_BAR VALUES(1)'); } || c3i$> spi_exec_query('SELECT 1 as foo'); c3i$> $$ LANGUAGE plperl; ERROR: creation of Perl funct

Re: [GENERAL] plperl exception catching

2006-12-13 Thread Marc Evans
On Wed, 13 Dec 2006, Tom Lane wrote: Marc Evans <[EMAIL PROTECTED]> writes: Is it accurate for me to believe that there is no way to catch exception within plperl? You do it the same way you trap any other error in perl ... OK, I must be missing something obvious: c3i=> CREATE OR REPLACE

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Ron Mayer
Joshua D. Drake wrote: > On Wed, 2006-12-13 at 13:20 -0500, John D. Burger wrote: >> Surely there are also third-party companies that provide "support" >> for MySqueal in some similar sense? Yeah. HP for example [links below]. HP announced support for Debian and MySQL (and the JBoss Stack as w

Re: [GENERAL] grant all privileges on database

2006-12-13 Thread Martijn van Oosterhout
On Wed, Dec 13, 2006 at 12:20:03PM -0800, [EMAIL PROTECTED] wrote: > grant all privileges on database test to auser > > As far as I can tell this does nothing. Intuitively this command suggests > that the auser would be able to access and modify the database test in > anyway. It would also sugge

[GENERAL] grant all privileges on database

2006-12-13 Thread developer
grant all privileges on database test to auser As far as I can tell this does nothing. Intuitively this command suggests that the auser would be able to access and modify the database test in anyway. It would also suggest that as new tables for the database auser would automatically have access

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread John D. Burger
Tom Lane wrote: The other point I'd make against John's argument is that there are a whole lot of Fortune 500 companies buying Red Hat support, and RH is effectively a third party for large chunks of Linux. (Of course, there are also large chunks for which Red Hat employees write as much code a

[GENERAL] selinux/postgresql/jfs

2006-12-13 Thread Richard P. Welty
i'm working with an FC5 test server which i'm trying to get set up so we can benchmark xfs vs. jfs vs. ext3(writeback). does anyone have any suggestions on setting up a tablespace on a jfs partition with selinux in enforcing mode? (i'm likely going to turn selinux off for the moment, but it'd be

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Tom Lane
Markus Schiltknecht <[EMAIL PROTECTED]> writes: > John D. Burger wrote: >> Sure, but they won't use PG either, for essentially the same reason, >> since =all= PG support is "third party". > So one can debate if i.e. EnterpriseDB is providing third party support > for PostgreSQL or first-hand sup

Re: [GENERAL] changing the permission of _lots_ of tables

2006-12-13 Thread Roderick A. Anderson
Andreas, Richard, Thanks. The link below is like of what I was looking for if there wasn't an already written script. been through all three of my Pg books but didn't find any mention of this type of scripting. Rod -- A. Kretschmer wrote: am Wed, dem 13.12.2006, um 7:55:48 + mailte

Re: [GENERAL] plperl exception catching

2006-12-13 Thread Tom Lane
Marc Evans <[EMAIL PROTECTED]> writes: > Is it accurate for me to believe that there is no way to catch exception > within plperl? You do it the same way you trap any other error in perl ... regards, tom lane ---(end of broadcast)-

Re: [GENERAL] Large IN query optimization

2006-12-13 Thread Tom Lane
"Worky Workerson" <[EMAIL PROTECTED]> writes: > I'm wondering (given what I have read about PG and IN), if there is a > better way to execute this query. > ... (as I have partitioned the events table by ip): Are you on 8.2? 8.1 is pretty stupid about joins to inheritance trees.

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Joshua D. Drake
On Wed, 2006-12-13 at 13:37 -0500, Bill Moran wrote: > In response to "John D. Burger" <[EMAIL PROTECTED]>: > > > > The good thing is that there are several companies supporting > > > Postgres, > > > so whatever one of them does it does not affect the market as a whole. > > > > Surely there are

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Markus Schiltknecht
Hi, John D. Burger wrote: Sure, but they won't use PG either, for essentially the same reason, since =all= PG support is "third party". Maybe. But at least these third parties can take the source and build their own product on top of it, without significant limitations. So one can debate if

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Joshua D. Drake
On Wed, 2006-12-13 at 13:00 -0600, Tony Caduto wrote: > John D. Burger wrote: > > > > Sure, but they won't use PG either, for essentially the same reason, > > since =all= PG support is "third party". > > > > > They would probably use EnterpriseDB though :-) Or Command Prompt like several extremel

Re: [GENERAL] Large Object to Bytea Conversion

2006-12-13 Thread Markus Schiltknecht
Hi, I'm using the function below to convert a large object to a bytea value. Unfortunately, it performs very poorly for *large* objects, i.e. I'm currently fiddling with a file of about 100 MB. I've increased work_mem to 256 MB, but that didn't help much. I suspect the aggregate function is

Re: [GENERAL] about the RULE system

2006-12-13 Thread Tom Lane
Rafal Pietrak <[EMAIL PROTECTED]> writes: > I thought trigger functions execute at root/postgres security level? No. You probably want to make that function SECURITY DEFINER so it executes as the owner, but this isn't default for triggers. regards, tom lane -

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Tony Caduto
John D. Burger wrote: Sure, but they won't use PG either, for essentially the same reason, since =all= PG support is "third party". They would probably use EnterpriseDB though :-) -- Tony Caduto AM Software Design http://www.amsoftwaredesign.com Home of PG Lightning Admin for Postgresql Yo

Re: [GENERAL] EXECUTE INTO on 8.2

2006-12-13 Thread Tom Lane
"Jon Asher" <[EMAIL PROTECTED]> writes: > I'm seeing some strange behavior with the following code. It compiles and > runs but returns an error on the Execute statement: > List index out of bounds(0) Worksforme. Want to provide a complete example instead of a fragmentary one? regression$# creat

[GENERAL] plperl exception catching

2006-12-13 Thread Marc Evans
Hi - Is it accurate for me to believe that there is no way to catch exception within plperl? For example, if an update fails, I'd like to do an insert. Yes, this is trivial to do in plpgsql, but sadly plpgsql is not usable due to not supporting variable variables. If plperl can't catch excepti

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread John D. Burger
Joshua D. Drake wrote: Surely there are also third-party companies that provide "support" for MySqueal in some similar sense? Of course :) but... Fortune 2500+ for the most part will *not* use a third party for support for something like MySQL. Sure, but they won't use PG either, for essenti

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Bill Moran
In response to "John D. Burger" <[EMAIL PROTECTED]>: > > The good thing is that there are several companies supporting > > Postgres, > > so whatever one of them does it does not affect the market as a whole. > > Surely there are also third-party companies that provide "support" > for MySqueal

[GENERAL] EXECUTE INTO on 8.2

2006-12-13 Thread Jon Asher
I'm seeing some strange behavior with the following code. It compiles and runs but returns an error on the Execute statement: List index out of bounds(0) DECLARE srec record; v_formula varchar; v_result varchar; BEGIN v_formula = 'select 4 as val'; EXECUTE v_formula INTO srec; END; H

Re: [GENERAL] Pltcl error - could not create "normal" interpreter

2006-12-13 Thread Tom Lane
"Lenorovitz, Joel" <[EMAIL PROTECTED]> writes: > Could somebody shed any light on the error message below that came from > trying to call a simple pltcl test function? I am running Postgres 8.1 > on WinXP and just recently added the pltcl language by copying Tcl84.dll > into my system directory (C

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Joshua D. Drake
On Wed, 2006-12-13 at 13:20 -0500, John D. Burger wrote: > > The good thing is that there are several companies supporting > > Postgres, > > so whatever one of them does it does not affect the market as a whole. > > Surely there are also third-party companies that provide "support" > for MySqu

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Stephen Frost
* John D. Burger ([EMAIL PROTECTED]) wrote: > >The good thing is that there are several companies supporting > >Postgres, > >so whatever one of them does it does not affect the market as a whole. > > Surely there are also third-party companies that provide "support" > for MySqueal in some simi

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Russ Brown
John D. Burger wrote: The good thing is that there are several companies supporting Postgres, so whatever one of them does it does not affect the market as a whole. Surely there are also third-party companies that provide "support" for MySqueal in some similar sense? There probably are, b

[GENERAL] Large IN query optimization

2006-12-13 Thread Worky Workerson
I'm wondering (given what I have read about PG and IN), if there is a better way to execute this query. I have (essentially) two tables in a read-only DB, ip_info and events, where many events can map to one ip_info. I'd like to get all the ip_info.info columns where a specific event occurred.

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread John D. Burger
The good thing is that there are several companies supporting Postgres, so whatever one of them does it does not affect the market as a whole. Surely there are also third-party companies that provide "support" for MySqueal in some similar sense? - John Burger MITRE

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Scott Marlowe
On Wed, 2006-12-13 at 12:01, Alvaro Herrera wrote: > Scott Marlowe wrote: > > On Wed, 2006-12-13 at 10:50, David Goodenough wrote: > > > http://developers.slashdot.org/article.pl?sid=06/12/13/1515217&from=rss > > > > > > "MySQL quietly deprecated support for most Linux distributions on October >

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Joshua D. Drake
On Wed, 2006-12-13 at 15:01 -0300, Alvaro Herrera wrote: > Scott Marlowe wrote: > > On Wed, 2006-12-13 at 10:50, David Goodenough wrote: > > > http://developers.slashdot.org/article.pl?sid=06/12/13/1515217&from=rss > > > > > > "MySQL quietly deprecated support for most Linux distributions on Octob

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Alvaro Herrera
Scott Marlowe wrote: > On Wed, 2006-12-13 at 10:50, David Goodenough wrote: > > http://developers.slashdot.org/article.pl?sid=06/12/13/1515217&from=rss > > > > "MySQL quietly deprecated support for most Linux distributions on October > > 16, > > when its 'MySQL Network' support plan was replaced

Re: [GENERAL] dynamic plpgsql question

2006-12-13 Thread Erik Jones
Marc Evans wrote: On Wed, 13 Dec 2006, Erik Jones wrote: Marc Evans wrote: On Wed, 13 Dec 2006, Erik Jones wrote: Marc Evans wrote: Hi - I am struggling with a trigger function in plpgsql, and am hoping that someone on this list can't show me a way to do what I need. In the trigger, T

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Scott Marlowe
On Wed, 2006-12-13 at 10:50, David Goodenough wrote: > http://developers.slashdot.org/article.pl?sid=06/12/13/1515217&from=rss > > "MySQL quietly deprecated support for most Linux distributions on October 16, > when its 'MySQL Network' support plan was replaced by 'MySQL Enterprise.' > MySQL now

Re: [GENERAL] function accepting and returning rows; how to avoid

2006-12-13 Thread Kevin Murphy
Merlin Moncure wrote: On 12/13/06, Kevin Murphy <[EMAIL PROTECTED]> wrote: I'd like to have a function that acts as a row filter (that can optionally expand each row into multiple rows), but I don't know how to wangle this such that the output is not enclosed in parentheses, i.e. what I'm gettin

[GENERAL] about the RULE system

2006-12-13 Thread Rafal Pietrak
Hi All, This is something that bugs me for some time now. I have: (as user postgres I do) CREATE TABLE debi (id int, name text); REVOKE ALL ON debi FROM public; CREATE FUNCTION piti() RETURNS "trigger" AS $$ DECLARE me RECORD; BEGIN select * into me FROM pg_authid; new.id

Re: [GENERAL] Weird PG 8.1.3 date error

2006-12-13 Thread Tony Caduto
Tom Lane wrote: He needs to set DateStyle to match the expected field order. regression=# show datestyle; DateStyle --- ISO, MDY (1 row) regression=# select '08-01-2006'::date; date 2006-08-01 (1 row) regression=# set datestyle TO ymd; SET regression=# select '08-01

Re: [GENERAL] Weird PG 8.1.3 date error

2006-12-13 Thread Joshua D. Drake
On Wed, 2006-12-13 at 10:37 -0600, Tony Caduto wrote: > Hi, > I have a user who is getting this error on a 8.1.3 server when importing > some data from a dbf file: > > PostgreSQL Error Code: (1) > ERROR: date/time field value out of range: "08-01-2006" > > He says the db is SQL-ASCII and the da

Re: [GENERAL] storage

2006-12-13 Thread Filip Rembiałkowski
2006/12/13, Antonios Katsikadamos <[EMAIL PROTECTED]>: I would like to know where postgres stores the created database and the tables? http://www.postgresql.org/docs/current/static/storage-file-layout.html F. ---(end of broadcast)--- TIP 5: don't

Re: [GENERAL] Pltcl error - could not create "normal" interpreter

2006-12-13 Thread Tom Lane
"Lenorovitz, Joel" <[EMAIL PROTECTED]> writes: > Could somebody shed any light on the error message below that came from > trying to call a simple pltcl test function? I am running Postgres 8.1 > on WinXP and just recently added the pltcl language by copying Tcl84.dll > into my system directory (C

[GENERAL] storage

2006-12-13 Thread Antonios Katsikadamos
Hi all, I would like to know where postgres stores the created database and the tables?Can anyone help? thnx for nay help, Antonios - Access over 1 million songs - Yahoo! Music Unlimited.

Re: [GENERAL] error messages without schema name

2006-12-13 Thread Shoaib Mir
That means you might have the same table in both schemas, so try doing the following to confirm: select * from schema1.bar select * from schema2.bar You can also set search_path if you want to avoid adding schema name with database objects: set search_path = schema1 select * from bar instead

Re: [GENERAL] A VIEW mimicing a TABLE

2006-12-13 Thread Rafal Pietrak
On Wed, 2006-12-13 at 11:08 -0500, Tom Lane wrote: > > You can add a default to a view's column, either the same as the > underlying table's default, or different if you want. > > ALTER TABLE view ALTER COLUMN col SET DEFAULT expr G! The obvious solutions are most difficult to spot. Thenx! --

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Madison Kelly
David Goodenough wrote: http://developers.slashdot.org/article.pl?sid=06/12/13/1515217&from=rss "MySQL quietly deprecated support for most Linux distributions on October 16, when its 'MySQL Network' support plan was replaced by 'MySQL Enterprise.' MySQL now supports only two Linux distribution

Re: [GENERAL] Weird PG 8.1.3 date error

2006-12-13 Thread Tom Lane
Tony Caduto <[EMAIL PROTECTED]> writes: > I have a user who is getting this error on a 8.1.3 server when importing > some data from a dbf file: > ERROR: date/time field value out of range: "08-01-2006" He needs to set DateStyle to match the expected field order. regression=# show datestyle; Da

Re: [GENERAL] dynamic plpgsql question

2006-12-13 Thread Marc Evans
On Wed, 13 Dec 2006, Erik Jones wrote: Marc Evans wrote: On Wed, 13 Dec 2006, Erik Jones wrote: Marc Evans wrote: Hi - I am struggling with a trigger function in plpgsql, and am hoping that someone on this list can't show me a way to do what I need. In the trigger, TG_ARGV[0] is the na

Re: [GENERAL] dynamic plpgsql question

2006-12-13 Thread Tom Lane
Marc Evans <[EMAIL PROTECTED]> writes: > In the trigger, TG_ARGV[0] is the name of a column that I want to > evaluate. This is effectively impossible in plpgsql, because it's a statically typed language --- it wants to know the type of every expression in advance, and so such a thing couldn't wor

[GENERAL] MySQL drops support for most distributions

2006-12-13 Thread David Goodenough
http://developers.slashdot.org/article.pl?sid=06/12/13/1515217&from=rss "MySQL quietly deprecated support for most Linux distributions on October 16, when its 'MySQL Network' support plan was replaced by 'MySQL Enterprise.' MySQL now supports only two Linux distributions — Red Hat Enterprise Lin

[GENERAL] Pltcl error - could not create "normal" interpreter

2006-12-13 Thread Lenorovitz, Joel
Greetings, Could somebody shed any light on the error message below that came from trying to call a simple pltcl test function? I am running Postgres 8.1 on WinXP and just recently added the pltcl language by copying Tcl84.dll into my system directory (C:/Windows/System32) and successfully issui

Re: [GENERAL] [EMAIL PROTECTED]: Re: port fault on pg_ctl's

2006-12-13 Thread Palle Girgensohn
--On onsdag, december 13, 2006 11.04.54 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: Gergely CZUCZY <[EMAIL PROTECTED]> writes: This is wierd, I agree. The split between server and client is really made = in the postgresql sources, I just follow their guidelines. [ checks RPM specfiles ... ]

Re: [GENERAL] error messages without schema name

2006-12-13 Thread Tom Lane
"=?UTF-8?Q?Filip_Rembia=C5=82kowski?=" <[EMAIL PROTECTED]> writes: > I heard from my PostgreSQL teacher, that all such messages should be > corrected in the source code, to include schema name too. I doubt we'd ever do that, because in most scenarios it'd just be unnecessary clutter, and the prima

Re: [GENERAL] dynamic plpgsql question

2006-12-13 Thread Erik Jones
Marc Evans wrote: On Wed, 13 Dec 2006, Erik Jones wrote: Marc Evans wrote: Hi - I am struggling with a trigger function in plpgsql, and am hoping that someone on this list can't show me a way to do what I need. In the trigger, TG_ARGV[0] is the name of a column that I want to evaluate. T

Re: [GENERAL] grant select on all tables of schema or database

2006-12-13 Thread Tomi N/A
2006/12/13, Tom Lane <[EMAIL PROTECTED]>: Martijn van Oosterhout writes: > I don't beleive you have to explicitly grant access to the database, or > the schema, but you definitly have to grant access to the tables > directly. They're completely separate privileges. GRANT ON DATABASE grants or

Re: [GENERAL] Online index builds

2006-12-13 Thread Csaba Nagy
On Wed, 2006-12-13 at 17:12, Tom Lane wrote: > Csaba Nagy <[EMAIL PROTECTED]> writes: > > So an implementation which optimistically builds the new index > > concurrently while holding no lock, and then hopes for the 3rd > > transaction to be able to get the exclusive lock and be able to swap the >

Re: [GENERAL] [EMAIL PROTECTED]: Re: port fault on pg_ctl's place]

2006-12-13 Thread Tom Lane
Palle Girgensohn <[EMAIL PROTECTED]> writes: > From INSTALL: > ... >Client-only installation: If you want to install only the client >applications and interface libraries, then you can use these >commands: > gmake -C src/bin install > gmake -C src/include install > gmake -C

[GENERAL] Weird PG 8.1.3 date error

2006-12-13 Thread Tony Caduto
Hi, I have a user who is getting this error on a 8.1.3 server when importing some data from a dbf file: PostgreSQL Error Code: (1) ERROR: date/time field value out of range: "08-01-2006" He says the db is SQL-ASCII and the datestyle is at the default. Of course on all my test servers the ins

Re: [GENERAL] grant select on all tables of schema or database

2006-12-13 Thread Gene
That would indeed be a handy feature... I was surprised when I discovered this was not available like in mysql, it's a real pain to grant permissions to a bunch of tables without querying table metadata. GRANT ALL ON TABLE *.* TO joeblow which would indeed be a useful thing to have, bu

Re: [GENERAL] grant select on all tables of schema or database

2006-12-13 Thread Tom Lane
Martijn van Oosterhout writes: > I don't beleive you have to explicitly grant access to the database, or > the schema, but you definitly have to grant access to the tables > directly. They're completely separate privileges. GRANT ON DATABASE grants or revokes permissions associated with database

Re: [GENERAL] error messages without schema name

2006-12-13 Thread Filip Rembiałkowski
06-12-13, Shoaib Mir <[EMAIL PROTECTED]> napisał(a): You can not truncate table 'foo' because there is referential integrity between 'foo' and 'bar', so try using TRUNCATE nsp2.foo CASCADE; You can find the schema name for 'bar' using a query like: select nspname from pg_namespace where oid =

Re: [GENERAL] dynamic plpgsql question

2006-12-13 Thread Marc Evans
On Wed, 13 Dec 2006, Erik Jones wrote: Marc Evans wrote: Hi - I am struggling with a trigger function in plpgsql, and am hoping that someone on this list can't show me a way to do what I need. In the trigger, TG_ARGV[0] is the name of a column that I want to evaluate. This code shows the

Re: [GENERAL] Online index builds

2006-12-13 Thread Tom Lane
Csaba Nagy <[EMAIL PROTECTED]> writes: > So an implementation which optimistically builds the new index > concurrently while holding no lock, and then hopes for the 3rd > transaction to be able to get the exclusive lock and be able to swap the > new index in the place of the old index, and error ou

Re: [GENERAL] dynamic plpgsql question

2006-12-13 Thread Erik Jones
Marc Evans wrote: Hi - I am struggling with a trigger function in plpgsql, and am hoping that someone on this list can't show me a way to do what I need. In the trigger, TG_ARGV[0] is the name of a column that I want to evaluate. This code shows the concept, though is not functional: CREAT

Re: [GENERAL] A VIEW mimicing a TABLE

2006-12-13 Thread Tom Lane
Rafal Pietrak <[EMAIL PROTECTED]> writes: > I can see that with a VIEW, I can do prity mutch everything I can do > with a TABLE, so a VIEW mimics a TABLE quite well but one feature: a > default value for a row on INSERT. You can add a default to a view's column, either the same as the underlyi

Re: [GENERAL] [EMAIL PROTECTED]: Re: port fault on pg_ctl's place]

2006-12-13 Thread Tom Lane
Gergely CZUCZY <[EMAIL PROTECTED]> writes: > This is wierd, I agree. The split between server and client is really made = > in the postgresql sources, > I just follow their guidelines. [ checks RPM specfiles ... ] Both Devrim and I put pg_ctl in the server subpackage, dunno where you think that t

[GENERAL] dynamic plpgsql question

2006-12-13 Thread Marc Evans
Hi - I am struggling with a trigger function in plpgsql, and am hoping that someone on this list can't show me a way to do what I need. In the trigger, TG_ARGV[0] is the name of a column that I want to evaluate. This code shows the concept, though is not functional: CREATE OR REPLACE FUNCTI

Re: [GENERAL] PG Admin

2006-12-13 Thread Gurjeet Singh
On 12/4/06, Bob Pawley <[EMAIL PROTECTED]> wrote: Your missing the point. I am creating a design system for industrial control. The control devices need to be numbered. The numbers need to be sequential. If the user deletes a device the numbers need to regenerate to again become sequential

[GENERAL] error messages without schema name

2006-12-13 Thread Filip Rembiałkowski
Hi all, I heard once that all messages which refer to table names should also give their schema name. I mean, if I see something like rzeznia=# TRUNCATE nsp2.foo; ERROR: cannot truncate a table referenced in a foreign key constraint DETAIL: Table "bar" references "foo". HINT: Truncate table

  1   2   >