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.
Based on the answers here I've decided not to use a different character as a prefix delimiter. I'm going with a double underscore (`__`), which is nicely parsable.

I should have been more clear on why I ultimately wanted this. The various comments I've left here explain it.

Here is an example which is pretty close to what we're probably ending at:

```
CREATE VIEW flat_data AS
SELECT 
    hub.id,
    idx_dly.ror_sd AS idx_dly__ror_sd,
    fx_dly.ror_sd AS fx_dly__ror_sd
FROM 
    hub
JOIN
    index_daily_movement AS idx_dly ON hub.id = idx_dly.hub_id
JOIN
    forex_daily_movement AS fx_dly ON hub.id = fx_dly.hub_id
...

```

In the application layer it is now possible to do things like

```
field_name = ... e.g. 'idx_dly__ror_sd'
table_abr, base_field_name = field_name.split('__')

```