Re:  [GENERAL] The jdbc

2007-01-22 Thread stevegy
Hi, I found the point. The auto_commit flag and jdbc connection pool is some of problem and the current_timestamp is not a now() meanful function. I have to use the CAST(timeofday() as timestamp) to. I refer to the http://archives.postgresql.org/pgsql-jdbc/2006-08/msg00063.php. Thanks. Re

Re: [GENERAL] Regular expressions and arrays and ANY() question

2007-01-22 Thread Martijn van Oosterhout
On Tue, Jan 23, 2007 at 12:59:38AM -0500, Tom Lane wrote: > > I think the problem is because the pattern expects to be on the right > > side with the target on the left, but I want to do it reversed. > > Yeah, the ANY syntax only allows the array on the right. You'd have to > make a LIKE-ish ope

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Martijn van Oosterhout
On Mon, Jan 22, 2007 at 05:51:53PM +, Gregory Stark wrote: > Actually no. A while back I did experiments to see how fast reading a file > sequentially was compared to reading the same file sequentially but skipping > x% of the blocks randomly. The results were surprising (to me) and depressing.

Re: [GENERAL] New US DST Rules & PostgreSQL

2007-01-22 Thread Tom Lane
Adam Gordon <[EMAIL PROTECTED]> writes: > Anyone know where to find info about whether or not the new US DST rules > impact certain versions of Postgres and what needs to be done to ensure > observance of the new rules? Thanks. http://developer.postgresql.org/cvsweb.cgi/pgsql/src/timezone/data/

Re: [GENERAL] Regular expressions and arrays and ANY() question

2007-01-22 Thread Tom Lane
[EMAIL PROTECTED] writes: > I am trying to figure out how to use a regex and an ANY(), without any > luck, to determine if at least one element of an array (on the right) > matches the given constant pattern (on the left). > I think the problem is because the pattern expects to be on the right >

Re: [GENERAL] too many trigger records found for relation "item" - what's that about??

2007-01-22 Thread Tom Lane
"Lenorovitz, Joel" <[EMAIL PROTECTED]> writes: > postgres=# select * from item; > ERROR: too many trigger records found for relation "item" You could reset the pg_class.reltriggers entry for "item" to be however many pg_trigger entries there actually are for the table. I'm curious how you got in

Re: [GENERAL] Password encryption method

2007-01-22 Thread Bruno Wolff III
On Mon, Jan 22, 2007 at 20:25:48 +0100, Bertram Scharpf <[EMAIL PROTECTED]> wrote: > > What I want to do is the following: > > 1. Login in from a program on a client as a particualar user. For this case you shouldn't need to do anything tricky as long as the user is login in as themselves. J

Re: [GENERAL] Tracking database activity

2007-01-22 Thread Tom Lane
Erik Jones <[EMAIL PROTECTED]> writes: > ... I was previously under the impression that by > tracking age(datfrozenxid) in pg_database over time I'd be able to know > how many transactions were processed in a certain amount of time. > However, I've seend that pg_stat_database.xact_commit + > p

Re: [GENERAL] New US DST Rules & PostgreSQL

2007-01-22 Thread Bruce Momjian
Adam Gordon wrote: > Hi- > > Anyone know where to find info about whether or not the new US DST rules > impact certain versions of Postgres and what needs to be done to ensure > observance of the new rules? Thanks. Pre-8.0 PostgreSQL versions us the operating system timezone database. All >=

[GENERAL] [Fwd: [PORTS] M$ SQL server DTS package equivalent in Postgres]

2007-01-22 Thread Paul Lambert
Sorry, posted this to the wrong list :( Original Message Subject: [PORTS] M$ SQL server DTS package equivalent in Postgres Date: Tue, 23 Jan 2007 10:15:06 +0900 From: Paul Lambert <[EMAIL PROTECTED]>

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL

2007-01-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 16:55, Bruce Momjian wrote: > Engada wrote: [snip] > When we got the PostgreSQL code from Berkely, it had code that > supposedly ran on VMS (not OpenVMS), but no one was available to > maintain it, so eventually it was removed. DEC Marketi

[GENERAL] New US DST Rules & PostgreSQL

2007-01-22 Thread Adam Gordon
Hi- Anyone know where to find info about whether or not the new US DST rules impact certain versions of Postgres and what needs to be done to ensure observance of the new rules? Thanks. -- adam ---(end of broadcast)--- TIP 2: Don't 'kill -9'

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server]]

2007-01-22 Thread Paul Lambert
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 14:01, Paul Lambert wrote: Ron Johnson wrote: On 01/22/07 07:09, Paul Lambert wrote: Alban Hertroys wrote: Paul Lambert wrote:

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Steve Atkins
On Jan 22, 2007, at 11:16 AM, Richard Huxton wrote: Bruce Momjian wrote: Yep, agreed on the random I/O issue. The larger question is if you have a huge table, do you care to reclaim 3% of the table size, rather than just vacuum it when it gets to 10% dirty? I realize the vacuum is going

[GENERAL] Problems compiling from source

2007-01-22 Thread George Weaver
Hi all, I have installed version 8.2.1 and downloaded the source tree in order to compile a number of C-functions. I have been compiling from source for contrib files and c-functions since version 7.3 without problem. I downloaded postgresql-base-8.2.1.tar.gz and unzipped it into the PostgreSQ

Re: [GENERAL]

2007-01-22 Thread Chad Wagner
On 1/22/07, Laurent Manchon <[EMAIL PROTECTED]> wrote: I have a slow response of my PostgreSQL database 7.4 using this query below on a table with 80 rows: select count(*)from tbl; PostgreSQL return result in 28 sec every time. although MS-SQL return result in 0.02 sec every time. Here

Re: [GENERAL] show all record between two date after group by and aggrigation...

2007-01-22 Thread Chad Wagner
On 1/22/07, deepak pal <[EMAIL PROTECTED]> wrote: i am fatching record's from data base between two date range for registration_date coloum and than group by an count it using count(registration_date) i have to show all dates even if date is not there in registration_date ,it should show date an

Re: [GENERAL] Trouble creating database with proper encoding

2007-01-22 Thread Tommy Gildseth
Rob Tanner wrote: createdb -U xythos -E UNICODE XythosDocumentStoreDB createdb -U xythos -E UNICODE XythosGlobalDB When I look at what I've done with psql -l, I get List of databases Name | Owner | Encoding ---+--+-- Xythos

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL

2007-01-22 Thread Bruce Momjian
Engada wrote: > >> I'm faily new to the world of Postgre so excuse me if these questions seem > >> ignorant. > >> > >> My current employer develops a software package which runs on OpenVMS on > >> HP Alpha/Itanium servers and contains a custom > >> database comprised of various format text and bi

Re: [GENERAL] Trouble creating database with proper encoding

2007-01-22 Thread Brandon Aiken
Strictly speaking, Unicode is a whole family of code pages. Unicode generally means multi-byte character encoding. UTF-8 is the most common encoding implementation of Unicode at the moment. UTF-16 is also popular, but very few systems need that many characters or wish to devote that many bytes t

[GENERAL] Trouble creating database with proper encoding

2007-01-22 Thread Rob Tanner
Hi, This is my first venture into PostgreSQL. I built and installer PostgreSQL 8.2.1 as part of a Xythos installation. I added a user called xythos and now I'm trying to add the initial databases that the product requires. From the command line, I executed the commands: createdb -U xythos -E U

[GENERAL]

2007-01-22 Thread Laurent Manchon
Hi, I have a slow response of my PostgreSQL database 7.4 using this query below on a table with 80 rows: select count(*)from tbl; PostgreSQL return result in 28 sec every time. although MS-SQL return result in 0.02 sec every time. My server is a DELL PowerEdge 2600 with bi-processor Xeon a

[GENERAL] show all record between two date after group by and aggrigation...

2007-01-22 Thread deepak pal
i am fatching record's from data base between two date range for registration_date coloum and than group by an count it using count(registration_date) i have to show all dates even if date is not there in registration_date ,it should show date and 0 in count.,how can i do it plz healp...

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server]

2007-01-22 Thread Engada
Alban Hertroys wrote: Paul Lambert wrote: G'day folks, I'm faily new to the world of Postgre so excuse me if these questions seem ignorant. My current employer develops a software package which runs on OpenVMS on HP Alpha/Itanium servers and contains a custom database comprised of variou

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server

2007-01-22 Thread Paul Lambert
Nicolas Barbier wrote: 2007/1/19, Paul Lambert <[EMAIL PROTECTED]>: A number of months ago I was pointed towards Postgre as a reliable database server Please don't use the word Postgre: http://stoned.homeunix.org/~itsme/postgre/>. greetings, Nicolas My apologies, being relatively new to th

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Kenneth Marshall
On Mon, Jan 22, 2007 at 07:24:20PM +, Heikki Linnakangas wrote: > Kenneth Marshall wrote: > >On Mon, Jan 22, 2007 at 06:42:09PM +, Simon Riggs wrote: > >>Hold that thought! Read Heikki's Piggyback VACUUM idea on new thread... > > > >There may be other functions that could leverage a similar

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Kenneth Marshall
On Mon, Jan 22, 2007 at 06:42:09PM +, Simon Riggs wrote: > On Mon, 2007-01-22 at 13:27 -0500, Bruce Momjian wrote: > > Yep, agreed on the random I/O issue. The larger question is if you have > > a huge table, do you care to reclaim 3% of the table size, rather than > > just vacuum it when it g

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread brian stone
I think any comparison between mysql and postgresql is faulty. I have used mysql for a very long time. As my skills matured and I was entrusted with larger projects, I could no longer make an intelligent case to use mysql over postgresql. I needed more from my database. Most arguments in fav

Re: [GENERAL] Help : Microsoft SQL Server equivalents in PostGreSQL

2007-01-22 Thread dean
Benedict Faria wrote: > I need to use a postgreSQL equivalent for "Updatetext" and > "ReadText" in MS SQL Server. Any pointers on what the PostgreSQL > equivalent is? Hi Benedict, I don't see an exact equivalent to MS SQL Server's UpdateText (and ReadText) commands in pgsql or any other PostgreSQ

[GENERAL] Regular expressions and arrays and ANY() question

2007-01-22 Thread webb . sprague
I am trying to figure out how to use a regex and an ANY(), without any luck, to determine if at least one element of an array (on the right) matches the given constant pattern (on the left). I think the problem is because the pattern expects to be on the right side with the target on the left, bu

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread Michael Nolan
John, you may not like it but we are in a competitive marketing environment with MySQL (even if both products are open source), and also with Oracle, SQL*Server, etc. The MySQL folks will take every chance they get to point out instances where PostgreSQL performance is inferior to MySQL (and that

Re: [GENERAL] Password encryption method

2007-01-22 Thread Andrus
No, the tables would be on the server, the same as was already being done. Using a separate table makes it more future proof. To access tables in server, you need to login into server. To login into server, you need postresql user name and password sent by client and thus stored in client com

Re: [GENERAL] Who is Slony Master/Slave + general questions.

2007-01-22 Thread Shoaib Mir
I dont have the replication setup on my machine right now but I guess as far as I remember you can surely check for the master and slave nodes from a Slony schema table. Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 19 Jan 2007 08:25:23 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Joris Dobbelsteen
>-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Gregory Stark >Sent: maandag 22 januari 2007 19:41 >To: Bruce Momjian >Cc: Heikki Linnakangas; Russell Smith; Darcy Buskermolen; >Simon Riggs; Alvaro Herrera; Matthew T. O'Connor; Pavan >Deolasee; Christ

Re: [GENERAL] postgresql scalability, active-active cluster

2007-01-22 Thread Jeff Davis
On Mon, 2007-01-22 at 17:37 -0300, Alvaro Herrera wrote: > brian stone wrote: > > I never considered MySQL because I really DO need transactions. MySQL > > also lacks many enterprise features we need; well they say they have > > them but from my testing they are a bit under-cooked. > > > > I need

Re: [GENERAL] [ANNOUNCE] == PostgreSQL Weekly News - January

2007-01-22 Thread Joshua D. Drake
Dave Page wrote: > Bruce Momjian wrote: >> David Fetter wrote: >>> On Mon, Jan 22, 2007 at 10:17:05AM -0300, Alvaro Herrera wrote: David Fetter wrote: > EnterpriseDB is now offering support packages for the main branch > of PostgreSQL. > http://www.enterprisedb.com/products/po

Re: [GENERAL] [ANNOUNCE] == PostgreSQL Weekly News - January

2007-01-22 Thread Dave Page
Bruce Momjian wrote: > David Fetter wrote: >> On Mon, Jan 22, 2007 at 10:17:05AM -0300, Alvaro Herrera wrote: >>> David Fetter wrote: >>> EnterpriseDB is now offering support packages for the main branch of PostgreSQL. http://www.enterprisedb.com/products/postgre_pricing.do >>> Huh,

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server]]

2007-01-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 14:01, Paul Lambert wrote: > Ron Johnson wrote: On 01/22/07 07:09, Paul Lambert wrote: > Alban Hertroys wrote: > Paul Lambert wrote: > > > [snip] > [snip] > We've got pretty new hardware - DS15's, DS25's, Itanium

Re: [GENERAL] postgresql scalability, active-active cluster

2007-01-22 Thread Alvaro Herrera
brian stone wrote: > I never considered MySQL because I really DO need transactions. MySQL > also lacks many enterprise features we need; well they say they have > them but from my testing they are a bit under-cooked. > > I need atomic actions across an N number of application servers. The > goa

Re: [GENERAL] Index bloat of 4x

2007-01-22 Thread Ed L.
We have a large number (50+) of pre-8.2 clusters. How can I best/most easily identify those indices most bloated and in need of reindex/rebuilding? Ed ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://ar

Re: [GENERAL] [ANNOUNCE] == PostgreSQL Weekly News - January

2007-01-22 Thread Bruce Momjian
David Fetter wrote: > On Mon, Jan 22, 2007 at 10:17:05AM -0300, Alvaro Herrera wrote: > > David Fetter wrote: > > > > > EnterpriseDB is now offering support packages for the main branch > > > of PostgreSQL. > > > http://www.enterprisedb.com/products/postgre_pricing.do > > > > Huh, it's interestin

Re: [GENERAL] postgresql scalability, active-active cluster

2007-01-22 Thread brian stone
I never considered MySQL because I really DO need transactions. MySQL also lacks many enterprise features we need; well they say they have them but from my testing they are a bit under-cooked. I need atomic actions across an N number of application servers. The goal here is scalability, which

Re: [GENERAL] [ANNOUNCE] == PostgreSQL Weekly News - January 21 2007 ==

2007-01-22 Thread David Fetter
On Mon, Jan 22, 2007 at 10:17:05AM -0300, Alvaro Herrera wrote: > David Fetter wrote: > > > EnterpriseDB is now offering support packages for the main branch > > of PostgreSQL. > > http://www.enterprisedb.com/products/postgre_pricing.do > > Huh, it's interesting that they managed to get the "Post

Re: [GENERAL] postgresql scalability, active-active cluster

2007-01-22 Thread Jeff Davis
On Sun, 2007-01-21 at 06:55 -0800, brian stone wrote: > Are there any built in tools or 3rd party tools for distributing a > postgresql database? I need an active active configuration; master- > master with fail over. The project I am working needs to support a > very large number of transactions

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server]]

2007-01-22 Thread Paul Lambert
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 07:09, Paul Lambert wrote: Alban Hertroys wrote: Paul Lambert wrote: [snip] I'd imagine there aren't too many VMS programmers around that would be willing to port Postgres either, but if anyone ou

[GENERAL] too many trigger records found for relation "item" - what's that about??

2007-01-22 Thread Lenorovitz, Joel
Greetings, I've had a strange error crop up recently on a table 'Item' which contains about 60 rows and lives in a development database I'm currently working on. Since the DB was last freshly created from a dump file several days ago I've added/dropped/altered a few tables (not necessarily 'Item'

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Bruce Momjian
Alvaro Herrera wrote: > Bruce Momjian wrote: > > > > Yep, agreed on the random I/O issue. The larger question is if you have > > a huge table, do you care to reclaim 3% of the table size, rather than > > just vacuum it when it gets to 10% dirty? I realize the vacuum is going > > to take a lot of

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread Jeff Davis
On Mon, 2007-01-22 at 10:30 +0800, Shashank Tripathi wrote: > The problem is when the number of rows exceeds 30 million, MySQL > performance degrades substantially. For most people, this is not an > issue. PG is solid with huge databases, but in my experience, even the > most optimized subselect on

Re: [GENERAL] printf-like format strings

2007-01-22 Thread Marc Evans
I have found the following technique works well for me: CREATE OR REPLACE FUNCTION audit_log_sprintf(text,integer) RETURNS TEXT as $$ my $fmt = shift; my $id = shift; my $msg = spi_exec_query("SELECT array_upper(msg_args,1) FROM audit_logs WHERE id = $id",1); my $nArgs = $msg->{rows}[0]

Re: [GENERAL] MSSQL/ASP migration

2007-01-22 Thread Robert Fitzpatrick
On Mon, 2007-01-22 at 12:13 -0500, Ted Byers wrote: > Is the original application ASP or SP.NET? It makes a difference, > particularly if it was developed to take advantage of ASP.NET 2. It might > conceivably be ASP.NET 3, but since that is brand new I can't see anyone > paying to replace an

Re: [GENERAL] printf-like format strings

2007-01-22 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message Alexander Presber asked: > does somebody know of an extension for postgres that allows the use > of printf-like format strings? > PL/Perl comes to mind, but how could one take care of the variabl

Re: [GENERAL] Password encryption method

2007-01-22 Thread Bertram Scharpf
Hi, Am Montag, 22. Jan 2007, 10:25:33 -0600 schrieb Bruno Wolff III: > I didn't give an opinion on whether or not the whole approach was a good > idea or not, since there wasn't enough detail in the original question. What I want to do is the following: 1. Login in from a program on a client a

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Heikki Linnakangas
Kenneth Marshall wrote: On Mon, Jan 22, 2007 at 06:42:09PM +, Simon Riggs wrote: Hold that thought! Read Heikki's Piggyback VACUUM idea on new thread... There may be other functions that could leverage a similar sort of infrastructure. For example, a long DB mining query could be registere

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Heikki Linnakangas
Gregory Stark wrote: "Bruce Momjian" <[EMAIL PROTECTED]> writes: I agree it index cleanup isn't > 50% of vacuum. I was trying to figure out how small, and it seems about 15% of the total table, which means if we have bitmap vacuum, we can conceivably reduce vacuum load by perhaps 80%, assuming

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Richard Huxton
Bruce Momjian wrote: Yep, agreed on the random I/O issue. The larger question is if you have a huge table, do you care to reclaim 3% of the table size, rather than just vacuum it when it gets to 10% dirty? I realize the vacuum is going to take a lot of time, but vacuuming to relaim 3% three tim

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Alvaro Herrera
Bruce Momjian wrote: > > Yep, agreed on the random I/O issue. The larger question is if you have > a huge table, do you care to reclaim 3% of the table size, rather than > just vacuum it when it gets to 10% dirty? I realize the vacuum is going > to take a lot of time, but vacuuming to relaim 3%

Re: [GENERAL] printf-like format strings

2007-01-22 Thread Terry Lee Tucker
On Monday 22 January 2007 12:59 pm, Alexander Presber <[EMAIL PROTECTED]> thus communicated: > Hello, > > does somebody know of an extension for postgres that allows the use > of printf-like format strings? > PL/Perl comes to mind, but how could one take care of the variable > argument count?

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread Scott Marlowe
On Sun, 2007-01-21 at 10:01, Shashank wrote: > > It seems MySQL just dropped the ball on > > the free version of their product, and it > > Not sure what you mean. I can download their latest versions without > any trouble. > > > > Additionally, they feel that Oracle is such a threat that they ha

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Simon Riggs
On Mon, 2007-01-22 at 13:27 -0500, Bruce Momjian wrote: > Yep, agreed on the random I/O issue. The larger question is if you have > a huge table, do you care to reclaim 3% of the table size, rather than > just vacuum it when it gets to 10% dirty? I realize the vacuum is going > to take a lot of t

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Gregory Stark
"Bruce Momjian" <[EMAIL PROTECTED]> writes: > Yep, agreed on the random I/O issue. The larger question is if you have > a huge table, do you care to reclaim 3% of the table size, rather than > just vacuum it when it gets to 10% dirty? I realize the vacuum is going > to take a lot of time, but v

[GENERAL] printf-like format strings

2007-01-22 Thread Alexander Presber
Hello, does somebody know of an extension for postgres that allows the use of printf-like format strings? PL/Perl comes to mind, but how could one take care of the variable argument count? Thanks for any advice! Sincerely Alexander Presber ---(end of broadcast)

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Bruce Momjian
Yep, agreed on the random I/O issue. The larger question is if you have a huge table, do you care to reclaim 3% of the table size, rather than just vacuum it when it gets to 10% dirty? I realize the vacuum is going to take a lot of time, but vacuuming to relaim 3% three times seems like it is go

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Gregory Stark
"Bruce Momjian" <[EMAIL PROTECTED]> writes: > I agree it index cleanup isn't > 50% of vacuum. I was trying to figure > out how small, and it seems about 15% of the total table, which means if > we have bitmap vacuum, we can conceivably reduce vacuum load by perhaps > 80%, assuming 5% of the table

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Simon Riggs
On Mon, 2007-01-22 at 12:18 -0500, Bruce Momjian wrote: > Heikki Linnakangas wrote: > > > > In any case, for the statement "Index cleanup is the most expensive part > > of vacuum" to be true, you're indexes would have to take up 2x as much > > space as the heap, since the heap is scanned twice.

Re: [GENERAL] MSSQL/ASP migration

2007-01-22 Thread Tony Caduto
Robert Fitzpatrick wrote: Any docs or other helpful info is welcome, just looking for some advise. One think I would recommend is to make sure when creating the new table structure that you make sure not to use capitalized object names. Because MS SQL server can be case insensitive I have

Re: [GENERAL] Loop in loop

2007-01-22 Thread Moritz Bayer
Hi Andreas, if it is possible, can you tell me what error I 've put in my first function? Thanks, Mo

Re: [GENERAL] MSSQL/ASP migration

2007-01-22 Thread Ted Byers
Is the original application ASP or SP.NET? It makes a difference, particularly if it was developed to take advantage of ASP.NET 2. It might conceivably be ASP.NET 3, but since that is brand new I can't see anyone paying to replace an ASP.NET 3 application that was just created. If it is ASP.

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Bruce Momjian
Heikki Linnakangas wrote: > Bruce Momjian wrote: > > Heikki Linnakangas wrote: > >> Russell Smith wrote: > >>> 2. Index cleanup is the most expensive part of vacuum. So doing a > >>> partial vacuum actually means more I/O as you have to do index cleanup > >>> more often. > >> I don't think that'

Re: [GENERAL] MSSQL/ASP migration

2007-01-22 Thread Robert Fitzpatrick
On Mon, 2007-01-22 at 16:32 +, Peter Rosenthal wrote: > Wanting to do something similar I recently submitted a large patch to > the mysql2pgsql project. It will now handle conversion of a mysqldump > file complete with data for the quite large and diverse DB I was using > it with. I'm sure ther

[GENERAL] selecting random rows

2007-01-22 Thread Kevin Murphy
Here is Josh Berkus' solution for randomly picking a single row from a query. I think the FAQ (www.postgresql.org/docs/faqs.FAQ.html#item4.1) could be updated with a link to this solution, which is more practical for large queries. www.powerpostgresql.com/Random_Aggregate Here is a discus

Re: [GENERAL] CAST function for user defined type

2007-01-22 Thread Ron Peterson
On Mon, Jan 22, 2007 at 11:40:08AM -0500, Tom Lane wrote: > Ron Peterson <[EMAIL PROTECTED]> writes: > > That cleared one hurdle, but I'm still not there yet. > > > % select 'fe43d07c0c624786bebfcb3357a2a13a'::y_octet_16; > > y_octet_16 > > -- > > fe43d

[GENERAL] Loop in loop

2007-01-22 Thread Moritz Bayer
Hello group, I've got a new problem where I hope someone can give me a solution. I have witten a function which should give back a type created by me. To get the data into the type, I have to go through a loop, which holds other loops. Simplified (not really), it looks like this: CREATE OR REPL

[GENERAL] Tracking database activity

2007-01-22 Thread Erik Jones
Hi, I'm hoping someone can help me wrap my head around some #s I'm using to track database activity. I have a script that runs hourly and queries pg_stat_database and checks age(datfrozenxid) in pg_database. It logs those stats and the next hour, when it runs, it takes the differences to chec

Re: [GENERAL] CAST function for user defined type

2007-01-22 Thread Tom Lane
Ron Peterson <[EMAIL PROTECTED]> writes: > That cleared one hurdle, but I'm still not there yet. > % select 'fe43d07c0c624786bebfcb3357a2a13a'::y_octet_16; > y_octet_16 > -- > fe43d07c0c624786bebfcb3357a2a13a That's not invoking any cast function, but

Re: [GENERAL] MSSQL/ASP migration

2007-01-22 Thread Peter Rosenthal
Wanting to do something similar I recently submitted a large patch to the mysql2pgsql project. It will now handle conversion of a mysqldump file complete with data for the quite large and diverse DB I was using it with. I'm sure there are still corner cases, but you should give it a try: http://g

Re: [GENERAL] Loop in loop

2007-01-22 Thread George Weaver
Original Message From: Moritz Bayer >But still the question: >Is it possible to put a loop into a loop? Or doesn't it make sense at all? I'm not sure what the OP was about, but Yes, it it possible to put a loop into a loop. See: http://www.postgresql.org/docs/8.2/static/plpgsql-control

Re: [GENERAL] security question

2007-01-22 Thread Jan Muszynski
On 22 Jan 2007 at 10:15, Ron Johnson wrote: > On 01/22/07 09:55, Jan Muszynski wrote: > > On 22 Jan 2007 at 16:10, Sim Zacks wrote: > > > >> How good is postgresql security? For example, If I have data > >> that I do not anyone to see, including the programmer/dba, is > >> it enough to change the

Re: [GENERAL] Password encryption method

2007-01-22 Thread Bruno Wolff III
On Sun, Jan 21, 2007 at 15:16:37 +0200, Andrus <[EMAIL PROTECTED]> wrote: > > >No, the tables would be on the server, the same as was already being done. > >Using a separate table makes it more future proof. > > To access tables in server, you need to login into server. > To login into server,

Re: [GENERAL] triggers and TriggerData

2007-01-22 Thread Alan Hodgson
On Monday 22 January 2007 07:04, Michael Fuhr <[EMAIL PROTECTED]> wrote: > You can pass literal string arguments to a trigger function. See > the CREATE TRIGGER documentation and, for PL/pgSQL, TG_ARGV and > TG_NARGS. For C see "Writing Trigger Functions in C"; search for > tgnargs and tgargs. >

Re: [GENERAL] Enable/Disable Triggers

2007-01-22 Thread Tom Lane
=?iso-8859-1?q?Germ=E1n_H=FCttemann_Arza?= <[EMAIL PROTECTED]> writes: > Hello, > I tried to execute ALTER TABLE emp DISABLE TRIGGER after_ins_emp on > PostgreSQL > 7.4.13 and I realised that feature isn't include yet in this version. > How can I enable/disable a trigger in this version of Postg

Re: [GENERAL] CAST function for user defined type

2007-01-22 Thread Ron Peterson
On Mon, Jan 22, 2007 at 04:36:20PM +0100, Martijn van Oosterhout wrote: > On Mon, Jan 22, 2007 at 09:44:52AM -0500, Ron Peterson wrote: > > I've created my own type: y_octet_16. Now I'm trying to create a CAST > > function for this type, but I'm not quite getting it. > > Quick question: do you me

Re: [GENERAL] Is there an equivalent of the W3c HTML checker for SQL?

2007-01-22 Thread Tom Lane
David Goodenough <[EMAIL PROTECTED]> writes: > This may seem like a question unrelated to Postgresql, but I have recently > noticed a project that is having a discussion about how their code should > be developed. They are (unfortunately) developing first with MySQL, because > that is what they a

Re: [GENERAL] security question

2007-01-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 09:55, Jan Muszynski wrote: > On 22 Jan 2007 at 16:10, Sim Zacks wrote: > >> How good is postgresql security? For example, If I have data >> that I do not anyone to see, including the programmer/dba, is >> it enough to change the password

[GENERAL] MSSQL/ASP migration

2007-01-22 Thread Robert Fitzpatrick
I have a customer who is wants to migrate his MSSQL database to PostgreSQL and we'll replace his application ASP with PHP. The issues should be limited as there are no stored procedures or triggers in MSSQL, just structure and data should be all that is needed to migrate. I have never migrated from

Re: [GENERAL] CAST function for user defined type

2007-01-22 Thread Tom Lane
Ron Peterson <[EMAIL PROTECTED]> writes: > I've created my own type: y_octet_16. Now I'm trying to create a CAST ^^ > % INSERT INTO bt( name, val ) VALUES > ( 'aaa', encode( y_uuid_generate(), 'hex' )::y_byte_16 ); > ERROR: type "y_byte_16" does not exist

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Heikki Linnakangas
Bruce Momjian wrote: Heikki Linnakangas wrote: Russell Smith wrote: 2. Index cleanup is the most expensive part of vacuum. So doing a partial vacuum actually means more I/O as you have to do index cleanup more often. I don't think that's usually the case. Index(es) are typically only a fract

Re: [GENERAL] security question

2007-01-22 Thread Jan Muszynski
On 22 Jan 2007 at 16:10, Sim Zacks wrote: > How good is postgresql security? > For example, If I have data that I do not anyone to see, including the > programmer/dba, is it enough > to change the password to the only user? > If they have access to the raw files is there a way for them to someho

Re: [GENERAL] CAST function for user defined type

2007-01-22 Thread Martijn van Oosterhout
On Mon, Jan 22, 2007 at 09:44:52AM -0500, Ron Peterson wrote: > I've created my own type: y_octet_16. Now I'm trying to create a CAST > function for this type, but I'm not quite getting it. Quick question: do you mean: > val > y_octet_16 ^^ > VALUES > ( 'aaa', encode( y_uui

Re: [GENERAL] security question

2007-01-22 Thread Martijn van Oosterhout
On Mon, Jan 22, 2007 at 08:30:53AM -0600, Ron Johnson wrote: > > The answer depends heavily on what the "programmer/dba" can do. > > > > Any superuser of the DB can see any data > > Any user that can access the raw files can see any data > > Any user that can poke into memory can see any data > >

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Bruce Momjian
Heikki Linnakangas wrote: > Russell Smith wrote: > > 2. Index cleanup is the most expensive part of vacuum. So doing a > > partial vacuum actually means more I/O as you have to do index cleanup > > more often. > > I don't think that's usually the case. Index(es) are typically only a > fraction

Re: [GENERAL] Loop in loop

2007-01-22 Thread A. Kretschmer
am Mon, dem 22.01.2007, um 15:58:32 +0100 mailte Moritz Bayer folgendes: > > But still the question: > Is it possible to put a loop into a loop? Or doesn't it make sense at all? Yes, is possible, why not? And sometimes it make sense... Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/

Re: [GENERAL] triggers and TriggerData

2007-01-22 Thread Michael Fuhr
On Sun, Jan 21, 2007 at 09:05:30PM -0800, Alan Hodgson wrote: > On Sunday 21 January 2007 15:56, gustavo halperin <[EMAIL PROTECTED]> wrote: > > I have another question about triggers, how can I pass arguments ?? I > > read about some struct TriggerData *CurrentTriggerData, but I didn't > > found a

Re: [GENERAL] Loop in loop

2007-01-22 Thread Moritz Bayer
OK, this looks better: CREATE OR REPLACE FUNCTION getregistrationtagging() RETURNS SETOF ty_usertracking AS $BODY$ DECLARE objReturn ty_usertracking%rowtype; BEGIN for objReturn IN SELECT date_part('day',trackdate) as ty_day, date_part('month',trackdate) as ty_month

[GENERAL] CAST function for user defined type

2007-01-22 Thread Ron Peterson
I've created my own type: y_octet_16. Now I'm trying to create a CAST function for this type, but I'm not quite getting it. The input function for my type takes a 32 char hex string as input. CREATE TABLE bt ( name TEXT NOT NULL, val y_octet_16 NOT NULL ); CREATE INDEX bt_

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 05:49, Peter Rosenthal wrote: > Right, > > You also have to realize that your first query might return zero results, > and MySQL (and maybe this is correct SQL behavior) balks at an empty value > set "where table_id in ()". > > I would ex

Re: [GENERAL] security question

2007-01-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 08:22, Martijn van Oosterhout wrote: > On Mon, Jan 22, 2007 at 04:10:15PM +0200, Sim Zacks wrote: >> How good is postgresql security? > > Good, within limits. > >> For example, If I have data that I do not anyone to see, including the >>

Re: [GENERAL] security question

2007-01-22 Thread Martijn van Oosterhout
On Mon, Jan 22, 2007 at 04:10:15PM +0200, Sim Zacks wrote: > How good is postgresql security? Good, within limits. > For example, If I have data that I do not anyone to see, including the > programmer/dba, is it enough to change the password to the only user? > If they have access to the raw fil

Re: [GENERAL] security question

2007-01-22 Thread A. Kretschmer
am Mon, dem 22.01.2007, um 16:10:15 +0200 mailte Sim Zacks folgendes: > How good is postgresql security? > For example, If I have data that I do not anyone to see, including the > programmer/dba, is it enough to change the password to the only user? > If they have access to the raw files is there

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server]]

2007-01-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 07:09, Paul Lambert wrote: > > Alban Hertroys wrote: >> Paul Lambert wrote: >> [snip] > I'd imagine there aren't too many VMS programmers around that > would be willing to port Postgres either, but if anyone out there > with experience in

[GENERAL] security question

2007-01-22 Thread Sim Zacks
How good is postgresql security? For example, If I have data that I do not anyone to see, including the programmer/dba, is it enough to change the password to the only user? If they have access to the raw files is there a way for them to somehow see the data? can they copy the files to another

  1   2   >