asier.
> I get a lot of requests from former MS SQL server DBAs/developers for
> such capablility.
People request a trace feature for PL/pgSQL from time to time but
I don't think anybody has implemented it yet. I'm sure a patch
would be welcome
--
the name of a table and a
column in that table. Use a different name for the variable.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail
e}'::text[] - 'carol';
?column?
-
{bob,ted,alice}
(1 row)
SELECT '{2,3,5,7}'::int[] - 3;
?column?
--
{2,5,7}
(1 row)
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
fails because you're passing a parameter that the FETCH
statement doesn't need (you're passing 1 as the nParams argument
and the parameter list as paramValues). Use one of the other two
methods, either PQexec() or PQexecParams() with nParams set to 0
and pass NULL instead of pa
ound for parameter 1
LOCATION: ExecEvalParam, execQual.c:518
I think the following message to pgsql-commiters announces the fix
that was applied to the development branch, which will soon be
released as 8.0.0:
http://archives.postgresql.org/pgsql-committers/2004-08/msg00028.php
--
Michael Fuhr
e logging for a particular session, execute the appropriate
"SET log_statement" statement in that session. If you have permission
problems then you could wrap that operation in a function defined
as SECURITY DEFINER and create the function as a database superuser.
--
Mic
ert into foo values (3);
Response INSERT 0 1
Request select * from foo;
Response 1D 2D 3C SELECT
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
on to read the
log file if you know where it is. That would be easy in a language
like PL/Python or PL/Perl.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 8: explain analyze is your friend
for the reminder. And yep, there it is, right at the
top of the ALTER DATABASE documentation...that's what I get for not
checking.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 9: the planner will ignore your des
users;
id | name
+--
1 |
2 |
(2 rows)
SELECT * FROM users_private;
ERROR: permission denied for relation users_private
Even without encryption this would be a way to hide the names,
although it might not be secure enough for your needs.
et this:
% ./foo
File "", line 1
print 'What hath'
^
SyntaxError: invalid syntax
I don't know if that behavior is configurable or not.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
et simple tests show that normal scripts run on Unix-like
platforms regardless of whether their lines end in LF, CRLF, or CR.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
On Tue, Jan 18, 2005 at 07:01:45PM +, Vladimir S. Petukhov wrote:
> I want to dinamcly change type of column. If possible, of course.
The FAQ discusses this:
http://www.postgresql.org/files/documentation/faqs/FAQ.html#4.4
--
Michael Fuhr
http://www.fuhr.org/~mf
reSQL backend so it knows about the configuration
changes, and try again.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
x27;t expect an
initdb to be required to move to 8.0.0. But don't hold me to that
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
s in a PL/pgSQL trigger. I didn't
think EXECUTE would work and indeed it doesn't, at least not the
way I tried:
ERROR: NEW used in query that is not in a rule
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)-
> handling of newlines.
If Python's behavior is intentional then the newline burden would
seem to be on the user or on plpythonu. I think Tom's point is
that that's just silly
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)--
.6 and 8.0.0 and an UPDATE statement like
the one above did appear to be using an index from a trigger. Note
that the plan for the UPDATE is logged only the first time it's
executed in a session, presumably because subsequent calls to the
function use a cached plan.
--
Michael
urn null;
> end;
> 'LANGUAGE 'plpgsql' IMMUTABLE CALLED ON NULL INPUT SECURITY INVOKER;
A function that has side effects like updating a table should be
VOLATILE, not IMMUTABLE.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 8: explain analyze is your friend
see, it takes
a lot of information from the system catalogs to generate a description
of a table. The Information Schema abstracts these queries through
views, so querying them might be the easiest way if they provide
what you need. See in particular information_schema.columns.
--
Michael Fuhr
ht
RT INTO foo (name) VALUES ('Jamie');
SELECT * FROM foo;
id | name | notes
----+---+---
1 | Jamie | hello
(1 row)
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
S'
with different identifiers quoted. See the documentation for quoted
identifiers:
http://www.postgresql.org/docs/7.4/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if postin
e you sure you're looking at the right DETAIL? Adding some
RAISE INFO or RAISE DEBUG statements can help you pinpoint which
log output belongs to which part of the function.
I just wrote a test function that used EXECUTE to do an UPDATE and
a SELECT loop and saw INDEXSCAN in the relevant DETAIL
submit
> a bug report with a test case.
Please do, but try 8.0.0 first. I don't know how stable PL/Perl
is on Windows, but there have been bug fixes in PL/Perl since the
8.0.0beta2 version you said you were running.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
74/lib/plpython.so" show?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
PyDict_Copy() function. The only newer version is 2.4, and it
was released in late November. I was wondering if it was a dynamic
linking issue, like plpython.so not finding libpython*.
Does PostgreSQL's configure script check versions for Perl, Python,
Tcl, etc.? If the version matters then conf
postgresql.org/docs/8.0/static/migration.html
http://www.postgresql.org/docs/8.0/static/app-initdb.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
rformance in such situation.
What does EXPLAIN ANALYZE DELETE ... show? Do you have an index
on the oid column? Do you have foreign key constraints that need
to be checked when rows are deleted? Do you have rules or triggers
that are being invoked?
--
Michael Fuhr
http://www.fuhr.org/~mfu
re looking for.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
ing a TCP connection or a Unix-domain socket connection?
If the former, do you have an IDENT server running? If the latter,
what platform are you using? Not all operating systems can pass
credentials over Unix-domain sockets.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
--
On Mon, Jan 24, 2005 at 06:35:36PM +0200, Jarkko Elfving wrote:
> I did get it work, thanks for help.
What was the solution? It might be informative to people searching
the list archives because they're having the same problem.
--
Michael Fuhr
http://www.fuhr.or
On Mon, Jan 24, 2005 at 06:46:25PM +0200, Jarkko Elfving wrote:
> On Mon, 2005-01-24 at 09:39 -0700, Michael Fuhr wrote:
> >
> > What was the solution? It might be informative to people searching
> > the list archives because they're having the same problem.
>
&g
that you could build queries to find out which rows
in those tables match the given value. You could wrap all this
code in a set-returning function.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 8: explain analyze is your friend
would be easy to add such a function to PostgreSQL, so
consider suggesting it to the developers or even writing it yourself
and submitting a patch.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 9: the planner will ignore yo
and Operators" section of the
"Functions and Operators" chapter in the documentation:
http://www.postgresql.org/docs/8.0/static/functions-binarystring.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 2: you
like this:
my $dbh = DBI->connect($source, $user, $password, {RaiseError => 1});
my $sth = $dbh->prepare("INSERT INTO phonegroups VALUES (?, ?, ?)");
$sth->execute("TECHIES", 1, 1);
$dbh->disconnect;
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
ou might need to allow for greater variation. Use whatever
makes sense for the type of data you're storing.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
n under "LIKE" discusses issues regarding the escape
character (the backslash by default).
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
ght be closer to
what you seek.
http://www.postgresql.org/docs/8.0/static/functions-binarystring.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
by misbehaving applications or by users who are
bypassing the application (e.g., somebody tweaking the data from a
psql session). Constraints in table definitions also serve as
self-documentation.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(e
45353 in evaluate_expr (expr=0x8337ab8, result_type=1007) at
clauses.c:2399
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
on_schema.views
The above shows that the view_definition column gets its value from
pg_get_viewdef(). What do the following queries return?
SELECT length(pg_get_viewdef('viewname'::regclass));
SELECT pg_get_viewdef('viewname'::regclass);
--
Michael F
On Thu, Jan 27, 2005 at 02:22:36PM -0500, Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> writes:
> > On Thu, Jan 27, 2005 at 05:26:26PM +0100, PFC wrote:
> >> It seems that contrib/intagg crashes my server :
>
> > I see the same thing with PostgreSQL 8.0.0 (RE
rintf("sizeof(long) = %d\n", sizeof(long));
return 0;
}
% gcc -m32 -o foo foo.c
% ./foo
sizeof(void *) = 4
sizeof(int)= 4
sizeof(long) = 4
% gcc -m64 -o foo foo.c
% ./foo
sizeof(void *) = 8
sizeof(int)= 4
sizeof(long) = 8
--
Michael Fuhr
http://www.fuhr.org/~mfuhr
Does setting that variable per session actually have an
effect, and if it does, does allowing ordinary users to set it
present a risk?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
ing the COPY command is failing? It should print an
error if it does, giving a hint at which line is causing a problem.
What error, if any, are you seeing?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 7: don't forget
78/VARIABLENAME as final_result;
You could do it in a PL/pgSQL function or a function written in
another procedural language. Another way would be to use a temporary
table:
CREATE TEMPORARY TABLE tmp AS SELECT count(*) AS foocount FROM foo;
SELECT 56778 / (SELECT foocount FROM tmp) AS final_result;
--
K;
INSERT INTO foo VALUES (DEFAULT);
SELECT * FROM foo;
addr
-
192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.5
(4 rows)
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
On Sat, Jan 29, 2005 at 02:35:06PM -0700, Michael Fuhr wrote:
> CREATE FUNCTION bigint2inet(bigint) RETURNS inet AS '
> BEGIN
> RETURN cidr(''0x'' || lpad(to_hex($1), 8, ''0''));
> END;
> ' LANGUAGE plpgsql IMMUTABLE STRICT;
the "Run-time Configuration" section of the "Server Run-time
Environment" chapter of the documentation:
http://www.postgresql.org/docs/7.4/static/runtime-config.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
ation should probably be fixed.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
//www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 8: explain analyze is your friend
ent to understand what's happening before killing one
transaction just so another can succeed.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 8: explain analyze is your friend
2 | 2
856 |3 | 3
(3 rows)
What is 7.4 doing differently than the other versions?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "
groups with "pg_dumpall --globals-only"
(or -g).
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
hat won't help you track down queries that are already running.
Is it possible that the transaction holding the lock is idle? Some
applications use long-lived transactions that can cause locking
problems in other transactions.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
essExclusiveLock that ALTER TABLE wants. If that's
the case, then maybe the application could be modified to COMMIT
or ROLLBACK its transactions if it knows it's going to be idle for
a while.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)-
On Thu, Feb 03, 2005 at 07:54:22PM +0100, Martin Balint wrote:
> is it somehow possible to hide databases from users?
To what end? Are you trying to keep users out of certain databases?
If so, then you can configure pg_hba.conf accordingly.
--
Michael Fuhr
http://www.fuhr.org/~mf
> significant amonuts of binary data stored in the dbms itself, and in
> addition I have "tsearch" loaded.
Are you using tsearch, or tsearch2? README.tsearch says that as
of 7.4, tsearch is deprecated in favor of tsearch2. Did you install
the 8.0.1 version of whatever mo
you to figure out the DROP statements yourself?
Running "gmake uninstall" in the module's source directory only
removes the .so, .sql, and other installed files -- it doesn't DROP
any objects that have been created in databases.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
e contrib/dblink
module. You can also write set-returning functions in procedural
languages like PL/Perl, PL/Tcl, and PL/Python, so you can exploit
any database-querying capabilities those languages provide. David
Fetter's DBI-Link module does this, for example. I've written my
own fu
leading "ERROR: " but that's easy.
If that doesn't answer your question, then please show what you're
doing, exactly what results you're getting, and exactly what results
you'd like to get.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
--
ed.
(This sounds familiar, like I've participated in a thread on this
topic before. I get the feeling Tom Lane is going to step in and
provide The Real Answer, and that my radio is about to start playing
"I Got You, Babe")
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
On Tue, Feb 08, 2005 at 12:58:34AM -0500, Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> writes:
> >
> > I think you can infer that a process is working with a row in some
> > manner (UPDATE, SELECT FOR UPDATE) by looking at the row's xmax
> > colu
cs/7.3/static/sql-createtable.html#SQL-CREATETABLE-COMPATIBILITY
http://www.postgresql.org/docs/7.2/static/sql-createtable.html#SQL-CREATETABLE-COMPATIBILITY
Should those versions describe ON COMMIT if they don't support it?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---
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-CREATETABL
thing simple in a higher-level PL.
As for the return type, I was going to look at explain_outNode()
in src/backend/commands/explain.c and get some ideas from there.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
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
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
nged (whether updated, inserted or deleted).
Please provide an example of what you're doing, what results you
expect or would like to see, and what results you actually get.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
current implementations
of PL/pgSQL you can do this:
CREATE FUNCTION bit2text(bit) RETURNS text AS '
BEGIN
RETURN $1;
END;
' LANGUAGE plpgsql IMMUTABLE STRICT;
See also CREATE CAST.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)--
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 VAL
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
ED then the tests
I've done so far have always seen xmax change to whoever currently
holds the lock. There's still a race condition, but visibility
doesn't seem to be a problem. Is that not supposed to be happening,
or am I still missing something?
--
Michael Fuhr
http://www.fuhr.
On Thu, Feb 10, 2005 at 08:04:52AM -0700, Ed L. wrote:
> On Wednesday February 9 2005 10:10, Michael Fuhr wrote:
> >
> > Any suggestions for the meantime?
>
> Well, this would be a bit unsightly and not exactly elegant, but
> I'd think you could do this via DB
psycopg is popular.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
> code clean. However, I get an error 'column xy duplicated'. Is this
> so by design?
Use column aliases so the xy columns don't have the same name:
CREATE VIEW viewname AS
SELECT a.xy AS axy,
b.xy AS bxy
FROM foo AS a,
foo AS b
WHERE ...
--
Michae
ND (col1 IS DISTINCT FROM OR
col2 IS DISTINCT FROM ...)
This statement uses IS DISTINCT FROM instead of <> so the comparisons
will handle NULLs properly. If the columns are all NOT NULL then
you could use <>.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
displaying
times as HH:MM:SS.ss, but the extra precision does appear to be there:
In psql:
SELECT tm FROM foo;
tm
-
14:32:41.219443
In Python:
curs.execute('SELECT tm FROM foo')
row = curs.dictfetchone()
print row['tm']
14:32:41.21
print row
type and use a row constructor when you
call it.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
cribes how a trigger can affect the
attempted operation:
http://www.postgresql.org/docs/8.0/static/triggers.html
http://www.postgresql.org/docs/8.0/static/plpgsql-trigger.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)--
On Thu, Feb 10, 2005 at 03:38:05PM -0500, Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> writes:
>
> > Any suggestions for the meantime?
>
> Update to CVS tip ;-)
Done. Below is a simple proof of concept for an explain() function
in PL/pgSQL. It's not necessa
On Thu, Feb 10, 2005 at 03:48:48PM -0700, Michael Fuhr wrote:
>
> Below is a simple proof of concept for an explain() function
> in PL/pgSQL.
Do PL/Perl and the other PLs require any changes to make this work?
I tried $rv = spi_exec_query("EXPLAIN $query") but $rv contained
ty is a problem though...
What about making both ways work? EXPLAIN would format the output
the way it currently looks, and SELECT * FROM explain(...) would
return a resultset.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if
bout might hold a lock."
Does that about sum it up? ;-)
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
16 Kb,62018 rows)
Take a look at contrib/dbsize and contrib/pgstattuple.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
THEN
-- do integer stuff
ELSIF coltype(param) = 'boolean'::regtype THEN
-- do boolean stuff
END IF;
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
OM foo;
idtype | foodatetype
-+-
integer | date
SELECT argtype(x) FROM (SELECT foodate FROM foo) AS s(x);
argtype
-
date
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
script itself is locked up, or just that
locks in the database are causing certain transactions to block?
Have you looked at pg_locks? Are locks being held by idle uncommitted
transactions?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)
With
this configuration you'll be able to see what each connection
is doing.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail c
):
http://www.postgresql.org/docs/8.0/static/catalogs.html
"relation" refers to an oid in pg_class. An easy way to convert
it to a relation name is to cast it to regclass:
SELECT relation::regclass, * FROM pg_locks;
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
-
en when root.crt exists)
until a couple of months ago. Was that change intentional or
accidental?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
your example, you get a separate version for integer, numeric, etc.
Is that the general case for polymorphic functions?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
before the execution of S.
If that's an appropriate reference and if I'm reading it correctly,
then PostgreSQL's behavior appears to comply with the standard.
Maybe one of the developers can confirm or deny.
[1] http://www.wiscorp.com/sql/sql_2003_standard.zip
--
M
lback-to.html
http://www.postgresql.org/docs/8.0/static/backup.html
http://www.postgresql.org/docs/8.0/static/backup-online.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http:/
postgresql.org/docs/8.0/static/ddl-schemas.html#DDL-SCHEMAS-PRIV
http://www.postgresql.org/docs/8.0/static/sql-grant.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 8: explain analyze is your friend
On Thu, Feb 10, 2005 at 10:31:40AM -0700, Michael Fuhr wrote:
>
> UPDATE tablename SET col1 = , col2 = , ...
> WHERE keycol =
> AND (col1 IS DISTINCT FROM OR
>col2 IS DISTINCT FROM ...)
You could also do this with a trigger. If all columns in the old
and new row
Y i
ORDER by i;
i | count
---+---
1 | 2501
2 | 2040
3 | 1463
4 | 994
5 | 3002
(5 rows)
Time: 8765.584 ms
I ran each query several times and those times were typical of both.
With a data set of 100 records, the PL/pgSQL function ran in about
14 seconds, while the
FETCH I'm getting back the error:
>
>ERROR: no value found for parameter 1
What version of PostgreSQL are you using? I think this is fixed
in 8.0.
http://archives.postgresql.org/pgsql-general/2005-01/msg00812.php
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---
fluous. Is it
safe to rely on this behavior?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 8: explain analyze is your friend
801 - 900 of 1313 matches
Mail list logo