2010/3/25 Louis-David Mitterrand :
> On Sat, Mar 06, 2010 at 04:31:55PM -0500, Tom Lane wrote:
>> Petru Ghita writes:
>> > "..immediately replaced with the function value" doesn't mean that the
>> > results of a previously evaluated function for the same parameters are
>> > stored and reused?
>>
>
On Thu, Mar 25, 2010 at 08:27:27AM +0100, Pavel Stehule wrote:
> 2010/3/25 Louis-David Mitterrand :
> > On Sat, Mar 06, 2010 at 04:31:55PM -0500, Tom Lane wrote:
> >> Petru Ghita writes:
> >> > "..immediately replaced with the function value" doesn't mean that the
> >> > results of a previously ev
Hello,
is there any standard function, or a concise solution based on set of
them, returning a set of dates included in a week of given year and
week number?
I ended up with creating my own function as in the example below, but I
am curious if I am not opening an open door.
Thanks
Irek.
C
On 25 March 2010 12:25, Ireneusz Pluta wrote:
> Hello,
>
> is there any standard function, or a concise solution based on set of them,
> returning a set of dates included in a week of given year and week number?
> I ended up with creating my own function as in the example below, but I am
> curious
Hi,
Any way to get transaction count from the postgres daemon or any log?
Also where can I find docs that can help me make a capacity plan for max
100,000 clients making around 200 transactions a day each.
--
Regards.
David Harel,
==
Home office +972 77 76
Louis-David Mitterrand writes:
> Hmm, that's interesting. So for simple functions (like my example) it is
> better to write them in plain sql? And in that case no 'immutable' flag
> is necessary?
If it's just a simple SQL expression, then yes write it as a SQL
function. The planner can "inline"
On Thursday 25. March 2010 16.16.53 Leif Biberg Kristensen wrote:
> I'm struggling with how to make plpgsql iterate through a list of numbers
> input as a text string, eg. "1438 2656 973 4208". I figure that I can use the
> regexp_split_to_array() function to make an array of the string, but can
On Thu, Mar 25, 2010 at 2:35 PM, Tom Lane wrote:
> When you're intending to have a SQL function be inlined, it's probably
> best not to mark it as either IMMUTABLE or STRICT --- that doesn't buy
> anything and it can complicate matters as to whether inlining is legal.
I'm confused, I thought it w
I'm struggling with how to make plpgsql iterate through a list of numbers
input as a text string, eg. "1438 2656 973 4208". I figure that I can use the
regexp_split_to_array() function to make an array of the string, but can I
iterate through an array with eg. a FOR loop?
regards,
--
Leif Bibe
2010/3/25 Louis-David Mitterrand :
> On Thu, Mar 25, 2010 at 08:27:27AM +0100, Pavel Stehule wrote:
>> 2010/3/25 Louis-David Mitterrand :
>> > On Sat, Mar 06, 2010 at 04:31:55PM -0500, Tom Lane wrote:
>> >> Petru Ghita writes:
>> >> > "..immediately replaced with the function value" doesn't mean t
Greg Stark writes:
> On Thu, Mar 25, 2010 at 2:35 PM, Tom Lane wrote:
>> When you're intending to have a SQL function be inlined, it's probably
>> best not to mark it as either IMMUTABLE or STRICT --- that doesn't buy
>> anything and it can complicate matters as to whether inlining is legal.
> I
Hi,
I want to find out the userid, nodecount and comment count of the userid.
I'm going wrong somewhere.
Check my SQL Code-
select u.uid, count(n.nid) nc , count(c.cid) cc from users u left join
node n on ( n.uid = u.uid ) left join comments c on ( c.uid = u.uid )
group by u.uid having u.uid
[I mistakenly used the wrong Subject line initially with this post]
In going through the arcana of string functions, I have come across the
following series of selects that contain, for me, a mysterious "$re$".
-- return all matches from regexp
SELECT regexp_matches('
foobarbequebaz', $re$(bar)(b
Thanks very much for this. I am using 8.4.2.
This query works as you describe in pgAdmin.
I had tried it in the SquirrelSQL client, which is where it produced the
result.
Obviously, this is a SquirrelSQL problem at least in part.
What does mean?
Thanks again for directing me to the doc's
Hi John,
The type code 2003 indicates an SQL99 column type of ARRAY, which is
not currently supported for rendering/editing. Here is the feature
request for SQuirreL SQL Client to track this feature:
https://sourceforge.net/tracker/?func=detail&aid=2972937&group_id=28383&atid=393417
Rob
On Wed
Hello
I'm using PostgreSQL (8.4.701) and Java (jdbc,
postgresql-8.4-701.jdbc4.jar) to connect to the database.
My question is: what is the SQL syntax for PostgreSQL to achieve the
following:
I want to receive the rowcount along with the rest of a result set. For
example, let's say the following
Snyder, James wrote on 25.03.2010 22:33:
I’m using PostgreSQL (8.4.701)
There is no such version.
The current version is 8.4.3
On a side note, Oracle allows the following syntax to achieve the above:
select count(*) over () as ROWCOUNT , first_name from people
The same syntax will work on
Hi,
Is this what you are trying to do?
postgres=# select * from (select count(*) from people ) p, (select
firstname from people)p2;
count | firstname
---+---
5 | Mary
5 | Mary
5 | John
5 | John
5 | Jacob
(5 rows)
I do not know about the performance impact of s
Hi,
I don't think so.
Oracle -
SQL> select count(*) over () as ROWCOUNT , first_name from people;
ROWCOUNT FIRST_NAME
--
-
---
6 Mary
6 Mary
6 John
6 John
In response to Jayadevan M :
> Hi,
> I don't think so.
> Oracle -
> SQL> select count(*) over () as ROWCOUNT , first_name from people;
>
> ROWCOUNT FIRST_NAME
> --
> -
> ---
> 6 Mary
In response to Nilesh Govindarajan :
> Hi,
>
> I want to find out the userid, nodecount and comment count of the userid.
>
> I'm going wrong somewhere.
>
> Check my SQL Code-
Check my example:
test=*# select * from u;
id
1
2
3
(3 rows)
test=*# select * from n;
uid
-
1
1
Hi,
>It works, but you should use a recent version:
>test=*# select count(1) over (), i from foo;
> count | i
>---+
> 8 | 1
> 8 | 2
> 8 | 3
> 8 | 6
> 8 | 7
> 8 | 9
> 8 | 13
> 8 | 14
>(8 rows)
> test=*# select version();
>
22 matches
Mail list logo