On Fri, Oct 29, 2010 at 3:58 PM, venkat wrote:
> Dear All,
>
> I got the solution... Here is my query
>
> ALTER TABLE DemoTable ALTER gid TYPE INT2;
>
>
>
Are you sure that you have converted here to a SERIAL type?
--
Shoaib Mir
http://shoaibmir.wordpress.com/
nce for the column (set the start of sequence according to
the values you got already in the column)
- Now set this sequence as the default value for that specific column which
you need to ALTER like this:
ALTER TABLE tablename ALTER COLUMN columnname
SET DEFAULT nextval('newsequence&
l.org/docs/8.3/interactive/ddl-constraints.html
CREATE TABLE order_items (
product_no integer REFERENCES products *ON DELETE RESTRICT*,
order_id integer REFERENCES orders *ON DELETE CASCADE*,
quantity integer,
PRIMARY KEY (product_no, order_id)
);
--
Shoaib Mir
http://shoaibmir.wordpress.com/
possible to alert via mail when some
> conditions are true in a database.
>
>
>
>
I guess you might be able to do that by using PLPython, PLPerl or PLTcl and
using the standard functions for doing emails in there.
--
Shoaib Mir
http://shoaibmir.wordpress.com/
to my email as its always better posting it to
the list.
--
Shoaib Mir
http://shoaibmir.wordpress.com/
ase -->
http://www.postgresql.org/docs/8.3/static/sql-copy.html
--
Shoaib Mir
http://shoaibmir.wordpress.com/
Did you try 'select current_schema' ?
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 6/9/07, chester c young <[EMAIL PROTECTED]> wrote:
within a table pl/pgsql trigger, what's the easiest way to see if the
schema for the triggered table is th
If you are on 8.1 you can use double qoutes ( 'C:\\Program Files\\My
program' ) on in 8.2 you can use the new "backslash_quote (string)"
setting.
You can find help on "backslash_quote (string)" at -->
http://www.postgresql.org/docs/current/static/runtime-conf
For that you will need to drop and re-create it with a different encoding
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 3/19/07, Ezequias R. da Rocha <[EMAIL PROTECTED]> wrote:
Hi list,
It is possible to change the Encode of one database while it is on ?
Sincerely
Ez
EXPLAIN ANALYZE does give the query execution time at the end of its output.
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 3/6/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
EXPLAIN ANALYZE Is perfect but i have no idea of how to use it. My
resultset is retrieving m
Did you try EXPLAIN ANALYZE ?
---
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 3/6/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
I preffer that the database give me this information. I don't know if
it is possible becouse if we retrieve many rows and if we want
Where do you see the second table in it?
I guess here:
A = mytable
B = (select field1, field2, count(*) from mytable group by field1, field2
having count(*) > 1)
So that is all around one table that is 'mytable', where A and B are just
the aliases.
--
Shoaib Mir
That has been asked in the past a number of time too, you can look at the
following for details -->
http://archives.postgresql.org/pgsql-novice/2006-06/msg00093.php
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 2/2/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
Hi
Just tried the following way, that might help you:
postgres=# create table testing (a date);
CREATE TABLE
postgres=# insert into testing values (to_date('1963-09-01', '-MM-DD'));
INSERT 0 1
postgres=# select * from testing;
a
1963-09-01
(1 row)
--
Sho
No problemo :)
What was the query and the statement for error? that way we might be able to
help...
-
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 1/31/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
Great. Now the log is working. Thank you, Thank you, Tha
You need to set it like this:
log_destination = 'syslog,stderr'
redirect_stderr = on
and then restart the server. It should show up the log from then onwards
-------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 1/31/07, Ezequias Rodrigues da Rocha <[EMAIL PROT
You need to create the folder manually, give the postgres user permission
for write on it and then restart the database server. This way you should be
able to set the log files in pg_log folder...
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 1/31/07, Ezequias Rodrigues da
Check for log_directory setting in your postgresql.conf file...
-
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 1/31/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
I noticed today morning that my pg.log doesn't exist in my server.
Why it occurs ?
Might be a view and then a rule attached with that can help you out with
doing updates using joins
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 1/17/07, Andrew Sullivan <[EMAIL PROTECTED]> wrote:
On Wed, Jan 17, 2007 at 04:50:18PM +0530, Moiz Kothari wrote:
Run the following:
update pg_class set reltriggers = count(*) from pg_trigger where
pg_class.oid=tgrelid and relname='vm_message';
It should solve the problem
------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 12/28/06, Kashmira Patel (kupatel) <[EMAIL PROT
Oh that explains a lot...
Thank you,
-
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 12/11/06, Michael Glaesemann <[EMAIL PROTECTED]> wrote:
On Dec 11, 2006, at 15:48 , Shoaib Mir wrote:
> create table myt1 (a numeric);
> create table myt2 (b numeric);
>
I just noticed the same behavior in Oracle and SQL Server as well :)
Regards,
-
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 12/11/06, Shoaib Mir <[EMAIL PROTECTED]> wrote:
I just noticed an abnormal behavior for the subquery:
create table myt1 (a numeric);
create table m
ying it on 8.2!
Can someone please comment?
Thank you,
-----
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
Wrong mailing list to ask this :-)
Try out a MS SQL Server one and you will get good help on that...
Regards,
Shoaib
On 12/8/06, sid tow <[EMAIL PROTECTED]> wrote:
Hi all
I dont know if this is the right forum to post this but any way if
you could help me or guide me to an appropriate
I think using the contrib module 'dblink' (http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dblink/) can help you here.Thanks,
-- Shoaib MirEnterpriseDB (www.enterprisedb.com)On 8/15/06, Sumeet Ambre <
[EMAIL PROTECTED]> wrote:Hi All,I have a database which consists of 20 million records an
You can do the following:ALTER TABLE table-name ALTER colum-name TYPE text;Thanks,-- Shoaib MirEnterpriseDB (www.enterprisedb.com)
On 8/8/06, Kumar Dev <[EMAIL PROTECTED]> wrote:
Use Alter table notebook from control center
right click on the table and open alter table notebook
you can drop a colum
26 matches
Mail list logo