) as a table
inside the database. Once you have that, it should be fairly easy to craft an
INSERT ... SELECT that converts the data on the fly.
Or use an ETL tool - Pentaho is popular.
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
I've read that postgres uses MVCC for transactions, and that it creates
snapshots of the database for each transaction. Couldn't the create
database command just use that snapshot?
Database creation cannot be done inside a transaction (one of the few
DDL statements that can't), so no.
--
If
On 26 June 2012 10:59, Christoph Zwerschke c...@online.de wrote:
Our developers like the dblink modules, so I have installed it into the
template1 database. They also like to import old database dumps after
creating new databases with dbcreate. But then they get irritated by the
error messages
Yes, pg_dump output from 8.3 should restore fine to 9.1.
Pardon my ignorance if this changed in recent versions, but shouldn't that read:
Yes, pg_dump 9.1 output from 8.3 should restore fine to 9.1?
--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.
On 22 June 2012 10:45, Stefan Schwarzer stefan.schwar...@unep.org wrote:
Hi there,
I am pg_dump-ing all tables from schema public on the server
/usr/local/pgsql/bin/pg_dump -U user my_database --schema=public
--encoding=UTF-8 dump.sql
and re-loading it via psql on my local machine.
2012-06-19 09:33:38 CESTWARNING: 01000: pgstat wait timeout
2012-06-19 09:33:38 CESTLOCATION: backend_read_statsfile,
.\src\backend\postmaster\pgstat.c:3807
2012-06-19 09:33:41 CESTLOG: 42501: could not rename temporary statistics
file pg_stat_tmp/pgstat.tmp to pg_stat_tmp/pgstat.stat:
the local database in that query
at all. Perhaps you could query the database on port 4001 instead? That would
seem to make more sense for this particular query.
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
--
Sent via pgsql-general mailing list (pgsql-general
On 12 June 2012 14:21, Stefan Schwarzer stefan.schwar...@unep.org wrote:
But the make process gives me this:
cd contrib/tablefunc
tablefunc $ make
gcc -Os -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
I think that's where it looks for the standard C headers?
In that case that's what
-^^
You can't mix those. I don't think SQL functions support named parameters, so
using positional parameters throughout would be the solution.
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.
--
Sent
On 13 June 2012 15:12, Alexander Farber alexander.far...@gmail.com wrote:
And when I split my statements into multiple
prepare()/execute() or query() calls,
then the temp. tables aren't found anymore.
Did you remember to wrap them in a transaction like you did in your
prepared statement?
--
On 11 June 2012 10:42, gipsy-king1 stue...@gis-consult.de wrote:
I have to import and watch/edit data stored in an .backup-file. This is a
backup-file, stored by an other firm.
Can you tell me what I have to do?
Is that a Postgres dump? If so, is it a plain text dump, a compressed
dump or a
On 5 June 2012 23:51, Aleksander Rozman andy.roz...@gmail.com wrote:
Like I said before all databases were missing... One of thoose database was
very important, but since I didn't have time I didn't pursue it further.
If it was very important, that means that you have backups, right?
From the
On 6 Jun 2012, at 16:33, Frank Lanitz wrote:
the result is much bigger than running a df -s over the postgres folder
- Its about factor 5 to 10 depending on database.
Is your du reporting sizes in Bytes or blocks or ...?
Alban Hertroys
--
The scale of a problem often equals the size
reason or another.
You can create updateable views by adding INSERT, UPDATE and DELETE rules to
them.
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http
On 29 May 2012 14:58, Adrian Klaver adrian.kla...@gmail.com wrote:
Q: Why can't I reload the SQL script I dumped in the SQL window?
A: The following limitations currently exist in SQL script execution:
* 'psql' commands such as '\connect' will not work at all.
Wait a minute! They use
On 24 May 2012 15:33, Pavel Stehule pavel.steh...@gmail.com wrote:
hello
I wrote patch for PostgreSQL 9.1 and 9.2 that adds more linestyles and
border styles to console
Nice job!
I'm not entirely enthusiastic about the option names though. Would it
help to split the setting into several?
For
On 11 May 2012 15:57, Inanc Seylan inanc.sey...@gmail.com wrote:
Hi all,
I have implemented a user-defined function in C that returns a boolean value
after some computation. Now I have a query Q such that when I specify the
function in the WHERE clause of Q, Q runs in 40 secs and if I don't
On 10 May 2012 11:30, Daniel McGreal daniel.mcgr...@redbite.com wrote:
I put the multi-value inserts in as I was
curious as to why prepared statements would be slower given they only plan
the query once (as also does the multi-value insert, I assume).
That's a common misconception.
The reason
On 10 May 2012 15:05, Radosław Smogura rsmog...@softperience.eu wrote:
May I ask what kind of planning may occur during insert?
Well, for example, if there's a unique constraint on the table then
the database will have to check that the newly inserted values don't
conflict with values that are
script removal of the pid file if its creation date is
before the time the system started booting up.
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http
.
I was wondering, would an updatable view with a pseudo-column for the old_id
do it?
Alban Hertroys
--
Screwing up is an excellent way to attach something to the ceiling.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http
On 3 May 2012 09:39, Alexander Reichstadt l...@mac.com wrote:
Thanks, that's answering my question. In Objective-C as well as many other
I notice that you're talking about pqlib instead of libpq. Perhaps
pqlib is an Obj-C wrapper around libpq that most of us just don't know
about? Obj-C is not a
On 27 April 2012 16:47, leaf_yxj leaf_...@163.com wrote:
David, Thanks for your reminder. My database version is 8.2.15. And My os
platform is Linux 5.5. Thanks I really appreciate it. Grace
There is no such thing as Linux 5.5.
But since you're on _a_ Linux distribution (there are many),
On 24 April 2012 16:15, Emi Lu em...@encs.concordia.ca wrote:
Good morning,
May I know is there a simple sql command which could return missing numbers
please?
For example,
t1(id integer)
values= 1, 2, 3 500
select miss_num(id)
from t1 ;
Will return:
===
.contract_name
order by b1.org_id, b1.contract_name;
Alban Hertroys
--
Screwing up is an excellent way to attach something to the ceiling.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 19 April 2012 16:19, Yvon Thoraval yvon.thora...@gmail.com wrote:
why ?
Because you're doing it wrong, apparently. However, since you left out
all the relevant information that could have helped determining what
you're doing and what errors you got, we can't help you.
Please provide the
On 19 April 2012 16:09, Chris bajasa...@gmail.com wrote:
Hi Chris,
It is postgres 9.1, with default settings. The autovacuum settings are all
commented out, I have not change dthem. My understanding is that analyze is
also run automatically by default.
So, I believe the answer to both
On 16 April 2012 09:24, Liam Caffrey liam.caff...@gmail.com wrote:
Hi,
There is a feature that I have used in SQL Server which I find really useful
for debugging (without using a debugger!!).
It is this I can write multiple select * from some_table statements
throughout my stored
test data first. There's
definitely a risk of losing everything in the database. It's probably a
_really_ bad idea :P
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
On 11 April 2012 09:15, Sidney Cadot sid...@jigsaw.nl wrote:
Dear all,
As a hobby project, I am toying around with a database containing
about 5 million chess games. On average, these games have about 80
positions (~ 40 moves by both black and white), which means there are
about 400 million
.
Of course, that may not be applicable to the her situation.
Alban Hertroys
--
Screwing up is an excellent way to attach something to the ceiling.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql
The tablename doesn't exist.doesn
END IF ;
END;
$$ LANGUAGE 'plpgsql' security definer;
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org
behave as Pavel
describes. Until you add an ORDER BY to your query.
A more robust implementation would be:
select anum, 0 from t1 where anum = 4
union all
select 100, 1 limit 1
order by 2;
If you don't want the extra column in your query results, you can wrap the
query in another select.
Alban
can't notify your
browser-based application from your server. You will have to poll.
Googling for ajax push turned up this explanation:
http://www.subbu.org/blog/2006/04/dissecting-ajax-server-push
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
--
Sent via pgsql
On 29 March 2012 09:11, John R Pierce pie...@hogranch.com wrote:
On 03/28/12 10:32 PM, Carson Gross wrote:
I've got a pretty big database (~30 gigs) and when I do a pg_dump, it ends
up only being 2 gigs.
I suppose you're talking about a plain text dump here? A compressed
dump would likely[*]
On 27 March 2012 11:33, Akshay Joshi akshay.jo...@enterprisedb.com wrote:
Hi
I am facing issue while restoring the database. I have taken the backup of
my database using pg_dump and then create new database and try to restore it
using pg_restore. I am using PostgreSQL 9.0.
What is the error?
On 27 March 2012 15:12, Akshay Joshi akshay.jo...@enterprisedb.com wrote:
On Tue, Mar 27, 2012 at 6:15 PM, Alban Hertroys haram...@gmail.com wrote:
On 27 March 2012 11:33, Akshay Joshi akshay.jo...@enterprisedb.com
wrote:
pg_restore: restoring data for table sample
pg_restore
On 26 March 2012 11:32, and andreaesposit...@gmail.com wrote:
I have read it on logging
psql -h host database create_some_func.sql
but then i am forced to redo the login.Is there another way to do it?
If you're working on the database server, then you can skip the -h
host bit and use a
in your PK ;)
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
on the slave.)
I recall someone in here had a similar problem where the table's FILLFACTOR on
the slave was different from the one on the master. Perhaps that would explain
the gaps you're seeing?
Alban Hertroys
--
Screwing up is an excellent way to attach something to the ceiling.
--
Sent via
the restore.
CREATE EXTENSION is new to Postgres 9.x, so your pg_restore is probably from a
Postgres 8.x installation.
Alban Hertroys
--
Screwing up is an excellent way to attach something to the ceiling.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
of tablespaces, but it's possible
that moving it would trigger a rewrite of the contents such that the effect
would be similar to what CLUSTER would do for you - it probably just moves the
files though, in which case you'd perform the CLUSTER on the new TABLESPACE and
then move it back.
Alban
On 12 March 2012 09:20, Nur Hidayat hidayat...@gmail.com wrote:
FYI, after I changed text field into character varying, I vaccuum the whole
database, resulting in much smaller database size
What I think that happened in your case is that because of the
data-type change every row in the table
serialise transactions on one connection just fine.
Alban Hertroys
--
Screwing up is an excellent way to attach something to the ceiling.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
COPY from STDIN and supply the contents of the file after that.
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql
).
And look into parallelising that workload. PG was designed for parallel
workloads. Using a single process you're still paying for that and not
benefitting.
Alban Hertroys
--
Screwing up is an excellent way to attach something to the ceiling.
--
Sent via pgsql-general mailing list (pgsql
On 17 February 2012 17:19, Scott Marlowe
Have you tried casting to varchar(1000) or something like that?
Don't MySQL's varchars only go to 255? That's why every MySQL database
uses blobs for text data, isn't it?
--
If you can't see the forest for the trees,
Cut the trees and you'll see there
On 7 February 2012 06:43, Lockas w_war...@hotmail.com wrote:
OK .. my offending line number is 4533
How can i remove it while copying ?
You can remove it before copying or after, but not while.
--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.
--
On 7 February 2012 15:03, mgo...@isstrucksoftware.net wrote:
How do I convert this to PostGres. I'm getting a error
ERROR: syntax error at or near (
LINE 23: set chr = substr(lfeid,idx,1);
Assuming you are writing this as pl/pgsql code, the way you do your
variable assignments is wrong on
On 6 February 2012 07:37, Lockas w_war...@hotmail.com wrote:
I've tried a lot of sizes
but I still have messages in my log saying:
* ---
ERROR: value too long for type character varying(200)
--- *
Why is this? There are no other varchar(200) columns in my DB at all,
no other table.
On 6 February 2012 13:26, Lockas w_war...@hotmail.com wrote:
*
ok then if I want to except that row from copying. how i can write it ?*
You can either remove the offending line(s) from the csv file or copy
to a staging table that doesn't have those limitations on field
lengths first.
--
If
this is related.
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
a
LEFT JOIN (SELECT advertisement_id, AVG(price) AS price, SUM(price) AS
download_revenue, COUNT(1) AS downloads FROM songs_downloaded
GROUP BY advertisement_id) AS sd ON a.id =
sd.advertisement_id AND a.advertiser_id = sd.advertiser_id
WHERE advertiser_id = 6553406
Alban Hertroys
--
Screwing up
On 24 January 2012 09:29, Chris Angelico ros...@gmail.com wrote:
On Mon, Jan 23, 2012 at 11:17 PM, Douglas Eric sekk...@hotmail.com wrote:
I suggest to change this behavior. If one makes a SELECT statement without
any ORDER BY, it would be
clever to automatically sort by the first primary key
On 23 January 2012 14:48, Sim Zacks s...@compulab.co.il wrote:
In my tests, if the joined rows are sorted it always updates with the
first row. Does anyone have any other experiences, or should I be
concerned that at some point it will behave differently?
I checked my tests again. It always
On 10 January 2012 15:46, Jerry Sievers gsiever...@comcast.net wrote:
We're trying to migrate the app from mysql to pg and this is one of
the performance bottle-necks. Unfortunately it slows down every
request by about 5 seconds.
That's a delay that could be due to DNS problems or other
On 9 January 2012 09:56, Damiano ALBANI
I believe DB2 is pretty much it in this area.
For the record, it looks like MS SQL Server has some equivalent feature :
FILESTREAM.
And Oracle has BFILE.
I've actually been thinking about how to implement something like this
for Postgres, but the
On 9 January 2012 12:36, John R Pierce pie...@hogranch.com wrote:
On 01/09/12 3:07 AM, Alban Hertroys wrote:
For the record, it looks like MS SQL Server has some equivalent feature :
FILESTREAM.
And Oracle has BFILE.
aren't these things functionally similar to PG's LO (large object
On 9 January 2012 14:55, Radosław Smogura rsmog...@softperience.eu wrote:
So responsible for this is database, but database doesn't have
real BLOBs, this what is made in PG JDBC driver is just not perfect way
to add this functionality to PostgreSQL.
I think you should elaborate on what you
that it was in the SQL query
string.
This is probably documented, but I don't have time to dig into the manuals
right now.
Alban Hertroys
--
Screwing up is an excellent way to attach something to the ceiling.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make
much do female Asians make compared to their
mobility.
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
You accidentally clicked Reply instead of Reply-all ;)
On 4 Jan 2012, at 3:03, 邓尧 wrote:
On Tue, Jan 3, 2012 at 3:42 PM, Alban Hertroys haram...@gmail.com wrote:
On 3 Jan 2012, at 5:20, 邓尧 wrote:
Hi,
I'm new to pgsql, I need the do something like the INSERT IGNORE in
mysql. After
On 31 December 2011 00:54, Simon Windsor simon.wind...@cornfield.me.uk wrote:
I am struggling with the volume and number of XML files a new application is
storing. The table pg_largeobjects is growing fast, and despite the efforts
of vacuumlo, vacuum and auto-vacuum it keeps on growing in size
amounts of data. I seem to recall pgfouine is such an application, but I've
never used it.
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http
to the query anyway, that's up to personal preference:
select 1 from pref_users where id=_from and (vip is not null or vip
current_timestamp + interval '1 week');
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.
--
Sent via pgsql-general
that
if recode runs into problems recoding a string to UTF-8 it will leave it
untouched, but that will NOT happen in all cases. Sometimes it will succeed,
even though the result has no meaning to a human.
That's a nasty problem you ran into, I hope the archives provide the wisdom you
need.
Alban
to kernel-level).
If your PG is pre-9, then you'll want some mechanism that keeps a pool of
pending data for RPC. In 9.0 and up you can send record information along with
NOTIFY.
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
--
Sent via pgsql-general mailing
won too. I consider it a compliment :)
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref
On 20 December 2011 15:35, Adrian Klaver adrian.kla...@gmail.com wrote:
To elaborate on my previous answer, search_path is in postgresql.conf because
it
is tied to the database cluster not a particular database.
Not necessarily, it can also be tied to a schema or a role or (I
assume) a
On 20 December 2011 16:01, Merlin Moncure mmonc...@gmail.com wrote:
On Tue, Dec 6, 2011 at 10:56 AM, Joe Miller joe.d.mil...@gmail.com wrote:
guess who won! :-D
Ah cool. I'll wave when I get outside :)
--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no
NOT NULL DEFAULT 0
);
Yes, those cascades are on purpose - the data in C is useless without the
accompanying record in A. Also, the PK makes sure it stays a 1:1 relationship.
Alban Hertroys
--
Screwing up is an excellent way to attach something to the ceiling.
--
Sent via pgsql-general
On 19 December 2011 16:26, MURAT KOÇ m.ko...@gmail.com wrote:
Hi Adrian,
I wrote a desktop application on Windows by using Npgsql.dll. So, I send
SQL statement to database from this application code. I can't use psql
command line (I know \password command changes password encrypted text).
Of course, we could create login credentials, login configuration options
for every DBA colleagues. But, as I said previous that big problem is
PostgreSQL logs include changing passwords on clear-text not encrypted
No, the big problem is that you don't consider your fellow DBA's
reliable.
is sufficient - no need to
check whether there are other matches after the first one.
That said, wouldn't a foreign key constraint help you even better? If
questions.user_id is required to refer to an existing users.id (by an FK
constraint), than the check in the query becomes moot.
Alban
that are not gluten-free of course.
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 7 December 2011 10:08, mamatha_kagathi_c...@dell.com wrote:
The procedure definition is
CREATE OR REPLACE PROCEDURE
-- So I am not calling a function but a procedure.
I don't think CREATE PROCEDURE is actually a valid command in
Postgres. The 9.0 documentation seems to confirm that
On 6 December 2011 12:00, Adarsh Sharma adarsh.sha...@orkash.com wrote:
select * from table where lat IS NULL;
can you explain how it works or any link that explain the difference between
2 queries.
That's because of the 3-valued logic of SQL.
x=NULL always evaluates to NULL, because it is
constraint violation. If you do, then it needs to modify
the relevant rows in the child table.
Likewise, INSERTs and UPDATEs in the child table need to verify that - if their
reference key changed - they're still referencing a valid row.
Alban Hertroys
--
Screwing up is an excellent way
a DELETE trigger or rule on this table that does something
unexpected?
It is indeed a possibility that this is a corrupted index, but that is not
something that happens unless more serious matters have been (or are) at hand,
like hardware failures.
Alban Hertroys
--
The scale of a problem often
On 1 December 2011 13:16, Amitabh Kant amitabhk...@gmail.com wrote:
I am trying (through conditional left join?) to fetch all records of tbldata
and the operator name from tbloperators who was operating the unit at event
time. If no operator was present, it should return null.
I think you want
On 28 November 2011 13:36, JavaNoobie vivek...@enzentech.com wrote:
Well I'm not fond of using a temporary table either. But how would I be able
to iterate over a set of consumers while using a join ? From my (limited) ,
using only a join I would only be able to generate the data for a
On 24 November 2011 14:52, Gavin Casey gpjca...@googlemail.com wrote:
This works in 9.1.1 but seems like a bug to me:
create function xout(_x INTEGER)
returns integer
as $$
begin
_x = _x * 2;
I would expect an error here, as having an expression without a
context (an if-statement, for
have a naming conflict
between your variable name and a column name in that second query: id and Id
are the same.
Alban Hertroys
--
Screwing up is an excellent way to attach something to the ceiling.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes
On 15 November 2011 12:58, Venkat Balaji venkat.bal...@verse.in wrote:
Hello,
We are facing an issue while installing Postgres-9.0.1 on CentOS-5.
That name always makes me wonder when they're releasing PennyOS or DollarOS :P
Below is the error we are encountering -
./configure -- output
On 10 November 2011 02:54, Wes Cravens wcrav...@cortex-it.com wrote:
On 11/9/2011 7:34 PM, David Johnston wrote:
Use WITH RECURSIVE instead of a function.
I apologize but I don't know how that would work. An example would help.
There are fine examples in the documentation for the SELECT
On 10 November 2011 08:56, Kalai R softlinne...@gmail.com wrote:
please suggest, what are the configurations should I do in postgres to avoid
these problem.
Thank You
None, it's not a Postgres problem. Most likely it is a problem with
your Windows installation.
You have files disappearing,
On 10 November 2011 15:43, shuaixf shua...@gmail.com wrote:
--*Test SQL*
CREATE TABLE tb(id integer primary key,
name varchar(32),
parent integer);
INSERT INTO tb VALUES(1, 'iPhone', NULL);
INSERT INTO tb VALUES(2, 'HTC', NULL);
INSERT INTO tb
On 9 November 2011 06:02, slavix mikerin.sl...@gmail.com wrote:
Hello,
I am new to postgres, but need to resolve this error:
PGError: ERROR: current transaction is aborted, commands ignored
until end of transaction block
: SELECT 1 FROM trades WHERE (trades.uuid =
documentation at:
http://www.postgresql.org/docs/8.3/static/tutorial-transactions.html
P.S. Please don't top-post on this list.
P.P.S. And please include the list in your replies (reply all).
On Thu, Nov 10, 2011 at 8:30 AM, Alban Hertroys haram...@gmail.com wrote:
On 9 November 2011 06:02, slavix
... WITH RECURSIVE would be handy for something like
get_ancestors or get_descendents.
If you only need one level of recursion, you can just use a self-join.
SELECT parent.id AS parent_id, child.id as child_id
FROM thingy AS parent
LEFT OUTER JOIN thingy AS child ON (child.parent_id = parent.id)
Alban
On 3 November 2011 15:15, hubert depesz lubaczewski dep...@depesz.com wrote:
Do the xobject_id values have other negative numbers or is -1 just a special
case? The only thing I can think of is a corrupted index on xobject_id.
minimal xobject_id in source table is 1000.
index on xobject_id
On 3 November 2011 09:25, hubert depesz lubaczewski dep...@depesz.com wrote:
All looks good. pg_dump of the table also doesn't show any strange problems,
and is duplicate free. But:
$ create table zzz as select * from sss.xobjects;
SELECT
$ select xobject_id, count(*) from zzz group by
2011/10/30 Devrim GÜNDÜZ dev...@gunduz.org:
I have no intention to build the -id packages again, given the lack of
request (first request since 8.3.11...). You can build your own packages
quite easily, though.
But... aren't integer datetimes supposed to be the default, with float
datetimes
referenced from table
pref_scores. CONTEXT: SQL statement delete from pref_games where
gid in (select gid from pref_scores where id= $1 )
It would without cascades defined, yeah. Did you skip over the first paragraph
of David's reply?
Alban Hertroys
--
If you can't see the forest for the trees
On 28 October 2011 09:02, Mohamed Hashim nmdhas...@gmail.com wrote:
EXPLAIN select * from stk_source ;
QUERY
PLAN
-
Result (cost=0.00..6575755.39 rows=163132513 width=42)
On 28 October 2011 13:37, Alban Hertroys haram...@gmail.com wrote:
On 28 October 2011 09:02, Mohamed Hashim nmdhas...@gmail.com wrote:
Please don't cross-post to mailing lists for multiple projects.
--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest
INTO.
CONTEXT: compilation of PL/pgSQL function pref_delete_user near line 3
SELECT INTO in PL/pgSQL isn't the same command as SELECT INTO in SQL.
Check the documentation for the two ;)
Alban Hertroys
--
Screwing up is an excellent way to attach something to the ceiling.
--
Sent via pgsql-general
On 26 October 2011 10:08, Alexander Farber alexander.far...@gmail.com wrote:
create table pref_games {
gid serial,
rounds integer not null,
finished timestamp default current_timestamp
}
then how do I find the new game id after I've just created it
there is even a section named Calling functions, but it
seems to focus on writing functions instead.
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http
301 - 400 of 1292 matches
Mail list logo