Joe Conway <[EMAIL PROTECTED]> writes:
> Not possible in current releases, but it will be in 7.4 (about to start beta).
> It looks like this:
Well there is the int_array_aggregate function in the contrib/intagg
directory. It has to be compiled separately, and it has a few quirks (like the
arrays
How to convert charter varying type to integer while retrieving
the value using ITL tag [query]?!
___
Click below to experience Sooraj R Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek
& Kareena http://www.mpkdh.com
this must be a problem with my sql, but this one has me stumped. the column:
Debit."cumm_dbt_blnce" - Credit."cumm_crd_blnce" in the long sql statement
below comes out as the literal: Debit."cumm_dbt_blnce" -
Credit."cumm_crd_blnce" rather than as the calculated value. WHY!?!?!
this works with s
The primary problem was that the update command doesn't modify rows in the
order u want to do it.
I think the update starts with the latest inserted rows. I guess.
Anyway, in real life this update modifies only one row with a value wich is
diff of null.
It was really handy if it was specified the
Hi,
I have a table containing a double precision column. That column
contains at least one judiciously placed NaN.
I'd expect the aggregate function min() to return the minimum, valid
numeric value. Instead, it seems to return the minimum value from the
subset of rows following the 'NaN'.
Wh
How do i can convert character varying type to integer
___
Click below to experience Sooraj R Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek
& Kareena http://www.mpkdh.com
---(end of broadcast
I am use PostgreSQL 7.2.1 in Redhat Linux 7.2
Java 1.4.x
When I do JDBC
String sql = "SELECT datetime_column FROM mytable";
Timestamp ts = resultSet.getTimestamp(2);
If the timestamp return format like
2003-07-15 13:20:00.20+00
then is OK. But if timestamp return like
2003-07-15 13:20:00.
Hello,
I am having difficulty setting an on update rule which seems to be
caught in a recursive loop.
Context is a table with three columns assigning users to groups with the
third column being boolean to flag the primary group. I would like to
set an update rule to enforce one primary group.
Thx a lot, I know now that it is possible to do that with pure sql.
Have you the alogorythm, because your link is dead ?
Ben
Rajesh Kumar Mallah a écrit:
Dear Bournon,
There are already good implementation of Tree
structures in databases ranging from using pure SQL
to PostgreSQL spe
Hello,
I am having strange behavior when I try to do an insert. Postgres tells
me that it cannot insert a duplicate key into a primary key index, when
I am not trying to insert into it. Can anyone shed light on why this is
happen, or point out the error of my ways?
Here are the details:
wormbas
These are my PostgreSQL tables:
pid | name
1 | A
2 | B
3 | C
4 | D
5 | E
tid | pid 1 | pid 2 | pid 3
1 | 1| 2| 3
Bascially, I would like to write a query to list only
the names which their "pid" match those pids in the
other table. If anyone knows, pls help!!
On Thu, 10 Jul 2003, Vijay Kumar wrote:
> Hi,
> We are using postgresql 7.3.3, we are encountering the following problems when we
> used temporary tables.
>
> Here with i'm sending my Sample function.
>
> create or replace function TestTemp_refcur(refcursor) returns refcursor As '
> declare
> re
On Thu, Jul 17, 2003 at 12:56:52PM +0100, Gary Stainburn wrote:
>
> nymr=# \d lnumbers
>Table "lnumbers"
> Column | Type | Modifiers
> ---+---+---
> lnid | integer | not null
> lnumber | character varyi
Hi there,
Would it be possible to implement some kind of cascading truncate?
As far as I understand, the "no truncate if table is referenced" change was
introduced to ensure database integrity. However, if the referencing table
is truncated, too, there should be no problems as far as foreign k
Hello
How access to especific array component
of an function with return type _varchar
declaration of my function:
>>> create or replace __function( int2, int2 ) returns _varchar
now use the function in SQL and access to the element 1...
>>> select __function(10::int2, 20::int2)[1]
I want to get a set of values returned from a
function. The values (there will need to be four of them) come
from 4 separate SELECT statements inside the Function. For example SELECT
one INTO variable1 from table1 where ... then SELECT two INTO
variable2 from table1 where... At first
i was wrong. it doesn't work as a prepared statement nor as a dynamic string
using jdbc.
it works fine if i paste it into psql.
is it possible that a problem with a calculated column and a subselect in
conjunction is a jdbc bug?
Regards,
Floyd Shackelford
4 Peaks Technology Group, Inc.
VOICE:
when i copy/paste the select stmt into psql, it works. or if i use it
"dynamically". it doesn't work properly when i use it in a prepared
statement -- which is what i am doing.
Regards,
Floyd Shackelford
4 Peaks Technology Group, Inc.
VOICE: 334.735.9428
FAX: 702.995.6462
EMAIL: [EMAIL PROTEC
Look at the following two queries.
select casepid, origpid
from virbcase
where date_trunc('day', origdt) >= '2003-07-01'
and date_trunc('day', origdt) <= '2003-07-31'
and origpid in (select pid from party where partyid in ('00339',
'00310',
'00320'))
and not exists (select pid from casecombo wher
I see connect by in Oracle
??? it is equivalent in PostgreSQL or not ??
Rajesh Kumar Mallah a écrit:
Dear Bournon,
There are already good implementation of Tree
structures in databases ranging from using pure SQL
to PostgreSQL specfic methods , less point in
revinting wheel unless u r
Can you query a set of nested entries to simulate a heirarchial system with a
single query?
I'm building a nested category table with a definition like below"
CREATE TABLE category (
id serial,
parent integer not null,
title varchar);
Idea is that we can "nest" categories so that we have
Floyd,
I would recommend turning sql statement tracing on in the database to
see the exact sql text that the driver is sending to the database (in
case it is somehow munging it). Then take that exact same text (as
found in the server log files) and run it in psql to see how it works there.
--
Josh Berkus wrote:
Terence,
Oh well, can't win them all :/
Nope. I'll suggest that for the TODO list ... we already have several
requests for added features for PL/pgSQL. The problem is that we currently
don't have a lead developer for PL/pgSQL, so the language has rather
stagnated.
Well
Cristian Cappo wrote:
>>> select __function(10::int2, 20::int2)[1]
^^^ parsing error.
Try:
create or replace function foo(int2, int2 ) returns _varchar as '
select ''{1,2}''::_varchar
' language 'sql';
regression=# select (foo(10::int2, 20::int2))[1];
foo
-
1
(1 row)
Hi all;
I found an unexpected behavior while trying to write a function to allow
users to change their own passwords. The function is as follows:
CREATE OR REPLACE FUNCTION change_password(VARCHAR)
RETURNS BOOL AS '
DECLARE
username VARCHAR;
CMD VARCHAR;
password ALIAS FOR $1;
BEGIN
Warren Little <[EMAIL PROTECTED]> writes:
> Look at the following two queries.
> ...
> and not exists (select pid from casecombo where casepid = secondpid)
> ...
> and casepid not in (select secondpid from casecombo)
> The second query is broken and I don't understand why.
I'll bet there are some
<[EMAIL PROTECTED]> writes:
> when i copy/paste the select stmt into psql, it works. or if i use it
> "dynamically". it doesn't work properly when i use it in a prepared
> statement -- which is what i am doing.
Could we see a self-contained example of the problem? It's hard to tell
whether you ar
"Michael S. Tibbetts" <[EMAIL PROTECTED]> writes:
> I'd expect the aggregate function min() to return the minimum, valid
> numeric value. Instead, it seems to return the minimum value from the
> subset of rows following the 'NaN'.
Not real surprising given than min() is implemented with float8s
On Sun, 20 Jul 2003, Tom Lane wrote:
> "Michael S. Tibbetts" <[EMAIL PROTECTED]> writes:
> > I'd expect the aggregate function min() to return the minimum, valid
> > numeric value. Instead, it seems to return the minimum value from the
> > subset of rows following the 'NaN'.
>
> Not real surprisi
On Thu, 17 Jul 2003, Derrick Betts wrote:
> I want to get a set of values returned from a function. The values
> (there will need to be four of them) come from 4 separate SELECT
> statements inside the Function. For example SELECT one INTO variable1
> from table1 where ... then SELECT two INTO
Hi Chris,
You want to use "session_user".
I would expect this to change the password of the user currently
logged in but instead it changes MY password. Evidently when a
function is called which is set to SECURITY DEFINER, it changes the
context of the current user. The CURRENT_USER then ret
On 15 Jul 2003, Lauren Matheson wrote:
> Hello,
>
> I am having difficulty setting an on update rule which seems to be
> caught in a recursive loop.
>
> Context is a table with three columns assigning users to groups with the
> third column being boolean to flag the primary group. I would like to
On Tue, 15 Jul 2003, Michael S. Tibbetts wrote:
> Hi,
>
> I have a table containing a double precision column. That column
> contains at least one judiciously placed NaN.
>
> I'd expect the aggregate function min() to return the minimum, valid
> numeric value. Instead, it seems to return the min
33 matches
Mail list logo