Re: [GENERAL] Debian packages for Postgres 8.2

2008-09-24 Thread Markus Wanner
Hi, Peter Eisentraut wrote: As a matter of policy, backports are made from Debian testing. Continued maintenance of PG 8.2 packages is not really backporting, since there is nothing to backport from. While that's certainly true, I think there's enough of a reason for an exception. Otherwise

Re: [GENERAL] Oracle and Postgresql

2008-09-24 Thread Casey Allen Shobe
On Sep 15, 2008, at 6:58 AM, David Fetter wrote: Roles, We have 'em. We do NOT have secure application roles or anywhere near the level of configurability in security aspects as Oracle. We've got a great foundation, but we lack a lot of fine-grained granularity (e.g. an Oracle SAR can

Re: [GENERAL] problem with custom_variable_classes

2008-09-24 Thread hubert depesz lubaczewski
On Wed, Sep 24, 2008 at 07:33:27PM -0400, Tom Lane wrote: > It will accept *definitions*, yes. I can't imagine why you'd think > it's a good idea to not throw error when asked for an unknown variable's > value. because this is how it worked. i'm not saying it was good. it worked that way, and int

Re: [GENERAL] case expression

2008-09-24 Thread Guy Rouillier
Garry Saddington wrote: It does work but returns a column called case. How can I return the case column as 'postcode'? select CASE WHEN postcode ilike '%OO%' THEN '' END as postcode from addresses -- Guy Rouillier -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] case expression

2008-09-24 Thread Fernando Moreno
> > BTW, should you have an "else" clause in there? - What happens when the > comparison fails? > As Tom said, a null value would be returned.

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-24 Thread Scott Ribe
> the sort of person who > thinks re-using someone else's undocumented code is easier than > writing it from scratch is probably not going to go to the trouble of > really learning the code via debugging tools. Fixed that for you: the sort of person who thinks re-using someone else's undocumented

Re: [GENERAL] problem with custom_variable_classes

2008-09-24 Thread Tom Lane
hubert depesz lubaczewski <[EMAIL PROTECTED]> writes: > while manual in 8.4 still states: > "When custom_variable_classes is set, the server will accept definitions of > arbitrary variables within each specified class.". It will accept *definitions*, yes. I can't imagine why you'd think it's a g

Re: [GENERAL] problem with custom_variable_classes

2008-09-24 Thread Taras Kopets
On Thu, Sep 25, 2008 at 12:38 AM, hubert depesz lubaczewski <[EMAIL PROTECTED]> wrote: > but it means that there is currently no way to check if there is value in this > - i.e. if it has been initialized. now you have to initialize this variable once per session before usage: SELECT set_config('o

Re: [GENERAL] case expression

2008-09-24 Thread Raymond O'Donnell
On 24/09/2008 23:22, Garry Saddington wrote: >> Garry Saddington <[EMAIL PROTECTED]> writes: >>> CASE WHEN postcode ilike '%OO%' THEN '' >>> END >>> from addresses > > It does work but returns a column called case. How can I return the case > column as 'postcode'? ...case when postcode ilike '%OO

Re: [GENERAL] case expression

2008-09-24 Thread Richard Broersma
On Wed, Sep 24, 2008 at 3:22 PM, Garry Saddington <[EMAIL PROTECTED]> wrote: >> > select *, >> > CASE WHEN postcode ilike '%OO%' THEN '' >> > END >> > from addresses > It does work but returns a column called case. How can I return the case > column as 'postcode'? You have to give an Alias to thi

Re: [GENERAL] case expression

2008-09-24 Thread Garry Saddington
On Wednesday 24 September 2008 21:03, Tom Lane wrote: > Garry Saddington <[EMAIL PROTECTED]> writes: > > Can anyone tell me why this will not work? > > > > select *, > > CASE WHEN postcode ilike '%OO%' THEN '' > > END > > from addresses > > ... > > Define "not work". What are you expecting it to d

Re: [GENERAL] problem with custom_variable_classes

2008-09-24 Thread hubert depesz lubaczewski
On Wed, Sep 24, 2008 at 12:15:41PM -0400, Malcolm Studd wrote: > I have a pl/pgSQL function[1] to calculate row numbers (based on [2]). > It uses a custom variable. This was working earlier, but is breaking now > saying it can't recognise the variable. The custom_variable_classes is > set in

[GENERAL] problem with custom_variable_classes

2008-09-24 Thread Malcolm Studd
Hi, I have a pl/pgSQL function[1] to calculate row numbers (based on [2]). It uses a custom variable. This was working earlier, but is breaking now saying it can't recognise the variable. The custom_variable_classes is set in the postgresql.conf. pgdb001=> select rownum('') from generate_ser

Re: [GENERAL] Oracle and Postgresql

2008-09-24 Thread Casey Allen Shobe
On Sep 1, 2008, at 12:42 AM, Henry wrote: This is /finally/ being addressed, although (very) belatedly. The Pg core dev team always argued that replication was an add-on and should not form part of the core (ie, similar nonsense excuses the MySQL team used for "add-ons" such as triggers, etc

Re: [GENERAL] Oracle and Postgresql

2008-09-24 Thread Casey Allen Shobe
On Sep 4, 2008, at 7:40 PM, Robert Treat wrote: It is not as simple as Oracles database link syntax. Setting up a connection involves a couple of sql looking commands, and once you setup a connection to a remote database, you can reference a table with something like select * from [EMAIL PRO

Re: [GENERAL] Slony vs Longiste

2008-09-24 Thread Asko Oja
Hi SkyTools contains in addition to Londiste and PgQ also walmgr.py that we use quite often for inside colo switchovers. Between colocations we use londiste because of lower bandwith requirements. walmgr.py --help usage: WALShipping manager. walmgr INI COMMAND [-n] Master commands: setup

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-24 Thread Tom Lane
Andrew Sullivan <[EMAIL PROTECTED]> writes: > On Wed, Sep 24, 2008 at 08:05:18AM -0700, David Fetter wrote: >> C is not magic obfuscation gear. ... > To be fair, one of the points that others are trying to make is not > "secure this function for real" but "secure this function enough to > make it

Re: [GENERAL] Slony vs Longiste

2008-09-24 Thread Jason Long
Robert Treat wrote: On Wednesday 24 September 2008 12:34:17 Jason Long wrote: Richard Huxton wrote: Jason Long wrote: I need to set up master vs slave replication. My use case is quite simple. I need to back up a small but fairly complex(30 MB data, 175 tables) DB remotely ove

Re: [GENERAL] case expression

2008-09-24 Thread Tom Lane
Garry Saddington <[EMAIL PROTECTED]> writes: > Can anyone tell me why this will not work? > select *, > CASE WHEN postcode ilike '%OO%' THEN '' > END > from addresses > ... Define "not work". What are you expecting it to do versus what really happens? Right offhand it looks like the CASE will r

Re: [GENERAL] Returning NEW in an on-delete trigger

2008-09-24 Thread Bruce Momjian
Jeff Davis wrote: > On Thu, 2008-09-18 at 15:04 -0400, Tom Lane wrote: > > This does seem like a bit of a gotcha for someone who writes RETURN NEW > > instead of RETURN OLD or vice versa, but I'm not sure how much we can do > > about that. Lots of people like to write triggers that fire on multipl

Re: [GENERAL] Oracle and Postgresql

2008-09-24 Thread Scott Marlowe
On Wed, Sep 24, 2008 at 1:02 PM, Casey Allen Shobe <[EMAIL PROTECTED]> wrote: > A knowledgeable PostgreSQL DBA can make significantly more than an Oracle > DBA as they're a scarcer resource and generally higher quality on average. > But it may be harder for them to find work - they may end up hav

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-24 Thread Glyn Astill
> C is not magic obfuscation gear. Anybody with a debugger > can expose > what it's doing. There have been math papers showing > that it's > impossible to hide the functionality of a piece of software > based only > on the ability to run it, so the entire prospect of > obscuring the > software's

Re: [GENERAL] Oracle and Postgresql

2008-09-24 Thread Casey Allen Shobe
On Aug 31, 2008, at 8:44 PM, David Fetter wrote: What they want to have is a huge entity they can blame when everything goes wrong. They're not interested in the actual response times or even in the much more important time-to-fix because once they've blamed Oracle, they know the responsibility

Re: [GENERAL] Slony vs Longiste

2008-09-24 Thread Robert Treat
On Wednesday 24 September 2008 12:34:17 Jason Long wrote: > Richard Huxton wrote: > > Jason Long wrote: > >> I need to set up master vs slave replication. > >> > >> My use case is quite simple. I need to back up a small but fairly > >> complex(30 MB data, 175 tables) DB remotely over T1 and be abl

Re: [GENERAL] Debian packages for Postgres 8.2

2008-09-24 Thread Peter Eisentraut
Joris Dobbelsteen wrote: The good question would be for what reason they have removed the backports package? Maybe shortage on maintainers? As a matter of policy, backports are made from Debian testing. Continued maintenance of PG 8.2 packages is not really backporting, since there is nothing

Re: [GENERAL] Debian packages for Postgres 8.2

2008-09-24 Thread Joris Dobbelsteen
Markus Wanner wrote: Hi, I'm running several productive servers on Debian etch (stable) with Postgres 8.2 which has been in lenny (testing) and made available for etch through the backports project [1]. Unfortunately, they discontinued maintaining 8.2 and switched to 8.3 in testing and thus

Re: [GENERAL] PDF Documentation for 8.3?

2008-09-24 Thread Kevin Hunter
At 4:12am -0400 on Wed, 24 Sep 2008, Michelle Konzack wrote: >> http://www.postgresql.org/files/documentation/pdf/8.3/postgresql-8.3-A4.pdf > > I was not able to download ANY PDFs > > I am sitting here @home behind my TP570 and I am connected over GSM > (Bouygues Telecom) to the Internet and

Re: [GENERAL] Slony vs Longiste

2008-09-24 Thread Jason Long
Richard Huxton wrote: Jason Long wrote: I need to set up master vs slave replication. My use case is quite simple. I need to back up a small but fairly complex(30 MB data, 175 tables) DB remotely over T1 and be able to switch to that if the main server fails. The switch can even be a scrip

Re: [GENERAL] PDF Documentation for 8.3?

2008-09-24 Thread Michelle Konzack
Am 2008-09-21 11:52:44, schrieb Sven Marcel Buchholz: > Hello, > what is wrong with this PDF? > http://www.postgresql.org/files/documentation/pdf/8.3/postgresql-8.3-A4.pdf I was not able to download ANY PDFs I am sitting here @home behind my TP570 and I am connected over GSM (Bouygues Teleco

Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-24 Thread William Garrison
Oh good. That's almost what I did: I made a schema only dump, then a data only dump with --inserts. Then I commented-out the constraints from the schema. Then I loaded the data. Unfortunately, the INSERT statements take 24 hours instead of 4 hours to restore. When you say the "default" op

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-24 Thread Andrew Sullivan
On Wed, Sep 24, 2008 at 08:05:18AM -0700, David Fetter wrote: > C is not magic obfuscation gear. Anybody with a debugger can expose > what it's doing. There have been math papers showing that it's > impossible to hide the functionality of a piece of software based only > on the ability to run it,

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-24 Thread Bruce Momjian
David Fetter wrote: > On Wed, Sep 24, 2008 at 02:12:19PM +, Glyn Astill wrote: > > I'm not sure what the policy is on putting stuff in the docs, but > > how about putting that in the relevant place, as well as a note > > about the other option; using C and SPI. > > C is not magic obfuscation g

[GENERAL] case expression

2008-09-24 Thread Garry Saddington
Can anyone tell me why this will not work? select *, CASE WHEN postcode ilike '%OO%' THEN '' END from addresses where studentid=1234 and addresstype='C' There are postcodes like this: OO00 0OO Regards Garry -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make change

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-24 Thread David Fetter
On Wed, Sep 24, 2008 at 02:12:19PM +, Glyn Astill wrote: > I'm not sure what the policy is on putting stuff in the docs, but > how about putting that in the relevant place, as well as a note > about the other option; using C and SPI. C is not magic obfuscation gear. Anybody with a debugger ca

Re: [GENERAL] Error in ALTER DATABASE command

2008-09-24 Thread Lennin Caro
--- On Tue, 9/23/08, William Garrison <[EMAIL PROTECTED]> wrote: > From: William Garrison <[EMAIL PROTECTED]> > Subject: [GENERAL] Error in ALTER DATABASE command > To: "Postgres General List" > Date: Tuesday, September 23, 2008, 3:49 PM > In Postgresql 8.2.9 on Windows, you cannot rename a da

Re: [GENERAL] [ADMIN] 8.3.4 rpms for Opensuse10.3 64bit

2008-09-24 Thread Devrim GÜNDÜZ
Hi Peter, On Tue, 2008-09-23 at 23:09 +0300, Peter Eisentraut wrote: > SLES builds have been broken for a while. I have not analyzed that > yet. > Bugs and patches welcome. https://projects.commandprompt.com/public/pgcore/repo/rpm/suse/8.3/SLES-10/postgresql.spec (it is using self-signed cer

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-24 Thread Glyn Astill
I'm not sure what the policy is on putting stuff in the docs, but how about putting that in the relevant place, as well as a note about the other option; using C and SPI. > Added to TODO under features not wanted: > > Incomplete itemObfuscated function source code (not > wanted) >

Re: [GENERAL] pg_dump of non nublic schema causes problems on restore.

2008-09-24 Thread Tom Lane
Howard Cole <[EMAIL PROTECTED]> writes: > The problem here is that table1 gets created in the public schema, not > myschema, presumably because the search path is no longer valid after > the drop schema. This is fixed in 8.3. I'm not real sure why the fix wasn't back-patched...

[GENERAL] pg_dump of non nublic schema causes problems on restore.

2008-09-24 Thread Howard Cole
Appologies if this has already been fixed, but I have come across a problem with pg_dump when dumping a single non-public schema. (This is on Windows Pg 8.2). It did not cause any major problems because I obviously made a backup of the database before I tried a restore, and managed to fix the b

[GENERAL] select row value from column's oid

2008-09-24 Thread Mathieu
Hi guys. I'd like to make a sql request able to get both row value and column name of a table for a specific id. Since I need the column name in my process, i first got interested in a way to get this info from pg tables with this request : SELECT a.attname as "column_name" FROM

Re: [GENERAL] Slony vs Longiste

2008-09-24 Thread Richard Huxton
Jason Long wrote: > I need to set up master vs slave replication. > > My use case is quite simple. I need to back up a small but fairly > complex(30 MB data, 175 tables) DB remotely over T1 and be able to > switch to that if the main server fails. The switch can even be a > script run manually.

Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-24 Thread Tomasz Ostrowski
On 2008-09-23 19:03, William Garrison wrote: > I have several .SQL files created from pg_dump, and I find that when I > feed them into psql that I get tons of foreign key errors because the > INSERT statements in the dump are not in the correct order. After > reading the docs, mailing lists, an