Question: I have an application which logs entries with datetime format. Now I want to push that datetime string into db. So i have the query 

```
db.query "update processing set start_time = STR_TO_DATE('2017053008:04:45', '%Y-%m-%d %H:%i:%s') where dated = '2017-06-07' and zone = 'W13';"

```

I have the datetime format in my log as "2017060708:04:45" and when I run the above query its inputs NULL in the filed start\_time.

Any help in this would be much appreciated. Thanks!

Answer: 
You could use dollar signs. From [the documentation:](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS)

> 
> SQL identifiers and key words must begin with a letter (a-z, but also letters with diacritical marks and non-Latin letters) or an underscore (\_). Subsequent characters in an identifier or key word can be letters, underscores, digits (0-9), or dollar signs ($). Note that dollar signs are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable. 
> 
> 
> 

I do not think it is a good idea. 

I often use *thematic schemas*. Gather objects (tables, views, functions etc) belonging to specific submodels in separate schemas, e.g.:

```
inventory.items
inventory.get_items()
inventory.document_workflows
sale.contractors
sale.local_orders
etc

```

where `inventory` and `sale` are schemas.
Please, dont take this answer as advice for action. I think you are doing things that will make your life more complicated. But yet what you are looking for is doable. To get the list of accepted not quoted chars, I run:

```
t=# create schema s;
CREATE SCHEMA
Time: 0.931 ms
t=# do
$$
declare i record;
begin
for i in 1..255 loop
  begin
  execute format ('create table s.%s(i int)',chr(i)); --I deliberately don't use %I - so it would not add dblquotes for Identifier
  exception when others then NULL;
  end;
end loop;
end;
$$
;
DO
Time: 49.443 ms
t=# select tablename from pg_tables where tablename !~ '[aA-zZ]';

```

this will give you the list of characters accepted. Based on which you can experiment, eg:

```
t=# create table a©b (i int);
CREATE TABLE
Time: 2.920 ms
t=# select * from a©b;
 i
---
(0 rows)

```

or 

```
t=# create table a­-b (i int);
CREATE TABLE
Time: 1.707 ms
t=# select * from a-­b;
 i
---
(0 rows)

```

Mind it is no hyphen (45), it is (173) one:

```
t=# select ascii('­-'),ascii('-');
 ascii | ascii
-------+-------
   173 |    45
(1 row)

```

So any of `÷, ® © ¤ £ ¡¦` and so on would do the trick. But now look at them and think - maybe you should solve different task?..