Re: [GENERAL] how to delay sync by a set time, hour or day?

2014-11-19 Thread John Smith
On 11/19/14, Michael Paquier wrote: > On Wed, Nov 19, 2014 at 8:37 AM, John Smith wrote: >> >> i want to setup a standby slave that listens 24/7 but only syncs when told >> to. >> >> setting "pause_at_recovery_target (boolean)" in recovery.conf on s

[GENERAL] how to delay sync by a set time, hour or day?

2014-11-18 Thread John Smith
i want to setup a standby slave that listens 24/7 but only syncs when told to. setting "pause_at_recovery_target (boolean)" in recovery.conf on slave doesn't help since docs say it only "specifies whether recovery should pause when the recovery target is reached." also "recovery_target = 'immedia

[GENERAL] is there a warm standby sync trigger?

2014-10-23 Thread John Smith
i want to setup a warm standby that listens 24/7 but only syncs when told to (ie only when i am ok with the database updates, will i trigger the sync). can i? i don't want to manually backup and restore like i do now. thks, jzs -- Sent via pgsql-general mailing list (pgsql-general@postgresql.

Re: [GENERAL] tsearch2: how to plainto_tsquery() with "|"

2014-03-25 Thread John Smith
...to_tsquery('...')" and inserting operators outside tsearch2. thks, jzs http://postgresql.1045698.n5.nabble.com/OR-tsquery-td1910087.html On 3/25/14, Tom Lane wrote: > John Smith writes: >> i can run "...@@ to_tsquery('cat | dog')". >> but if

[GENERAL] tsearch2: how to plainto_tsquery() with "|"

2014-03-25 Thread John Smith
i can run "...@@ to_tsquery('cat | dog')". but if i run "...@@ to_tsquery('cat dog')", it gives me a syntax error (#42601). so i run "...@@ plainto_tsquery('cat dog')". but then i can't run "...@@ plainto_tsquery('cat | dog')". can you help before i give up on tsearch2? thks, jzs http://postg

Re: [GENERAL] sum from table 1, where from table 2

2014-02-23 Thread John Smith
it works (diego != deigo). thanks, jzs -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] sum from table 1, where from table 2

2014-02-23 Thread John Smith
i have two tables, like so: 1. create table public.vote ( sn integer primary key, total integer, cityvarchar(24) ); sn | total | city 1 | 11| new york 2 | 27| los angeles 3 | 58| san diego 2. create tabl

Re: [GENERAL] dynamic table names

2013-07-17 Thread John Smith
david, you're right. i didn't realize it had to be executed inside a function so now i'm trying this: -- create function create or replace function get_tables(sname varchar) returns record as $$ select tablename from pg_tables where schemaname = $1; $$ language 'plpgsql'; -- query tables wher

[GENERAL] dynamic table names

2013-07-17 Thread John Smith
guys, have to use legacy 8.1. i have 100,000 tables in a schema that need to be queried (optimizing this by combining them into one will have to wait). so my query goes like so: > execute 'select * from ' || tabname::regclass || ' where firstname = "john"' into e; but i am getting an error: >

Re: [GENERAL] update ... set ... subquery

2010-03-17 Thread John Smith
| 133 | matt so basically trying to get "number" from "b" to "a" where their "name"s match. also "... number in (...) ..." throws error (syntax error at or near "in"). thks, jzs On Wed, Mar 17, 2010 at 3:52 PM, Szymon Guz wro

[GENERAL] update ... set ... subquery

2010-03-17 Thread John Smith
guys, trying multiple updates without success like so: update a set number = any ( select number from b where a.number=b.number) where number is null; >> 'syntax error at or near "any"' subquery returns more than one row. using 8.1. thks, jzs -- Sent via pgsql-general mailing li

Re: [GENERAL] slow, long-running 'commit prepared'

2008-12-01 Thread John Smith
constant in the number of row locks held, and linear in the number of table locks held. Is there any state in that file that grows linearly with the size of the data touched in the transaction? On Wed, Nov 26, 2008 at 5:52 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "John Smith" <[EM

Re: [GENERAL] slow, long-running 'commit prepared'

2008-11-25 Thread John Smith
gt; A > -- > Andrew Sullivan > ajs(at)crankycanuck(dot)ca > > > > On Tue, Nov 25, 2008 at 7:17 PM, John Smith <[EMAIL PROTECTED]> wrote: > > I have a pg instance with 700GB of data, almost all of which is in one > > table. When I PREPARE and then COMMIT PRE

[GENERAL] slow, long-running 'commit prepared'

2008-11-25 Thread John Smith
I have a pg instance with 700GB of data, almost all of which is in one table. When I PREPARE and then COMMIT PREPARED a transaction that reads & writes to a large fraction of that data (about 10%, effectively randomly chosen rows and so every file in the table is modified), the COMMIT PREPARED some

Re: [GENERAL] Backup/Restore of single table in multi TB database

2008-05-07 Thread John Smith
41 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > "John Smith" <[EMAIL PROTECTED]> writes: > > After reading the documentation, it seems like the following might > > work. Suppose the database has two tables foo and bar, and we're only > > interested i

[GENERAL] Backup/Restore of single table in multi TB database

2008-05-07 Thread John Smith
Hi, I have a large database (multiple TBs) where I'd like to be able to do a backup/restore of just a particular table (call it foo). Because the database is large, the time for a full backup would be prohibitive. Also, whatever backup mechanism we do use needs to keep the system online (i.e., u

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-21 Thread John Smith
On Fri, Mar 21, 2008 at 4:24 PM, Andrej Ricnik-Bay <[EMAIL PROTECTED]> wrote: > On 22/03/2008, John Smith <[EMAIL PROTECTED]> wrote: > > > > please don't cross-post my cross-post. if i wanted to post it to the > > > > postgresql list, i would hav

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-21 Thread John Smith
On Fri, Mar 21, 2008 at 10:17 AM, Colin Wetherbee <[EMAIL PROTECTED]> wrote: > John Smith wrote: > > On Thu, Mar 20, 2008 at 2:16 PM, Colin Wetherbee > > <[EMAIL PROTECTED]> wrote: > >> Please don't cross-post, especially since nobody on the PostGIS

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-21 Thread John Smith
On Thu, Mar 20, 2008 at 2:16 PM, Colin Wetherbee <[EMAIL PROTECTED]> wrote: > John Smith wrote: > > guys, > > Please don't cross-post, especially since nobody on the PostGIS mailing > list answered your previous question. On Thu, Mar 20, 2008 at 6:45 PM, Colin Wether

[GENERAL] [postgis-users] how many min. floating-points?

2008-03-20 Thread John Smith
guys, how many min. floating-points must a server hardware support for postgresql+postgis? does postgresql+postgis do much floating-point math to make a difference? can someone give postgresql+postgis application examples that will require high floating-points? thks, jzs -- Sent via pgsql-general

Re: [GENERAL][UMN_MAPSERVER-USERS] query postgres AND oracle

2008-02-02 Thread John Smith
thanks. thought dbi-link could only connect across postgres databases, didn't realize it can connect postgres AND oracle. will look into it. jzs On 1/31/08, Chander Ganesan <[EMAIL PROTECTED]> wrote: > > John Smith wrote: > guys, > i got geometry in postgres, some othe

[GENERAL][UMN_MAPSERVER-USERS] query postgres AND oracle

2008-01-31 Thread John Smith
guys, i got geometry in postgres, some other data in oracle. is it possible to filter postgres geometry based on oracle data (without using services)? cheers, jzs ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] external editor for psql

2007-11-06 Thread John Smith
http://www.nabble.com/need-good-editor-for-postgreSQL-tf3660882.html#a10229560 how do u get gvim (portable?) to do syntax color highlighting for sql/plpgsql on files in buffer?? you're right- notepad is not enough (and pgedit is not free). cheers, jzs ---(end of broadcast

Re: [GENERAL] access privileges: grant select on (all current and future tables)?

2007-09-28 Thread John Smith
On 9/27/07, John Smith <[EMAIL PROTECTED]> wrote: > On 9/27/07, John Smith <[EMAIL PROTECTED]> wrote: > > how'd i "grant select on (all current and future tables inside a > > private schema) to username" without turning that user into superuser? > >

Re: [GENERAL] access privileges: grant select on (all current and future tables)?

2007-09-27 Thread John Smith
On 9/27/07, John Smith <[EMAIL PROTECTED]> wrote: > how'd i "grant select on (all current and future tables inside a > private schema) to username" without turning that user into superuser? > "grant usage on..." doesn't do it. > > or do i, ev

[GENERAL] access privileges: grant select on (all current and future tables)?

2007-09-27 Thread John Smith
how'd i "grant select on (all current and future tables inside a private schema) to username" without turning that user into superuser? "grant usage on..." doesn't do it. or do i, everytime i batch/auto create the tables, do a "grant select on (new table) to username"? http://www.postgresql.org/d

Re: [GENERAL] decode access privileges

2007-09-26 Thread John Smith
On 9/26/07, Michael Glaesemann <[EMAIL PROTECTED]> wrote: > > On Sep 26, 2007, at 14:51 , John Smith wrote: > > > what does this mean? > > > > {postgres=arwdRxt/postgres,username=r/postgres} > > http://www.postgresql.org/docs/8.2/interactive/sql-grant.ht

[GENERAL] decode access privileges

2007-09-26 Thread John Smith
what does this mean? {postgres=arwdRxt/postgres,username=r/postgres} cheers, jzs ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your

[GENERAL] track row / field usage

2007-08-07 Thread John Smith
guys, i want to track just how many times a particular row, field or contained value gets queried / fetched? i guess a trigger like so would do the trick: on query, update value in column even a log and then parsing it would help. but is there a cooler way- some built-in stats counter? just trying

Re: [GENERAL] postgresql and solaris 10: pitch to sysadmins

2007-06-19 Thread John Smith
ely inexpensive with an 8 hour course costing higher than 100.00 but less than 500.00 ..." what all does solaris 10 support cover? jzs On 6/18/07, John Smith <[EMAIL PROTECTED]> wrote: guys need to pitch postgresql to some hard-to-budge solaris sysadmins- they don't even know abo

[GENERAL] postgresql and solaris 10: pitch to sysadmins

2007-06-18 Thread John Smith
guys need to pitch postgresql to some hard-to-budge solaris sysadmins- they don't even know about the postgresql-solaris 10 package, just used to oracle and don't want to break their backs over postgresql. plus i don't know enough slony yet. can someone point me to some standard backup/restore et

Re: [GENERAL] PHP sucks!! - was: persistent db connections in PHP

2007-06-17 Thread John Smith
On 6/17/07, Tom Allison <[EMAIL PROTECTED]> wrote: Perl has a high entry barrier. yeah right ;). perl is time-tested better for sys admin than the web. and we all know how sys admins want to use the same code for the web but it doesn't cut right. *if anything* php is 'enhanced perl' for the w

Re: [GENERAL] PHP sucks!! - was: persistent db connections in PHP

2007-06-16 Thread John Smith
On 6/16/07, Uwe C. Schroeder <[EMAIL PROTECTED]> wrote: Mhhh - what does PHP have to do with Postgresql? Lots of pages just end in .php, which is why the google results are so high - guess what, the tool "html" hits 3.2 billion :-) show me a database that doesn't respect html and i'll show you o

Re: [GENERAL] PHP sucks!! - was: persistent db connections in PHP

2007-06-16 Thread John Smith
and that's not how it is?? ever tried ubuntu and saw how it looks a bit like windows thesedays?? good luck but try getting funding/acceptance with this line "i wanna design a new tool but i don't want features from that other tool that work in the market" let's stop blaming php if you don't know

Re: [GENERAL] PHP sucks!! - was: persistent db connections in PHP

2007-06-16 Thread John Smith
guys, love both tools but php @ 2.5 *billion* google results is far more popular than postgresql @ 25 million google results. *if* somebody's gotto adapt it's not php. php does what it does best in a way that stuffy academics don't get. On 6/16/07, PFC <[EMAIL PROTECTED]> wrote: "PHP: very loose

[GENERAL] copy or create table for data logging?

2007-04-24 Thread John Smith
guys, i want to log some data everyday. for this i can do 1 of 2 things: 1) i can create an empty 'template' table and copy it everyday before data logging including defaults. # including constraints (thanks greg) doesn't work but more on that later. helps- i avoid spending more time on lengthy

[GENERAL] who uses tsearch2

2007-03-01 Thread John Smith
guys, need to pitch tsearch2+postgresql- need some big names who use ts2? jzs ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread John Smith
sql. jzs On 2/22/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote: John Smith wrote: > On 2/21/07, Lincoln Yeoh wrote: >> MySQL: the PHP of databases. > > 'd appreciate if you stick to the subject. Oops he probably should not have used MySQL because it is trademarked... mysql: The PHP of databases ;) Sincerely, Joshua D. Drake > jzs

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread John Smith
On 2/21/07, Lincoln Yeoh wrote: MySQL: the PHP of databases. 'd appreciate if you stick to the subject. jzs ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PR

[GENERAL] sequence increment jumps?

2007-01-25 Thread John Smith
guys, i inserted 1 record into my database (default nextval('sequencename'::regclass) where (start 1 increment 1)). then i tried to insert 1 other record twice but both those inserts failed because of a domain check ("ERROR: value too long for type character varying(X)". when i was finally able to

[GENERAL] column insert/alter got me stumped!

2007-01-24 Thread John Smith
guys, just wanna change value of 1 existing column # insert into tablename (columnname) values ('value'); ...works # select columnname from tablename where columnname='value'; ...works # insert into tablename (columnname) values ('value') select columnname from tablename where columnname='value

[GENERAL] tsearch2 headline() query subselect help

2007-01-10 Thread John Smith
guys, how'd i make this query work? select headline(select column_1 from table_1 where to_tsvector(column_1) @@ to_tsquery('ftp'),'ftp'::tsquery); ERROR: syntax error at or near "select" at character 17 when i break it, it works fine, like so # select he

Re: [GENERAL] ECPG and Curors.

2006-06-13 Thread John Smith
On Mon, Jun 12, 2006 at 11:14:24PM -0400, Peter L. Berghold wrote: > what I don't see is how to detect that I've fetched the last row from a > query. Is there more complete doco on this process somewhere? You could either handle a NOT FOUND exception, or make use of SQLCODE or SQLSTATE like thi

Re: [GENERAL] ECPG Segfaulting on EXEC SQL connect

2005-01-01 Thread John Smith
t: 01 January 2005 15:08 To: John Smith Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] ECPG Segfaulting on EXEC SQL connect On Tue, Dec 28, 2004 at 10:16:04PM -0000, John Smith wrote: > I'm trying to convert a series of C programs written originally using > Informix ESQL to us

[GENERAL] ECPG Segfaulting on EXEC SQL connect

2004-12-30 Thread John Smith
Hello,   I'm trying to convert a series of C programs written originally using Informix ESQL to use Postgres' ECPG.   All of my test programs written from scratch seem to work ok, and I can now precompile, compile and link without error, but when I actually run the program, I get a segfault