On Thu, Feb 10, 2005 at 12:16:53AM -0700, Michael Fuhr wrote:
>
> SELECT textin(bit_out(b)) FROM foo;
Is it generally true that you can convert between types using the
above method, assuming compatible syntax? That is, using the source
type's output function to get a cstring that you pass to the
On Thu, Feb 10, 2005 at 12:00:31AM -0700, Michael Fuhr wrote:
>
> CREATE FUNCTION bit2text(bit) RETURNS text AS '
> BEGIN
> RETURN $1;
> END;
> ' LANGUAGE plpgsql IMMUTABLE STRICT;
This also appears to work:
CREATE TABLE foo (b varbit);
INSERT INTO foo VALUES ('10011');
SELECT textin(bit_out
On Thu, Feb 10, 2005 at 07:32:35AM +0100, Együd Csaba wrote:
>
> In case of arrays I can use array_to_string(), but I couldn't find any
> functions to convert bit(*) to string (in a format like this: e.g. '10011').
I don't know if this will always work, but with current implementations
of PL/pgSQL
Hi,
I use pg8 and ZeosLib 6.5.1. Zeos can't read fields type of array and bit,
so I need to convert these fields to text on the server side.
In case of arrays I can use array_to_string(), but I couldn't find any
functions to convert bit(*) to string (in a format like this: e.g. '10011').
Could
On Wed, Feb 09, 2005 at 09:50:41PM -0500, Jan wrote:
> I've been using PostgreSQL for about three months. So far my
> only objection is that "pg_affected" provides the number of attempts
> rather than the number of rows that are actually changed. I could
> easily do that with a little counter.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
seems like it still exists in 10.3.8 which was just released today
- -
Jonel Rienton
http://blogs.road14.com
Software Developer, *nix Advocate
On Feb 9, 2005, at 3:40 PM, Tom Lane wrote:
> Joe Lester <[EMAIL PROTECTED]> writes:
>> Watch out for t
I've been using PostgreSQL for about three
months. So far my only objection is that "pg_affected" provides the
number of attempts rather than the number of rows that are actually
changed. I could easily do that with a little counter.
I think PostgreSQL should be changed to return the
n
On Wed, Feb 09, 2005 at 11:36:22PM -0500, Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> writes:
> > I started looking at this earlier. Is it even possible to get
> > EXPLAIN output via SPI (and thus the PLs' interfaces to SPI)?
>
> Hmm ... my first reaction was "sure", but:
[snip]
> ERROR:
On Tue, Feb 08, 2005 at 01:45:44AM -0500, Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> writes:
> > On Tue, Feb 08, 2005 at 12:58:34AM -0500, Tom Lane wrote:
> >> I'm too tired to work out an example, but I think this probably doesn't
> >> work in general: the xmax on the version of the row yo
Michael Fuhr <[EMAIL PROTECTED]> writes:
> I started looking at this earlier. Is it even possible to get
> EXPLAIN output via SPI (and thus the PLs' interfaces to SPI)?
Hmm ... my first reaction was "sure", but:
regression=# create or replace function foo() returns setof text as $$
regression$#
Any advice for an opensource newbie running on Windows 2000? How hard is it
to rebuild for windows? Any instructions? What compiler?
Oisin
- Original Message -
From: "Bradley D. Snobar" <[EMAIL PROTECTED]>
To: ""Oisin Glynn"" <[EMAIL PROTECTED]>
Sent: Wednesday, February 09, 2005 10:40 P
"Ed L." <[EMAIL PROTECTED]> writes:
> and I don't know what else.
How about being able to search for queries where expected rows and actual rows
are far apart.
--
greg
---(end of broadcast)---
TIP 7: don't forget to increase your free space ma
Aaron Glenn wrote:
> On Tue, 8 Feb 2005 14:29:08 -0500, Robert Treat
> <[EMAIL PROTECTED]> wrote:
> > Slony
>
> Yes.
>
> > High Availability
>
> Yes.
>
> > If you have other ideas please feel free to chime in, we'd really like to
> > see
> > an uptick in postgresql attendees.
>
> Will Bruce a
On Wed, Feb 09, 2005 at 06:31:11PM -0800, David Fetter wrote:
> On Wed, Feb 09, 2005 at 04:34:30PM -0700, Ed L. wrote:
> >
> > SELECT sql, op, index, relation, actual_first
> > FROM pg_explain_analyze('SELECT * FROM foo')
> > WHERE op = 'Index Scan'
> > AND actual_first > 1.0;
> >
On Wednesday February 9 2005 8:07, Ed L. wrote:
> >
> > Well, I'm a little bored; I've got tomorrow off, and this
> > seems like it might be doable in the kind of high-level
> > PL/Foo's with which I'm familiar. What would the returning
> > rowtype for
> > pg_explain_analyze(TEXT) be?
>
> LOL. If
On Wednesday February 9 2005 7:31, David Fetter wrote:
> On Wed, Feb 09, 2005 at 04:34:30PM -0700, Ed L. wrote:
> > Thinking about how to make this analysis faster and less
> > labor- intensive ...
> >
> >SELECT node_id, op, parent_node_id, index, relation,
> > cost_first, cost_last,
Hi,
I am trying to keep database access encapsulated in functions from an insert
and update point of view so as all of the applications writing to the
database are using the same functions/statements.
My problem is I was creating functions to do inserts/updates and now I have
a table with more
David Fetter wrote:
On Wed, Feb 09, 2005 at 04:34:30PM -0700, Ed L. wrote:
Thinking about how to make this analysis faster and less labor-
intensive ...
I know of no other way to get the detailed performance data provided
via EXPLAIN ANALYZE without just painfully disassembling a query.
It se
On Wed, Feb 09, 2005 at 04:34:30PM -0700, Ed L. wrote:
> Thinking about how to make this analysis faster and less labor-
> intensive ...
>
> I know of no other way to get the detailed performance data provided
> via EXPLAIN ANALYZE without just painfully disassembling a query.
> It seems it wou
Thinking about how to make this analysis faster and less labor-
intensive ...
I know of no other way to get the detailed performance data provided
via EXPLAIN ANALYZE without just painfully disassembling a query.
It seems it would be pretty useful w/r/t performance monitoring to
be able to ret
Bruce Momjian wrote:
> Strange, it looks OK to me with the -lpq. My guess is that it is
> some SCO strangeness but I am not sure what. Do an 'nm' on libpq.so
> and see if those symbols are in there.
>
>
---
>
> Jim Morcom
On Wed, Feb 09, 2005 at 03:38:32PM -0700, Ed L. wrote:
> On Wednesday February 9 2005 3:13, Martijn van Oosterhout wrote:
> >
> > In general, the EXPLAIN ANALYZE output follows the planner
> > output as close as possible. If you look at the original query
> > posted, it showed an Index Scan costing
Strange, it looks OK to me with the -lpq. My guess is that it is some
SCO strangeness but I am not sure what. Do an 'nm' on libpq.so and see
if those symbols are in there.
---
Jim Morcombe wrote:
> Can anyone help me with
On Wednesday February 9 2005 3:13, Martijn van Oosterhout wrote:
>
> In general, the EXPLAIN ANALYZE output follows the planner
> output as close as possible. If you look at the original query
> posted, it showed an Index Scan costing 4.63..4.63 which means
> the index scan is taking (on average) 4
On Wed, Feb 09, 2005 at 02:37:39PM -0700, Ed L. wrote:
> Very helpful, thanks. So time spent in that node & its children
> = first number of "actual time" * loops? That seems consistent
> with the fact that reindexing the index led to the huge speedup.
> If the second number of the "actual ti
After reading the manual (8.0). I am not certain what real advantage there is
to using a cursor
over using a FOR loop. since FOR automatically uses a cursor anyway. They both
avoid
memory problems. Have I missed something or are there other reasons?
---(end of broadcast)
"Ed L." <[EMAIL PROTECTED]> writes:
> If the second number of the "actual time" part means time
> elapsed in this node and its children until the last row was
> returned, why does it say "actual time=4.63..4.63" instead of
> "actual time=4.63..4767.62"?
The reason we do that is to make the "act
Joe Lester <[EMAIL PROTECTED]> writes:
> Watch out for the memory leak bug on OS 10.3.2 though 10.3.5 (this is
> apparently an OS X bug, not a Postgres bug):
> http://archives.postgresql.org/pgsql-general/2004-08/msg00972.php
> I don't know if it exists on 10.3.6 or 10.3.7 (the current version).
On Wednesday February 9 2005 2:21, Tom Lane wrote:
> "Ed L." <[EMAIL PROTECTED]> writes:
> >
> > 21 -> Nested Loop (cost=0.00..108.85 rows=1
> > width=1196) (actual time=4769.59..4769.59 rows=0 loops=1) 22
> > -> Nested Loop (cost=0.00..64.78 rows=4 width=131)
> > (actual time=0.41..7
"Ed L." <[EMAIL PROTECTED]> writes:
> I'm trying to optimize a large query by looking at
> EXPLAIN ANALYZE output. Here's what I think may be
> the most relevant snippet:
> 21 -> Nested Loop (cost=0.00..108.85 rows=1 width=1196) (actual
> time=4769.59..4769.59 rows=0 loops=1)
> 22
On Wed, Feb 09, 2005 at 03:40:49PM -0500, Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> writes:
> > The 7.3 and 7.2 documentation for CREATE TABLE both mention ON COMMIT:
>
> > http://www.postgresql.org/docs/7.3/static/sql-createtable.html#SQL-CREATETABLE-COMPATIBILITY
> > http://www.postgres
Michael Fuhr <[EMAIL PROTECTED]> writes:
> The 7.3 and 7.2 documentation for CREATE TABLE both mention ON COMMIT:
> http://www.postgresql.org/docs/7.3/static/sql-createtable.html#SQL-CREATETABLE-COMPATIBILITY
> http://www.postgresql.org/docs/7.2/static/sql-createtable.html#SQL-CREATETABLE-COMPATIB
On Wed, Feb 09, 2005 at 01:11:36PM -0700, Ed L. wrote:
> On Wednesday February 9 2005 12:56, Alvaro Herrera wrote:
> > On Wed, Feb 09, 2005 at 12:54:27PM -0700, Ed L. wrote:
> > > sped up the query to sub-second. This is a 7.3.4 cluster.
> > > I wonder if this that 7.3 index bloat bug?
> >
> > Ha
On Wednesday February 9 2005 12:56, Alvaro Herrera wrote:
> On Wed, Feb 09, 2005 at 12:54:27PM -0700, Ed L. wrote:
> > sped up the query to sub-second. This is a 7.3.4 cluster.
> > I wonder if this that 7.3 index bloat bug?
>
> Hard to say, because you didn't provide more info (such as if
> the i
On Wed, Feb 09, 2005 at 12:54:27PM -0700, Ed L. wrote:
> On Wednesday February 9 2005 12:04, you wrote:
> > 4796.0 ms are the time it took for 34's index scan to complete
> > the 1014 loops, I'd think.
>
> Interesting. Reindexing the index
>
> idx_queryoutcome_occurrencehistory_key
>
>
PDO just went into beta, and can be downloaded from
http://pecl.php.net/package/pdo to be compiled into previous versions of
PHP. We really should get some PHP and PgSQL people onto making sure
the PgSQL driver is top notch (if it isn't already).
Gavin
On Mon, 2005-02-07 at 20:21 -0800, Joshua
Hello,
code for genereting xml:
CREATE OR REPLACE FUNCTION ext.xml(varchar) RETURNS text AS $$
use DBI; use XML::Generator::DBI; use XML::Handler::YAWriter;
my $rv = spi_exec_query("SELECT current_setting('client_encoding'), " .
"current_database()", 1);
my $e
On Wed, Feb 09, 2005 at 11:29:21AM -0700, Roy Souther wrote:
> I need to be able to run a program when some data is requested from the
> database. Some query will do a SELECT on a known table and I need to have
> some event trigger that makes a call to generate a small XML file and then
> post
On Wed, Feb 09, 2005 at 11:00:00AM -0700, Ed L. wrote:
> 34 -> Index Scan using idx_queryoutcome_occurrencehistory_key on
> queryoutcome (cost=0.00..10.28 rows=28 width=1065) (actual time=4.63..4.63
> rows=0 loops=1014)
On Wednesday February 9 2005 11:29, Roy Souther wrote:
> I cannot find any information about wether PostgreSQL has
> EXTPROC or not. Can someone tell me if it dose or if there is
> a better way to do this.
Not sure what version you're using, but sounds like a job for
perl (plperl) + a select rule
Watch out for the memory leak bug on OS 10.3.2 though 10.3.5 (this is
apparently an OS X bug, not a Postgres bug):
http://archives.postgresql.org/pgsql-general/2004-08/msg00972.php
I don't know if it exists on 10.3.6 or 10.3.7 (the current version). I
submitted a bug report to Apple many months
I cannot find any information about wether PostgreSQL has EXTPROC or not. Can
someone tell me if it dose or if there is a better way to do this.
I need to be able to run a program when some data is requested from the
database. Some query will do a SELECT on a known table and I need to have
some
I'm trying to optimize a large query by looking at
EXPLAIN ANALYZE output. Here's what I think may be
the most relevant snippet:
21 -> Nested Loop (cost=0.00..108.85 rows=1 width=1196) (actual
time=4769.59..4769.59 rows=0 loops=1)
22 -> Nested Loop (cost=0.00..64.78 rows=4 wi
[EMAIL PROTECTED] wrote:
Hi,
How do I call a StoredProcdure, written in PlPqSql
which returns a set of records (or tableWhatever)
and wants parameters,
from ADO while using "adCmdStoredProc" ?
Which driver are you using? If it's the OLE DB provider, then there is a
solution, provided that you
On Feb 9, 2005, at 11:10 AM, Sibtay Abbas wrote:
hi all
How are function parameters generally passed in postgresql.
More specifically when we pass a variable to a plpgsql function is
passed by value or by reference
By value. I don't believe there is any way to modify parameters if that
is what you
Sibtay Abbas wrote:
hi all
How are function parameters generally passed in postgresql.
More specifically when we pass a variable to a plpgsql function is
passed by value or by reference
By value. Always (as far as I know).
--
Richard Huxton
Archonet Ltd
---(end of broadc
True. Apple even has a page with installation instructions:
http://developer.apple.com/internet/opensource/postgres.html
-tfo
--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005
On Feb 9
On Wed, Feb 09, 2005 at 02:43:56AM -0600, Jonel Rienton wrote:
> You'll probably need to install fink or darwinports also if you're
> building from source. I have successfully built PostgreSQL 8.0.1
> recently in my Mac OS X box. Building PostgreSQL in different
> platforms has become one of m
renato.barrios wrote:
Please tell me if Postgresql runns in an iMac.
Yes it does as long as you are running OS X.
Sincerely,
Joshua D. Drake
Thanks,
Renato
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister comma
hi all
How are function parameters generally passed in postgresql.
More specifically when we pass a variable to a plpgsql function is
passed by value or by reference
Thank You
---(end of broadcast)---
TIP 2: you can get off all lists at once with t
In the last exciting episode, [EMAIL PROTECTED] (Christoph Pingel) wrote:
> I'm new to PostgreSQL, and it has been a pleasure so far.
>
> There's just one thing I'm trying to do and I didn't find any hints in
> the manual: I want to index just a part of a string in a column.
>
> The situation: I ha
On Wed, 9 Feb 2005, NTPT wrote:
AFAIK (7.4.x) there is one limitation in persistant connections to postgresql
from various frontends (
http://cz.php.net/manual/en/features.persistent-connections.php ), because it
can not use transactions in situation where more concurent tasks use a single
conn
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2005-02-06 09:34:53 -:
Since I posted my original question, I realized that pgpool notes a
failure of either master or slave in its log. Would we want something
more proactive?
snmp?
Send out a NOTIFY that can be LISTENed for.
--
Richard Huxt
Hi Levi,
On Feb 9, 2005, at 4:01 AM, Levente Lajko wrote:
Yes, I have found this statement. However, it doesn't prevent others
to see that specific row in its state before the update. The point is
to lock the row for reading as well.
Unfortunately, the postgres doc clearly states that row-level l
On Feb 9, 2005, at 3:43 AM, Jonel Rienton wrote:
You'll probably need to install fink or darwinports also if you're
building from source. I have successfully built PostgreSQL 8.0.1
recently in my Mac OS X box. Building PostgreSQL in different
platforms has become one of my hobbies :) so if you nee
Am Mittwoch, den 09.02.2005, 10:39 -0200 schrieb Clodoaldo Pinto:
> On Wed, 09 Feb 2005 13:18:44 +0100, Tino Wildenhain <[EMAIL PROTECTED]> wrote:
> >
> > Will this go into the same database?
>
> Yes, this *went* into the same database.
>
> > If so, you should probably use:
> >
> > CREATE TABLE
On Wed, 09 Feb 2005 13:18:44 +0100, Tino Wildenhain <[EMAIL PROTECTED]> wrote:
>
> Will this go into the same database?
Yes, this *went* into the same database.
> If so, you should probably use:
>
> CREATE TABLE targettable AS
> select data,
> usuario,
> sum(pontos) as sum_pont
Am Montag, den 07.02.2005, 20:05 -0200 schrieb Clodoaldo Pinto:
> On Mon, 07 Feb 2005 13:51:46 -0800, Joshua D. Drake
> <[EMAIL PROTECTED]> wrote:
>
> > Well your first email didn't explain that you were doing the below :)
>
> In the first email I was not doing the insert. I was executing a psql
After much work i was able to do it:
The psql script was changed to:
\o '/KakaoStats/bak/groupdup1.txt'
select
data,
usuario,
sum(pontos),
sum(wus)
from usuarios
where data <= 2056
group by data, usuario
;
\o
\o '/KakaoStats/bak/groupdup2.txt'
select
data
NTPT wrote:
AFAIK (7.4.x) there is one limitation in persistant connections to
postgresql from various frontends (
http://cz.php.net/manual/en/features.persistent-connections.php ),
because it can not use transactions in situation where more concurent
tasks use a single connection (execuse my w
On Wed, Feb 09, 2005 at 12:22:44AM +0100, NTPT wrote:
> AFAIK (7.4.x) there is one limitation in persistant connections to
> postgresql from various frontends (
> http://cz.php.net/manual/en/features.persistent-connections.php ), because
> it can not use transactions in situation where more conc
Please tell me if Postgresql runns in an iMac.
If you're on OS X, sure. I'd recommend installing darwinports
(http://darwinports.opendarwin.org), which makes downloading and
compiling as easy as that:
sudo port install postgresql8
darwinports also features several modules for accessing postgr
Am Mittwoch, den 09.02.2005, 01:42 -0600 schrieb Thomas F.O'Connell:
> I don't think it's a standard part of OS X. I think it comes with Apple
> Remote Desktop, and it might be in the Server edition, but it's not a
> part of the standard version.
Ok ;) But at least we can state "it runs" ;)
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
You'll probably need to install fink or darwinports also if you're
building from source. I have successfully built PostgreSQL 8.0.1
recently in my Mac OS X box. Building PostgreSQL in different
platforms has become one of my hobbies :) so if you ne
64 matches
Mail list logo