[SQL] ERROR: operator does not exist: date ~~ unknown

2009-04-11 Thread Rohit Suman
Hi

I've a table bins in which I've a column named "Date In"  which stores values 
of "Date" type. I've postgresql 8.3.5

Now when I execute query " select * from bins where "Date In" like '%'; "I get 
the folowing error :



SQL error:

ERROR:  operator does not exist: date ~~ unknown
LINE 1: select * from bins where "Date In" like '%';
   ^
HINT:  No operator matches the given name and argument type(s). You might need 
to add explicit type casts.
In statement:
select * from bins where "Date In" like '%';
Please help...I'm stuck for like 3-4 hours now on this X_X

Rohit



  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

Fw: [SQL] ERROR: operator does not exist: date ~~ unknown

2009-04-12 Thread Rohit Suman
Ya...I simply changed column type to text and it worked. :D

I had requirements where I needed such a functionality. There was no way to do 
it any other way...

Thanks man



- Forwarded Message 
From: Pavel Stehule 
To: Rohit Suman 
Cc: pgsql-sql@postgresql.org
Sent: Sunday, 12 April, 2009 1:06:16 PM
Subject: Re: [SQL] ERROR: operator does not exist: date ~~ unknown

Hello

it means - there are not operator LIKE for datatype date. Why do you
do it? Try to look on date_part or extract functions.

Fast solution, bot not optimal, is cast date to text via function
to_char(date, 'mask')

regards
Pavel Stehule


2009/4/12 Rohit Suman :
> Hi
>
> I've a table bins in which I've a column named "Date In"  which stores
> values of "Date" type. I've postgresql 8.3.5
>
> Now when I execute query " select * from bins where "Date In" like '%'; " I
> get the folowing error :
>
>
> SQL error:
>
> ERROR:  operator does not exist: date ~~ unknown
> LINE 1: select * from bins where "Date In" like '%';
>^
> HINT:  No operator matches the given name and argument type(s). You might
> need to add explicit type casts.
>
> In statement:
> select * from bins where "Date In" like '%';
>
> Please help...I'm stuck for like 3-4 hours now on this X_X
>
> Rohit
>
> 
> Add more friends to your messenger and enjoy! Invite them now.



  Get perfect Email ID for your Resume. Grab now 
http://in.promos.yahoo.com/address

Re: [SQL] Re: [GENERAL] Frequently unable connecting to db "server doesn't listen"

2009-04-20 Thread Rohit Suman
I had a quite of similar problem earlier..it was with WAPPSTACK package that I 
had installed. Both the apache server and the postgresql stopped working. So, I 
had to uninstall and install both of them . After a day or two same thing 
happened. Then I scanned my PC using Avast Anti-Virus and there was a virus in 
my pc, so when i deleted all infected files with virus...since then I never had 
such a problem.

So, my advice...do virus scan using avast and remove malwares using 
malwarebytes. This should solve your problem.





From: Scott Marlowe 
To: Net Tree Inc. 
Cc: pgsql-gene...@postgresql.org; pgsql-sql@postgresql.org
Sent: Monday, 20 April, 2009 8:50:35 AM
Subject: [SQL] Re: [GENERAL] Frequently unable connecting to db "server doesn't 
 listen"

On Sun, Apr 19, 2009 at 8:10 PM, Net Tree Inc.  wrote:
>
> If this e-mail address is not intend use for asking questions using e-mail
> suscription, please ignore it.  I could not find any official PostgreSQL
> support forum for me to post ask questions. Appreciated if you could you
> refer me a few good PostgreSQL support forum for me to ask questions.

This is a mailing list, so you're here!  No need to look for web
forums or anything.

> The problem I am having has happened a few times within in a week. I am
> repeatly not able to connect to the db and having "server doesn't listen"
> message without touch anything, it just happen. First time it happen after I
> restarting my computer that has not been restart for almost a month. After
> restarting and trying to connect to DB and it failed, also I notice my
> computer can not be restart nor shutdown under the normal way by click on
> "start menu" and "shutdown or restart". I can only shut it down use the hard
> way by pressing the power button, I don't know why, but its another story.
> Therefore for DB, I only can fix it by uninstall and reinstall PostgreSQL.
> But it happening repeatly.
>
> Any one experience it? or to guide me to where I can find help?

Several possibilities.  What's your max_connections set to?  What does
the postgresql log have to say (if anything) about these failed
connections?  How many postgres processes are running when this
happens?  What OS is this on? Are you using some kind of persistent
php client?  Or some other kind of pooling client that might be using
up all the connections?

Any other info you can give us will help.

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



  Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! 
Edition http://downloads.yahoo.com/in/firefox/