s of 3 when
something goes wrong in your script. I don't know of a way, aside from parsing
the output, that you can identify exactly where the problem arose.
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
signature.asc
Description: Digital signature
On Tue, Jan 25, 2011 at 03:10:59AM -0800, gargdevender74 wrote:
>
> how to create geometry (EPSG:4326) by lat/long. plz advice
Try ST_Point and ST_SetSRID()
http://www.postgis.org/docs/ST_Point.html
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
signatu
d reducing that to "a few
hundredths of a second" like you're interested in might cause all kinds of
load from the deadlock detector.
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
signature.asc
Description: Digital signature
WHEN $3 IS NULL OR $3 = '' THEN trim($1)
ELSE trim($1) || trim(coalesce($2, '')) || trim($3)
END;
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
signature.asc
Description: Digital signature
ceptable.
> For option 2; result B=NE70 or B=NE75 or B=NE80 is acceptable.
>
> I am lost trying to construct SQL to accomplish this...
Try DISTINCT ON, after ensuring the results are ordered meaningfully.
http://www.postgresql.org/docs/current/interactive/sql-select.html#SQL-DISTINCT
--
Josh
01-01 00:02:20-07 | 8
9 | 2 | 1 | 2007-01-01 00:02:25-07 | 3
9 | 2 | 1 | 2007-01-01 00:02:30-07 | 3
(21 rows)
...and these results...
a | b | c | d| sum
---+---+---++-
1 | 9 | 1 | 2007-01-01 00:00:05-07 | 8
9 | 2 | 1 | 2007-01-01 00:00:10-0
On Sat, Jul 24, 2010 at 06:05:57AM +0200, Andreas wrote:
> Hi,
>
> is there a way to delete from a table using information from another
> table to decide if a row should be dropped?
Yes. See DELETE ... USING
http://www.postgresql.org/docs/8.4/interactive/sql-delete.html
--
J
che using a
trigger on the plan_events table.
Finally, you can try to improve performance of your function itself. If it's
taking 4.6 sec. to read and process 2669 rows, either you're reading awfully
slowly (VACUUM problems, perhaps?) or your f_plan_events_acl() function takes
a long time to run.
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
signature.asc
Description: Digital signature
mething like "SELECT * FROM select_business_types()".
You'll get that error if you instead say "SELECT select_business_types()".
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
signature.asc
Description: Digital signature
+(floor(random()*36520)::int % 3652);
...and if you'd rather it were a function anyway, do this:
CREATE FUNCTION populate_table() RETURNS VOID AS $$
INSERT INTO unpart_tbl_test
SELECT GENERATE_SERIES(0,999),
'teststring data',
date '1995-01-01&
...@josh*# insert into c (d) values ('text');
INSERT 0 1
5432 j...@josh*# insert into c (d) values ('tExt');
ERROR: duplicate key value violates unique constraint "c_ix"
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
signature.asc
Description: Digital signature
r PostgreSQL logs. The
logging documentation might be useful to you here.
http://www.postgresql.org/docs/current/static/runtime-config-logging.html
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
signature.asc
Description: Digital signature
ORDER BY
field1, field2, field3;
Here's an example.
# select * from b order by f1, f2, f3;
f1 | f2 | f3
++
x1 | y1 | 5
x1 | y2 | 1
x1 | y2 | 3
x2 | y3 | 2
x2 | y3 | 4
(5 rows)
# select distinct on (f1, f2) f1, f2, f3 from b order by 1, 2,
3 desc;
f1 | f2 | f3
+
On Sat, Aug 15, 2009 at 12:07:54AM +0800, Hengky Lie wrote:
> Thanks to all who response my question.
>
> I have checked the doc, but it seems too advance for my postgresql
> knowledge.
>
> Other question is where can i get pgcrypto modules ?
You haven't told us how you installed PostgreSQL, but
rypto extension:
http://www.postgresql.org/docs/current/static/pgcrypto.html
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
signature.asc
Description: Digital signature
array_to_string(array_accum(log_notes, '')) FROM...
You might need to add array_accum manually; before 8.4 it wasn't built in.
See http://www.postgresql.org/docs/8.3/static/xaggr.html
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
signature.asc
Description: Digital signature
On Fri, Jul 24, 2009 at 12:54:31PM -0400, Alvaro Herrera wrote:
> Joshua Tolley escribió:
>
> > Have you tried this? I expect if you give it a shot, you'll find you don't
> > actually have this problem. Really, everything is always in a transaction.
> > If
>
into an error). Statements within functions are always executed within the
same transaction, so you can issue SAVEPOINT commands anywhere in PL/pgSQL
functions without problems, because you're always in a transaction.
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
signature.asc
Description: Digital signature
On Tue, Jun 23, 2009 at 05:14:36PM +0200, Harald Fuchs wrote:
> test=# CREATE TABLE t2 (
> test(# id int NOT NULL REFERENCES t1,
> test(# language char(3) NULL,
> test(# txt text NOT NULL,
> test(# PRIMARY KEY (id, language)
> test(# );
> CREATE TABLE
> test=# INSERT INTO
On Sat, Jun 13, 2009 at 04:51:20PM -0400, Mark Fenbers wrote:
> So how do I turn off being prompted for a password for george. (I am
> aware of the security risks...)
Create a .pgpass file[1], or modify pg_hba.conf[2]
- Josh / eggyknap
[1] http://www.postgresql.org/docs/8.3/interactive/libpq-
On Thu, Apr 30, 2009 at 08:20:02AM +1000, Adam Ruth wrote:
>The simple answer is to pg_dump both tables and compare the output with
>diff.
>Other than that, I think you'll need a custom program.
For all but the strictest definition of "identical", that won't work.
Tables may easily con
On Mon, Mar 23, 2009 at 10:18:31AM +0200, Achilleas Mantzios wrote:
> Στις Monday 23 March 2009 09:59:12 ο/η Zdravko Balorda έγραψε:
> >
> > Hi,
> > I need a casting operator from boolean to integer,
> > tu put in ALTER TABLE statment after USING.
> >
>
> Sorry in the above email i meant smth li
On Thu, Mar 12, 2009 at 03:26:47PM +0100, Marco Lechner wrote:
> Hi Mina,
>
> thanks for your answer. I thought about that, but don't
> views decrease performance, because they are "calculated"
> on access?
The query gets rewritten a bit, but it's not a big deal. A more
important concern might be
23 matches
Mail list logo