that such record variable can created ?
Andrus.
CREATE DOMAIN tebool AS bool DEFAULT false NOT NULL;
create temp table test ( test tebool ) on commit drop ;
CREATE OR REPLACE FUNCTION test()
RETURNS numeric AS $$
DECLARE
r_test test;
begin
return 0;
end; $$ lan
turns null value.
I also tried to cast result to tebool
select test1.test::tebool from test left join test1 on false;
and
select null::ebool
This returns also null. So Postgres allows null values in this type instance.
There are no problems.
Andrus.
--
Sent via pgsql-general mailing l
nd finish or is postgres hanging ?
- Currently it is running 15 hours. How many hours it takes to finish ?
How to speed up this query ?
Using
PostgreSQL 9.0.1, compiled by Visual C++ build 1500, 64-bit
Windows 2003 x64 server with 4 GB RAM.
Posted also in
http://stackoverflow.com/
and
drops this user in all cases without dropping data ?
Or maybe there is some command or simpler commands in postgres ?
Using Postgres 9.1+
Posted also in
http://stackoverflow.com/questions/32988702/how-to-drop-user-in-all-cases-in-postgres
Andrus.
r who invokes this command if this helps.
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
;
-- Restrict some tables:
revoke all on kasutaja,kaspriv,logifail from vantaa cascade;
grant select on kaspriv,kasutaja to vantaa;
grant update (eesnimi, nimi,email,amet,islocked,telefon,language,vabakuup)
on kasutaja to vantaa;
grant insert on logifail to vantaa;
Andrus.
--
Sent via pgsql-general
privileges for schema public
So even superuser cannot delete.
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
, vantaa and farukkugan delete script causes error which I
described. For farukkugan it occurs also if running under superuser.
So it looks like it should be possible for non-superusers also.
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to
user farukkugay ;
but got error
ERROR: role "farukkugay" cannot be dropped because some objects depend on it
SQL state: 2BP01
Detail: privileges for schema public
How to to delete user ?
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to yo
mydb using script below but still got error
ERROR: role "vantaa" cannot be dropped because some objects depend on it
DETAIL: privileges for database mydb
How to drop role?
Andrus.
set local role admin; -- admin is not superuser but is member of
mydb_owner
CREATE ROLE vantaa;
grant
"PostgreSQL 9.4.4, compiled by Visual C++ build 1800, 32-bit" it works.
It looks like in 9.1 reassign owned should replaced with revoke commands.
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www
ndToEndId/text()',
x,nsa))::text AS orderinr
FROM t;
Parsing can done in other ways e.q. using xslt stylesheet for tranformation
or in client side ASP.NET 4.6 MVC if this is more reasonable.
Posted also in
http://stackoverflow.com/questions/3739/how-to-parse-xml-with-optional
Hi!
Thank you.
In "PostgreSQL 9.1.2 on x86_64-unknown-linux-gnu, compiled by gcc-4.4.real
(Debian 4.4.5-8) 4.4.5, 64-bit"
it returns two empty rows. How to make it work in this version ?
In "PostgreSQL 9.5.2, compiled by Visual C++ build 1800, 32-bit" it works.
And
AS tasusumma
,
unnest(xpath('/ns:Document/ns:BkToCstmrStmt/ns:Stmt/ns:Ntry/ns:NtryDtls/ns:TxDtls/ns:Refs/ns:EndToEndId/text()',
x,nsa))::text AS orderinr
FROM t;
should produce
endaaatasusumma orderinr
XX00221059842412 150.00 PV04131
XX00221059842412 0.38 null
Andrus.
, x,nsa))[1]::text::numeric AS tasusumma,
(xpath('ns:NtryDtls/ns:TxDtls/ns:Refs/ns:EndToEndId/text()',
x,nsa))[1] AS orderinr
FROM (
SELECT
unnest(xpath('/ns:Document/ns:BkToCstmrStmt/ns:Stmt/ns:Ntry',
x,nsa)) as x, nsa, x as xo
FROM t
) Ntry
This references
Posted also in
http://stackoverflow.com/questions/37231624/how-to-use-table-row-values-as-function-parameters
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
nsert into ko values ('G');
WITH func_cte AS (
SELECT crtKAIVE(ko.doktyyp)
FROM ko
)
SELECT (crtKAIVE).*
FROM func_cte;
but got strange error
ERROR: syntax error at or near ""
LINE 18: )
How to fix ?
Andrus.
my case koosseis.ametikoht column does not contain null values.
Si I fixed this in WHERE clause
WHERE (iandmed.ametikoht is not null or koosseis.ametikoht is not null)
I hope this produces same result in my case.
Andrus.
---(end of broadcast
laps(date '2007-01-01',date '2007-01-02',date '2007-01-02',date
'2007-01-04');
returns FALSE
When first period end and second period start dates are the the same,
doverlaps() must return TRUE.
Andrus.
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
I need to disable rows with overlapping dates in 8.1+
I created the following trigger procedure for this.
Is this best way ?
Will it prevent overlapping rows in all cases ?
Andrus.
create table puhkus (reanr serial primary key, palgus date, plopp date);
CREATE OR REPLACE FUNCTION
month versions for numeric and
bigint month counts with a body that casts the months value to integer
and calls the gomonth(date, integer) version.
I really want to write only single function version.
Andrus.
---(end of broadcast)---
TIP 6: ex
"Rodrigo De León" <[EMAIL PROTECTED]> kirjutas sõnumis
news:[EMAIL PROTECTED]
> On May 26, 5:58 pm, "Andrus" <[EMAIL PROTECTED]> wrote:
>> Thank you.
>> This doc says that dropping trigger drops depending objects also.
>
> Only if you use CASC
fined trigger so that they are also
dropped ?
Andrus.
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
CREATE TRIGGER mycheck_trigger BEFORE INSERT OR UPDATE ON mytbl
FOR EACH ROW EXECUTE PROCEDURE mycheck_pkey();
aborts transaction if trigger already exists.
There in no CREATE OR REPLACE TRIGGER command in PostgreSQL
How to create trigger only when it does not exist ?
Andrus
re only integer data, without decimal
points.
Can you give example how numeric(2) -> integer conversion can lose data,
please.
Andrus.
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
t;
" -> Seq Scan on dok (cost=0.00..7373.63 rows=55963 width=4)"
Andrus.
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly
connections which can ran two child processes can use 100% of cpu
but I have no generic idea how to split database loading and foreign key
creation into two connections.
Andrus.
---(end of broadcast)---
TIP 1: if posting/reading through Usen
my script in today night to get complete timing.
Any idea how to increase speed ?
Andrus.
49,4500 Duration 1,4167 minutes: UPDATE dok SET krdokumnr=NULL WHERE
krDokumnr is NOT null AND doktyyp NOT IN ('G','O')
52,3167 Duration 2,8667 minutes:
UPDATE dok SET krdokumnr=NULL WHERE
;
"-> Materialize (cost=20569.69..21403.32 rows=55963 width=4)"
" -> Unique (cost=0.00..20239.73 rows=55963 width=4)"
"-> Index Scan using dok_dokumnr_idx on dok
(cost=0.00..20099.82 rows=55963 width=4)"
Andrus.
---
and problem
description.)
Erwin,
thank you.
This index was duplicated.
I changed my script not to create this index.
However this should not affect to speed a much since this index is created
after data is loaded to table.
Andrus.
---(end of broadcast
ULL;
DELETE FROM rid USING mydel WHERE rid.dokumnr =mydel.dokumnr;
drop table mydel;
and this runs 1 seconds intead for 2.2 hours.
Thank you very much.
This works!
It's sad that PostgreSQL cannot optimize this delete statement
automatically.
Andrus.
---
Seq Scan on dok (cost=0.00..7373.63 rows=55963 width=4)
(actual time=40.236..3353.985 rows=56079 loops=1)"
"Total runtime: 7269944.251 ms"
As I understand this took 2.2 hours to run
Andrus.
---(end of broadcast)---
TIP 6: explain analyze is your friend
ok d (cost=0.00..6785.01 rows=56101 width=4)
(actual time=0.021..147.805 rows=56079 loops=1)"
"Total runtime: 2521.091 ms"
Andrus.
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
akes 1 sec and from script 11 minues I
do'nt think this is hardware related.
If that does not solve your problem, post your setup or your script -
whichever you suspect to be the problem
The script which creates 800 MB database is big.
I can create this script but is anybody interested
ok d USING (dokumnr)
WHERE d.dokumnr IS NULL
returs the same time from script and when returned separately in small
database.
Andrus.
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
I think that this cannot slow down SELECT command speed.
Do you have work_mem set the same in both cases?
Yes. I have same database server and same database.
Andrus.
---(end of broadcast)---
TIP 6: explain analyze is your friend
PostgreSQL runs commands
create table test ( test integer primary key );
create index i1 on test(test);
create index i2 on test(test);
without any error.
Now there are 3 same indexes on table.
How to fix this so that duplicate indexes are not allowed ?
Andrus
=111.296..111.296 rows=56079
loops=1)
6 -> Seq Scan on dok d (cost=0.00..6784.64
rows=56064 width=4) (actual time=0.005..58.686
rows=56079 loops=1)
7 Total runtime: 761.311 ms
Since there are a lot of rows (202424 swown), this select command must use
indexes.
Without indexes it is not possible toobtain speed of 0.7 seconds.
Andrus.
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
ter in Windows in compressed format ?
Andrus.
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
re running CREATE LANGUAGE ?
Andrus.
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
If index
CREATE UNIQUE INDEX toode_toode_unique_pattern_idx
ON firma1.toode
USING btree
(lower(toode::text) text_pattern_ops);
is dropped, this error does not occur.
---(end of broadcast)---
TIP 4: Have you searched our list archives?
This error occurs only when lowercase character ä is used.
Other accented characters does not cause the error.
Andrus.
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
SELECT * FROM firma1.toode WHERE toode LIKE 'ä%'
causes error:
ERROR: invalid memory alloc request size 2147483648
SQL state: XX000
How to fix ?
Andrus.
toode column type is char(20) and it is primary key.
toode table has index:
CREATE UNIQUE INDEX toode_toode_unique_patte
NIQUE INDEX toode_toode_unique_pattern_idx1
ON firma1.toode
USING btree
(upper(toode::text) text_pattern_ops);
and using
SELECT * FROM firma1.toode WHERE upper(toode) LIKE 'Ä%'
Will this work OK ?
Andrus.
---(end of broadcast)---
9352 kB 18 MB
pg_shdepend_depender_index 7344 kB 7344 kB
pg_shdepend_reference_index 1312 kB 1312 kB
pg_depend_depender_index1040 kB 1040 kB
Is it normal that pg_shdepend is so big ?
Andrus.
---(end
I have W2K server, relatively small database containing all required indexes
and need to sum only few records.
My query takes 26 seconds to run.
How to fix this ?
Andrus.
explain analyze select sum(taitmata) as ukogus
from rid join dok using (dokumnr)
where toode='NE TR'
a
Use
www.fyireporting.com
Open source, uses excellent PostgreSQL npgsql drivers.
Use standard RDL format
Andrus.
"Geoffrey" <[EMAIL PROTECTED]> kirjutas sõnumis
news:[EMAIL PROTECTED]
> We are looking for a reporting tool that will enable users to generate
> their o
returned successfully with no result in 158187 ms.
I installed Postgres using standard msi file.
postgresql.conf contains
autovacuum = on # enable autovacuum subprocess?
However, log files does not show any autovacuum messages.
So I expect that autovacuum in not running.
Any idea why autovacuum is not running ?
Andrus.
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
x Cond: (toode = 'NE TR'::bpchar)"
"-> Hash (cost=365.33..365.33 rows=3128 width=4) (actual
time=0.104..0.104 rows=7 loops=1)"
" -> Index Scan using dok_tasudok_unique_idx on dok
(cost=0.00..365.33 rows=3128 width=4) (actual time=0.058..0.0
o write those messages to log file ?
Should I configure ODBC driver, Postgres or change my application ?
Andrus.
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
> That's not pollution; it's telling you you need to fix your
> application to escape the backslashes differently.
I havent seen that ODBC specification requires escaping strings.
So this is task of ODBC driver.
Andrus.
---(
ains index
CREATE UNIQUE INDEX dok_tasudok_unique_idx ON dok (doktyyp,tasudok)
WHERE doktyyp IN ( 'T', 'U') ;
explain analyze shows that this index is used.
It is interesting how this index can be used to optimize
WHERE dok.doktyyp='U'
clause.
Andrus.
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
> Apart from that: there was a bug in the ODBC driver prior 08.02.0402 which
> resulted in this error message whenever binary data of type
> SQL_LONGVARBINARY
> was send.
Where is 0402 driver ?
Last downloadable version in 0400 which has this issue.
Andrus.
---
I'm looking for a report generator which renders reports in server and sends
rendering result
to client.
any idea ?
Andrus.
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-n
> "Render" as in "run the report program on the host"?
Yes.
Many reports shows only summary data in reports.
If such report is created in server, it runs fast.
If such report is created in client, it need to retrieve a lot of data and
is very slow.
Andrus.
---
?
Is there any roadmap for future, OpenRpt is not updated almost a year ?
Andrus.
"Ned Lilly" <[EMAIL PROTECTED]> kirjutas sõnumis
news:[EMAIL PROTECTED]
> Try OpenRPT - server side rendering engine, and client-side GUI designer.
>
> http://sourceforge.net/projects/
> I guess I should have noted that we will need to run this on Linux
> clients.
Geoffrey,
You can run FYIReporting engine in Linux using MONO ( www.go-mono.com )
Andrus.
---(end of broadcast)---
TIP 1: if posting/reading through
When user login has disabled by
CREATE USER NOLOGIN
Postgres 8.2 returns "Password authentication failure" error message on
login.
This is very confusing to users.
How to force Postgres to return message like in Windows:
Login is disabled.
this is so big ?
Andrus.
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly
I found that
SELECT * FROM foo
ORDER BY bar
OFFSET n
LIMIT m
and
SELECT * FROM foo
ORDER BY bar
LIMIT m
OFFSET n
produce always same results.
Why ?
OFFSET and LIMIT operations are NOT commutative in general.
Andrus.
---(end of broadcast
ibes only single order.
Actually Postgres allows order of OFFSET / LIMIT clauses swapped without any
error.
Why Postgres does not throw error when SELECT ... LIMIT ... OFFSET is used ?
That's not sql and should cause error.
Andrus.
---(end of broadcast)--
d depend on the order of OFFSET and LIMIT clauses are
present in SELECT clause.
SELECT ... OFFSET n LIMIT m
SELECT ... LIMIT m OFFSET n
should return different results in sime cases.
Filtering and ordering are effectively orthogonal. LIMIT and OFFSET are
clearly *not* orthogonal.
Otherwise I see
ons are legal.
What I'm doing wrong ?
Why error message does not show exact information about error ?
Andrus.
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
ated conf file.
If I remove # sign in front of last line (line 482), and reload
configuration, I got syntax error
in log file.
Is this Postgres bug ?
Andrus.
# -
# PostgreSQL configuration file
# -
#
# This file consists of lines of
(cost=0.00..4286.20 rows=1998 width=4) (actual time=0.057..6.779 rows=3543
loops=1)"
" Index Cond: ((kuupaev >= '2007-11-01'::date) AND
(kuupaev <= '2007-12-04'::date))"
" -> Hash (cost=2.27..2.27 rows=27 width=19) (a
or
ERROR: functions in index expression must be marked IMMUTABLE
SQL state: 42P17
How to create such index ?
Andrus.
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if you
result, you're query is liable
> to give you outright incorrect results.
My fields are kuupaev date and kellaaeg char(5)
kellaaeg is in format hh mm
I compare this always with kuupaev||kellaaeg
'2007-12-0423 59' is my valid datetime for to be used for th
in form hh mm
This schema is deployed in a large number of servers.
Its change would be very expensive. change requires huge amout of work time
to re-write applications, create database conversion scripts, re-write
pl/sql triggers, test and fix new bugs causes by change.
Andrus.
CREAT
running ?
Andrus.
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
running analyze manually query runs a lot faster.
So I think that autovacuum is not runnning in server.
Why ?
How to make it to run ?
How to check is autovacuum running or not ?
Andrus.
"PostgreSQL 8.2.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2
(mingw-special)"
o re-qrite
the driver.
Query looks quite resonable to me and should be accepted by PostgreSQL 8.3
Beta.
Andrus.
---(end of broadcast)---
TIP 6: explain analyze is your friend
matching item.
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
ocess? 'on'
2. Wizards adds values without units. It is difficult to figure out how much
memory changed settings really take.
How to force tuning wizard to add changes in real units if server supports
them, e.q. with KB or MB suffixes like in normal postgresql.conf file?
Andrus.
reSQL\9.0\bin
15.11.2009 16:37 200_704 ssleay32.dll
15.11.2009 16:37 1_017_344 libeay32.dll
How to update them so that they match with linux server ?
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
I tried
SELECT (SHOW server_version) AS Contents
but got
ERROR: syntax error at or near "server_version" at character 14
how to get server version inside select statement ?
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your su
pg_migrator and clones existing database or
other idea ?
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
ert into test values('fe80::f1ea:f3f4:fb48:7155%10')
How to fix ?
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
a string identifying the zone of the address, and
`%' is a delimiter character to distinguish between and
.
so this is clearly standardized.
It should be mentioned in docs that PostgreSql does not support ipv6 and
attempt to use will cause crash.
Andrus.
--
Sent via pgsql-ge
Windows 2000 in easy way?
It is for use only in the same computer.
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
so much time.
How to speed it up ? Should I turn sync off for upsize or other idea ?
How to increase
Andrus Moor
OÜ Eetasoft
Akadeemia 21-G302
Tallinn 12618
http://www.eetasoft.ee
http://eeva.eetasoft.ee
tel. 6654214, 6654215
--
Sent via pgsql-general mailing list (pgsql-general
to create portable CREATE DATABASE command for estonian locale which
works in all operating systems?
3. Or how to detect OS from PostgreSql server and select correct Estonian
locale ?
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
gres ?
Why Postgres does not have command which returns available locale names ?
How to use same locale names in every platform?
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
There is no portable operating system interface to get the names of all
locales.
Thank you.
Why postgres does not use conditional directives like
#ifdef WINDOWS
...
#endif
#ifdef LINUX
..
#endif
to return list of available locales ?
Andrus.
--
Sent via pgsql-general mailing list (pgsql
ocale names hoping that some call suceeds?
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
for other reasons also. There is no way to know was this failing
due to missing locale.
What is best command to probe postgresql 9 server for locale existence ?
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.post
y locale may be available but it can have at least four different values
depending on server.
No need to disturb admins.
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
ed and verify that it matches what you expect.
I need to know locale name to set locale.
Is there some simple command which can used to test for locale existence for
create database command ?
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
-started in Windows Control panel, it continues
working for a week and same issue appears again.
Server and windows event log does not contian any information about issue.
How to fix of diagnose it ?
Should I move to 32 Postgres 9.0 server or other idea ?
Andrus.
--
Sent via pgsql-general
tivity and pg_locks?
Do you see "Idle in transaction" (probably in task manager)?
I havent looked into them.
How to automatically re-start postgres service in every night ? Or is it
better to switch to 32bit server?
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@pos
run.
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
How to create string concatenation operator which preserves trailing spaces
on CHAR(n) type columns ?
I tried code below, but it returns AB (without spaces).
How to force it to return A B (keep space after A) ?
Andrus.
CREATE OR REPLACE FUNCTION public.stringconcat(left text, right text
perator for strings or should some other
notation used ?
I tried:
CREATE OR REPLACE FUNCTION public.concatkeepspaces(left bpchar, right
bpchar)
RETURNS bpchar
LANGUAGE sql IMMUTABLE
AS $BODY$
SELECT concat($1,$2);
$BODY$;
CREATE OPERATOR public.+ (
leftarg = bpchar,
rightarg = bpchar,
proced
untime.
FoxPro expression a+b produces trailing spaces after a .
To get same result I need to + or other operator with this behaviour.
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
t;t"
at line
RECURSIVE t(n) AS (
recursive b as ( shown in comment
with clause is used to create some non recursive queries (a) .
After them recursive query is defined (b) and after it there are some other
non-recursive queries (c)
Using Postgres 9.1 and above.
Andrus.
0, 32-bit"
Posted also in
http://stackoverflow.com/questions/26165745/how-find-greatest-tuple-before-given-2-column-tuple-in-postgres-fast
Andrus.
|kellaaeg <= ?someparam
How to fix or other way to speed this query?
Posted also in
http://stackoverflow.com/questions/26161561/how-to-create-composite-index-in-postgres-9
Andrus.
d kellaaeg and you can create a
functional index that >uses the same calculation. That would be the easiest
way to use this.
Thank you.
I solved this by creating composite index on 3 columns and re-writing query
as Tom recommended.
It looks like Tom's recommendation is simpler for me.
storedasafixed-sizedfield
inPostgres.Itistreatedexactlythesameas
varchar(n)exceptforbeingpadded
So char type does not take more space than varchar.
Andrus.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to
approximately 800 ms
So it looks like thee is no difference in sequential scan speed and thus no
need to change char types.
Andrus
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
easonable to replace char with varchar.
Andrus
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
1 - 100 of 586 matches
Mail list logo