Re: [GENERAL] Thoughts on "Love Your Database"

2016-05-04 Thread Mike Sofen
a...where there is zero tolerance for slack db design that could cause scalability or performance issues. My stored functions are...relatively simple. Mike Sofen (San Diego, CA USA) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Thoughts on "Love Your Database"

2016-05-04 Thread Mike Sofen
es like windowing functions. So I guess you’d say I’m in the entirely opposite camp, since it’s proven to be such an effective solution architecture for many applications that leverage relational database engines. Mike Sofen (San Diego, CA USA)

Re: [GENERAL] Alternate or Optimization for with hold cursor

2016-05-12 Thread Mike Sofen
o disk constantly. And since you're working on a single row at time, it will take forever. Convert the cursor into a normal query and you should see BIG (10-1000x) gains in speed. A cursor can always be converted to normal sql...always...it's not always easy but it's always worth the

Re: [GENERAL] Interval Rounding

2007-06-01 Thread Mike Ginsburg
age(now(), change_time)) WHEN (now() - change_time) < '1 hour'::interval THEN date_part('minutes', age(now(), change_time)) END FROM... Any better way to do it? Michael Glaesemann wrote: On Jun 1, 2007, at 12:11 , Mike Ginsburg wrote:

[GENERAL] Interval Rounding

2007-06-01 Thread Mike Ginsburg
FROM ... to get the interval, and am attempting to use either EXTRACT() or DATE_PART() to get the appropriate value, but the interval doesn't contain any unit higher than days. Any thoughts on how I could accomplish this? Thanks in advance Mike Ginsburg Collaborative Fusion, Inc. [EMAIL

[GENERAL] Distributing PostGres database to various customers

2007-06-11 Thread Mike Gould
All, I am new to PostGres 8 (using 8.2.4 windows version). We have for several years been using iAnywhere's SQL Anywhere product with our commercial transportation software. With ASA there are 2 files that must be distributed for the database, a filename.db and a filename.log. When we do a n

[GENERAL] Another conversion from ASA to PostGres how to

2007-06-15 Thread Mike Gould
All, As the subject says we are converting from Sybase's SQL Anywhere to PostGres 8.2.4. One of the features in ASA is a SET OPTION PUBLIC.login_procedure='DBA.login_check'. After a user is authenticated on a connection, if this setting is set, then the database automatically triggers this p

[GENERAL] Trigger Priority

2007-07-03 Thread Mike Gould
Is there a way to determine the order that triggers are executed? We are converting from SQL Anywhere 9 and one of the features that they have is the ability to add a order statement to triggers. This allows from a programmatic way to control how triggers are fired if there is more than o

[GENERAL] feature requests

2007-07-08 Thread Mike Gould
I would like to see a CREATE Variable dataname datatype added. The scope of these variables would be global. Along this same line I would like to see a way to have a trigger or rule fired upon connection initialization. This would allow for these type of variables to be SET along with other de

[GENERAL] FOREIGN KEY migration of syntax, help needed

2007-07-31 Thread Mike Haberman
TABLE ONLY assettype ADD CONSTRAINT at_fk_1 FOREIGN KEY (pid) REFERENCES assettype(id) ON UPDATE CASCADE ON DELETE CASCADE; Are there any other gottcha's when doing this type of migration? (I need to use the FKEY syntax, so a schema visualizer will show the foreign key relations

Re: [GENERAL] FOREIGN KEY migration of syntax, help needed

2007-07-31 Thread Mike Haberman
Thank you for the quick response. If all my old constraints are NOT DEFERRABLE INITIALLY IMMEDIATE does that mean I don't have to worry about the deferrable keyword? mike On Tue, Jul 31, 2007 at 04:00:59PM -0400, Tom Lane wrote: > Mike Haberman <[EMAIL PROTECT

Re: {Spam} [GENERAL] FOREIGN KEY migration of syntax, help needed

2007-08-01 Thread Mike Haberman
wow.. Thank you. mike On Wed, Aug 01, 2007 at 10:31:16AM +0200, Dimitri Fontaine wrote: > Le mardi 31 juillet 2007, Mike Haberman a ?crit?: > >My old database has the old-style FOREIGN KEY syntax: > > I've had this very same transition to make on a database here, and

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-19 Thread Mike Rylander
On 8/9/07, cluster <[EMAIL PROTECTED]> wrote: > Thanks for your response! Let me try to elaborate what I meant with my > original post. > > If R is the set of words in the tsvector for a given table row and S is > the set of keywords to search for (entered by e.g. a website user) I > would like to

[GENERAL] problems with large table

2007-09-12 Thread Mike Charnoky
o complete? Is there some sort of fine-tuning I should pay attention to? Any help is much appreciated. Mike ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] problems with large table

2007-09-12 Thread Mike Charnoky
? maintenance_work_mem is 16384. Joshua: I'm copying the data to a new table right now, I'll see how that goes. Alvaro: The cluster suggestion probably won't help in my case since data in the table should already be naturally ordered by date. Mike Tom Lane wrote: > "Joshua D. D

Re: [GENERAL] problems with large table

2007-09-14 Thread Mike Charnoky
Thanks, recreating the table solved my problems. Our team is working on implementing some performance tuning based on other recommendations from the list (FSM, etc). Mike Joshua D. Drake wrote: > At this point, you are in a world of hurt :). If you stop a vacuum you > have created a hug

[GENERAL] NZDT Question

2007-09-25 Thread Mike C
); now --- 2007-10-01 06:12:40.097244+12 (1 row) business=# select current_timestamp; now --- 2007-10-01 06:12:43.697349+12 (1 row) Note the 1 hour difference between postgres and date. Regards, Mike --

Re: [GENERAL] NZDT Question

2007-09-25 Thread Mike C
12:40.097244+13 > (1 row) > > What have you got "timezone" set to? Did you remember to restart > the postmaster after updating? Aha! Thanks... when I ran set timezone, it did not recognize 'Pacific/Auckland'. I hadn't installed share/timezone in correct loc

[GENERAL] more problems with count(*) on large table

2007-09-28 Thread Mike Charnoky
00 work_mem = 16384 maintenance_work_mem = 262144 max_fsm_pages = 50 max_fsm_relations = 3 Mike ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] more problems with count(*) on large table

2007-09-28 Thread Mike Charnoky
The autovacuum is turned on. Since this is pg8.1, I don't know when the table was actually last vacuumed. I *did* run analyze on the table, though. Also, nothing has been deleted in this table... so vacuum should have no affect, right? Mike Sean Davis wrote: > Mike Charnoky wrot

Re: [GENERAL] more problems with count(*) on large table

2007-09-28 Thread Mike Charnoky
-- Aggregate (cost=486615.04..486615.05 rows=1 width=0) -> Index Scan using pred_acc_evtime_index on prediction_accuracy (cost=0.00..454671.07 rows=12777586 width=0) Index Cond: ((evtime >= '2007-09-26 00:00:00-07'::timestamp with time zone) AND (evtime <= '2

Re: [GENERAL] more problems with count(*) on large table

2007-10-01 Thread Mike Charnoky
0:00:00-07'::timestamp with time zone)) (3 rows) Time: 131.559 ms mydb# execute stmt; count -- 14150928 (1 row) Time: 101721.346 ms Mike Gregory Stark wrote: > "Alban Hertroys" <[EMAIL PROTECTED]> writes: > >> Mike Charnoky wrote: >>> With respect

Re: [GENERAL] more problems with count(*) on large table

2007-10-01 Thread Mike Charnoky
evtime <= '2007-09-30 00:00:00-07'::timestamp with time zone)) Total runtime: 111201.000 ms (4 rows) Time: 111298.695 ms Mike Gregory Stark wrote: > "Mike Charnoky" <[EMAIL PROTECTED]> writes: > >> I altered the table in question, with "set statistic

Re: [GENERAL] more problems with count(*) on large table

2007-10-02 Thread Mike Charnoky
is inserting data into this table. I have checkpoint_segments set to 64 so that pg is not constantly thrashing the disk with writes. The transaction log is on a separate disk. Mike Bill Moran wrote: > In response to Mike Charnoky <[EMAIL PROTECTED]>: > >> This is strange...

[GENERAL] Large Result and Memory Limit

2007-10-04 Thread Mike Ginsburg
e was a better way. Thanks in advance for the help. MG Mike Ginsburg Collaborative Fusion, Inc. [EMAIL PROTECTED] 412-422-3463 x4015 ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-n

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread Mike Ginsburg
André Volpato wrote: Mike Ginsburg escreveu: Hello, I am working on a personnel registry that has upwards of 50,000 registrants. Currently I am working on an export module that will create a CSV from multiple tables. I have managed to keep the script (PHP) under the memory limit okay

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread Mike Ginsburg
Scott Marlowe wrote: On 10/4/07, Mike Ginsburg <[EMAIL PROTECTED]> wrote: export it. Memory limit is a major concern, but the query for one row returns a result set too large and PHP fails. If this is true, and one single db row makes php exceed its memory limit just by return

Re: [GENERAL] Out of memory with ODBC

2007-10-12 Thread Relyea, Mike
ooted my server (thankfully I don't have very many clients at all, so that helps) and before anybody else connected to it, ran the query and observed the same result. This seems to be a problem with the ODBC driver? How can I narrow that down further? Mike ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Out of memory with ODBC

2007-10-12 Thread Relyea, Mike
> From: Richard Huxton [mailto:[EMAIL PROTECTED] > > Relyea, Mike wrote: >> If I execute this query in PGAdmin III it runs without any errors and returns no records. > > Hmm. So what's different about the queries? > Nothing. The SQL is identical. I copied o

Re: [GENERAL] Out of memory with ODBC

2007-10-12 Thread Relyea, Mike
> From: Richard Huxton [mailto:[EMAIL PROTECTED] > Relyea, Mike wrote: > > This seems to be a problem with the ODBC driver? How can I narrow > > that down further? > > Well, first make 100% certain the query being executed is the > one you see being sent from A

Re: [GENERAL] Out of memory with ODBC

2007-10-19 Thread Relyea, Mike
> From: Richard Huxton [mailto:[EMAIL PROTECTED] > Relyea, Mike wrote: > > This seems to be a problem with the ODBC driver? How can I narrow > > that down further? > > Well, first make 100% certain the query being executed is the > one you see being sent fro

Re: [GENERAL] reserving space in a rec for future update

2007-11-14 Thread Mike Charnoky
sting... Mike Andrew Sullivan wrote: > On Wed, Nov 14, 2007 at 10:28:30AM -0500, Gauthier, Dave wrote: >> null. My concern has to do with record fragmentation at the time of >> update because there's no room to "expand" them to accept the non-null >> data. (BTW,

[GENERAL] convert custom datatype to array

2007-11-19 Thread Mike Charnoky
mycolumn [30.910,12.300] [5.950,15.780,1.580,1.070,1.050,0.940,1.750,7.880] [10.680,29.030] [15.25

Re: [GENERAL] convert custom datatype to array

2007-11-19 Thread Mike Charnoky
missing link to eventually get the data to float4[]. Mike Alvaro Herrera wrote: > Mike Charnoky wrote: >> Our database schema was designed before postgresql supported arrays and >> contains a custom type which is basically a float4 array. I would like >> to clean things up a

Re: [GENERAL] convert custom datatype to array

2007-11-19 Thread Mike Charnoky
Thanks! That did the trick. For posterity, I was able to do the final conversion using: alter table mytable alter column mycolumn type float4[] using string_to_array(trim(both '[]' from textin(nbf4a_out(mycolumn))),',')::float4[]; Mike Alvaro Herrera wrote: > Mik

Re: [GENERAL] partitioned table query question

2007-12-11 Thread Mike Rylander
On Dec 10, 2007 8:01 PM, Erik Jones <[EMAIL PROTECTED]> wrote: > [snip] > Again, though, is there some better way to go about implementing some > kind of hash based partitioning in postgres besides this that would > be more natural wrt queries? > Adding a column to hold the result of the %, perha

[GENERAL] Postgres 8.3 HOT and non-persistent xids

2007-12-19 Thread Mike C
n ids, the documentation says that this is for read-only transactions. What defines a read-only transaction for this purpose? Does postgres check to see if a SELECT includes e.g. a sequence change via nextval? If I mark the transaction as readonly using the PG JDBC driver, will that be sufficient? Thank

Re: [GENERAL] Postgres 8.3 HOT and non-persistent xids

2007-12-20 Thread Mike C
Thank you both, this clears everything up for me. Cheers, Mike ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] A select DISTINCT query? - followup Q

2008-01-27 Thread Mike Ginsburg
4fifth comment 5sixth comment Thanks, Phil. Mike Ginsburg Collaborative Fusion, Inc. [EMAIL PROTECTED] 412-422-3463 x4015 -- IMPORTANT: This message contains confidential information and is intended only for the individual

Re: [GENERAL] Missing uuid_generate_v1()

2010-10-07 Thread Mike Christensen
On Wed, Oct 6, 2010 at 10:47 PM, Magnus Hagander wrote: > On Thu, Oct 7, 2010 at 05:09, Mike Christensen wrote: >> On Wed, Oct 6, 2010 at 7:56 PM, Tom Lane wrote: >>> Mike Christensen writes: >>>> On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane wrote: >>>&

[GENERAL] Postgres won't start after setting ssl=on

2010-10-09 Thread Mike Christensen
07 UTC FATAL: could not load private key file "server.key": Permission denied I'm logged on as root. Any ideas? Thanks! Mike -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Postgres won't start after setting ssl=on

2010-10-09 Thread Mike Christensen
7;root'. > In my case I run Red Hat which uses the 'postgres' user, so: > > chown postgres.postgres /var/lib/pgsql/data/server.* > > > On Sun, Oct 10, 2010 at 2:52 PM, Mike Christensen > wrote: >> >> Hi, I'm trying to require SSL for Postgres co

Re: [GENERAL] Postgres won't start after setting ssl=on

2010-10-09 Thread Mike Christensen
ed to mess with anything on the client side of things.. So now I have my database, which only accepts TCP/IP "host" connections from the IP addresses of my web servers, and then requires "hostssl" from my home cable modem IP. Everything else is blocked. Should be decently secure

Re: [GENERAL] Postgres won't start after setting ssl=on

2010-10-10 Thread Mike Christensen
While I do appreciate the vote of confidence, rest assured you will never see a post from me that starts with "So I've been hacking the pg code and..." On Sat, Oct 9, 2010 at 11:54 PM, Scott Marlowe wrote: > On Sat, Oct 9, 2010 at 10:04 PM, Darren Duncan > wrote: >> The owner of these new files

[GENERAL] Need some help setting up pgAgent

2010-10-17 Thread Mike Christensen
like.. now what? The docs have no next steps. How do I create a new job to run my SQL function every night? From some documentation from Postgres Plus, I was led to believe that there should be a "Jobs" tree in pgAdmin created.. But I see nothing. Thanks! Mike -- Sent via pgsql-ge

Re: [GENERAL] Need some help setting up pgAgent

2010-10-18 Thread Mike Christensen
On Mon, Oct 18, 2010 at 2:07 AM, Dave Page wrote: > On Sun, Oct 17, 2010 at 2:32 PM, Mike Christensen wrote: >> Okay my required n00b question of the week, hopefully this'll be an easy >> one.. >> >> I decided to give pgAgent a shot, because there's this sto

Re: [GENERAL] Need some help setting up pgAgent

2010-10-18 Thread Mike Christensen
On Mon, Oct 18, 2010 at 2:21 AM, Mike Christensen wrote: > On Mon, Oct 18, 2010 at 2:07 AM, Dave Page wrote: >> On Sun, Oct 17, 2010 at 2:32 PM, Mike Christensen wrote: >>> Okay my required n00b question of the week, hopefully this'll be an easy >>> one.. >

Re: [GENERAL] Need some help setting up pgAgent

2010-10-18 Thread Mike Christensen
On Mon, Oct 18, 2010 at 2:34 AM, Dave Page wrote: > On Mon, Oct 18, 2010 at 10:31 AM, Mike Christensen wrote: >> Sorry, it looks like it defaulted to the wrong DB.  I created the >> schema in the "postgres" database and now I see a Jobs node.. > > :-) > >>

Re: [GENERAL] Need some help setting up pgAgent

2010-10-18 Thread Mike Christensen
On Mon, Oct 18, 2010 at 2:43 AM, Dave Page wrote: > On Mon, Oct 18, 2010 at 10:41 AM, Mike Christensen wrote: >> On Mon, Oct 18, 2010 at 2:34 AM, Dave Page wrote: >>> On Mon, Oct 18, 2010 at 10:31 AM, Mike Christensen >>> wrote: >>>> Sorry, it look

Re: [GENERAL] Need some help setting up pgAgent

2010-10-18 Thread Mike Christensen
On Mon, Oct 18, 2010 at 3:07 AM, Dave Page wrote: > On Mon, Oct 18, 2010 at 10:46 AM, Mike Christensen wrote: >> Okay I found one that I can use.. >> >> One question..  Should the connection string in the script have the >> password for "root" hard coded i

Re: [GENERAL] Need some help setting up pgAgent

2010-10-18 Thread Mike Christensen
On Mon, Oct 18, 2010 at 3:37 AM, Dave Page wrote: > On Mon, Oct 18, 2010 at 11:34 AM, Mike Christensen wrote: >> On Mon, Oct 18, 2010 at 3:07 AM, Dave Page wrote: >>> On Mon, Oct 18, 2010 at 10:46 AM, Mike Christensen >>> wrote: >>>> Okay I found one

Re: [GENERAL] Missing uuid_generate_v1()

2010-10-22 Thread Mike Christensen
. I think now it's legit now.. On Fri, Oct 22, 2010 at 7:00 PM, Alexia Lau wrote: > Does anyone know where I can see what’s already fixed at 9.0.2? > > Thanks, > > Alexia > > On 2010-10-07 09:54, Dave Page wrote: >> On Thu, Oct 7, 2010 at 3:56 AM, Tom Lane wrote: &

[GENERAL] Full text search in Chinese

2010-10-24 Thread Mike Chamberlain
-full-text-search-in-chinese-on-postgresql Thanks, Mike

[GENERAL] pgAdmin on Mac connecting to Postgres 9 on Linux - SSL/timeout issue

2010-10-29 Thread Mike Christensen
force quit.. Is there some sort of idle timeout setting on SSL connections, or maybe it has to re-negotiate the connection after a certain amount of idle time and it's not doing that right? Anyone run into this before? Thanks! Mike -- Sent via pgsql-general mailing list (pgsql-ge

Re: [GENERAL] pgAdmin on Mac connecting to Postgres 9 on Linux - SSL/timeout issue

2010-10-30 Thread Mike Christensen
Maybe that's it.. It's definitely some sort of SSL thing since it didn't start happening until I enabled SSL. I guess I'll just have to close pgAdmin when I'm not using it.. On Sat, Oct 30, 2010 at 12:57 AM, Basil Bourque wrote: > > On Oct 29, 2010, at 15:36,

Re: [GENERAL] large xml database

2010-10-30 Thread Mike Christensen
Gz. Maybe you can lease a bunch of Amazon EC2 high computing slices and parallelize it? I think throwing ridiculous amounts of hardware at things is always the best approach. On Sat, Oct 30, 2010 at 2:48 PM, Viktor Bojović wrote: > Hi, > i have very big XML documment which is larger tha

[GENERAL] Access postgresql data base from .net

2010-11-05 Thread mike stanton
a major rewrite of all the SQL ?. Obviously we may have problemas with differences between Sql-server and Postgresql syntax, but we don´t want to de a rewrite. Hope to hear soon, any help appreciated. Mike Stanton W. Santiago Chile __ Información de ESET NOD32 Antivirus, versión de la

Re: [GENERAL] Access postgresql data base from .net

2010-11-05 Thread mike stanton
Dann, perhaps the a better question would be.if we use, for example, npgsql, we'd have to adapt code and use the tools own calls. And that means rewriting. Is this true?. Cheers Mike - Original Message - From: Dann Corbit To: 'mike stanton' ; pgsql-general

Re: [GENERAL] What is Dialect

2010-11-22 Thread Mike Christensen
If I understand your question correctly, a Dialect is an abstraction layer that allows Hibernate to talk with different database backends (MySQL, PG, Oracle, SQLServer, etc). Since different databases have different syntaxes, various features, etc. This seems more of a Hibernate question though,

Re: [GENERAL] What is Dialect

2010-11-22 Thread Mike Christensen
On Mon, Nov 22, 2010 at 12:26 AM, Andreas wrote: > Am 22.11.2010 08:32, schrieb Adarsh Sharma: >> >> I am reading about Dialects of different databases. Yet I can't understand >> what is the need of dialect in Postgres or any other like Hibernate uses >> Dialect of all Databases for ORM. >> What i

Re: [GENERAL] json data type

2010-11-23 Thread Mike Christensen
uery for all rows with an X property of > 5 or something, eg {Y: 1, X: 6} Mike -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Type cast removal - proposed exceptions for xml,enum

2010-12-06 Thread Mike Christensen
On Mon, Dec 6, 2010 at 7:49 PM, Craig Ringer wrote: > Hi all > > I'm finding a few areas where PostgreSQL's refusal to implicitly cast > from 'text' to another type is causing real problems, particularly when > using the PgJDBC driver. I'd like to propose a couple of relaxations of > the implicit

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Mike Christensen
2011/1/5 Grzegorz Jaśkiewicz : > On Wed, Jan 5, 2011 at 2:37 PM, Scott Ribe > wrote: >> On Jan 5, 2011, at 1:31 AM, Radosław Smogura wrote: >> >>> * simple to generate, and 128bit random is almost globally unique, >> >> Almost? Should be totally unique, as long as your random source is decent >>

Re: [GENERAL] Installing Postgres with MS SQL Server 2005

2011-01-20 Thread Mike Christensen
> I have a machine on which MS SQL Server 2005 is already installed. Now I > want to install PostgreSQL 8.3 along with MS SQL Server. > > > > Can  this combination cause  any problems to any of the database servers? You should not run into any problems, both servers run on different ports (by defa

[GENERAL] Error trying to install Ruby postgres gems on OS/X

2011-01-28 Thread Mike Christensen
/Library/Ruby/Gems/1.8/gems/postgres-0.7.9.2008.01.28 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/postgres-0.7.9.2008.01.28/ext/gem_make.out I have Postgres 9.0 installed at /Library/PostgreSQL/9.0. Any ideas? Mike -- Sent via pgsql-general mailing list (pgsql-general@p

Re: [GENERAL] Error trying to install Ruby postgres gems on OS/X

2011-01-28 Thread Mike Christensen
le not created Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/postgres-0.7.9.2008.01.28 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/postgres-0.7.9.2008.01.28/ext/gem_make.out /Library/PostgreSQL/9.0> On Fri, Jan 28, 2011 at 5:46 PM, Thom Brown wrote: > On 2

Re: [GENERAL] Error trying to install Ruby postgres gems on OS/X

2011-01-28 Thread Mike Christensen
m just learning for now).. However, if anyone has any ideas how to install the native adapter, lemme know! On Fri, Jan 28, 2011 at 5:50 PM, Mike Christensen wrote: > Now I get: > > /Library/PostgreSQL/9.0>export ARCHFLAGS='-arch i386' > /Library/PostgreSQL/9.0>sudo -E

Re: [GENERAL] Error trying to install Ruby postgres gems on OS/X

2011-01-28 Thread Mike Christensen
> You might have to tell it where the PostgreSQL binaries live first then: > > export PATH=$PATH:/Library/PostgreSQL/9.0/bin Hey that seems to have fixed it! Thanks! Mike -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscript

[GENERAL] One last Ruby question for tonight - Regarding UUID type

2011-01-28 Thread Mike Christensen
My goal is to learn Ruby by porting one of my existing PG web applications over to Rails.. However, my existing data heavily relies on the UUID data type. I've noticed when I create a new model with something like: guidtest name:string value:uuid And then do a rake:migrate, the CREATE TABLE tha

Re: [GENERAL] One last Ruby question for tonight - Regarding UUID type

2011-01-28 Thread Mike Christensen
> My goal is to learn Ruby by porting one of my existing PG web > applications over to Rails..  However, my existing data heavily relies > on the UUID data type.  I've noticed when I create a new model with > something like: > > guidtest name:string value:uuid > > And then do a rake:migrate, the CR

[GENERAL] Permission denied error - best way to fix?

2011-02-08 Thread Mike Christensen
ssion (if possible, I don't want this user to be able to modify the schema).. Mike -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Permission denied error - best way to fix?

2011-02-08 Thread Mike Christensen
es the user need to be a superuser, or is there some way to GRANT >> this permission (if possible, I don't want this user to be able to >> modify the schema).. >> >> Mike >> > > pg_dump is an admin function so it will need to run as a role that can touch >

[GENERAL] Any feedback on this query?

2011-02-17 Thread Mike Christensen
rch criteria. Feedback on this approach? Mike -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Any feedback on this query?

2011-02-18 Thread Mike Christensen
On Fri, Feb 18, 2011 at 1:05 AM, Dean Rasheed wrote: > On 18 February 2011 07:19, Mike Christensen wrote: >> Here's my query: >> >> SELECT R.RecipeId, R.Title, R.Description, R.ImageUrl, R.Rating, >> R.PrepTime, R.CookTime, R.OwnerId, U.Alias >> FROM Recip

Re: [GENERAL] Explicit NULL for no INTEGER data? -- Update

2011-02-18 Thread Mike Christensen
Judging from: http://www.postgresql.org/docs/8.1/static/sql-copy.html It looks like you have to specify your own NULL string with the NULL AS parameter of the COPY command. On Fri, Feb 18, 2011 at 3:12 PM, Rich Shepard wrote: > On Fri, 18 Feb 2011, Rich Shepard wrote: > >> Do I need an explicit

Re: [GENERAL] Explicit NULL for no INTEGER data? -- Update

2011-02-18 Thread Mike Christensen
>> It looks like you have to specify your own NULL string with the NULL >> AS parameter of the COPY command. > > Mike, > >  I completely missed that option when I've read the copy page. My > apologies! > > Rich Awesome, I'm the one usually asking easy

Re: [GENERAL] Web Hosting

2011-03-05 Thread Mike Christensen
de using PG/PHP and I > have no intention of switching. > Thanks. Well there's this list: http://www.postgresql.org/support/professional_hosting Also, maybe something like Amazon EC2 if you want your own "box"? I think the small instances are even free.. Mike --

[GENERAL] pg_restore

2011-03-30 Thread Mike Orr
ata. The tables to be updated do have 1:many relationships. How would I restore all of them at once? List them all as '-t' args to the same pg_restore command? -- Mike Orr -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] pg_restore

2011-03-30 Thread Mike Orr
On Wed, Mar 30, 2011 at 2:36 PM, John R Pierce wrote: > On 03/30/11 1:56 PM, Mike Orr wrote: >> >> MySQL simply locks the tables, drops/recreates them, loads the data, >> and unlocks the tables. Other connections have to wait but they don't >> have to be closed

[GENERAL] Counting records in a child table

2011-03-31 Thread Mike Orr
want. I added the other group by fields because psql refused to run the query otherwise. -- Mike Orr -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Counting records in a child table

2011-03-31 Thread Mike Orr
-- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Mike Orr > Sent: Thursday, March 31, 2011 2:49 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] Counting records in a child table > > I know how to do count(*)/group by o

Re: [GENERAL] temp tables not dropping at end of script

2011-04-06 Thread Relyea, Mike
cripts. I took the easy way out and before creating each temp table, I added a DROP TABLE IF EXISTS statement. If the table doesn't exist, I get a warning but my script doesn't fail. Mike -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

Re: [GENERAL] pg_restore

2011-04-12 Thread Mike Orr
On Fri, Apr 1, 2011 at 2:39 PM, Merlin Moncure wrote: > On Wed, Mar 30, 2011 at 3:56 PM, Mike Orr wrote: >> I'm converting a MySQL webapp to PostgreSQL. I have a backup server >> which is refreshed twice daily with mysqldump/mysql and has a >> continuously-running cop

Re: [GENERAL] Adding a default value to a column after it exists

2011-04-13 Thread Mike Fowler
T DEFAULT expression; For full documentation see: http://www.postgresql.org/docs/9.0/static/sql-altertable.html Thanks for any help. Regards, -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] WARNING: database must be vacuumed within 8439472 transactions

2014-07-07 Thread Mike Christensen
Sounds like you just have to wait until it finishes.. On Mon, Jul 7, 2014 at 12:56 PM, Prabhjot Sheena < prabhjot.she...@rivalwatch.com> wrote: > Hello >We are using postgresql 8.3 database for last 5 yrs for this > production database and its running fine. This is our critical database

[GENERAL] Regular expression question with Postgres

2014-07-24 Thread Mike Christensen
I'm curious why this query returns 0: SELECT 'AAA' ~ '^A{,4}$' Yet, this query returns 1: SELECT 'AAA' ~ '^A{0,4}$' Is this a bug with the regular expression engine?

Re: [GENERAL] Regular expression question with Postgres

2014-07-24 Thread Mike Christensen
, David G Johnston < david.g.johns...@gmail.com> wrote: > Mike Christensen-2 wrote > > I'm curious why this query returns 0: > > > > SELECT 'AAA' ~ '^A{,4}$' > > > > Yet, this query returns 1: > > > > SELECT 'AAA'

Re: [GENERAL] Regular expression question with Postgres

2014-07-24 Thread Mike Christensen
Yea looks like Postgres has it right, well.. per POSIX standard anyway. JavaScript also has it right, as does Python and .NET. Ruby is just weird. On Thu, Jul 24, 2014 at 1:57 PM, Tom Lane wrote: > Mike Christensen writes: > > I'm curious why this query returns 0: > > S

[GENERAL] Any Postgres experts not afraid of the camera?

2014-09-03 Thread Mike Christensen
http://meta.stackoverflow.com/questions/270574/an-experiment-stack-overflow-tv?cb=1

[GENERAL] Estimating WAL usage during pg_basebackup

2014-10-30 Thread Mike Blackwell
I need to get an idea of how much WAL space will be required during a long (many hours) pg_basebackup over a relatively slow network connection. This is for a server that's not yet running PITR / streaming. Any thoughts? * *

[GENERAL] Vacuum freeze

2014-12-04 Thread Mike Blackwell
check_postgres.pl (--action=autovac_freeze) recently complained that we needed to run VACUUM FREEZE. Doing so generated a boatload of WAL files - perhaps on the order of the of the database itself. Is VACUUM FREEZE something that is normally handled by autovac? If so, how would we approach findi

[GENERAL] pl/pgsql trigger function - compare *most* columns in NEW vs. OLD

2014-12-18 Thread Mike Blackwell
Is there a simple notation for comparing most columns in the new and old records in a pl/pgsql trigger function? Something like (new.b, new.c, new.d) = (old.b, old.c, old.d) works to compare all the columns except 'a', but is fragile in that it needs to be updated any time a column is added to t

[GENERAL] Problem with constraint exclusion on partitions

2014-12-19 Thread Mike Pultz
ms (7 rows) The types match: cloud_test2=# select pg_typeof(now() - interval '24 hours'); pg_typeof -- timestamp with time zone Is there something I'm missing? Thanks! Mike

Re: [GENERAL] Problem with constraint exclusion on partitions

2014-12-19 Thread Mike Pultz
- pg_catalog | now | timestamp with time zone | | normal | invoker | stable | pgres | internal | now | current transaction time it's the timestamp at the start of the transaction- so the planner should have a set value for all rows. Am I mi

[GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Mike Cardwell
speed. I'm new to Postgres, and to this list, so if there is a better way for me to submit this suggestion or solve my problem, please point me in the right direction. [1] http://www.unicode.org/Public/UNIDATA/CaseFolding.txt Regards, -- Mike Cardwell https://grepular.com https://emailprivac

Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Mike Cardwell
as input, I would just do: WHERE lower(punycode_encode(hostname)) = lower(punycode_encode('any-representation')) There doesn't need to be any extra table storage for the punycode encoded version. -- Mike Cardwell https://grepular.com https://emailprivacytester.com OpenPGP Key35

Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Mike Cardwell
inal and creating an index on the punycode version. This is exactly the same method that we commonly use for performing case insensitive text searches using lower() indexes. -- Mike Cardwell https://grepular.com https://emailprivacytester.com OpenPGP Key35BC AF1D 3AA2 1F84 3DC3 B0CF 70A5 F5

Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Mike Cardwell
t; > I'm not for knowing the rules of punycode but I'm not seeing what value > lower() provides here... Case insensitive matching. So that "EXAMPLE.COM" = "example.com" -- Mike Cardwell https://grepular.com https://emailprivacytester.com OpenPGP Key

Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Mike Cardwell
possibly interesting for collaboration, let me know & I'll try > to put together the relevant people. Those functions would be very useful to me. I know a bit of C, but probably not enough to produce an acceptable patch. If there are people who would also find these functions useful, an

Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Mike Cardwell
> which are way more reliable? In that case, you do have a 1:1 lookup > and you shouldn't have a problem. I was unaware of the different versions of IDNA. I basically started using the Perl module IDNA::Punycode in my project and assumed that this was the only type. Seems like I need

<    1   2   3   4   5   6   7   8   9   10   >