On 5/28/2013 11:04 AM, Torsten Grust wrote:
On 25 May 2013, at 9:19, Bill MacArthur wrote (with possible deletions):
[...]
select * from test;
id | rspid | nspid | cid | iac | newp | oldp | ppv | tppv
+---+---+-+-+--+--+-+-
1 | 2 | 3
On 5/25/2013 7:57 AM, Marc Mamin wrote:
Von: pgsql-sql-ow...@postgresql.org [pgsql-sql-ow...@postgresql.org]" im
Auftrag von "Bill MacArthur [webmas...@dhs-club.com]
Gesendet: Samstag, 25. Mai 2013 09:19
An: pgsql-sql@postgresql.org
Bet
xperimented with doing the aggregates as a CTE and then joining that to
various incarnations of DISTINCT and DISTINCT ON, but those do not do what I
want. Trying to find the right combination of terms to get an answer from
Google has been unfruitful.
Any ideas?
Thank you for your considerati
, Thanks for all the great advice!
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]
Sent: Monday, April 18, 2005 8:00 PM
To: Rod Taylor
Cc: Bill Lawrence; Scott Marlowe; PFC; pgsql-sql@postgresql.org
Subject: Re: [SQL] Getting the output of a function used in a where clause
Thanks,
Unfortunately, I think that solution requires the distance calculation to be
executed twice for each record in the table. There are ~70K records in the
table. Is the postgres query optimizer smart enough to only perform the
calculation once?
Bill
-Original Message-
From: Scott
Thanks a bunch!
Looks pretty step-by-step at the site for the link you sent. I'll give it a
shot and see how it turns out.
Thanks again for all your help!
Bill
-Original Message-
From: PFC [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 12, 2005 1:03 AM
To: Bill Lawrence
Subjec
Boy I sure thought that would work... I received the following from postgres:
ERROR: Attribute "distance" not found.
Started looking into gist Looks complex.
Any other ideas?
-Original Message-
From: PFC [mailto:[EMAIL PROTECTED]
Sent: Monday, April 11, 2005 1:51 A
ing like: $sql = “SELECT zipcode, distance from zipcodes where distance <= $dist order by distance;”; But I don’t the magic SQL phrase to populate the distance variable using my nifty function. Do I need to create an output type for distance? Thanks in advance! Bill
like Oracle, MySQL, DB2, and SQL Server.
Thanks
Bill Kotraba
LogiXML
> On Wed, Mar 10, 2004 at 02:17:31PM +0800, [EMAIL PROTECTED] wrote:
> >
> > i'm using PostgreSQL as my database and now i'm looking for a good
> > reporting tools(can do ad-hoc queries &
Josh Berkus wrote:
Bill,
I don't understand at all. If I do "SELECT * FROM
set_returning_function()" and all I'm going to do is iterate through the
columns and rows, adding them to a two dimensional array that will be
marshalled as a SOAP message, what about not knowing the
Josh Berkus wrote:
Bill,
First off: discussion moved to the SQL list, where it really belongs.
True, it started out as [PERFORM], but is no longer.
Well, I would have agreed with the uselessness, until this project. The
"source of endless debugging" frightens me!
Well, the last time
Thanks for the response. I'll look into re-running the ddl using the bytea
datatype the next time I perform the setup I'm using. (I used a Sybase SQL
Anywhere db in the meantime to get me back on track with the task at hand).
Thanks again,
Bill
"Richard Huxton" <[EMA
Anybody know what the Postgresql equivalent to a Sybase varbinary data type
is? I have a package that provides ddl to store a 40 byte/char? varbinary
column in a table and it is failing against postrgresql.
Thanks for any help and if more info is need to answer, please let me know.
Bill
It's good to hear this kind of discussion going on!
I solved my problem (for now) by creating a bunch of
overloaded LEAST and GREATEST functions, one for each
datatype. They only take two parameters, but that's
fine for what we're doing.
However, I ran into another, unrelated problem. I
created
> Um, what's wrong with MAX and MIN, exactly?
MIN and MAX are aggregate functions, LEAST and
GREATEST are not. See the examples on the following
table:
foo
A B
- -
1 4
2 3
3 2
> SELECT LEAST(a, b), GREATEST(a, b) FROM foo;
LEAST(a, b) GREATEST(a, b)
--- --
1 4
2
Hi,
I know the LEAST and GREATEST functions are not part
of standard SQL, but they sure were handy where I came
from (Oracle-land).
Has anyone written user-defined functions that do the
same thing?
Are there any plans to add these functions as part of
a future version Postgres?
Thanks,
-Stefan
Hello all,
Is it possible to define a function to pass parameter like this?
function( parameter )
but not
function( 'parameter' )
Regards
Bill
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.post
to write a function that pass
the parameter like the DataDiff function, I mean:
DataDiff( Year, date1, date2)
but not
DataDiff( 'Year', date1, date2)
Is it possible to doing this? Define a enum data type?
Thanks
Bill
---(end of
IsNull work like this
SELECT IsNull( user_name, '') FROM user ;
then the query will return empty string when the field user_name is null
Regards
Bill
> > Hello all,
> >
> > I am a newbie to postgreSQL, is it possible to write a "DateDiff",
> > &
Hello all,
I am a newbie to postgreSQL, is it possible to write a "DateDiff",
"IsNull" function work same as the one in SQL Server and are there and
sample out there? And is it possible to override the existing function and
operator like "+" to b
Markus Wagner wrote:
>
> Hi Daniel,
>
> thank you for your reply.
>
> There are some unanswered questions.
> Why does one have to consider multiple run levels? Doesn't run level 3
> (network + X) implicate run level 2 (network)?
> So if I don't use XDM (or equivalent) and the system starts with
Hello! wers regarding a book proposal on
Regarding the book proposal on Postgres: I can tell you that the world
needs a Postgres book!
Specifically, I would like to see the following topics covered:
- table-inheritance: what does it mean, how does it work, examples
- regular expressions in que
n two tables (where one table may have no matching rows) via a
single sorted query?
Thanks!
Bill
23 matches
Mail list logo