slus...@gmail.com (Josh) writes:
> I'm trying to do a DELETE FROM on my large table (about 800 million
> rows) based on the contents of another, moderately large table (about
> 110 million rows). The command I'm using is:
>
> DELETE FROM records WHERE id NOT IN (SELECT id FROM unique_records);
>
>
gerame...@gmail.com (Gera Mel Handumon) writes:
> Is it possible to get postgresql server ip address using sql command?
You can get the IP address tied to a specific connection...
See the function inet_server_port().
Note, however, that the server may have a multiplicity of IP addresses,
so th
sfr...@snowman.net (Stephen Frost) writes:
> People who are trying to parse psql's output directly should realize
> they probably are going about it the wrong way. :)
There's a set of people I need to tell that to...
--
select 'cbbrowne' || '@' || 'cbbrowne.com';
http://cbbrowne.com/info/internet
shulkae writes:
> I am newbie to postgres/SQL.
>
> I want to delete all rows exceeding 400 hours (10 days) and I want to
> limit deletion of only 100 records at a time.
>
> I was trying the following in PostgreSQL:
>
> DELETE from mytable WHERE (now() - timestamp_field > INTERVAL '400
> hour' ) L
Andre Rothe writes:
> Where are stored the sequence information? How I can query the
> properties of a sequence like increment, max/min value, cache?
> I'm looking for a table like user_sequences in Oracle, where I
> can query all of my sequences.
cbbrowne=# create sequence foo;
CREATE SEQUENCE
c
ja...@xnet.co.nz (Jasen Betts) writes:
> On 2009-04-12, Dirk Jagdmann wrote:
>>> When you need to choose between enum types, domain types or lookup
>>> tables with foreign keys, what do you usualy choose?
>>
>> When I have a column with valid values that I know when writing my
>> tables and that w
liaogz82 writes:
> I am new to Postgresql. I was wondering is there a way to convert
> MySQL to Postgres? Is there a utility in the market that does that?
There are many possibilities to choose from:
http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL
--
select 'cbbrow
[EMAIL PROTECTED] (Gerardo Herzig) writes:
> Hi all. Im facing a situation where i have to replicate a table from
> database A in databases B,C,F and so on.
>
> The first (and only) thing i have in mind is using triggers with dblink
> for comunications with the other DB's.
>
> I dont even like the
[EMAIL PROTECTED] (Bryan Emrys) writes:
> (Trying to start a new thread instead of my accidental intrusion into another
> thread)
>
> Hello Everyone,
>
> In a text-heavy database, I'm trying to make an initial design decision in
> the following context.
>
> There is a lot of long text that I co
[EMAIL PROTECTED] ("Gavin 'Beau' Baumanis") writes:
> I am hoping that you might be able to give me some assistance with the
> following task!
> I have a database with nearly 200 tables and I need to find all tables
> that contain a column of myColumnName.
>
> I was hoping there might be a built-in
[EMAIL PROTECTED] (James Robinson) writes:
> Academic question here:
>
> Given a table with a pair of any sort of line-segment-esqe
> range delimiter columns, is it possible to build a unique index to
> enforce non-overlapping ranges? Such as:
>
> create table test
> (
>
[EMAIL PROTECTED] (Tom Lane) writes:
> Alvaro Herrera <[EMAIL PROTECTED]> writes:
>> Gerardo Herzig escribió:
>>> Yes, the TRUNCATE statement is not sql ansi, maybe is a more low level
>>> thing than i think.
>
>> TRUNCATE currently does not fire triggers, but that doesn't mean it's
>> impossible
[EMAIL PROTECTED] (Gerardo Herzig) writes:
> Hi all. Acording to the docs, TRUNCATE will not fire a DELETE trigger
> on the table being truncated.
> There is a way to capture a TRUNCATE in any way?
I think there's some sort of "to do" on that...
It ought to be not *too* difficult (I imagine!) to
[EMAIL PROTECTED] (Andrew Sullivan) writes:
> On Mon, Jan 07, 2008 at 05:02:27PM +0100, Peter Kovacs wrote:
>> I just wanted to give my cheers for DISTINCT ON. It is a great
>> feature, I've just found a really good use for it. I am just wondering
>> why it didn't make it into the standards.
>
> Li
[EMAIL PROTECTED] (Bruce Momjian) writes:
> Peter Kovacs wrote:
>> I just wanted to give my cheers for DISTINCT ON. It is a great
>> feature, I've just found a really good use for it. I am just wondering
>> why it didn't make it into the standards.
>>
>> On a slightly unrelated note, I had the opp
[EMAIL PROTECTED] (Gregory Stark) writes:
> "Aleksandr Vinokurov" <[EMAIL PROTECTED]> writes:
>
>> Gregory Stark wrote:
>>>
>>> What version are you running with?
>>
>> 8.0.1, sorry for missing.
>
> There have been 12 bug-fix releases since then on the 8.0 branch including
> updating timezones to r
[EMAIL PROTECTED] (Sean Davis) writes:
> I am looking for reporting extensions such as windowing, ranking,
> leads/lags, etc. for postgresql. A quick google search turned up
> some "working on it" type results, but I was wondering if anything
> actually existed up to this point?
No, nothing exist
[EMAIL PROTECTED] (Richard Huxton) writes:
> Jyoti Seth wrote:
>> Hello ,
>> I have two postgres databases on different linux servers. Postgres
>> database
>> on one server has some tables that needs to be synchronized from the other
>> postgres database . What should be the best method for this.
[EMAIL PROTECTED] (Wei Weng) writes:
> On Monday 25 June 2007 15:22, Susan Young wrote:
>> Hi Wei,
>> That's OK - Enjoy!
>> Susan
>>
>> Wei Weng wrote:
>> > Can I take next week off?
>> >
>> > Thanks!
>> >
>> > Wei
>
> hi, susan, a change of plan. :)
>
> Instead of the whole week, I just wanted to
[EMAIL PROTECTED] (Andrew Sullivan) writes:
>> Does postgres provide 64 bit support? If so is there a precompiled 64
>> bit version for AIX? I have the 32 bit GCC and can compile 32 bit. 64
>> bit GCC I have not gotten stabilized. (I cold use a tip in that
>> direction if anyone lese has experience
"Santosh" <[EMAIL PROTECTED]> writes:
> Hi All.
>
> My setup is as follows:
> OS: Sun Solaris 5.8.
> Postgres: 7.2.4
>
> I have very large database, which contain 15 tables and each table is
> contain more than 10,00,000 records.
>
> My application is parsing text data files and inserting records i
[EMAIL PROTECTED] (Joe) writes:
> On Thu, 2006-10-12 at 01:25 -0400, Tom Lane wrote:
>> It does seem like this is wrong, in view of SQL92's statement about
>> ALTER TABLE DROP COLUMN:
>>
>> 4) If RESTRICT is specified, then C shall not be referenced in
>> the of any view desc
"Bit Byter" <[EMAIL PROTECTED]> writes:
> I would like to know what the underlying SQL statement will look
> like, so that I can use this knowlege to build a generic parser that
> creates SQL statements from the "English like" text, using the
> syntax I described above.
I seem to recall that Lotus
Paul Maier <[EMAIL PROTECTED]> writes:
> Hello everybody,
>
> Why does...
>
> BEGIN;
> SELECT nextval('test.test_seq') AS id;
> ROLLBACK;
>
> ...still increase the sequence after aborting the transaction? This
> nextval-command should be reverted after rolling back, right? Same with an
> ABORT:
>
>
[EMAIL PROTECTED] (Scott Marlowe) writes:
> On Mon, 2006-07-10 at 11:25, Andrew Sullivan wrote:
>> On Mon, Jul 10, 2006 at 11:27:52AM -0400, Kevin Bednar wrote:
>> > Looking to keep 2 databases in sync, at least semi-realtime if possible,
>> > although running a batch update every x mins wouldn't
darcy@druid.net ("D'Arcy J.M. Cain") writes:
> And even given all of that, I would probably still use serial.
>> and has been recommended. But having a hash function over the address
>> column as the primary key means I can always regenerate my primary key
>
> Danger, Will Robinson. The phrase "re
[EMAIL PROTECTED] (Andrew Sullivan) writes:
> On Thu, Jul 06, 2006 at 10:16:42PM +1200, David Clarke wrote:
>> column that is calculated from another column in the table but I think
>> it would still be more effective than a serial id.
>
> There is the problem that the hash is not proved unique (in
"codeWarrior" <[EMAIL PROTECTED]> writes:
> I never use anything other than "id SERIAL NOT NULL PRIMARY KEY" for my
> PKEY's -- as an absolute rule -- I guess I am a purist... Everything else
> (the other columns) can have unique constraints, etcetera and be FOREIGN
> KEYS, etc...
>
> Try INSER
gry@ll.mit.edu (george young) writes:
> On 9 Feb 2006 08:22:59 -0800
> "BigSmoke" <[EMAIL PROTECTED]> threw this fish to the penguins:
>
>> If my tables have one or more UNIQUE constraints/indices, I still add a
>> "id SERIAL PRIMARY KEY" field to most of my tables. This makes
>> referencing easier
[EMAIL PROTECTED] ("Jim C. Nasby") writes:
> On Wed, Dec 21, 2005 at 12:34:12AM +0100, [EMAIL PROTECTED] wrote:
>> Hi,
>>
>> Utilize CLUSTER; (after vacuum) to reorder the data.
>
> Why would you vacuum when cluster is just going to wipe out the dead
> tuples anyway?
There is one reason to VACUUM
[EMAIL PROTECTED] (Ferindo Middleton Jr) writes:
> Is there a way to change the position attribute of a column in a
> table? I have data that I need to import into various tables in my db
> on a consistent basis... I usually us e the COPY ... FROM query but I
> can't control the -order- of the fiel
[EMAIL PROTECTED] ("Brandon Metcalf") writes:
> p == [EMAIL PROTECTED] writes:
>
> p> Brandon Metcalf wrote:
> p> > Is there a way to check for the existence of a column in a table
> p> > other than, say, doing a SELECT on that column name and checking the
> p> > output?
>
> p> SELECT * FROM
[EMAIL PROTECTED] writes:
> Is it possible to delete a record from all tables in the database at
> the same time, without having to execute a separate "DELETE" statement
> for each table?
>
> I have a situation where I need to delete user records from our system.
> The user account information is s
[EMAIL PROTECTED] writes:
> I have been having some trouble with plsql stored procs in postgres in
> that I can
> make a table name a variable in the stored proc. Is there some
> special way to make this happen that I am unaware of?
>
> For example, I want to do something like:
>
> stored_proc(in
[EMAIL PROTECTED] ("Bath, David") writes:
> Question(s):
> * Am I being realistic, or should I grit my teeth and clone code from
> trigger to trigger and column to column?
> * Is this something I should try and do using domains, types and
> cast functions from "text" or some horrible combinatio
[EMAIL PROTECTED] ("Greg Patnude") writes:
> Data validation and purification should be performed at the
> application layer -- you should format your data appropriately
> BEFORE trying any INSERT/UPDATE operations.
It seems to me that one might create some stored functions that can do
some valida
[EMAIL PROTECTED] (Achilleus Mantzios) writes:
> O Chris Browne έγραψε στις Jul 26, 2005 :
>> You can get a savings of about 4% of the space, but at the cost of
>> taking an appreciable outage during which the database is not usable.
>
> 1st not all database is unusable, durin
[EMAIL PROTECTED] (Achilleus Mantzios) writes:
> O Christopher Browne έγραψε στις Jul 26, 2005 :
>
>> > Hello
>> >
>> > Would you like to advice to use REINDEX DATABASE on regular basis ?
>> >
>> > if (yes)
>> > how it should be connected with VACUUM FULL ANALYZE which is run
>> > regularly ? (rei
[EMAIL PROTECTED] (Varun Mehta) writes:
> If I run an EXPLAIN on this query I can see that it is doing a
> sequential scan, which seems quite needless, as surely this
> information is cached in some secret location.
That would in fact surely *NOT* be the case.
If you have multiple users performin
[EMAIL PROTECTED] (Alain) writes:
> Andrew Sullivan escreveu:
>> On Thu, May 12, 2005 at 01:07:00PM -0600, [EMAIL PROTECTED] wrote:
>>
>>>Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle? If
>>>so, we can write the following query:
>> No. What is the purpose of your query? You coul
[EMAIL PROTECTED] ("Muhyiddin A.M Hayat") writes:
>> There is an easy way to do this; write a plpgsql set returning
>> function which adds the balance to the last column of the table. That
>> query will always have a cost in both time and memory proportional to
>> the size of the table, and the me
[EMAIL PROTECTED] ("Greg Patnude") writes:
> There's a difference between "natural" order (the location in the
> database or on disk) and "record" order (the order specified by the
> primary key)...
That's well and fine; I could see the "natural order" in which data is
returned varying over time i
[EMAIL PROTECTED] writes:
> Why it? I can't undestand why the new record location was change. Shouldn't it
> apper at the LAST record???
> What need I do??
SQL only imposes an order on the return set if you add an "ORDER BY"
clause.
You can't expect any particular order to either recur or NOT rec
[EMAIL PROTECTED] ("Chris Cox") writes:
> Hi all,
>
> For some reason I just can't get this to use the index for the following
> query. I'm using PostgreSQL 7.3.4.
>
> Here's the details (let me know if you need anymore information to provide
> any assistance):
>
> Indexes: person_pkey primary key
[EMAIL PROTECTED] (Louie Kwan) writes:
> Do anyone of you aware of any PG import tool same as SQL*LOADER in ORACLE
>
> We are doing some DataWarehouse work and need to import a large set of data
> from csv files.
>
> We are trying a import tool from ems-hitech.com, but I have troubles when
> loadin
45 matches
Mail list logo