In article <4cba2bc4.9030...@darrenduncan.net>,
Darren Duncan writes:
> I would further recommend turning the above into a separate data type,
> especially if you'd otherwise be using that constraint in several
> places, like this ...
FWIW, the shatypes contrib package includes a binary md5 data
On 16 October 2010 21:13, Vince Carney wrote:
> Is it possible to do an if/else statement inside acos() to account for a > 1
> or < -1. I can't seem to get if/else working in postgres?
>
Try to stay on-list, so that others can benefit from the discussion.
Yes you could use CASE..WHEN, but that w
Hello again,
I have 1 more question please:
how do you select the "x" and "y" parts of a point data type?
Can't find it in
http://www.postgresql.org/docs/8.4/interactive/functions-geometry.html
For example, I have this table with a "pos" column:
snake=> \d gps
Table "public.g
Alexander Farber writes:
> how do you select the "x" and "y" parts of a point data type?
pointval[0] and pointval[1] --- this is mentioned somewhere in the fine
print in the "geometric functions and operators" page, IIRC.
regards, tom lane
--
Sent via pgsql-general mail
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 stored sproc
(sorry, function) I need to run nightly and I think spending hours
figuring out pgAgent would somehow be better than the 3 minutes it
would take to add
Yup - after hunting around a bit I realized MSYS was missing, so I
installed it.
Good news: I now have a Bash interface and ./configure ran successfully
Bad news: Now the install process bombs out when I attempt to "make"
(it gets Error 1 and Error 2 and backs out of the /c/program
files/postg
Alexander Farber wrote:
Hello, really good advices here! But -
On Sun, Oct 17, 2010 at 2:37 AM, Rob Sargent wrote:
I just read the "anonymously" part, so I take it you have ruled out
recording the given coordinate components directly, in multiple columns
presumably? Otherwise it seems yo
Thanks to those who replied to my post.
I tried that and works a treat!
Regards.
John
==
On Sat, 2010-16-10 at 17:18 +0100, Raymond O'Donnell wrote:
> On 15/10/2010 22:12, John Iliffe wrote:
> > Does anyone have a way to run pg_dump from cron
On Fri, Oct 08, 2010 at 12:12:54PM +0200, Wolfgang Keller wrote:
> I'm working on a database schema which contains lots of
> "type code lookup" tables. The entries of these tables are
> also hierarchically related among themselves
> (subtype/supertype), to store rather large and quite complex
> ta
Turner, John J wrote:
> Bad news: Now the install process bombs out when I attempt to "make"
> (it gets Error 1 and Error 2 and backs out of the /c/program
> files/postgresql-9.0.0/src directory)
FWIW, it works for me. "Error X" being too little to guess anything, maybe
you should paste
Bad news: Now the install process bombs out when I attempt to "make"
(it gets Error 1 and Error 2 and backs out of the /c/program
files/postgresql-9.0.0/src directory)
This is the full log of what happens when I run make:
$ make
make -C src all
make[1]: Entering directory
Is there a way to select the top 10% of the values from a column?
For example the top 10% best selling items where number of sales is a column.
Thanks.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/
Tim Uckun wrote:
Is there a way to select the top 10% of the values from a column?
For example the top 10% best selling items where number of sales is a column.
The top 10% would be a variable number of records. Is that what you want, or
would you rather, say, just see the top N items?
The
Thank you all for your comments and suggestions!
~kj
On 18 October 2010 00:33, Tim Uckun wrote:
> Is there a way to select the top 10% of the values from a column?
>
> For example the top 10% best selling items where number of sales is a column.
>
That is a bit problematic because it necessitates knowing the number
of rows total, and slow counting
On Mon, Oct 18, 2010 at 12:53 PM, Darren Duncan wrote:
> Tim Uckun wrote:
>>
>> Is there a way to select the top 10% of the values from a column?
>>
>> For example the top 10% best selling items where number of sales is a
>> column.
>
> The top 10% would be a variable number of records. Is that w
> That is a bit problematic because it necessitates knowing the number
> of rows total, and slow counting is an idiosyncrasy of postgres.
>
> http://wiki.postgresql.org/wiki/Slow_Counting
>
> To get the top 10%:
>
> SELECT * FROM table LIMIT(SELECT (COUNT(*) * 0.1)::integer FROM table)
I think I
On 10/18/2010 06:18 AM, Turner, John J wrote:
../../src/include/c.h:284:2: #error must have a working 64-bit
integer datatype
There's your problem. "configure" didn't detect support for 64-bit
integers in your compiler, causing the build to fail at:
00276 #ifndef HAVE_INT64
0
On 10/18/2010 08:06 AM, Tim Uckun wrote:
That is a bit problematic because it necessitates knowing the number
of rows total, and slow counting is an idiosyncrasy of postgres.
http://wiki.postgresql.org/wiki/Slow_Counting
To get the top 10%:
SELECT * FROM table LIMIT(SELECT (COUNT(*) * 0.1)::in
>
> OK, so you want a median-style "sort them in descending order and count down
> until you've selected the first 10% of rows" approach? In other words,
> values in the 90th percentile of the distribution?
>
> Try this. Given table "x" with single integer column "y", obtain rows of x
> in the 90th
Turner, John J wrote:
I'm reluctant at this point to wipe out my MinGW and MSYS and start from
scratch with Windows SDK and/or VS-ee...
Well, you should probably get over that, because all of the official
builds of 9.0 don't really care about supporting MinGW anymore. See
http://www.postg
Something like this should work - (but is untested), and does require the extra
subquery, so there may be a more efficient way?
However, off the top of my head:
select a,b,c
from table
where
order by c desc
limit (select count(*)/10 from table where );
where c is the no of sales column
B
Hi there,
The problem is, i call a stored function with 'plpy.execute()', and there
may be error thrown out from the callee function. I want to get the error
message.
I try to put plpy.execute into a python try-except, but i doesn't work.
Anyone has an idea?
Explanation about the context:
crea
On 10/18/2010 11:28 AM, Turner, John J wrote:
.. I thought it was worth a shot to try building from source with
MinGW/MSYS to get the pgxs files... but apparently not -- especially
since I'm on Windows XP 32-bit platform (hence the issue with 64-bit
datatypes bombing out during make, I presume)
Hmmm.. seems like I'm in a dandy of a catch-22
On an earlier post
(http://archives.postgresql.org/pgsql-general/2010-09/msg01043.php) I
was inquiring about trying to add in Jeff Davis' temporal extension
package available from pgFoundry.
Based on the facts that:
1) the temporal package installs
Greg Smith writes:
> Well, you should probably get over that, because all of the official
> builds of 9.0 don't really care about supporting MinGW anymore. See
> http://www.postgresql.org/docs/9.0/interactive/install-windows.html for
> notes on this. I wouldn't be surprised to find the capabi
I am using Postgresql 8.1.
I need to know which query are executing seq_scan on tables as statistics
said there were 4 seq_scan on the tables for the last 2 days.
Any idea please.
On 10/18/2010 12:29 PM, Turner, John J wrote:
Craig, thanks for having a go at it - and thanks for all the help thus
far!
OK. According to your config.log, configure tests "long int" and
determines it's only 32 bits, so tries "long long int" and determines
that it's 64 bits wide. So there is
On Fri, 15 Oct 2010 17:12:50 -0400, John Iliffe
wrote:
> Does anyone have a way to run pg_dump from cron in a way that doesn't
> require someone to enter the password on every run? I get the following
> error even when the backup user has read permissions on all application
> databases.
You ca
29 matches
Mail list logo