craigp wrote:
i had some questions/thoughts on using sequences vs oids as pks... it's a
common requirement to obtain the last value of a sequence after an insert. most
other databases support such a feature, but since oid's are deprecated, and
only oid's are returned, this isn't supported by post
It's here now. I think it used to be in the main distro, but has been
moved out recently.
http://pgfoundry.org/projects/pgtcl/
On 24 Jul 2006 03:07:59 -0700, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
Hello everybody,
I must replace an old server by a new one, and I decide to upgrade
postgr
Title: [JDBC] Invalid column display size. Cannot be less than zero
i want to know what error code will be returned if the database
does not exist.
i have the following list, howvere do not know which one shall be
returned when database itself does not exits
http://www.postgresql.org/
Hi list,
somehow it seems that in my pg_xlog directory not all wal files are deleted
after copying them to the archive directory even though the archive_status is
done for all of them.
Is it safe to delete them after they were copied or is it safe to use 'mv' as
archive_command?
Thanks!
--
Ch
On 7/25/06, Redefined Horizons <[EMAIL PROTECTED]> wrote:
Merlin,
I am actually working on a spatial extension for PostgreSQL that is
similar to PostGIS, but compatible with a geometry library I am
developing.
I had first thought of using a "table" only desgin, with no custom
data types, to stor
> Did you try the example I posted? What happens if you do the
> following? First set up a couple of tables:
I no longer have 7.4 running. I'll have to check and see if can test.
> Is it possible that your foreign key constraints are DEFERRED in
> 7.4 but not in 8.1? That would change transac
Am Dienstag, 25. Juli 2006 00:01 schrieb Stephan Szabo:
> The above basically looks like:
> CASE WHEN THEN ELSE
> END.
>
> In SQL92 at least, the form of which looks like (SELECT
> ...) is which is limited to 1 column and 1 row. The
> other subquery forms don't look legal in that position unl
Christian Rengstl wrote:
> Hi list,
>
> somehow it seems that in my pg_xlog directory not all wal files are
> deleted after copying them to the archive directory even though the
> archive_status is done for all of them. Is it safe to delete them
> after they were copied or is it safe to use 'mv'
On Tue, Jul 25, 2006 at 07:12:28AM -0500, Wes wrote:
> > Unless I'm misunderstanding you or a bug was fixed between 7.4.5
> > and 7.4.13 (the version I'm running), I'm not convinced that last
> > statement is true. EXCLUSIVE conflicts with all lock types except
> > ACCESS SHARE; foreign key refere
Emi Lu <[EMAIL PROTECTED]> writes:
> I did make distclean, and I retried "configuration and ", but I still
> saw the following errors:
The only other theory I can think of is that the linker is picking up
an old libpq.so from /home/postgresql/lib because of the -rpath switch
... which it should n
craigp wrote:
1) does it make sense (and would it be possible) to make a rule which would,
say, somehow write into the oid field of a tuple to be returned by lastoid? i'm
assuming here that the database would not have oid's enabled.
We do this in a trigger. We assign the NEXTVAL to a variab
> Unless I'm misunderstanding you or a bug was fixed between 7.4.5
> and 7.4.13 (the version I'm running), I'm not convinced that last
> statement is true. EXCLUSIVE conflicts with all lock types except
> ACCESS SHARE; foreign key references prior to 8.1 use SELECT FOR
> UPDATE and in 8.1 they use
On Tue, 25 Jul 2006, Christian Schoenebeck wrote:
> Am Dienstag, 25. Juli 2006 00:01 schrieb Stephan Szabo:
> > The above basically looks like:
> > CASE WHEN THEN ELSE
> > END.
> >
> > In SQL92 at least, the form of which looks like (SELECT
> > ...) is which is limited to 1 column and 1 row.
I have several columns in my database that are timestamps. My developers are asking me how to split the timestamp so that they can look at either the date or at the time portion.I know I can do a select to_date(now(),'-mm-dd') and it will return the date. However, how do I get the time? Also
Chris Hoover wrote:
> I have several columns in my database that are timestamps. My developers
> are asking me how to split the timestamp so that they can look at either the
> date or at the time portion.
>
> I know I can do a select to_date(now(),'-mm-dd') and it will return the
> date. How
am 25.07.2006, um 12:54:35 -0400 mailte Chris Hoover folgendes:
> I have several columns in my database that are timestamps. My developers
> are asking me how to split the timestamp so that they can look at either
> the
> date or at the time portion.
The CAST-Operater is your friend:
est=# sel
I believe you would want to cast the field
to a date like so select datefield::datefrom table1 or select datefield::time from
table1.
From: Chris Hoover
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 25, 2006 11:55
AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Splitting
Am Dienstag, 25. Juli 2006 17:56 schrieben Sie:
> You could use a procedural language like plpgsql.
Ok, using the plpgsql approach I tried this:
CREATE FUNCTION my_function(int4) RETURNS SETOF int8 AS
$BODY$
DECLARE
myrow RECORD;
BEGIN
IF (some_condition) THEN
FOR myrow IN SEL
I'm having trouble figuring out how to use the currval() function for
sequences in an INSERT statement. I did some searching online, but
couldn't find what I was looking for.
I have two Schemas in my Database:
metadata
geometry
I have a table named "metadata_geometries" in the metadata schema.
[EMAIL PROTECTED] wrote:
> Martijn van Oosterhout wrote:
>
>> On Mon, Jul 24, 2006 at 11:43:39AM +0200, Philippe Lang wrote:
>>> The problem seems to come from the return_next, in conjunction with
>>> binary data:
>>>
>>>
>>> return_next
>>> (
>>>
I did make distclean, and I retried "configuration and ", but I still
saw the following errors:
The only other theory I can think of is that the linker is picking up
an old libpq.so from /home/postgresql/lib because of the -rpath switch
... which it should not be doing, but maybe it is an
On Tue, 2006-07-25 at 12:54 -0400, Chris Hoover wrote:
> I know I can do a select to_date(now(),'-mm-dd') and it will
> return the date. However, how do I get the time?
Casting is the better option, but the to_date format spec handles a lot
more than just dates. See:
http://www.postgresql.
[EMAIL PROTECTED] ("Chris Hoover") writes:
> I have several columns in my database that are timestamps. My
> developers are asking me how to split the timestamp so that they can
> look at either the date or at the time portion. I know I can do a
> select to_date(now(),'-mm-dd') and it will re
Philippe Lang wrote:
> Juste one more question: what is the maximum size of a TEXT column in
> PG 8.1.4?
A handful of bytes less than 1 GB.
--
Alvaro Herrerahttp://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
---(e
Tom Lane wrote:
"Roderick A. Anderson" <[EMAIL PROTECTED]> writes:
I've add a new user and as I go though granting various accesses to the
different tables I realized many of those tables have primary keys that
are generated by a sequence.
Do I need to grant access on the sequences and what
Alvaro Herrera wrote:
> Philippe Lang wrote:
>
>> Juste one more question: what is the maximum size of a TEXT column in
>> PG 8.1.4?
>
> A handful of bytes less than 1 GB.
It should be ok then... :)
---
Philippe Lang
Attik System
smime.p7s
Description: S/MIME cryptographic signa
Hi ,Forget about cursors. Singleton queries are also not working.Tried writing the follwoing code but doesn't give me any result. Don't know if i have to do somethin else apart from what i've already done.
include EXEC SQL INCLUDE sqlca;int main (){ EXEC SQL BEGIN DECLARE SECTION;
On Tue, 2006-07-25 at 10:45 -0700, Redefined Horizons wrote:
> I'm having trouble figuring out how to use the currval() function for
> sequences in an INSERT statement. I did some searching online, but
> couldn't find what I was looking for.
>
> I have two Schemas in my Database:
>
> metadata
> g
Hi,
I'm looking to migrate psql db1 to a psql db2 that has a different structure
even though 70% would be the same. I'd need a tool that allows me to map
field to field and then migrate the data from one db to another. Needless to
say that preserving data integrity is very important.
Any goo
Try it out the following way:create table test (var1 int);create sequence s1;select s1.nextval;insert into test values (s1.currval);select * from test;Thanks,Shoaib Mir
EnterpriseDB (www.enterprisedb.com)On 7/25/06, Redefined Horizons <
[EMAIL PROTECTED]> wrote:I'm having trouble figuring out how t
Hello, MC.
Only human can do this. Moreover, if "data integrity is very
important".
Regards
You wrote:
MM> Hi,
MM> I'm looking to migrate psql db1 to a psql db2 that has a different structure
MM> even though 70% would be the same. I'd need a tool that allows me to map
MM> field to field and th
On Jul 25, 2006, at 2:59 PM, MC Moisei wrote:
I'm looking to migrate psql db1 to a psql db2 that has a different
structure even though 70% would be the same. I'd need a tool that
allows me to map field to field and then migrate the data from one
db to another. Needless to say that preservi
>while(1)
>{
>EXEC SQL FETCH IN c_movie INTO :movie_title;
> printf("%s\n",movie_title);
> movie_title = NULL;
>}
>
> free (movie_title);
As a side note, you should free movie_title each time, not just set it
to NULL if you us
On Tue, 2006-07-25 at 13:59 -0500, MC Moisei wrote:
I'm looking to migrate psql db1 to a psql db2 that has a different structure
even though 70% would be the same.
Depending on how much the structure changes (as opposed to more trivial things like column names), you might consider
The main thing is I changed a bunch of date types to timestamp type. Is
there a simple way to change the type on such fields ?
Some fields got renamed and the type changed.
It sounds like doing a copy|template of db1 as db2 and then applying the new
changes as a script that will probably wo
If I am implementing an internal function in PostgreSQL with the C
programming language, can I use one of the C API's to execute a query
from within the function? Is there another way to execute an SQL query
from within an internal function implemented in C?
Thanks,
Scott Huey
-
On Tue, 2006-07-25 at 17:21 -0500, MC Moisei wrote:
The main thing is I changed a bunch of date types to timestamp type. Is
there a simple way to change the type on such fields ?
Yes, and more generally to change the type of a column. See below:
[EMAIL PROTECTED]> create table t
Redefined Horizons wrote:
> If I am implementing an internal function in PostgreSQL with the C
> programming language, can I use one of the C API's to execute a query
> from within the function? Is there another way to execute an SQL query
> from within an internal function implemented in C?
The S
Hi list,
i have a table with a column where the default value is current_timestamp, but
somehow all the tuples (around 8.000.000) have the same timestamp, which is,
honestly speaking, not what i intended to do. So is the current_timestamp
function only executed when the insert statement starts?
am 26.07.2006, um 7:26:09 +0200 mailte Christian Rengstl folgendes:
> Hi list,
>
> i have a table with a column where the default value is
> current_timestamp, but somehow all the tuples (around 8.000.000) have
> the same timestamp, which is, honestly speaking, not what i intended
> to do. So is
40 matches
Mail list logo