Re: [GENERAL] Postgresql, PSN hack and table limits

2011-05-01 Thread Greg Smith
On 05/01/2011 01:50 AM, Mark Morgan Lloyd wrote: Somebody is making a very specific claim that Postgres can support a limited number of rows Did you find this via http://www.reversecurity.com/2011/04/new-details-from-psn-hack.html ? That was the only Google-indexed source leading to it I fou

Re: [GENERAL] "IS LATER THAN" filter for date column

2011-05-01 Thread Scott Marlowe
On Sun, May 1, 2011 at 7:37 PM, gvim wrote: > I've been looking through the Date/Time functions and operators on the docs > and can't find anything obvious to do this simple task - filter a date > column for entries which are later than a specified date. select * from table where datecol > '2001-

Re: [GENERAL] "IS LATER THAN" filter for date column

2011-05-01 Thread Chris Ernst
On 05/01/2011 07:37 PM, gvim wrote: > I've been looking through the Date/Time functions and operators on the > docs and can't find anything obvious to do this simple task - filter a > date column for entries which are later than a specified date. > > gvim > Try "WHERE date > '2011-04-01'" replaci

[GENERAL] "IS LATER THAN" filter for date column

2011-05-01 Thread gvim
I've been looking through the Date/Time functions and operators on the docs and can't find anything obvious to do this simple task - filter a date column for entries which are later than a specified date. gvim -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make change

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-01 Thread Scott Marlowe
On Thu, Apr 28, 2011 at 3:07 PM, Karsten Hilbert wrote: > I must agree with a recent poster > that what appears to identify as a natural key often really > isn't or else becomes not so later on. It's vastly easier to > then deal with that by re-defining constraints without > having to touch prima

[GENERAL] Help with database recovery ...

2011-05-01 Thread Iztok Stotl
My database crashed and server won't start ... -- LOG: database system was interrupted while in recovery at 2011-05-01 19:31:37 CEST HINT: This probably means that some data is corrupted and you will have to use the last backup for recovery. LO

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-01 Thread Karsten Hilbert
On Fri, Apr 29, 2011 at 10:14:07AM -0500, Merlin Moncure wrote: > I took a quick look at the gnumed schema and found it to be generally > very thorough and excellent. If you're going to use surrogate keys, > that's they way to do it. Good to know since I'm only a lowly medical doctor not having

Re: [GENERAL] Postgresql, PSN hack and table limits

2011-05-01 Thread Mark Morgan Lloyd
Tom Lane wrote: Jasen Betts writes: On 2011-05-01, Mark Morgan Lloyd wrote: Somebody is making a very specific claim that Postgres can support a limited number of rows: "INPS (a data forensics team) said that there is 7 main Databases all hosted at different data centers but linked over a

Re: [GENERAL] Values larger than 1/3 of a buffer page cannot be indexed (hstore)

2011-05-01 Thread Tom Lane
Stefan Keller writes: > I'm doing an equality search with success with the '->' operator on > the same field 'tags' like in this query (1): > -- Count all restaurants in database ("amenity = restaurant''): > select count(*) from osm_all_v > where hstore(tags)->'amenity'='restaurant' > This query

Re: [GENERAL] Postgresql, PSN hack and table limits

2011-05-01 Thread Tom Lane
Jasen Betts writes: > On 2011-05-01, Mark Morgan Lloyd > wrote: >> Somebody is making a very specific claim that Postgres can support a >> limited number of rows: >> >> "INPS (a data forensics team) said that there is 7 main Databases all >> hosted at different data centers but linked over a

Re: [GENERAL] Values larger than 1/3 of a buffer page cannot be indexed (hstore)

2011-05-01 Thread Stefan Keller
Hi Tom, Thanks for the hint! I'm actually doing a GROUP BY with an inquality search (HAVING...) and still get long lasting queries, see query (2) below. I'm doing an equality search with success with the '->' operator on the same field 'tags' like in this query (1): -- Count all restaurants in

Re: [GENERAL] Short-circuit boolean evaluation

2011-05-01 Thread Jasen Betts
On 2011-04-30, Jon Smark wrote: > Hi, > > Does Postgresql perform short-circuit boolean evaluation both in SQL > and PL/pgSQL functions? sometimes. the planner will rearrange what you write, for this reason it is very likely that > SELECT count(*) FROM foobar WHERE foobar.id = $1 AND do_s

Re: [GENERAL] Postgresql, PSN hack and table limits

2011-05-01 Thread Jasen Betts
On 2011-05-01, Mark Morgan Lloyd wrote: > Somebody is making a very specific claim that Postgres can support a > limited number of rows: > > "INPS (a data forensics team) said that there is 7 main Databases all > hosted at different data centers but linked over a type of 'cloud' Each > database

Re: [GENERAL] "OLD." || myColumnNameVar (How to generically access columns in a trigger's OLD or NEW records)

2011-05-01 Thread Basil Bourque
Hoorah! I was able to complete my single PL/pgSQL function to create history records tracking individual field value changes generically for all my tables. Some developers call this an "audit trail", though an accountant might say otherwise. Thanks for all the replies. Special thanks to John

Re: [GENERAL] Postgresql, PSN hack and table limits

2011-05-01 Thread Mark Morgan Lloyd
Magnus Hagander wrote: On Sun, May 1, 2011 at 07:50, Mark Morgan Lloyd wrote: Somebody is making a very specific claim that Postgres can support a limited number of rows: "INPS (a data forensics team) said that there is 7 main Databases all hosted at different data centers but linked over a ty

Re: [GENERAL] Postgresql, PSN hack and table limits

2011-05-01 Thread John R Pierce
On 04/30/11 10:50 PM, Mark Morgan Lloyd wrote: Somebody is making a very specific claim that Postgres can support a limited number of rows: "INPS (a data forensics team) said that there is 7 main Databases all hosted at different data centers but linked over a type of 'cloud' Each database us

Re: [GENERAL] Postgresql, PSN hack and table limits

2011-05-01 Thread Magnus Hagander
On Sun, May 1, 2011 at 07:50, Mark Morgan Lloyd wrote: > Somebody is making a very specific claim that Postgres can support a limited > number of rows: > > "INPS (a data forensics team) said that there is 7 main Databases all hosted > at different data centers but linked over a type of 'cloud' Eac

Re: [GENERAL] histogram

2011-05-01 Thread Thomas Markus
hi, group by 1 means group by first output column order by 2 means order by second output column ascending Am 30.04.2011 19:00, schrieb Joel Reymont: What is the meaning of group by 1 order by 2 e.g. what to the numbers 1 and 2 stand for? What would change if I do the follo

Re: [GENERAL] "OLD." || myColumnNameVar (How to generically access columns in a trigger's OLD or NEW records)

2011-05-01 Thread Sim Zacks
On 04/28/2011 10:46 PM, Basil Bourque wrote: In PL/pgSQL, how does one generically access the fields of the OLD or NEW record? I've tried code such as this: 'NEW.' || quote_ident( myColumnNameVar ) || '::varchar' But when run by an "EXECUTE" command, I get errors such as: ERROR: missin