Releases before 7.4 are spotty about supporting backwards scan of
complex queries --- if you have a join or aggregate in the query,
it likely won't work, yielding either strange errors or wrong answers.
It will work if the top plan node in the query is a SORT, though, so
a possible workaround is to
On Wed, 17 Sep 2003, tom baker wrote:
> i am (probably) shooting myself in the foot, but here goes the question.
>
> inside of a begin transaction/commit block, i am attempting to insert a record
> into a parts table, and then insert a record that references the part into an
> application table.
hello all
i am (probably) shooting myself in the foot, but here goes the question.
inside of a begin transaction/commit block, i am attempting to insert a record
into a parts table, and then insert a record that references the part into an
application table. and the transaction fails with this
[EMAIL PROTECTED] wrote:
Hi,
I have two databases with the same tables, one is my Real Database and the other is my
Log Database.
My Log database does NOT have any kind of keys (PRIMARY or FOREIGN).
I need to insert from my Real database to my Log database every row that is Updated or Deleted in
[EMAIL PROTECTED] (Miko O'Sullivan) writes:
> Unfortunately in the 7.2.x version I have available, EXECUTE does not
> allow "select into". The docs suggests a technique for using a FOR
> loop to extract information from an EXECUTE, but the technique only
> works for finite set of expected variable
Tomasz Myrta <[EMAIL PROTECTED]> writes:
> I wanted to use some select result several times in pl/pgsql function.
> Neither move backward 1 in test;
> nor
> execute ''move backward 1 in test'';
> doesn't work.
Releases before 7.4 are spotty about supporting backwards scan of
complex queri
Hi
I wanted to use some select result several times in pl/pgsql function.
DECLARE
test refcursor;
x record;
BEGIN
open test for select...
fetch test into x;
while found loop
...work...
fetch test into x;
end loop;
...rewind cursor using move...
fetch test...
Neither move backward 10
In our postgre database is a decimal field with format YYMMDDhhmmss.99
where the 9s are random digits. I'm trying to strip off just the
YYMMDD and put it in date form.
So far I came up with:
SUBSTR(TO_CHAR(rec_num,999),1,6) AS Date which returns YMMDD.
For example where the rec_num
Hi all,
Can any one give me a link/tutorial for using arrays in databases..I
need Queries to access the arrays as well...
Thanx in advance.
regards,
Jagdeesh.
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http
In our postgre database is a decimal field with format YYMMDDhhmmss.99
where the 9s are random digits. I'm trying to strip off just the
YYMMDD and put it in date form.
So far I came up with:
SUBSTR(TO_CHAR(rec_num,999),1,6) AS Date which returns YMMDD.
For example where the rec_n
I'm trying to set up a trigger that restricts when and how updates are
done to the records in a relation. However, when the administrator
accesses the relation, I want the restriction to be relaxed.
My approach was to have a view that is accessed by the normal users and
have the admin access t
[EMAIL PROTECTED] (Bruce Momjian) wrote in message news:<[EMAIL PROTECTED]>...
> Yes, see the FAQ. You have to use EXECUTE for temp table access in
> functions.
Unfortunately in the 7.2.x version I have available, EXECUTE does not
allow "select into". The docs suggests a technique for using a FO
Hi,
I have two databases with the same tables, one is my Real Database and the other is my
Log Database.
My Log database does NOT have any kind of keys (PRIMARY or FOREIGN).
I need to insert from my Real database to my Log database every row that is Updated or
Deleted in any Table of the Real d
On Wednesday 17 Sep 2003 13:50 in
<[EMAIL PROTECTED]>, wireless
([EMAIL PROTECTED]) wrote:
> For example where the rec_num is 30608124143.47069519725 the above
> functions return 30608.
Unless you are logging dates around 3 A.D., I suggest you add 2000 to the
number before you apply the TO_CHAR()
Tom and Richard,
I have successfully fixed this problem now thanks to your support! The
setting of LC_COLLATE to C prior to running initdb fixed all problems
finally once I had sorted out my error in passing the environment
variables correctly.
Thanx!
/Kristian
Kristian Jörg wrote:
Tom Lane wrote:
=?ISO-8859-1?Q?Kristian_J=F6rg?= <[EMAIL PROTECTED]> writes:
Unfortunately this does not seem to help! I dumped the database,
recreated the cluster with initdb with LC_COLLATE = C (and even tried
setting LC_CTYPE to C also), and restored the database. The same
=?ISO-8859-1?Q?Kristian_J=F6rg?= <[EMAIL PROTECTED]> writes:
> Unfortunately this does not seem to help! I dumped the database,
> recreated the cluster with initdb with LC_COLLATE = C (and even tried
> setting LC_CTYPE to C also), and restored the database. The same
> ordering appears...
You di
On Wednesday 17 September 2003 13:39, Kristian Jörg wrote:
> Kristian Jörg wrote:
> > Richard Huxton wrote:
> >>>
> >>>LUNDGREN
> >>>M L R
> >>>MACDOWELL
> >>>MUSCLE
> >>>
> >>>But in Postgres I get this order:
> >>>
> >>>LUNDGREN
> >>>MACDOWELL
> >>>M L R
> >>>MUSCLE
> >>
> Woops, a type above. M
Kristian Jörg wrote:
Richard Huxton wrote:
On Wednesday 17 September 2003 10:47, Kristian Jörg wrote:
Hello!
I am having troubles with sort order in Postgres. It seems that space is
not handled at all?
For instance the following rows are sorted in MS SQL Ser
Richard Huxton wrote:
On Wednesday 17 September 2003 10:47, Kristian Jörg wrote:
Hello!
I am having troubles with sort order in Postgres. It seems that space is
not handled at all?
For instance the following rows are sorted in MS SQL Server as:
LUNDGREN
M L R
MACDOWELL
MUSCLE
The reason why the first one
SELECT MAX(e.d), e.host_position FROM (SELECT host_position,
COUNT(host_position) as d FROM sss_host GROUP BY host_position) as e
GROUP BY e.host_position ORDER BY 1 LIMIT 1;
did not work is because the query needs a
ORDER BY 1 DESC LIMIT 1 like the second one.
Mind the
TIA people
Three related tables:
trans_core - transaction details
(trans_id, trans_owner, trans_date, trans_amount)
trans_src - funding source
(core_id, src_id, src_amount)
src_summary - summary of funding-source totals
(summary_date, summary_src, summary_amount)
The total tra
On Wednesday 17 September 2003 10:47, Kristian Jörg wrote:
> Hello!
>
> I am having troubles with sort order in Postgres. It seems that space is
> not handled at all?
> For instance the following rows are sorted in MS SQL Server as:
>
> LUNDGREN
> M L R
> MACDOWELL
> MUSCLE
>
> But in Postgres I ge
Thanks Haller, the second one worked thanks a million be blessed
Regards
+-+
| Martin W. Kuria (Mr.) [EMAIL PROTECTED]
++
From: Christoph Haller <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
CC:
Hello!
I am having troubles with sort order in Postgres. It seems that space is
not handled at all?
For instance the following rows are sorted in MS SQL Server as:
LUNDGREN
M L R
MACDOWELL
MUSCLE
But in Postgres I get this order:
LUNDGREN
MACDOWELL
M L R
MUSCLE
I seems that space is no consider
>
> > Hi I have this problem, when I try to run this query:
> >
> > SELECT MAX(d), host_position FROM (SELECT host_position,
> > COUNT(host_position) as d FROM sss_host GROUP BY host_position) as
e;
> >
> > am getting and ERROR: Attribute e.host_position must be GROUPed or
> used in
> > an aggregat
> Hi I have this problem, when I try to run this query:
>
> SELECT MAX(d), host_position FROM (SELECT host_position,
> COUNT(host_position) as d FROM sss_host GROUP BY host_position) as e;
>
> am getting and ERROR: Attribute e.host_position must be GROUPed or
used in
> an aggregate function.
>
> Pl
Hi I have this problem, when I try to run this query:
SELECT MAX(d), host_position FROM (SELECT host_position,
COUNT(host_position) as d FROM sss_host GROUP BY host_position) as e;
am getting and ERROR: Attribute e.host_position must be GROUPed or used in
an aggregate function.
Please to advic
Hi I have this problem, when I try to run this query:
SELECT MAX(d), host_position FROM (SELECT host_position,
COUNT(host_position) as d FROM sss_host GROUP BY host_position) as e;
am getting and ERROR: Attribute e.host_position must be GROUPed or used in
an aggregate function.
Please to advic
29 matches
Mail list logo