On Fri, Aug 11, 2006 at 06:09:16PM +0200, Michael Meskes wrote:
> On Fri, Aug 11, 2006 at 07:01:55AM -0600, Michael Fuhr wrote:
> > The ECPG "Connecting to the Database Server" documentation does
> > have an example for Unix sockets with quotes:
> >
> >
or whether he'd commit
the necessary changes based on what we've already discussed in this
thread.
--
Michael Fuhr
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail comm
base dbxyz due to some
> authentication problems???
What do the server's logs say? Can you connect to the database
from the same machine using psql? If you add the following line
to your program before the connect, what output do you get?
ECPGdebug(1, stderr);
--
Michael Fuhr
--
On Sat, Aug 12, 2006 at 02:04:42PM -0700, Jim Bryan wrote:
> Installed latest postgresql 8 on windows xp,
> everything works fine with pl/pgsql; problems creating
> a table with perl however:
>
> CREATE OR REPLACE FUNCTION datetable() RETURNS integer
> AS $$
> CREATE TABLE tabletest
> (
> da
t code accordingly.
http://www.postgresql.org/docs/8.1/interactive/auth-methods.html
--
Michael Fuhr
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTEC
tically use indexes for MIN() and MAX() (Tom)
In previous releases, the only way to use an index for MIN()
or MAX() was to rewrite the query as SELECT col FROM tab ORDER
BY col LIMIT 1. Index usage now happens automatically.
--
Michael Fuhr
---(end of
s different than the
SQL command EXECUTE:
http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN
You don't need to use prepared statements in PL/pgSQL functions
because the language automatically prepares and caches query plans.
Just do the INSERT directly.
On Sun, Aug 13, 2006 at 10:30:24AM +0200, Michael Meskes wrote:
> On Fri, Aug 11, 2006 at 04:40:36PM -0600, Michael Fuhr wrote:
> > Will you take care of it or should I submit a patch? I've noticed
>
> I you have the time to write the patch I woul dappreciate it.
I'll
06-09-14
(1 row)
or
test=> SELECT CAST('2006-08-01' AS date) + 30 + (7 * (3 - 1));
?column?
2006-09-14
(1 row)
--
Michael Fuhr
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
On Tue, Aug 15, 2006 at 03:56:03PM +0200, Michael Meskes wrote:
> On Tue, Aug 15, 2006 at 05:59:23AM -0600, Michael Fuhr wrote:
> > I'll submit a patch. However, in the case of string literals not
> > working, is that a documentation bug or a code bug? Are they
> >
id integer,
raw_email char[]
);
When you should have done this:
CREATE TABLE raw_email (
id integer,
raw_email text -- or varchar
);
Is my guess correct?
--
Michael Fuhr
---(end of broadcast)---
TIP 6: explain analyze is your friend
ple
varchar column? Are you handling the contents as array elements
(e.g., one element per line) or is the whole considered a single
piece of data?
--
Michael Fuhr
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send a
EXECUTING-DYN
--
Michael Fuhr
---(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
end a leading '{' and a trailing '}' to ch??
Do you intend to handle the data as an array in SQL? If not then
the raw_email column should be declared as varchar or text instead
of varchar[]. In that case your C code won't need to change.
--
Michael Fuhr
--
you
do need to use C I'd recommend practicing with PL/pgSQL to learn
the basics with a simpler language.
http://www.postgresql.org/docs/8.1/interactive/plpgsql-trigger.html
--
Michael Fuhr
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
ction? See the bottom of the
following page:
http://www.postgresql.org/docs/8.1/interactive/ecpg-commands.html
"In the default mode, statements are committed only when EXEC SQL
COMMIT is issued."
--
Michael Fuhr
---(end of broadcast)---
TIP
server-side C function that uses ECPG? Is there a reason
you're not using SPI? Are you connecting to a different server?
Or by "function" do you really mean "program," meaning a separate
executable?
http://www.postgresql.org/docs/8.1/interactive/spi.html
ions you're using. I've done a
little testing and haven't been able to reproduce your results, so
apparently my tests don't match what you're doing.
--
Michael Fuhr
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
the relevant documentation:
http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN
http://www.postgresql.org/docs/8.0/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN
--
Michael Fuhr
---(end of broadcast
mpilers have options to warn about uninitialized variables; I'd
recommend using them.
If that doesn't help then please post a small (10-20 line), complete
program that anybody could compile and run.
--
Michael Fuhr
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
ue\''
test=> insert into aaa values (:var);
INSERT 0 1
test=> select * from aaa;
val
some value
(1 row)
--
Michael Fuhr
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
nd what platforms
are the server and client? I don't recall if you've said.
--
Michael Fuhr
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
file:
awk -F'|' '{print NR, NF}' /tmp/sold.pg
Suggestion: fix the file so each line has the same number of fields
as the table has columns.
--
Michael Fuhr
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner w
tuple just as it would for COUNT. I answered a similar question
recently:
http://archives.postgresql.org/pgsql-novice/2006-07/msg00220.php
--
Michael Fuhr
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
On Fri, Aug 18, 2006 at 06:01:02PM +0200, Michael Meskes wrote:
> On Tue, Aug 15, 2006 at 07:31:31PM -0600, Michael Fuhr wrote:
> > Will that be a minor fix that can be backpatched or will it be
> > invasive enough to be fixed only in HEAD? I'll submit a documentation
>
to
do something like the following?
INSERT INTO p_id.loops (monitor)
SELECT NEW.devices_id
FROM library.devices
WHERE NEW.device_number = library.devices.device_number
AND library.devices.type_ = 'mon';
--
Michael Fuhr
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
On Sat, Aug 19, 2006 at 03:36:42PM +0200, Michael Meskes wrote:
> On Fri, Aug 18, 2006 at 02:54:19PM -0600, Michael Fuhr wrote:
> > It works with a double-quoted string but not with a single-quoted
> > string as the documentation mentions.
>
> It's not supposed to work
CTION sprintf(format text, args anyarray) RETURNS text AS $$
return format % args
$$ LANGUAGE plruby IMMUTABLE STRICT;
SELECT sprintf('%s', array['pink', 'elephants']::text[]);
sprintf
-
eleph
On Sun, Aug 20, 2006 at 08:21:18PM -0700, Reece Hart wrote:
> On Sat, 2006-08-19 at 16:50 -0600, Michael Fuhr wrote:
> > Here's a trivial (and only minimally tested) PL/Ruby function:
>
> Thanks, Michael. That's a solution I can use. Now I just have to
> compile
they're being called?
Could you post a simple, self-contained example that exhibits both
the desired and undesired behavior? That is, all SQL statements
that somebody could load into an empty database to create and
populate the tables, create the triggers, and perfor
on.
> CREATE OR REPLACE FUNCTION _create_cache(text)
> RETURNS text AS
This isn't a trigger function. Are you sure "trigger" is the
word you meant?
--
Michael Fuhr
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
---
1 | test on foo | 123
(1 row)
INSERT INTO bar (id) VALUES (1);
SELECT * FROM bar;
id | t | x
+-+-
1 | test on bar | 456
(1 row)
--
Michael Fuhr
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
nt to the trigger function then you'll see when and how many
times it's being called.
--
Michael Fuhr
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
R_HOME/etc//Renviron
exist and have permissions such that the PostgreSQL server can read
it? The error "cannot find system Renviron" comes from the R
function process_system_Renviron() in src/main/Renviron.c in response
to process_Renviron() returning 0, which it
ansaction rolls back
then transactions that have already been committed over a dblink
connection won't be rolled back. Doing transaction control from
outside the functions would probably be better.
--
Michael Fuhr
---(end of broadcast)---
TIP 3: Hav
> so I don't see that as the problem.
Have you checked the permissions on all of the directories in the
file's path? Have you verified that PostgreSQL is using the same
$R_HOME? You can check the environment with plr_environ():
SELECT * FROM plr_environ() O
On Wed, Aug 23, 2006 at 09:37:17AM -0500, Don Isgitt wrote:
> Michael Fuhr wrote:
> >Have you checked the permissions on all of the directories in the
> >file's path? Have you verified that PostgreSQL is using the same
> >$R_HOME? You can check the environment with plr_
PL/Perl? If you're parsing email messages then coding
in Perl, Python, Ruby, etc., would probably be easier than C.
--
Michael Fuhr
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
hen use an IF statement as Tom suggested or
use INSERT ... SELECT with a WHERE clause that would restrict the
SELECT result to an empty set if the insert shouldn't happen.
--
Michael Fuhr
---(end of broadcast)---
TIP 9: In versions below 8.
s
Once we have a clear picture of what should happen in response to
what actions then it'll be easier to figure out how to make that
happen.
--
Michael Fuhr
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
ates on this issue, check here"
The link leads to a closed bug report entitled "Enormous memory
increase (and application crash) with large BYTEA parameter." You
might wish to read the comments to see if and how the problem has
been addressed.
--
Michael Fuhr
the lifetime of the table."
I think you're confusing the size of the sequence (always 64 bits)
with the size of the column (32-bit integer for serial, 64-bit
bigint for bigserial) that will hold the sequence's value.
--
Michael Fuhr
---(end of broadcast)
get the full 32-bit range (4294967296) by
allowing negative numbers and setting the sequence's MINVALUE and
RESTART value to -2^31 (-2147483648).
> Which should still be enough for "millions of records"
Correct.
--
Michael Fuhr
---
rl code.
See the aforementioned PL/Perl documentation. You could also use
PL/Perl just for parsing and use PL/pgSQL for working with the
database.
--
Michael Fuhr
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
ut
debugging the function is premature: let's see the requirements and
then figure out how to implement them.
--
Michael Fuhr
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
0.7.1 doesn't (that "Release version" is over
3.5 years old!).
--
Michael Fuhr
---(end of broadcast)---
TIP 6: explain analyze is your friend
#x27;
> the transaction is rejected.
Are you saying that a query like the following might return more
than one row?
SELECT * FROM library.devices WHERE device_number = 1 AND type_ = 'end';
Or have I misunderstood what you mean by "This doesn't seem to
narrow th
www.postgresql.org/docs/8.1/interactive/plperl-trusted.html
Regarding "use", "require", and "do" see the Perl documentation,
in particular the perlfunc and perlmod manual pages.
--
Michael Fuhr
---(end of broadcast)---
user=arwdRxt/csi", what does the "/csi"
> represent? Is this the owner of the table? The grantor? Is this
> discussed anywhere in the PostgreSQL documentation?
The GRANT documentation says
/ -- user who granted this privilege
Did you overlook those or
e. That local variable must
have a different name to avoid syntax errors that would result from
the ambiguity of having a variable and a table column with the same
name.
--
Michael Fuhr
---(end of broadcast)---
TIP 5: don't forget to increase yo
255 Aug 25 18:15 FinalData.txt
Might this be an SELinux problem?
--
Michael Fuhr
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
PL/Perl function in one database that needs to
connect to a different database? What exactly are you trying to
do?
--
Michael Fuhr
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
ions written for C to Perl
That depends on how many triggers you have, how elaborate they are,
and how proficient you are at Perl. I tend to use PL/pgSQL for
functions that involve a lot of SQL statements; I use PL/Perl or
PL/Ruby for things like text manipulation that those languages are
good
e extract(epoch from ) to get the number of
seconds (with fractional part) in an interval, then multiply by
1000 to get milliseconds. Example:
select extract(epoch from sum(Til - Fra)) * 1000.0 ...
--
Michael Fuhr
---(end of broadcast)---
TIP 5:
On Mon, Aug 28, 2006 at 04:18:12PM +0200, Bjørn T Johansen wrote:
> On Mon, 28 Aug 2006 07:20:02 -0600 Michael Fuhr <[EMAIL PROTECTED]> wrote:
> > select extract(epoch from sum(Til - Fra)) * 1000.0 ...
>
> Do you know if this is supported on older versions of PostgreSQL
he above example will work in the stock installation for
arrays of any type (i.e., with operands of type anyarray).
--
Michael Fuhr
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
On Sun, Sep 03, 2006 at 12:59:08AM -0400, Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> writes:
> > test=> SELECT ARRAY[1, 2, 3, 4] @ ARRAY[1, 3];
> > ?column?
> > --
> > t
> > (1 row)
>
> > In 8.2 the above example will work i
> 2 billion :-).
If you plan to use integer row IDs then you'll need to use 64-bit
bigint/bigserial instead of 32-bit integer/serial. I haven't worked
with a database that large; maybe somebody else can give additional
advice.
--
Michael Fuhr
---
done. I can make SSL
connections to PostgreSQL as any user with the same certificate,
and I don't see anything in the documentation that allows that to
be configured. If I've overlooked something then somebody please
point it out.
--
Michael Fuhr
---(end of broad
On Sun, Sep 10, 2006 at 09:39:59PM -0600, Michael Fuhr wrote:
> On Mon, Sep 11, 2006 at 02:32:26AM +0200, Jean-Gerard Pailloncy wrote:
> > 1) Is it possible to use the SSL authentification done by apache with
> > PostgreSQL ?
>
> I'm not aware of a way for Apache
On Mon, Sep 11, 2006 at 10:44:18AM +0200, Jean-Gerard Pailloncy wrote:
> Le 11 sept. 06 à 05:57, Michael Fuhr a écrit :
> > If such a capability existed then it could arguably be considered
> > a flaw in SSL because it would allow a server to impersonate one
> > of its clients
opy of it
then you could use a script like this:
#!/usr/bin/perl -ln
BEGIN {print "copy tablename from stdin delimiter '|';";}
print "$_|$.";
END {print "\\."} # should also work without this line
Run the script and pipe the output into psql:
script_name file
lash and a period on a line by itself.
>> 1|2|DEFAULT
>> \.
ERROR: invalid input syntax for integer: "DEFAULT"
CONTEXT: COPY foo, line 1, column col3: "DEFAULT"
--
Michael Fuhr
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
u're done messing with template1, you could dump it and
compare that dump to a dump of a database created from template0.
The comparison should show if you missed anything.
--
Michael Fuhr
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
http://www.postgresql.org/docs/8.1/interactive/sql-createdatabase.html
http://www.postgresql.org/docs/8.1/interactive/sql-alterdatabase.html
http://www.postgresql.org/docs/8.1/interactive/sql-createrole.html
http://www.postgresql.org/docs/8.1/interactive/sql-alterrole.html
--
Michae
you run "ssh -v"
do you see a line like "Enabling compression at level X"?
--
Michael Fuhr
---(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
t also be taken into account. Using a
sniffer to observe the amount of data transferred would be a more
appropriate test.
--
Michael Fuhr
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
On Fri, Sep 15, 2006 at 09:52:04AM -0600, Michael Fuhr wrote:
> On Fri, Sep 15, 2006 at 05:37:50PM +0200, zeljko wrote:
> > But, when I try (via tunnel, explained above)
> > psql -p 5400 -h localhost mydatabase
> > it connects and works fine, but there's no compression
gt;
> nTier results shows real compression (faster more than twice).
What does a sniffer like tcpdump or wireshark/ethereal show? Let's
see how much data is being sent over a compressed vs. uncompressed
connection and how long the data transfers are taking.
--
Michael Fuhr
--
was trying to compress
essentially random data (the SSL-encrypted data), and random data
doesn't have enough redundancy to compress.
--
Michael Fuhr
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
.
CREATE TABLE iclasses (
classid serial,
subject text,
year text,
groups text,
teacher text,
set text
);
INSERT INTO iclasses (subject, year, groups, teacher, set)
SELECT DISTINCT subject, year, groups, teacher, set
FROM interimclasses;
--
Michael Fuhr
ou'd have to hack the source code. See the transformColumnDefinition()
and makeObjectName() functions in src/backend/parser/analyze.c.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 5: Have you che
satisfies the given argument types
> You may need to add explicit typecasts
>
> where is problem???
Are you sure the server is 7.4? What does SELECT VERSION() show?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)
ernal
Source code | md5_text
Description | calculates md5 hash
The internal function md5_text() is in src/backend/utils/adt/varlena.c.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
f
> 1,2,3...
>
> Is there any way to handle this without having to make a sort order
> column?
Try something like this:
ORDER BY SUBSTRING(unitnum FROM '[0-9]+')::INTEGER, unitnum
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)--
an comment on the possibility of a shared FOR PREVENT
UPDATE lock.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
TION LEVEL SERIALIZABLE; -- or READ COMMITTED
SELECT VERSION();
ROLLBACK;
Why the log message? Is this by design or is it a bug?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, plea
99 99'), ' MM DD');
to_timestamp
2004-12-17 00:00:00-07
test=> SELECT to_timestamp(to_char(20041217, 'FM 99 99'), ' MM DD');
to_timestamp
2004-12-17 00:00:00-07
On Sun, Sep 19, 2004 at 12:31:26PM -0400, Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> writes:
> > The leading space is confusing to_timestamp():
>
> > test=> SELECT to_timestamp(' 2004 12 17', ' MM DD');
> > to_timestamp
oncvs's lock in
/projects/cvsroot/pgsql-server/config
cvs update: [01:47:47] waiting for anoncvs's lock in
/projects/cvsroot/pgsql-server/config
Is something amiss?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
12
Checking currval() also wouldn't tell you whether any rows in a
table had been updated.
> Is there a way to trap / ignore this error? Or a way
> to check if there was a transaction in this connection
> before.
Why do you need to know this? What are you tryi
On Sat, Sep 25, 2004 at 05:40:27PM +0200, Egy?d Csaba wrote:
> I'm wonder if there is any possibility to modify a users password by
> updating the pg_shadow table.
Why not use ALTER USER?
http://www.postgresql.org/docs/7.4/static/sql-alteruser.html
--
Michael Fuhr
http://www.fuhr
ng contrib
cvs update: cannot open directory /projects/cvsroot/pgsql-server/contrib: No such file
or directory
cvs update: skipping directory contrib
CVS was working earlier Sunday afternoon. Is something broken or being
worked on?
--
Michael Fuhr
http://www.fuhr.
ably should be.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
or ALTER SEQUENCE or setval(). You might
wish to subscribe to pgsql-es-ayuda:
http://archives.postgresql.org/pgsql-es-ayuda/
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
The following
General Bits article has examples:
http://www.varlena.com/varlena/GeneralBits/26.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
n place" in Postgres.
Does ALTER TABLE not work?
http://www.postgresql.org/docs/7.3/static/sql-altertable.html
Whatever you decide to do, hopefully you have a development system
on which to test your changes.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
nable that at least
{GRANT | REVOKE} {INSERT | ALL} on a table should cascade to the
appropriate permissions on the table's implicit sequences.
Comments? Can anybody think of why cascading GRANT and REVOKE to
implicit sequences might be A Bad Idea?
--
Michael Fuhr
http://www.f
whereas PostgreSQL expects
octal. If you can't change the dump format, then again, filtering
the data through a script might work.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading through Usenet,
On Wed, Oct 13, 2004 at 01:32:01PM -0400, David Rysdam wrote:
> Michael Fuhr wrote:
> >You could filter the data through a script that reformats certain
> >fields, then feed the reformatted data to PostgreSQL. This is
> >usually a trivial task for Perl, awk, sed, or the like
s, the sum of the lengths of the replacement arguments
must be 2 or more greater than the sum of the lengths of the
original arguments. I'm guessing that if the postmaster used
a longer status message, then /usr/ucb/ps would show it. I'll
test that the next time I rebui
On Thu, Oct 14, 2004 at 08:24:19AM -0600, Michael Fuhr wrote:
>
> As far as I can tell, for /usr/ucb/ps the show the replacement
> arguments, the sum of the lengths of the replacement arguments
> must be 2 or more greater than the sum of the lengths of the
> original arguments. I&
put functions for standard types.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
On Wed, Oct 13, 2004 at 03:37:14PM -0400, David Rysdam wrote:
> Michael Fuhr wrote:
> >
> >I'd probably choose to extend PostgreSQL rather than hack what
> >already exists, though.
>
> By "extend PostgreSQL" do you mean create a custom input_function f
se users who should be using it:
REVOKE ALL ON FUNCTION valid_user(TEXT, TEXT) FROM public;
GRANT EXECUTE ON FUNCTION valid_user(TEXT, TEXT) TO somebody;
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading
ort select
conn = psycopg.connect('dbname=test')
conn.autocommit(1)
curs = conn.cursor()
curs.execute('LISTEN alert')
fd = curs.fileno()
while True:
select.select([fd], [], [], None)
curs.execute('SELECT 1')
print curs.notifies()
--
Michael Fuhr
http://www.fuhr.o
logmsg) VALUES ('second message');
SELECT * FROM changelog;
logid |logtime| loguser | logmsg
---+---+-+
1 | 2004-10-14 18:43:20.581907-06 | 100 | first message
2 | 2004-10-14 18:43:35.541114-
s;
Building such a query would be easy in Perl or Python. The OP said
he'd like to see a plpythonu implementation so maybe I'll whip one
up if I get time. I'd be inclined to just write an ordinary Python
script instead of a stored procedure, however, so it could be used
on sy
wonder if one of your SUMs is returning NULL, causing
your addition to evaluate to NULL. If so, then perhaps you should
use COALESCE to turn those NULLs into zeros.
If I've misunderstood the problem then please clarify.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
On Sat, Oct 16, 2004 at 09:30:32AM -0500, Josh Close wrote:
> On Sat, 16 Oct 2004 00:59:34 -0600, Michael Fuhr <[EMAIL PROTECTED]> wrote:
> >
> > Add some RAISE INFO statements to print variables' values at key
> > places. I wonder if one of your SUMs is returning
1201 - 1300 of 1313 matches
Mail list logo